/*
 * Our Story page. Loaded after /styles.css, which supplies the shared tokens, header and footer.
 * Direction: deep espresso, warm ivory type, champagne hairlines, muted sepia photography.
 */
body.story {
  background: var(--espresso);
  color: #e6dbc7;
}
.story {
  --ivory-text: #f5ebdd;
  --champagne: #d8b978;
  --taupe: #b8aa96;
  --hair: rgba(216, 185, 120, 0.28);
}

/* Active navigation item */
.nav__links a.is-active {
  color: var(--champagne);
  box-shadow: inset 0 -2px 0 var(--champagne);
}
.nav__panel a.is-active {
  color: var(--champagne);
}

/* Shared type */
.s-eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--taupe);
}
.s-eyebrow--gold {
  color: var(--champagne);
}
.s-eyebrow--rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ivory-text);
}
.s-eyebrow--rule::after {
  content: "";
  width: 56px;
  height: 1px;
  background: var(--champagne);
}
.s-h1,
.s-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ivory-text);
  letter-spacing: -0.012em;
}
.s-h1 {
  margin-top: 1.25rem;
  font-size: clamp(2.5rem, 5.2vw, 4.25rem);
  line-height: 1.05;
}
.s-h2 {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 3.4vw, 2.875rem);
  line-height: 1.1;
}
.s-sub {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.375rem, 2.5vw, 2.125rem);
  line-height: 1.25;
  color: var(--champagne);
}
.s-lead {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #e8ddca;
}
.s-rule {
  display: block;
  width: 48px;
  height: 1px;
  margin: 1.5rem 0;
  background: var(--champagne);
}
.s-caps {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--ivory-text);
}
.s-caps--gold {
  color: var(--champagne);
}
.story strong {
  font-weight: 600;
  color: var(--ivory-text);
}

/* Hero */
.s-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(520px, 52vw, 680px);
  overflow: hidden;
  background: var(--espresso);
}
.s-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 78%;
}
.s-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(29, 22, 18, 0.92) 0%, rgba(29, 22, 18, 0.66) 38%, rgba(29, 22, 18, 0.12) 72%),
    linear-gradient(0deg, var(--espresso) 0%, rgba(29, 22, 18, 0) 26%);
}
.s-hero__inner {
  position: relative;
  z-index: 1;
  padding-block: 4rem;
}
.s-hero__loc {
  position: absolute;
  right: max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter)));
  bottom: 2rem;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 235, 221, 0.8);
}

/* Long hairline between the hero and the sections below */
.s-divider {
  height: 1px;
  margin-inline: clamp(1rem, 2vw, 2.25rem);
  background: rgba(216, 185, 120, 0.5);
}

/* Engraved coffee branches sunk into both edges of the story, leverage and trinity sections */
.s-story,
.s-leverage,
.s-trinity {
  position: relative;
  overflow: hidden;
}
.s-story .wrap,
.s-leverage .wrap,
.s-trinity .wrap {
  position: relative;
  z-index: 1;
}
.s-story::before,
.s-story::after,
.s-leverage::before,
.s-leverage::after,
.s-trinity::before,
.s-trinity::after {
  content: "";
  position: absolute;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}
.s-story::before,
.s-story::after,
.s-trinity::before,
.s-trinity::after {
  width: clamp(150px, 17vw, 270px);
  aspect-ratio: 560 / 630;
  background-image: url("/assets/botanical/coffee-branch-champagne-edge.webp");
  opacity: 0.13;
}
.s-leverage::before,
.s-leverage::after {
  width: clamp(190px, 21vw, 330px);
  aspect-ratio: 900 / 567;
  background-image: url("/assets/botanical/coffee-branch-cherries-gold.webp");
  opacity: 0.15;
}
.s-story::before {
  left: -60px;
  bottom: -30px;
}
.s-story::after {
  right: -60px;
  top: -24px;
  transform: scaleX(-1);
}
.s-leverage::before {
  left: -80px;
  top: 8%;
}
.s-leverage::after {
  right: -80px;
  bottom: 6%;
  transform: scaleX(-1);
}
.s-trinity::before {
  left: -60px;
  top: 14%;
}
.s-trinity::after {
  right: -60px;
  bottom: 4%;
  transform: scaleX(-1);
}

/* Editorial story */
.s-story {
  padding-block: clamp(3rem, 6vw, 5rem);
}
.s-story__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.3fr);
  gap: 3rem;
  align-items: center;
}
.s-photo {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 26px 46px -30px rgba(0, 0, 0, 0.8);
}
.s-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 14% 46%;
  filter: sepia(0.55) saturate(0.9) contrast(1.05) brightness(0.9);
}
.s-story__text {
  display: grid;
  gap: 1.5rem;
  max-width: 40rem;
  padding-left: 3rem;
  border-left: 1px solid var(--hair);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #e0d5c1;
}

/* The Phygital value leverage */
.s-leverage {
  padding-block: clamp(3rem, 6vw, 5rem);
  border-block: 1px solid var(--hair);
}
.s-leverage__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.45fr);
  gap: 3.5rem;
  align-items: center;
}
.s-leverage__text p:not(.s-eyebrow) {
  max-width: 30rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #ddd1bc;
}
.s-plot {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  margin: 0;
  border: 1px solid rgba(216, 185, 120, 0.5);
  border-radius: 14px;
  overflow: hidden;
  background: #121812;
  box-shadow: 0 30px 50px -34px rgba(0, 0, 0, 0.85);
}
.s-plot__map {
  position: relative;
  aspect-ratio: 777 / 582;
}
.s-plot__map img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(0.85) contrast(1.08);
}
.s-plot__map::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 50%, rgba(18, 14, 10, 0) 55%, rgba(18, 14, 10, 0.55) 100%);
  pointer-events: none;
}
.s-plot__poly {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.s-plot__poly polygon {
  fill: rgba(227, 197, 133, 0.08);
  stroke: #e3c585;
  stroke-width: 1.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.s-plot__pin {
  position: absolute;
  left: 54.7%;
  top: 55%;
  z-index: 2;
  width: 14px;
  height: 14px;
  margin: -14px 0 0 -7px;
  border-radius: 50% 50% 50% 0;
  background: #f5ebdd;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.s-plot__pin::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #1d1612;
}
.s-plot__data {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-left: 1px solid rgba(216, 185, 120, 0.3);
  background: rgba(21, 17, 14, 0.7);
}
.s-plot__open {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--champagne);
  transition: color 0.3s var(--ease);
}
.s-plot__open:hover {
  color: #fff;
}
.s-plot__label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--taupe);
}
.s-plot__coords {
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--ivory-text);
}
.s-plot__id {
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgba(216, 185, 120, 0.3);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  color: var(--ivory-text);
}
.s-plot__checks {
  display: grid;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: #e6dbc7;
}
.s-plot__checks li {
  position: relative;
  padding-left: 1.5rem;
}
.s-plot__checks li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.4rem;
  width: 0.625rem;
  height: 0.3125rem;
  border-left: 1.6px solid var(--champagne);
  border-bottom: 1.6px solid var(--champagne);
  transform: rotate(-45deg);
}

/* The balanced trinity matrix */
.s-trinity {
  padding-block: clamp(3rem, 5vw, 4.5rem) clamp(3rem, 5vw, 4rem);
}
.s-trinity__head {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
}
.s-trinity__line {
  flex: 1;
  height: 1px;
  background: var(--hair);
}
.s-trinity__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.s-col {
  padding-inline: 2rem;
}
.s-col:first-child {
  padding-left: 0;
}
.s-col:last-child {
  padding-right: 0;
}
.s-col + .s-col {
  border-left: 1px solid var(--hair);
}
.s-col__photo {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
}
.s-col__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: grayscale(0.5) sepia(0.5) contrast(1.05) brightness(0.88);
}
.s-col__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1.125rem;
}
.s-num {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.25rem, 3.6vw, 3rem);
  line-height: 1;
  color: var(--champagne);
}
/* The slash is drawn, not typeset: Playfair's italic slash sinks below the baseline. */
.s-slash {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  margin-left: 0.4em;
  background: var(--champagne);
  transform: skewX(-24deg);
}
.s-col p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: #ddd2bd;
}
/* Body copy: a light weight with a hair of tracking reads finer and calmer than Inter's default 400. */
.s-lead,
.s-story__text,
.s-leverage__text p:not(.s-eyebrow),
.s-col p {
  font-weight: 300;
  letter-spacing: 0.005em;
}

/* Closing emblem */
.s-close {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(320px, 34vw, 420px);
  overflow: hidden;
  background: var(--espresso);
}
.s-close__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.6) grayscale(0.3) brightness(0.6) contrast(1.05);
}
.s-close__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--espresso) 0%, rgba(29, 22, 18, 0.2) 40%, rgba(29, 22, 18, 0.2) 60%, var(--espresso) 100%);
}
.s-close__inner {
  position: relative;
  z-index: 1;
  padding-block: 4rem;
  text-align: center;
}
.s-quote {
  max-width: 21em;
  margin-inline: auto;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.625rem, 3.2vw, 2.625rem);
  line-height: 1.25;
  color: var(--ivory-text);
}
.s-sign {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ivory-text);
}
.s-sign span {
  flex: 0 1 140px;
  height: 1px;
  background: var(--champagne);
  opacity: 0.8;
}

/* Tablet */
@media (max-width: 1100px) {
  .s-leverage__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .s-leverage__text p:not(.s-eyebrow) {
    max-width: 40rem;
  }
}
@media (max-width: 900px) {
  .s-trinity__cols {
    grid-template-columns: 1fr;
  }
  .s-col,
  .s-col:first-child,
  .s-col:last-child {
    padding-inline: 0;
  }
  .s-col + .s-col {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-left: 0;
    border-top: 1px solid var(--hair);
  }
  .s-col__photo img {
    aspect-ratio: 16 / 9;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .s-hero__shade {
    background:
      linear-gradient(90deg, rgba(29, 22, 18, 0.88) 0%, rgba(29, 22, 18, 0.45) 100%),
      linear-gradient(0deg, var(--espresso) 0%, rgba(29, 22, 18, 0) 26%);
  }
  .s-hero__inner {
    padding-block: 3rem 4rem;
  }
  .s-hero__loc {
    left: var(--gutter);
    right: auto;
    bottom: 1.25rem;
  }
  .s-story__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .s-story__text {
    padding-left: 0;
    border-left: 0;
    padding-top: 1.75rem;
    border-top: 1px solid var(--hair);
  }
  .s-plot {
    grid-template-columns: 1fr;
  }
  .s-plot__data {
    border-left: 0;
    border-top: 1px solid rgba(216, 185, 120, 0.3);
  }
  .s-trinity__head {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .s-trinity__line {
    display: none;
  }
  .s-sign {
    letter-spacing: 0.2em;
    gap: 1rem;
  }
  .s-story::before,
  .s-story::after,
  .s-leverage::before,
  .s-leverage::after,
  .s-trinity::before,
  .s-trinity::after {
    opacity: 0.08;
  }
}

/* ---------------------------------------------------------------- photo hover (quiet, slow, pointer devices only)
   A barely-there push-in, the grading easing toward natural colour and a fine champagne frame fading in.
   The satellite map is not zoomed, so the plot boundary never drifts off the land it marks. */
.s-photo,
.s-col__photo {
  position: relative;
}
.s-photo::after,
.s-col__photo::after {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border: 1px solid rgba(216, 185, 120, 0);
  border-radius: 2px;
  pointer-events: none;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .s-photo img,
  .s-col__photo img {
    transition: transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1), filter 1.2s ease;
  }
  .s-photo::after,
  .s-col__photo::after {
    transition: border-color 1.2s ease;
  }
  .s-photo:hover img,
  .s-col__photo:hover img {
    transform: scale(1.035);
  }
  .s-photo:hover img {
    filter: sepia(0.3) saturate(0.95) contrast(1.05) brightness(0.97);
  }
  .s-col__photo:hover img {
    filter: grayscale(0.2) sepia(0.32) contrast(1.05) brightness(0.96);
  }
  .s-photo:hover::after,
  .s-col__photo:hover::after {
    border-color: rgba(216, 185, 120, 0.42);
  }
  .s-plot__map img {
    transition: filter 1.2s ease;
  }
  .s-plot__poly polygon {
    transition: fill 1.2s ease, stroke 1.2s ease;
  }
  .s-plot__map:hover img {
    filter: brightness(0.8) saturate(0.95) contrast(1.06);
  }
  .s-plot__map:hover .s-plot__poly polygon {
    fill: rgba(227, 197, 133, 0.14);
    stroke: #f0d9a2;
  }
}

/* Touch: the same settle, played once as each photo scrolls into view (see /touch-motion.js). */
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .s-photo img,
  .s-col__photo img {
    transition: transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1), filter 1.2s ease;
  }
  .s-photo::after,
  .s-col__photo::after {
    transition: border-color 1.2s ease;
  }
  .s-photo.is-seen img,
  .s-col__photo.is-seen img {
    transform: scale(1.035);
  }
  .s-photo.is-seen img {
    filter: sepia(0.3) saturate(0.95) contrast(1.05) brightness(0.97);
  }
  .s-col__photo.is-seen img {
    filter: grayscale(0.2) sepia(0.32) contrast(1.05) brightness(0.96);
  }
  .s-photo.is-seen::after,
  .s-col__photo.is-seen::after {
    border-color: rgba(216, 185, 120, 0.42);
  }
  .s-plot__map img {
    transition: filter 1.2s ease;
  }
  .s-plot__poly polygon {
    transition: fill 1.2s ease, stroke 1.2s ease;
  }
  .s-plot__map.is-seen img {
    filter: brightness(0.8) saturate(0.95) contrast(1.06);
  }
  .s-plot__map.is-seen .s-plot__poly polygon {
    fill: rgba(227, 197, 133, 0.14);
    stroke: #f0d9a2;
  }
  .s-plot__open:active {
    transform: scale(0.96);
  }
}

/* ---------- copy update: vision section, pull line, trinity intro and lead lines, closing principle ---------- */
.s-story__text .s-pull {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.3;
  color: var(--champagne);
}
.s-story__text .s-eyebrow {
  margin-top: 0.75rem;
}
.s-close {
  min-height: 0;
}
.s-close__shade {
  background: linear-gradient(180deg, var(--espresso) 0%, rgba(29, 22, 18, 0.55) 35%, rgba(29, 22, 18, 0.55) 65%, var(--espresso) 100%);
}
.s-close__inner {
  padding-block: clamp(4rem, 7vw, 6rem);
}
.s-close__inner .s-eyebrow {
  margin-bottom: 1.25rem;
}
.s-close__body {
  max-width: 38rem;
  margin: 1.75rem auto 0;
  display: grid;
  gap: 1rem;
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.8;
  color: #ebe0cd;
}
.s-tagline {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--taupe);
}
