/* ============================================================
   Home page, hero, case study, steps, tiers, pitch
   ============================================================ */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--s-8), 10vw, 140px) clamp(var(--s-9), 10vw, 130px);
  background: var(--paper);
  isolation: isolate;
}

/* Layered warm washes, never a flat block of stone */
.hero__glow {
  position: absolute;
  inset: -25% -10% auto -10%;
  height: 145%;
  z-index: -1;
  background:
    radial-gradient(48% 40% at 12% 4%, rgba(14, 185, 117, 0.1) 0%, transparent 64%),
    radial-gradient(56% 44% at 62% 92%, rgba(231, 226, 216, 0.9) 0%, transparent 74%);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__top {
  display: grid;
  gap: var(--s-8);
  align-items: center;
}
@media (min-width: 1040px) {
  .hero__top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    gap: var(--s-9);
  }
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-light-mid);
  margin-bottom: var(--s-6);
}
.hero__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--jade-600);
  box-shadow: 0 0 0 4px rgba(14, 185, 117, 0.18);
}

.hero h1 {
  max-width: 15ch;
}
.hero__accent {
  display: block;
  color: var(--jade-700);
}

.hero__lede {
  margin-top: var(--s-6);
  max-width: 54ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-7);
}

/* --- Hero device composition ---
   The desktop shot sits flat with a hairline border and a real shadow.
   The overlapping phone is desktop only; below 1040px the single shot
   still puts the proof near the top on a phone. */
.hero__visual {
  display: block;
  margin-top: var(--s-7);
}
@media (min-width: 1040px) {
  .hero__visual {
    margin-top: 0;
  }
}

.hero__stage {
  position: relative;
}
.hero__browser {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--paper-line-strong);
  box-shadow: 0 1px 2px rgba(16, 20, 26, 0.06), 0 14px 36px rgba(16, 20, 26, 0.1),
    0 40px 80px rgba(16, 20, 26, 0.08);
}
.hero__browser img {
  width: 100%;
  height: auto;
  display: block;
}

/* The overlapping phone only earns its place beside the full-width desktop shot */
.hero__phone {
  display: none;
}
@media (min-width: 1040px) {
  .hero__phone {
    display: block;
    position: absolute;
    right: -28px;
    bottom: -44px;
    width: 136px;
    padding: 4px;
    border-radius: 18px;
    background-color: #14181e;
    border: 1px solid rgba(16, 20, 26, 0.3);
    box-shadow: 0 2px 6px rgba(16, 20, 26, 0.16), 0 18px 40px rgba(16, 20, 26, 0.22);
  }
}
.hero__phone img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

/* Sits outside the stage so it clears the phone overhang on desktop */
.hero__caption {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin: var(--s-5) 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--on-light-low);
}
@media (min-width: 1040px) {
  .hero__caption {
    margin-top: 64px;
  }
}
.hero__caption-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--jade-600);
  flex: none;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5) var(--s-4);
  margin: var(--s-8) 0 0;
  padding-top: var(--s-6);
  border-top: 1px solid var(--paper-line);
}
@media (min-width: 760px) {
  .hero__stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .hero__stat {
    padding-inline: var(--s-5);
    border-left: 1px solid var(--paper-line);
  }
  .hero__stat:first-child {
    padding-left: 0;
    border-left: 0;
  }
}
@media (min-width: 1040px) {
  .hero__stats {
    margin-top: var(--s-9);
  }
}
.hero__stat dt {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--on-light-low);
  margin-bottom: var(--s-2);
}
.hero__stat dd {
  margin: 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ---------- Case study ---------- */
.case {
  display: grid;
  gap: var(--s-8);
}
@media (min-width: 1000px) {
  .case {
    grid-template-columns: 1.45fr 1fr;
    gap: var(--s-9);
    align-items: center;
  }
}

.case__shots {
  position: relative;
  padding-bottom: var(--s-8);
}

.case__mobile {
  display: none;
}
@media (min-width: 640px) {
  .case__mobile {
    display: block;
    position: absolute;
    right: -8px;
    bottom: 0;
    width: 148px;
  }
}
@media (min-width: 1000px) {
  .case__mobile {
    right: -34px;
    width: 168px;
  }
}
.phone {
  border-radius: 18px;
  overflow: hidden;
  background: #14181e;
  padding: 4px;
  border: 1px solid rgba(16, 20, 26, 0.3);
  box-shadow: 0 2px 6px rgba(16, 20, 26, 0.16), 0 18px 40px rgba(16, 20, 26, 0.22);
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.case__body h3 {
  margin-bottom: var(--s-4);
}
.case__body > p {
  color: var(--on-light-mid);
  line-height: 1.72;
}

.case__facts {
  list-style: none;
  margin: var(--s-6) 0;
  padding: 0;
}
.case__facts li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: space-between;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--paper-line);
  font-size: 0.93rem;
}
.case__facts strong {
  font-weight: 600;
  color: var(--on-light-hi);
}
.case__facts span {
  color: var(--on-light-mid);
  text-align: right;
}

/* ============================================================
   Layout variants, these exist so the page stops opening every
   section with the same left-aligned block over an empty right half.
   ============================================================ */

/* --- Split section: heading column holds still, list scrolls past it --- */
.split {
  display: grid;
  gap: var(--s-7);
}
@media (min-width: 940px) {
  .split {
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--s-9);
    align-items: start;
  }
  .split__aside {
    position: sticky;
    top: 116px;
  }
}
.split__aside h2 {
  margin-bottom: var(--s-5);
}
.split__aside .lede {
  margin-bottom: var(--s-5);
}

.feats {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-4) var(--s-5);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--paper-line);
}
.feat:first-child {
  padding-top: 0;
  border-top: 0;
}
.feat:last-child {
  padding-bottom: 0;
}
.feat__n {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--jade-700);
  padding-top: 6px;
}
.feat__body h3 {
  margin-bottom: var(--s-3);
}
.feat__body p {
  color: var(--on-light-mid);
  font-size: 0.97rem;
  line-height: 1.72;
  max-width: 54ch;
}

/* --- Two-column section head: kills the empty right half --- */
.section-head--split {
  max-width: none;
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 860px) {
  .section-head--split {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-8);
    align-items: end;
  }
  .section-head--split .lede {
    padding-bottom: 6px;
  }
}

/* --- Process: the numeral carries the section instead of a thin rule --- */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--paper-line);
}
.flow__item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--s-5);
  padding: var(--s-7) 0;
  border-bottom: 1px solid var(--paper-line);
}
@media (min-width: 860px) {
  .flow__item {
    grid-template-columns: minmax(140px, 0.3fr) 0.9fr 1fr;
    gap: var(--s-8);
    align-items: center;
  }
  .flow__body {
    display: contents;
  }
  .flow__body h3 {
    align-self: center;
  }
}
.flow__n {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(3.2rem, 7.5vw, 5.6rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: var(--jade-700);
  opacity: 0.22;
}
.flow__body h3 {
  margin-bottom: var(--s-3);
}
@media (min-width: 860px) {
  .flow__body h3 {
    margin-bottom: 0;
  }
}
.flow__body p {
  color: var(--on-light-mid);
  font-size: 0.97rem;
  line-height: 1.72;
  max-width: 52ch;
}

/* --- Closing statement: one moment of scale on the page --- */
.stmt {
  max-width: 1000px;
}
.section--deep .stmt__lead,
.stmt__lead {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.65rem, 3.6vw, 2.7rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--on-dark-hi);
  margin-bottom: var(--s-8);
  text-wrap: balance;
}
.stmt__cols {
  display: grid;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
}
@media (min-width: 800px) {
  .stmt__cols {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-7);
  }
}
.stmt__cols p {
  color: var(--on-dark-mid);
  line-height: 1.75;
}

/* ============================================================
   Motion
   ============================================================ */

/* --- Hero load sequence: each word, then the copy, then the image.
       CSS keyframes so it runs off the main thread during page load
       and needs no JavaScript. --i is set on each element itself. --- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.4em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero .w {
  display: inline-block;
  animation: rise 0.7s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.hero__rise {
  animation: rise 0.8s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

/* --- Scroll-linked drift: the image eases away as you leave the hero.
       Compositor-side, 5% travel, desktop only, absent where unsupported. --- */
@keyframes hero-drift {
  to {
    transform: translateY(-5%) scale(1.02);
  }
}
@supports (animation-timeline: view()) {
  @media (min-width: 1040px) and (prefers-reduced-motion: no-preference) {
    .hero__visual {
      animation: hero-drift linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
  }
}

/* --- Hairlines draw in with their row. A pseudo-element scaled on X,
       never an animated border. Default is drawn; the .js gate hides it
       until the observer fires, so no-JS pages keep every rule. --- */
.feat,
.flow__item {
  position: relative;
}
.feat {
  border-top: 0;
}
.feat::before,
.flow__item::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--paper-line);
  transform-origin: left;
}
.feat::before {
  top: 0;
}
.feat:first-child::before {
  display: none;
}
.flow__item {
  border-bottom: 0;
}
.flow__item::after {
  bottom: 0;
}
.js .feat::before,
.js .flow__item::after {
  transform: scaleX(0);
  transition: transform 0.8s var(--ease-out);
}
.js .feat.is-in::before,
.js .flow__item.is-in::after {
  transform: scaleX(1);
}

/* --- Stagger: each row waits 60ms on the one before, capped at 300ms --- */
.feats .feat:nth-child(2),
.feats .feat:nth-child(2)::before {
  transition-delay: 60ms;
}
.feats .feat:nth-child(3),
.feats .feat:nth-child(3)::before {
  transition-delay: 120ms;
}
.feats .feat:nth-child(4),
.feats .feat:nth-child(4)::before {
  transition-delay: 180ms;
}
.feats .feat:nth-child(5),
.feats .feat:nth-child(5)::before {
  transition-delay: 240ms;
}
.feats .feat:nth-child(6),
.feats .feat:nth-child(6)::before {
  transition-delay: 300ms;
}
.flow .flow__item:nth-child(2),
.flow .flow__item:nth-child(2)::after {
  transition-delay: 90ms;
}
.flow .flow__item:nth-child(3),
.flow .flow__item:nth-child(3)::after {
  transition-delay: 180ms;
}

/* ---------- Home contact block ---------- */
.homeform {
  display: grid;
  gap: var(--s-7);
}
@media (min-width: 900px) {
  .homeform {
    grid-template-columns: 0.85fr 1.15fr;
    gap: var(--s-9);
    align-items: start;
  }
}
.homeform h2 {
  max-width: 12ch;
}
.homeform .lede {
  max-width: 44ch;
}
.homeform__alt {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--paper-line);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--on-light-low);
  max-width: 40ch;
}
.homeform__alt a {
  color: var(--jade-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.homeform .cform {
  margin-top: 0;
}

/* ---------- Stack row: the tools the build actually runs on ---------- */
.stack {
  display: grid;
  gap: var(--s-5);
  padding-block: var(--s-7);
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
}
@media (min-width: 760px) {
  .stack {
    grid-template-columns: auto repeat(4, 1fr);
    align-items: center;
    gap: var(--s-7);
  }
}
.stack__label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-light-low);
  white-space: nowrap;
}
.stack__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stack__name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--on-light-hi);
}
.stack__role {
  font-size: 0.78rem;
  color: var(--on-light-low);
}

/* ---------- Home FAQ ---------- */
.homefaq {
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 900px) {
  .homefaq {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--s-9);
    align-items: start;
  }
}
.homefaq h2 {
  max-width: 14ch;
}
