/* LAYOUT: uses only the variables from theme.css. Change theme.css, not this file, to restyle the site. */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
}

body {
  /* Forest with a soft light behind the coin, darker towards the edges, for depth */
  background:
    radial-gradient(ellipse 60% 55% at 50% 58%, rgba(47, 122, 74, 0.55) 0%, rgba(47, 122, 74, 0) 70%),
    radial-gradient(ellipse 120% 100% at 50% 50%, rgba(0, 66, 20, 0) 40%, rgba(0, 30, 10, 0.85) 100%),
    var(--color-canvas);
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ---------- Navigation (fixed, forest bar so the yellow logo always sits on dark) ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-xl);
  background: var(--tyura-forest);
  border-bottom: 1px solid var(--color-border);
}

.nav__logo img {
  height: 28px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
  font-size: var(--font-size-sm);
}

.nav__links a {
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--color-accent);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-button);
  background: var(--color-surface);
  color: var(--color-on-surface);
  font-family: var(--font-heading);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-heading);
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.button:hover {
  opacity: 0.85;
}

.button--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* ---------- Sections (full-bleed, ~100vh) ---------- */

.section {
  min-height: 100vh;
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.section > * {
  width: 100%;
  max-width: 1120px;
}

/* Light sections: cream background, forest text */
.section--light {
  background: var(--color-canvas-light);
  color: var(--color-text-light);
}

.section--light .muted {
  color: var(--color-muted-light);
}

.section--light .button {
  background: var(--tyura-forest);
  color: var(--tyura-cream);
}

.section--light .button--outline {
  color: var(--color-text-light);
  border-color: var(--color-border-light);
}

.section--light .credit {
  color: var(--color-muted-light);
}

.credit--brand {
  color: var(--tyura-leaf);
}

/* ---------- Type ---------- */

.heading {
  font-family: var(--font-heading);
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-heading);
  line-height: var(--line-height-heading);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.heading--xl {
  font-size: var(--font-size-xl);
}

.heading--lg {
  font-size: var(--font-size-lg);
}

.muted {
  color: var(--color-muted);
}

/* Captions: small, Figtree SemiBold, yellow on dark */
.eyebrow {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-emphasis);
  color: var(--color-accent);
}

.section--light .eyebrow {
  color: var(--tyura-leaf);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.credit {
  font-size: var(--font-size-caption);
  color: var(--color-muted);
}

/* ---------- Hero ---------- */

/* Hero fills the first screen: centred text at the top, the coin rests below it */
.hero {
  min-height: 100vh;
  justify-content: flex-start;
  padding-top: calc(110px + 3vh);
}

.hero__content {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

/* ---------- Cream sections: the green scene dissolves into cream, then the services, the form and the about section ---------- */

#services {
  /* a clean straight edge: the cream rises over the green with no rounding and no shadow */
  margin-top: -12vh;
  justify-content: flex-start;
  padding-top: 130px;
}

.curtain {
  position: relative;
  z-index: 2;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Elements that rise in as they enter the screen */
.rise {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.rise.is-in {
  opacity: 1;
  transform: none;
}

/* Services: four tall cards to choose from, then email, business name and send */
.services__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  max-width: 760px;
  text-align: center;
}

.services__lead {
  max-width: 520px;
}

.lead {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.choices {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.choice {
  position: relative;
  display: flex;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.choice__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: left;
  padding: var(--space-lg);
  background: var(--color-panel-light);
  border: 1.5px solid transparent;
  border-radius: var(--radius-card);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s ease, background 0.25s ease, box-shadow 0.3s ease;
}

.choice:hover .choice__body {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 66, 20, 0.12);
}

.choice input:focus-visible + .choice__body {
  outline: 2px solid var(--tyura-forest);
  outline-offset: 3px;
}

.choice.is-selected .choice__body {
  background: var(--tyura-forest);
  color: var(--tyura-cream);
  border-color: var(--tyura-forest);
}

.choice__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.choice__num {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.16em;
  color: var(--tyura-leaf);
}

.choice.is-selected .choice__num {
  color: var(--tyura-yellow);
}

.choice__tick {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-light);
  display: grid;
  place-items: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.choice__tick::after {
  content: '';
  width: 6px;
  height: 11px;
  border: solid var(--tyura-forest);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  margin-top: -2px;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.choice.is-selected .choice__tick {
  background: var(--tyura-yellow);
  border-color: var(--tyura-yellow);
}

.choice.is-selected .choice__tick::after {
  transform: rotate(45deg) scale(1);
}

.choice__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-heading);
  line-height: var(--line-height-heading);
  margin-top: var(--space-sm);
}

.choice__tag {
  font-size: var(--font-size-sm);
  color: var(--tyura-leaf);
}

.choice.is-selected .choice__tag {
  color: var(--color-muted);
}

.choice__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
  font-size: var(--font-size-sm);
  line-height: 1.35;
}

.choice.is-selected .choice__list {
  border-top-color: var(--color-border);
}

/* The short form */
.lead__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  scroll-margin-top: 140px;
}

.lead__fields {
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-md);
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.field__label {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tyura-leaf);
}

.field input {
  font: inherit;
  font-size: var(--font-size-body);
  padding: 14px 18px;
  color: var(--color-text-light);
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-card);
}

.field input:focus {
  outline: 2px solid var(--tyura-forest);
  outline-offset: 1px;
}

.lead__submit {
  border: 0;
  cursor: pointer;
  padding: 17px 32px;
}

.lead__status {
  min-height: 1.4em;
  font-size: var(--font-size-sm);
  color: #9a2c1c;
}

.lead__status.is-ok {
  color: var(--tyura-leaf);
}

.lead__book {
  font-size: var(--font-size-sm);
  color: var(--tyura-forest);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* About: calm and simple. Jost for the headline and names, Figtree for everything that is read */
.about__wrap {
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  text-align: left;
}

.about__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 820px;
}

.about__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about__lead {
  font-size: var(--font-size-md);
  line-height: 1.4;
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  line-height: 1.55;
}

.about__people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.person {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  background: var(--color-panel-light);
  border-radius: var(--radius-card);
}

.person__role {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tyura-leaf);
}

.person h3 {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-heading);
  line-height: var(--line-height-heading);
}

.person p {
  color: var(--tyura-leaf);
}

.partners ul {
  list-style: none;
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border-light);
}

.partners li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.partners li strong {
  font-weight: var(--font-weight-emphasis);
}

.partners li span {
  color: var(--tyura-leaf);
  font-size: var(--font-size-sm);
  text-align: right;
}

/* ---------- Footer ---------- */

.footer {
  padding: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: var(--font-size-caption);
}

.footer__links a {
  transition: color 0.2s ease;
}

.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--tyura-leaf);
}

/* ---------- Coin canvas (fixed, behind the content, positioned by the script) ---------- */

#coin-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#coin-canvas.is-ready {
  opacity: 1;
}

/* ---------- Story sections: text on one side, the coin on the other ---------- */

.story {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-2xl) var(--space-xl);
}

.story__text {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.story--left {
  justify-content: flex-start;
}

.story--right {
  justify-content: flex-end;
  text-align: left;
}

.story--center {
  justify-content: center;
  align-items: flex-start;
  padding-top: calc(120px + 6vh);   /* clears the fixed nav */
  text-align: center;
}

.story--center .story__text {
  max-width: 620px;
  align-items: center;
}

.story__line {
  font-size: var(--font-size-body);
  color: var(--color-muted);
}

/* Captions are always caps, headlines always sentence case */
.caption {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.16em;
  color: var(--color-accent);
}

/* The service caption: a short rule, a quiet TYURA, and the service name set large so it is the first thing read */
.caption__brand {
  display: block;
  font-size: var(--font-size-caption);
  color: var(--color-muted);
  margin-bottom: 4px;
}

.caption__brand::before {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: var(--tyura-yellow);
  margin-bottom: var(--space-md);
}

.caption__name {
  display: block;
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: 0.16em;
  line-height: 1.1;
}

/* Text animates in and out with the section */
.reveal-item {
  opacity: 0;
  transform: translateX(var(--from, 0));
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.story--left .reveal-item {
  --from: -28px;
}

.story--right .reveal-item {
  --from: 28px;
}

.story--center .reveal-item {
  --from: 0;
  transform: translateY(24px);
}

.story.is-in .reveal-item {
  opacity: 1;
  transform: none;
}

/* Finale: pinned for one screen, centred like the hero title. The coin's pieces orbit the text, then rebuild small on the right */
.finale {
  position: relative;
  height: 100vh;
  margin-top: -10vh;                    /* the last branch has room to leave before the headline arrives */
}

.finale__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: 0 var(--space-lg) 34vh;      /* text sits well above centre, so the cream edge below it reads as an invitation */
  text-align: center;
}

.finale__title {
  font-family: var(--font-heading);
  font-size: clamp(52px, 8vw, 140px);
  font-weight: var(--font-weight-heading);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--tyura-cream);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
  max-width: 9em;
}

.finale__line {
  max-width: 460px;
  text-shadow: 0 2px 18px rgba(0, 20, 8, 0.85);
  font-size: var(--font-size-body);
  color: var(--color-muted);
}

.finale .reveal-item {
  transform: translateY(24px);
}

.finale.is-in .reveal-item {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav,
  .section,
  .story,
  .footer {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .story {
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
    padding-bottom: 8vh;
  }

  .story--center {
    justify-content: center;
    text-align: center;
  }

  .story--right {
    justify-content: flex-start;
  }

  .story--center .story__text {
    align-items: center;
  }

  .nav__links {
    display: none;
  }

  .choices {
    grid-template-columns: 1fr 1fr;
  }

  .lead__fields {
    grid-template-columns: 1fr;
  }

  .about__cols,
  .about__people {
    grid-template-columns: 1fr;
  }
}

/* ---------- Desk hero: photo background, centred title, coin resting on the desk ---------- */

.desk {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url("assets/scene/desk.jpg") center / cover no-repeat;
  opacity: 1;
}

.coin-shadow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0) 70%);
  opacity: 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  justify-content: flex-start;
  padding-top: calc(100px + 3vh);
}

.hero .heading {
  font-size: clamp(44px, 6.2vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.hero .heading span {
  display: block;
}

.hero__line {
  max-width: 520px;
  color: var(--color-muted);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.scroll-cue {
  position: absolute;
  bottom: 1.5vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--font-size-caption);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ---------- Navigation: transparent over the desk, big brand word, links top-right ---------- */

.nav {
  background: transparent;
  border-bottom: 0;
  padding: 28px 4vw;
  transition: background 0.5s ease, color 0.4s ease;
}

/* the nav's empty space lets clicks through to whatever is beneath; only the brand, links and button respond */
.nav {
  pointer-events: none;
}

.nav a,
.nav button {
  pointer-events: auto;
}

/* No bar: the brand and links sit straight on the scene. Over a cream section the type turns forest,
   and a very soft cream fade keeps content that scrolls underneath from clashing with it */
.nav.on-light {
  background: linear-gradient(180deg, rgba(251, 246, 230, 0.96) 0%, rgba(251, 246, 230, 0.82) 55%, rgba(251, 246, 230, 0) 100%);
  color: var(--tyura-forest);
}

.nav.on-light .nav__brand {
  color: var(--tyura-forest);
}

.nav.on-light .button {
  background: var(--tyura-forest);
  color: var(--tyura-cream);
}

.nav__brand {
  font-family: var(--font-heading);
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: var(--font-weight-heading);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tyura-yellow);
  line-height: 1;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links {
  gap: 34px;
  font-size: var(--font-size-caption);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Language switch: a pill in the outline-button style, as tall as the button beside it.
   A cream thumb slides to the current language (forest over the cream sections) */
.lang {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: var(--font-weight-heading);
  letter-spacing: 0.08em;
  transition: border-color 0.4s ease;
}

.lang::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: 44px;
  border-radius: var(--radius-pill);
  background: var(--tyura-cream);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.4s ease;
}

.lang[data-current="pt"]::before {
  transform: translateX(44px);
}

.lang__opt {
  position: relative;
  width: 44px;
  padding: 11px 0;
  font: inherit;
  line-height: 20px;
  letter-spacing: inherit;
  color: inherit;
  text-align: center;
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  opacity: 0.7;
  transition: color 0.35s ease, opacity 0.2s ease;
}

.lang__opt:hover,
.lang__opt[aria-pressed="true"] {
  opacity: 1;
}

.lang__opt[aria-pressed="true"] {
  color: var(--tyura-forest);
}

.lang__opt:focus-visible {
  outline: 2px solid var(--tyura-yellow);
  outline-offset: 1px;
}

.nav.on-light .lang {
  border-color: var(--color-border-light);
}

.nav.on-light .lang::before {
  background: var(--tyura-forest);
}

.nav.on-light .lang__opt[aria-pressed="true"] {
  color: var(--tyura-cream);
}

.nav.on-light .lang__opt:focus-visible {
  outline-color: var(--tyura-forest);
}

/* the menu button and the phone menu only exist on narrow screens */
.nav__toggle,
.menu {
  display: none;
}

/* Vertical tab on the right edge, like a label on a product page */
.nav__tab {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 11;
  writing-mode: vertical-rl;
  padding: 26px 14px;
  background: var(--tyura-cream);
  color: var(--tyura-forest);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- Hero: big title top-left, frosted glass card on the right ---------- */

.hero {
  display: block;
  position: relative;
  min-height: 100vh;
  padding: 0;
  text-align: left;
}

.hero__eyebrow {
  position: absolute;
  left: 4vw;
  top: 17vh;
}

.hero__title {
  position: absolute;
  left: 3.4vw;
  top: 21vh;
  font-family: var(--font-heading);
  font-size: clamp(60px, 10.5vw, 190px);
  font-weight: var(--font-weight-heading);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--tyura-cream);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
}

.hero__card {
  position: absolute;
  right: 5vw;
  top: 44vh;
  width: min(440px, 34vw);
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  border-radius: 18px;
  border: 1px solid rgba(251, 246, 230, 0.25);
  background: rgba(251, 246, 230, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

.hero__sub {
  font-family: var(--font-heading);
  font-size: clamp(38px, 4.2vw, 62px);
  font-weight: var(--font-weight-heading);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--tyura-cream);
}

.hero__line {
  color: var(--color-muted);
}

.hero__actions {
  margin-top: var(--space-xs);
  justify-content: flex-start;
}

.scroll-cue {
  left: 50%;
  width: auto;
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }

  .nav__tab {
    display: none;
  }

  .hero__eyebrow,
  .hero__title,
  .hero__card {
    position: static;
    width: auto;
  }

  .hero {
    padding: 130px var(--space-lg) 0;
  }

  .hero__title {
    margin-top: var(--space-md);
    font-size: clamp(52px, 15vw, 88px);
  }

  .hero__card {
    margin-top: 48vh;
    background: rgba(251, 246, 230, 0.12);
  }
}

/* ---------- Four branches: one pinned section, text on one side, coin on the other ---------- */

.branches {
  position: relative;
  height: 300vh;                       /* two screens pinned, one to leave */
}

.branches__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.branch-copy {
  position: absolute;
  top: 40%;
  width: min(520px, 34vw);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: left;
  opacity: 0;
  transform: translateY(calc(-50% + 18px));
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
}

.branch-copy--right {
  right: 6vw;
}

.branch-copy--left {
  left: 6vw;
}

.branch-copy.is-active {
  opacity: 1;
  transform: translateY(-50%);
}

.branches__tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7vh;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 44px;
  list-style: none;
}

.branches__tabs li {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-emphasis);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid transparent;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.branches__tabs button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.branches__tabs li:hover:not(.is-active) {
  color: var(--tyura-cream);
}

.branches__tabs button:focus-visible {
  outline: 2px solid var(--tyura-yellow);
  outline-offset: 6px;
}

.branches__tabs li.is-active {
  color: var(--tyura-yellow);
  border-bottom-color: var(--tyura-yellow);
}

/* Scroll sections: the brand display size (Jost Medium), with a little more air */
.story__text .heading,
.branch-copy .heading {
  font-size: var(--font-size-hero);
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.story__text .story__line,
.branch-copy .story__line {
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.4;
  max-width: 20em;
}

@media (max-width: 900px) {
  .branch-copy,
  .branch-copy--left,
  .branch-copy--right {
    left: var(--space-lg);
    right: var(--space-lg);
    width: auto;
    top: auto;
    bottom: 21vh;
    transform: translateY(18px);
  }

  .branch-copy.is-active {
    transform: none;
  }

  .branches__tabs {
    gap: 20px;
    bottom: 5vh;
  }
}

/* ---------- Reduced motion: no coin, text shown in place ---------- */

@media (prefers-reduced-motion: reduce) {
  #coin-canvas {
    display: none;
  }

  .reveal-item,
  .rise {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


@media (max-width: 560px) {
  .choices {
    grid-template-columns: 1fr;
  }
}

/* About: marker highlights and underlines on the phrases that carry the message (leaf green; yellow stays for dark scenes) */
.hl {
  color: inherit;
  background: linear-gradient(transparent 58%, rgba(47, 122, 74, 0.38) 58%, rgba(47, 122, 74, 0.38) 92%, transparent 92%) no-repeat left / 0% 100%;
  transition: background-size 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s;
  padding: 0 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.is-in .hl {
  background-size: 100% 100%;
}

.ul {
  text-decoration: underline;
  text-decoration-color: var(--tyura-leaf);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.about strong {
  font-weight: var(--font-weight-emphasis);
}

@media (prefers-reduced-motion: reduce) {
  .hl {
    background-size: 100% 100%;
    transition: none;
  }
}


/* ---------- iPhone: stable screen height, coin kept clear of the text, compact hero ---------- */

@media (max-width: 900px) {
  #coin-canvas {
    height: 100svh;
  }

  .hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;          /* eyebrow, title and "Ready to scale." share one left edge */
    padding: 104px var(--space-lg) 28px;
  }

  .hero__title {
    margin-top: var(--space-sm);
    font-size: clamp(48px, 14vw, 80px);
  }

  /* "Ready to scale." sits straight on the scene, without the glass box, so the coin keeps the middle of the screen.
     A soft shade under it keeps the type readable on the photo. Everything fades as you scroll away (--leave, set by the last script) */
  .hero__card {
    margin-top: auto;
    padding: 0;
    gap: var(--space-sm);
    border: 0;
    border-radius: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .hero > * {
    opacity: calc(1 - var(--leave, 0));
  }

  /* the title is already near the top, so it goes twice as fast and is gone before it reaches the brand */
  .hero__eyebrow,
  .hero__title {
    opacity: calc(1 - min(1, var(--leave, 0) * 2));
  }

  .hero::after {
    content: "";
    position: fixed;                  /* held at the foot of the screen, so it fades without an edge travelling up */
    left: 0;
    right: 0;
    bottom: 0;
    height: 50svh;
    z-index: -2;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(0, 30, 10, 0.6) 0%, rgba(0, 30, 10, 0.3) 55%, rgba(0, 30, 10, 0) 100%);
    opacity: calc(1 - var(--leave, 0));
  }

  .hero__sub {
    font-size: clamp(30px, 8.6vw, 40px);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  }

  .hero__line {
    max-width: 34ch;
    font-size: 16px;
    line-height: 1.45;
  }

  .hero__actions {
    gap: 10px;
  }

  .hero__actions .button {
    padding: 12px 18px;
  }

  .scroll-cue {
    display: none;
  }

  .branches {
    height: 300svh;
  }

  .branches__stage {
    height: 100svh;
  }

  .finale,
  .finale__stage {
    height: 100svh;
  }

  .branch-copy,
  .branch-copy--left,
  .branch-copy--right {
    bottom: 17svh;
  }

  .branch-copy .heading {
    font-size: clamp(32px, 9vw, 42px);
  }

  .branches__tabs {
    flex-wrap: nowrap;
    gap: 14px;
    bottom: calc(4svh + env(safe-area-inset-bottom));
  }

  .branches__tabs li {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .story {
    min-height: 100svh;
  }

  .story__text .heading {
    font-size: clamp(32px, 9vw, 44px);
  }

  .nav {
    padding: 18px var(--space-lg);
  }

  .nav__brand {
    font-size: 28px;
  }

  /* the nav keeps only the brand and the menu button; links, language and Talk to us move into the menu */
  .nav__right .lang,
  .nav__right .button {
    display: none;
  }

  .nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    margin-right: -10px;              /* the lines line up with the gutter; the tap area stays 44px */
    padding: 0 10px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
  }

  .nav__toggle span {
    display: block;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .nav__toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4.25px) rotate(45deg);
  }

  .nav__toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4.25px) rotate(-45deg);
  }

  .nav__toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
  }

  /* A soft backing once you scroll: a forest fade over the green scenes, a plain cream bar over the cream sections.
     They sit behind the nav's type and fade in and out, so nothing slides under the brand */
  .nav::before,
  .nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .nav::before {
    bottom: -28px;
    background: linear-gradient(180deg, rgba(0, 66, 20, 0.94) 0%, rgba(0, 66, 20, 0.75) 55%, rgba(0, 66, 20, 0) 100%);
  }

  .nav::after {
    bottom: 0;
    background: var(--tyura-cream);
    box-shadow: 0 1px 0 var(--color-border-light);
  }

  .nav.on-light {
    background: none;
  }

  .nav.is-scrolled:not(.on-light)::before,
  .nav.on-light::after {
    opacity: 1;
  }

  /* menu open: the nav reads cream on forest, whatever is beneath */
  .nav.menu-open,
  .nav.on-light.menu-open {
    color: var(--tyura-cream);
  }

  .nav.menu-open .nav__brand {
    color: var(--tyura-yellow);
  }

  .nav.menu-open::before,
  .nav.menu-open::after {
    opacity: 0;
  }

  .menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 9;                       /* under the nav, so the brand and the close button stay on top */
    padding: 120px var(--space-lg) calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--tyura-forest);
    color: var(--tyura-cream);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
  }

  .menu.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
  }

  html.menu-lock,
  html.menu-lock body {
    overflow: hidden;
  }

  /* the items rise in one after another when the menu opens */
  .menu__item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .menu.is-open .menu__item {
    opacity: 1;
    transform: none;
    transition-delay: calc(0.08s + var(--i) * 0.06s);
  }

  .menu__links {
    list-style: none;
    display: flex;
    flex-direction: column;
  }

  .menu__links a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-heading);
    font-size: clamp(36px, 10.5vw, 52px);
    font-weight: var(--font-weight-heading);
    line-height: 1.05;
    letter-spacing: -0.01em;
  }

  .menu__num {
    font-family: var(--font-main);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-emphasis);
    letter-spacing: 0.16em;
    color: var(--tyura-yellow);
  }

  .menu__foot {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
  }

  .menu__social {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-caption);
    color: var(--color-muted);
  }

  .menu__social a:hover,
  .menu__social a:focus-visible {
    color: var(--tyura-yellow);
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .menu,
  .menu__item,
  .nav__toggle span,
  .lang::before {
    transition: none;
  }
}

/* ---------- Phones: the four service cards become a row you swipe, one card and a peek of the next ---------- */

.choices__dots {
  display: none;
}

@media (max-width: 560px) {
  .lead {
    align-self: stretch;
  }

  .choices {
    min-width: 0;                     /* a fieldset is as wide as its content by default; this lets it scroll */
    display: flex;
    gap: 12px;
    margin: 0 calc(-1 * var(--space-lg));
    padding: 6px var(--space-lg) 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--space-lg);
    scrollbar-width: none;
  }

  .choices::-webkit-scrollbar {
    display: none;
  }

  .choice {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }

  /* the cards slide in from the side, one after another */
  .choice.rise {
    transform: translateX(48px);
  }

  .choice.rise.is-in {
    transform: none;
  }

  .choice:hover .choice__body {
    transform: none;
    box-shadow: none;
  }

  .choices__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: calc(-1 * var(--space-xl) + 18px);
  }

  .choices__dots span {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-pill);
    background: var(--color-border-light);
    cursor: pointer;
    transition: width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.3s ease;
  }

  .choices__dots span.is-picked {
    background: var(--tyura-leaf);
  }

  .choices__dots span.is-on {
    width: 22px;
    background: var(--tyura-forest);
  }
}
