/* Homepage sections, top to bottom. Every section reads fully without JS; the .is-pinned states are added by main.js
   only when motion is allowed and the screen is big enough. */
main { position: relative; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 24px) 0 clamp(56px, 8vh, 96px); text-align: center; }
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: clamp(250px, min(30vw, 46vh), 440px); }
.logo-art { width: 100%; height: auto; overflow: visible; }
.hero__flow-start { position: absolute; left: 50%; bottom: clamp(16px, 4vh, 40px); width: 2px; height: 1px; }
.hero__title { margin-top: clamp(24px, 3.5vh, 40px); font-size: var(--fs-display); max-width: 19ch; }
.hero__lede { margin-top: 20px; max-width: 54ch; font-size: var(--fs-lede); color: var(--text-2); line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ---------- Problem → promise ---------- */
.problem { background: var(--surface-1); border-radius: 28px 28px 0 0; box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.9); }
.problem__list { counter-reset: none; }
.problem__row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px clamp(32px, 5vw, 80px); align-items: baseline; padding-block: clamp(26px, 3.4vw, 40px); border-top: 1px solid var(--line); }
.problem__row:last-child { border-bottom: 1px solid var(--line); }
.problem__quote { display: inline; font-family: var(--font-display); font-style: italic; font-size: var(--fs-quote); line-height: 1.12; color: var(--white);
  background: linear-gradient(var(--orange), var(--orange)) 0 60% / 0% 2px no-repeat; transition: background-size 0.9s var(--ease-in-out), opacity 0.6s; }
.problem__note { display: block; margin-top: 10px; font-size: var(--fs-small); color: var(--text-3); }
.problem__name { display: block; font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); color: var(--orange); line-height: 1.1; }
.problem__line { display: block; margin-top: 8px; color: var(--text-2); max-width: 34ch; }
.problem__scan { display: none; }

.problem.is-pinned { padding: 0; height: 320vh; }
.problem.is-pinned .problem__sticky { position: sticky; top: 0; min-height: 100svh; display: flex; align-items: center; padding-block: calc(var(--header-h) + 12px) 40px; }
.problem.is-pinned .sec-head { margin-bottom: clamp(28px, 4vh, 56px); }
.problem.is-pinned .problem__quote { opacity: 0.32; }
.problem.is-pinned .problem__row.is-active .problem__quote { opacity: 1; }
.problem.is-pinned .problem__row.is-done .problem__quote { opacity: 0.5; background-size: 100% 2px; }
.problem.is-pinned .problem__promise { clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease-out); }
.problem.is-pinned .problem__row.is-done .problem__promise { clip-path: inset(0 0 0 0); }
.problem.is-pinned .problem__scan { display: block; position: absolute; left: calc(var(--gutter) + var(--rail) - 14px); right: var(--gutter); top: 0; height: 2px; background: linear-gradient(90deg, var(--orange), rgba(248, 100, 0, 0.15)); transform-origin: 0 50%; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.problem.is-pinned .problem__scan.is-on { opacity: 1; }
@media (max-width: 760px) {
  .problem__row { grid-template-columns: 1fr; }
}

/* ---------- Services ---------- */
.services__row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: 12px clamp(28px, 4vw, 64px); padding-block: clamp(28px, 3vw, 40px); border-top: 1px solid var(--line); }
.services__row:last-child { border-bottom: 1px solid var(--line); }
.services__name { font-size: var(--fs-h3); grid-row: span 2; }
.services__for, .services__result { grid-column: 2; }
.services__for { color: var(--orange); font-size: var(--fs-small); font-weight: 500; }
.services__result { color: var(--text-2); max-width: 52ch; }
.services__more { grid-column: 3; grid-row: 1 / span 2; align-self: center; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; color: var(--white); }
@media (max-width: 760px) {
  .services__row { grid-template-columns: 1fr; }
  .services__name { grid-row: auto; }
  .services__for, .services__result { grid-column: auto; }
  .services__more { grid-column: auto; grid-row: auto; }
}

/* ---------- Work: the live tick ---------- */
.work { padding-bottom: calc(var(--section) * 0.8); }
.work .sec-head { margin-bottom: clamp(32px, 4vw, 56px); }
.live__stage { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: center; }
.live__desk { max-width: 780px; }
.frame__screen[data-live-screen] picture { grid-area: 1 / 1; }
.frame__screen[data-live-screen] { display: grid; }
.live__img--after { position: relative; }
.live__mark { position: absolute; border: 2px solid var(--orange); border-radius: 10px; pointer-events: none; opacity: 1; transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.live__mark--phone { left: 4.6%; top: 62.2%; width: 90.8%; height: 8.6%; }
.live__mark--desk { left: 31.6%; top: 82.6%; width: 54.6%; height: 13.2%; border-radius: 8px; }
.live__steps { margin-top: clamp(24px, 3vw, 40px); display: grid; gap: 14px; counter-reset: step; max-width: 46rem; }
.live__step { position: relative; padding-left: 40px; color: var(--text-2); font-size: var(--fs-lede); line-height: 1.5; counter-increment: step; }
.live__step::before { content: counter(step); position: absolute; left: 0; top: 0.1em; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--orange); color: var(--orange); font-size: var(--fs-tiny); font-weight: 600; }
.live__who { color: var(--white); font-weight: 500; }

/* Pinned: the stage holds still while three steps play */
.live.is-pinned { height: 320vh; }
.live.is-pinned .live__sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; padding-top: var(--header-h); }
.live.is-pinned .live__inner { width: 100%; }
.live.is-pinned .live__img--after { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.live.is-pinned .live__mark { opacity: 0; transform: scale(1.04); }
.live.is-pinned[data-step="1"] .live__phone .live__img--after,
.live.is-pinned[data-step="2"] .live__phone .live__img--after,
.live.is-pinned[data-step="2"] .live__desk .live__img--after { opacity: 1; }
.live.is-pinned[data-step="1"] .live__mark--phone,
.live.is-pinned[data-step="2"] .live__mark--desk { opacity: 1; transform: none; }
.live.is-pinned .live__steps { display: grid; }
.live.is-pinned .live__step { grid-area: 1 / 1; opacity: 0; transform: translateY(12px); transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out); }
.live.is-pinned .live__step.is-active { opacity: 1; transform: none; }
@media (max-width: 700px) {
  .live__stage { grid-template-columns: 1fr; justify-items: start; }
  .live__phone { width: min(250px, 70vw); }
}

/* The other screens */
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 48px); margin-top: clamp(72px, 9vw, 128px); }
.screens__item { display: grid; gap: 14px; align-content: start; }
.screens__item p:not(.tag) { color: var(--text-2); max-width: 34ch; }
.screens__item .frame--phone { width: min(100%, 260px); margin-bottom: 8px; }
.screens__item--wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px clamp(28px, 4vw, 64px); align-items: end; }
.screens__text { display: grid; gap: 12px; padding-bottom: 8px; }
.screens__text p:not(.tag) { font-size: var(--fs-lede); }
@media (max-width: 900px) {
  .screens { grid-template-columns: 1fr; }
  .screens__item--wide { grid-template-columns: 1fr; }
  .screens__item .frame--phone { width: min(100%, 280px); }
}

/* It's Okay Culture */
.also { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(96px, 11vw, 160px); padding-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.also__title { font-size: var(--fs-h2); }
.also__lede { margin-top: 12px; font-family: var(--font-display); font-style: italic; font-size: var(--fs-h3); color: var(--text); line-height: 1.2; }
.also__text p:not(.also__lede) { margin-top: 18px; color: var(--text-2); max-width: 40ch; }
.also__text .link-arrow { margin-top: 26px; }
.also__shots { position: relative; padding-bottom: 14%; }
.also__login { position: absolute; right: -2%; bottom: 0; width: 48%; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85); }
.also__phone { position: absolute; right: -1%; bottom: -4%; width: 25%; padding: 5px; border-radius: 26px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85); }
.also__phone .frame__screen { border-radius: 21px; }
.also + .also { margin-top: clamp(72px, 8vw, 120px); }
@media (max-width: 900px) {
  .also { grid-template-columns: 1fr; }
  .also__shots { padding-bottom: 22%; }
  .also__login { width: 56%; right: 0; }
  .also__phone { width: 30%; right: 0; }
}

/* ---------- How we work ---------- */
.how__track { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px 48px; }
.how__step { position: relative; display: grid; gap: 10px; align-content: start; }
.how__num { font-family: var(--font-display); font-size: clamp(3rem, 4vw, 4.25rem); line-height: 1; color: var(--text-3); transition: color 0.5s var(--ease-out); }
.how__dot { display: none; }
.how__name { font-size: var(--fs-h3); }
.how__text { color: var(--text-2); max-width: 32ch; }

.how.is-pinned { padding: 0; }
.how.is-pinned .how__sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; padding-top: var(--header-h); overflow-x: clip; }
.how.is-pinned .how__sticky > .wrap { width: 100%; }
.how.is-pinned .sec-head { margin-bottom: clamp(36px, 6vh, 72px); }
.how.is-pinned .how__viewport { overflow: visible; clip-path: inset(-100vh -100vw -100vh -14px); } /* the steps slide out on the right, never under the rail */
.how.is-pinned .how__track { display: flex; gap: 0; width: max-content; position: relative; padding-top: 34px; will-change: transform; }
.how.is-pinned .how__track::before,
.how.is-pinned .how__track::after { content: ""; position: absolute; left: 9px; top: 8px; height: 2px; width: calc(100% - 9px - clamp(280px, 26vw, 360px) + 9px); background: var(--line-strong); transform-origin: 0 50%; }
.how.is-pinned .how__track::after { background: var(--orange); transform: scaleX(var(--p, 0)); }
.how.is-pinned .how__step { width: clamp(280px, 26vw, 360px); padding-right: clamp(32px, 4vw, 64px); }
.how.is-pinned .how__dot { display: block; position: absolute; left: 0; top: -34px; width: var(--node); height: var(--node); border-radius: 50%; border: 3px solid var(--orange); background: var(--ground); z-index: 1; }
.how.is-pinned .how__dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--orange); transform: scale(0); transition: transform 0.45s var(--ease-out); }
.how.is-pinned .how__step.is-reached .how__dot::after { transform: scale(1); }
.how.is-pinned .how__step.is-reached .how__num { color: var(--orange); }

/* ---------- Ways to work ---------- */
.ways__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px clamp(32px, 5vw, 80px); }
.ways__item { padding-top: 28px; border-top: 1px solid var(--line-strong); }
.ways__name { font-size: var(--fs-h3); }
.ways__item p { margin-top: 14px; color: var(--text-2); max-width: 42ch; }
@media (max-width: 760px) { .ways__grid { grid-template-columns: 1fr; } }

/* ---------- Why Welwitschia ---------- */
.why { overflow-x: clip; }
.why__leaf { position: absolute; left: 0; top: 0; width: 100%; height: clamp(60px, 9vw, 120px); color: var(--text-3); }
.why__body { display: grid; gap: 28px; max-width: 52rem; }
.why__story { font-size: var(--fs-lede); color: var(--text-2); max-width: 44ch; }
.why__line { font-family: var(--font-display); font-size: var(--fs-quote); line-height: 1.15; color: var(--white); max-width: 26ch; text-wrap: balance; }

/* ---------- Start states for the load sequence (html.motion only; main.js plays them) ---------- */
.motion .logo-art__hide { display: inline; }
.motion [data-stem] { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion [data-ring] { opacity: 0; } /* main.js grows each ring's radius from 0 as its stem arrives */
.motion [data-hero-in] { opacity: 0; transform: translateY(16px); }
