/* ══ Home hero — bottom row ══════════════════════════════════════════
 * Three columns under the gradient window, divided by hairlines: the
 * headline, the sentence with the two actions, and the three steps.
 * Every size is a multiple of --sc-text, so the row rescales with the
 * Showcase breakpoints in site.css. */

.hb-label {
  font-size: calc(var(--sc-text) * 0.62);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--dim);
}

/* ── Bottom row: headline │ sentence + actions │ steps ─────────── */
.sc-bottom.hb-d {
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.85fr);
  align-items: stretch;
  gap: 0;
  border-top: 1px solid var(--line-2);
  padding-top: calc(var(--sc-card-gap) * 1.4);
}
.hb-d > * { padding: 0 calc(var(--sc-card-gap) * 1.6); }
.hb-d > * + * { border-left: 1px solid var(--line-2); }
.hb-d > :first-child { padding-left: 0; }
.hb-d > :last-child { padding-right: 0; }
.hb-d-head {
  font-size: calc(var(--sc-text) * 3.4);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.hb-d-mid { display: flex; flex-direction: column; justify-content: space-between; gap: calc(var(--sc-text) * 1.2); }
.hb-d-mid .sc-para { max-width: 26em; color: rgba(242, 242, 242, 0.82); }
.hb-d-mid .sc-btn { width: auto; flex: 1 1 0; }
.hb-d-steps { display: flex; flex-direction: column; justify-content: space-between; gap: calc(var(--sc-text) * 0.9); }
.hb-d-steps ol { display: grid; }
.hb-d-steps li {
  display: flex;
  align-items: baseline;
  gap: 1em;
  padding: 0.55em 0;
  border-bottom: 1px solid var(--line);
  line-height: 1;
  transition: padding 0.6s var(--ease-out), color 0.3s;
}
.hb-d-steps li span { width: 1.6em; font-size: 0.72em; color: var(--dim); }
.hb-d-steps li i { margin-left: auto; font-style: normal; color: var(--dim); transition: transform 0.6s var(--ease-spring); }
@media (hover: hover) and (pointer: fine) { .hb-d-steps li:hover { padding-left: 0.4em; color: #fff; } }
@media (hover: hover) and (pointer: fine) { .hb-d-steps li:hover i { transform: translateX(4px); color: var(--warm); } }

/* the in-window headline + actions exist for phones and tablets only */
.hb-m { display: none; }

/* ══ Phones and tablets: one cinematic first screen ══════════════════
 * The window becomes the whole first screen: NOÉSO large in the middle,
 * the headline and both actions over the gradient's dark bottom. The
 * desktop headline and buttons step aside; the sentence and the three
 * steps follow below the fold. */
@media (max-width: 1024px) {
  .lk-stage--hero .sc-plate {
    flex: none;
    height: calc(100svh - var(--sc-pad) * 2 - var(--sc-gap) - 38px);
    min-height: 520px;
    max-height: 980px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    padding: clamp(20px, 4vw, 36px);
  }
  .lk-stage--hero .sc-plate > [data-rise="1"] {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8%;
  }
  .lk-stage--hero .sc-wordmark {
    --wm-gap: 0.14;
    font-size: min(18.5vw, 170px);
  }

  .hb-m { display: grid; gap: clamp(18px, 3vw, 28px); position: relative; z-index: 2; }
  .hb-m-head {
    font-size: clamp(42px, 11.5vw, 92px);
    font-weight: 500;
    line-height: 0.94;
    letter-spacing: -0.045em;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.25);
  }
  .hb-m-cta { display: flex; gap: 10px; }
  .hb-m-cta .sc-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 17px 10px;
    font-size: 16px;
  }
  /* the second action is glass, so the gradient shows through it */
  .hb-btn-glass {
    color: var(--sc-ink);
    background: rgba(12, 12, 12, 0.28);
    box-shadow: inset 0 0 0 1px rgba(242, 242, 242, 0.32);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
  }
  @media (hover: hover) and (pointer: fine) { .hb-btn-glass:hover { background: rgba(12, 12, 12, 0.45); } }

  /* below the fold: the sentence large, then the steps */
  .hb-d-head, .hb-d-mid .sc-cta { display: none; }
  .sc-bottom.hb-d {
    grid-template-columns: 1fr;
    row-gap: clamp(28px, 5vw, 44px);
    border-top: 0;
    padding: clamp(24px, 5vw, 48px) 0 clamp(8px, 2vw, 16px);
  }
  .hb-d > * { padding: 0 !important; border-left: 0 !important; }
  .hb-d-mid .sc-para {
    max-width: 24em;
    font-size: clamp(22px, 5.6vw, 34px);
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: var(--sc-ink);
  }
  .hb-d-steps { font-size: clamp(17px, 4.2vw, 22px); }
  .hb-d-steps .hb-label { font-size: 12px; }
  .hb-d-steps li { padding: 0.8em 0; }
}

/* landscape phones: no room for a full-screen window */
@media (max-width: 1024px) and (max-height: 500px) {
  .lk-stage--hero .sc-plate { height: auto; min-height: 420px; }
}

/* ══ Phones and tablets: full bleed ══════════════════════════════════
 * The gradient runs edge to edge under a floating nav — no frame, no
 * margins — with a soft dark fade so the nav reads over the light top,
 * and a vertical SCROLL rail on the right edge. */
.sc-cue { display: none; }

@media (max-width: 1024px) {
  .lk-stage--hero .sc { padding: 0; gap: 0; }
  .lk-stage--hero .sc-nav {
    position: absolute; z-index: 4; left: var(--sc-pad); right: var(--sc-pad);
    top: calc(var(--sc-pad) + env(safe-area-inset-top));
  }
  .lk-stage--hero .sc-menu-btn,
  .lk-stage--hero .sc-nav-cta {
    background: rgba(12, 12, 12, 0.3);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    color: var(--sc-ink);
  }
  /* The gradient runs to the LARGE viewport height — the screen with the
     browser's toolbars collapsed — so it reaches behind Safari's and
     Chrome's bars instead of ending where they start. The type keeps to
     the SMALL viewport: the extra (100lvh - 100svh) goes into the bottom
     padding, so the headline and buttons never sit under a toolbar. */
  .lk-stage--hero .sc-plate {
    height: 100svh; max-height: none; border-radius: 0;
    padding: calc(var(--sc-pad) * 1.4);
    padding-bottom: calc(var(--sc-pad) * 1.6 + env(safe-area-inset-bottom));
  }
  @supports (height: 100lvh) {
    /* + the home-indicator strip and a margin: Safari's floating toolbar
       leaves that strip outside 100lvh, and the next section showed through
       it. The same amount goes into the padding, so the type does not move. */
    .lk-stage--hero .sc-plate {
      --bleed: calc(env(safe-area-inset-bottom) + 48px);
      height: calc(100lvh + var(--bleed));
      padding-bottom: calc(var(--sc-pad) * 1.6 + env(safe-area-inset-bottom) + (100lvh - 100svh) + var(--bleed));
    }
    .lk-stage--hero .sc-rail { top: calc(58svh); }
  }
  .lk-stage--hero .sc-plate::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 160px; z-index: 1; pointer-events: none;
    background: linear-gradient(180deg, rgba(10, 9, 8, 0.55), rgba(10, 9, 8, 0));
  }
  .sc-bottom.hb-d { padding-left: var(--sc-pad); padding-right: var(--sc-pad); }

  /* the scroll rail: SCROLL set vertically over a line with light running down it */
  .sc-rail {
    position: absolute; z-index: 3;
    right: calc(var(--sc-pad) * 1.4); top: 58%;
    display: grid; justify-items: center; gap: 12px;
    font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
    color: rgba(242, 242, 242, 0.8);
  }
  .sc-rail span { writing-mode: vertical-rl; }
  .sc-rail i {
    display: block; width: 1px; height: 56px; position: relative; overflow: hidden;
    background: rgba(242, 242, 242, 0.25);
  }
  .sc-rail i::after {
    content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
    background: var(--sc-ink);
    animation: scroll-cue 1.8s cubic-bezier(0.6, 0, 0.3, 1) infinite;
  }
}
@keyframes scroll-cue { to { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .sc-rail i::after { animation: none; top: 30%; } }

/* ── Status-bar tint (phones) ────────────────────────────────────────
 * Safari colours the strip around the clock from what is fixed at the top
 * of the page. This sliver carries the gradient's top colour while the hero
 * is on screen and the page colour after it (site.js toggles .past-hero). */
.top-tint { display: none; }
@media (max-width: 1024px) {
  .top-tint {
    display: block;
    position: fixed; z-index: 100; left: 0; right: 0; top: 0;
    height: max(1px, env(safe-area-inset-top));
    background: #6b5c52;
    pointer-events: none;
    transition: background-color 0.4s ease;
  }
  html.past-hero .top-tint { background: var(--sc-page); }
}

/* ══ Phones and tablets: scroll effects ═════════════════════════════
 * Scroll-driven CSS animations: they run on the compositor, tied to the
 * scroll position, so they stay smooth on a phone. Browsers without
 * support keep the plain reveals from site.css. Desktop is untouched. */
@media (max-width: 1024px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* 1 · hero exit: type drifts up and fades, the gradient dims */
    .lk-stage--hero .hb-m {
      animation: m-hero-out linear both;
      animation-timeline: scroll(root);
      animation-range: 0 60svh;
    }
    .lk-stage--hero .sc-rail {
      animation: m-fade-out linear both;
      animation-timeline: scroll(root);
      animation-range: 0 18svh;
    }
    .lk-stage--hero .sc-plate::after {
      content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
      background: #0a0908; opacity: 0;
      animation: m-dim linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100svh;
    }

    /* 3 · steps slide in one after another */
    .hb-d-steps li {
      animation: m-step-in linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 90%;
    }

    /* 4 · section titles rise out of a mask */
    .sec-head .h-display, .cta-title {
      animation: m-title-rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 75%;
    }

    /* 5 · project cards zoom open; the picture moves slower than the page */
    .work-card .media {
      animation: m-card-zoom linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
    .work-card .media-inner {
      animation: m-parallax linear both;
      animation-timeline: view();
      animation-range: cover;
    }

    /* 6 · service words slide in from the side */
    .svc-t {
      animation: m-slide-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }

    /* 7 · the closing window grows open */
    .cta-plate {
      animation: m-cta-open linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
  }
}
@keyframes m-hero-out { to { transform: translate3d(0, -64px, 0); opacity: 0; } }
@keyframes m-fade-out { to { opacity: 0; } }
@keyframes m-dim { to { opacity: 0.55; } }
@keyframes m-step-in { from { opacity: 0; transform: translate3d(32px, 0, 0); } }
@keyframes m-title-rise {
  from { opacity: 0; transform: translate3d(0, 38%, 0); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 -10% 0); }
}
@keyframes m-card-zoom { from { transform: scale(0.86); opacity: 0.35; } }
@keyframes m-parallax {
  from { transform: translate3d(0, -9%, 0) scale(1.18); }
  to { transform: translate3d(0, 9%, 0) scale(1.18); }
}
@keyframes m-slide-in { from { transform: translate3d(22%, 0, 0); opacity: 0.15; } }
@keyframes m-cta-open { from { transform: scale(0.84); } }
