/* ============================================================
   SnowEdge — section layouts
   ============================================================ */

/* ─────────── HERO ─────────── */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: flex;
  align-items: flex-end;
  padding-block: calc(var(--nav-h) + 3rem) clamp(3.5rem, 2rem + 5vw, 7rem);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% center;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--ink) 2%, rgba(8, 13, 24, .82) 26%, rgba(8, 13, 24, .28) 58%, rgba(8, 13, 24, .55) 100%),
    linear-gradient(to right, rgba(8, 13, 24, .88) 0%, rgba(8, 13, 24, .35) 48%, transparent 72%);
}
.hero__body { position: relative; z-index: 1; }
.hero__title { max-width: 16ch; margin-bottom: var(--s-5); }
.hero__lede {
  font-size: var(--t-lede);
  color: var(--mist);
  max-width: 50ch;
  margin-bottom: var(--s-6);
}
.hero__actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-6); }
.hero__note {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: var(--t-small);
  color: var(--mist);
  max-width: 52ch;
}

/* ─────────── PRODUCT: SPLIT MEDIA ─────────── */
.split-media {
  display: grid;
  gap: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 1.8rem + 2vw, 4rem);
}
@media (min-width: 940px) { .split-media { grid-template-columns: 1.1fr .9fr; } }

.split-media__lede { color: var(--mist); margin-top: var(--s-3); max-width: 54ch; }

.senses { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.sense {
  display: grid;
  gap: .3rem;
  padding-left: var(--s-5);
  border-left: 2px solid var(--ice);
}
.sense__label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ice);
}
.sense__body { font-size: var(--t-small); color: var(--mist); line-height: 1.62; }

/* ─────────── STAGED SHOWCASES ───────────
   App screens are presented on a lit stage in a device bezel, with cropped UI
   cards floating off the edges. A bare screenshot on a flat background reads as
   documentation; this reads as a product. The floats carry real content, so
   below the cluster breakpoint they fall back into normal flow rather than
   being hidden. */

.stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  isolation: isolate;
}
.stage::before {
  content: "";
  position: absolute;
  inset: -6% -10% 4%;
  z-index: -1;
  background:
    radial-gradient(58% 46% at 50% 34%, rgba(79, 200, 245, .17), transparent 70%),
    radial-gradient(42% 34% at 76% 78%, rgba(255, 122, 26, .10), transparent 72%);
  filter: blur(6px);
  pointer-events: none;
}
.stage__caption {
  font-size: var(--t-small);
  color: var(--dim);
  line-height: 1.58;
  max-width: 34ch;
  text-align: center;
}

/* Phone bezel. The screenshots already include the status bar and dynamic
   island, so the frame only needs to supply the body and its edge highlight. */
.device {
  position: relative;
  padding: 9px;
  border-radius: 40px;
  background: linear-gradient(158deg, #33405e 0%, #141d2f 42%, #0a1120 100%);
  box-shadow:
    0 44px 90px -34px rgba(0, 0, 0, .95),
    0 6px 20px -8px rgba(0, 0, 0, .7),
    inset 0 1px 0 rgba(255, 255, 255, .16);
  width: min(100%, 306px);
}
.device img { display: block; width: 100%; border-radius: 32px; background: var(--void); }

/* A cropped UI card presented as the main object, when there is no phone. */
.panel { margin: 0; width: min(100%, 386px); }
.panel img {
  display: block; width: 100%;
  border-radius: 22px;
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, .92),
    inset 0 1px 0 rgba(255, 255, 255, .1);
}

/* Floating detail cards. */
.float { margin: 0; }
.float img {
  display: block; width: 100%;
  border-radius: 16px;
  box-shadow: 0 26px 54px -20px rgba(0, 0, 0, .92);
}

/* Accents are sized and offset so they overlap the main image by roughly a
   quarter of their own width. Any more and they stop being accents and start
   hiding the screen they are meant to be annotating. */
@media (min-width: 900px) {
  .float { position: absolute; width: 43%; z-index: 2; }
  .float--wide { width: 51%; }
  .float--tl { top: -6%;   left: -12%;  transform: rotate(-1.4deg); }
  .float--tr { top: -6%;   right: -12%; transform: rotate(1.4deg); }
  .float--bl { bottom: 2%; left: -14%;  transform: rotate(1deg); }
  .float--br { bottom: 2%; right: -12%; transform: rotate(-1deg); }
}

.showcase {
  display: grid;
  gap: clamp(2.2rem, 1.4rem + 3vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
  border-top: 1px solid var(--line);
}
.showcase:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
  .showcase { grid-template-columns: 1fr 1fr; }
  .showcase--flip > :first-child { order: 2; }
}
.showcase__text { max-width: 52ch; }
.showcase__text h3 {
  font-size: clamp(1.35rem, 1.1rem + .9vw, 1.95rem);
  margin-bottom: var(--s-4);
}
.showcase__text p { color: var(--mist); }

/* ─────────── TECHNOLOGY ─────────── */
.tech-grid { display: grid; gap: var(--s-4); }
@media (min-width: 880px) { .tech-grid { grid-template-columns: repeat(3, 1fr); } }
.card--tech { border-top: 2px solid var(--ice); }

.techdemo {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-top: clamp(2.5rem, 1.8rem + 2vw, 4rem);
  border-top: 1px solid var(--line);
  display: grid;
  gap: clamp(2rem, 1.4rem + 3vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) { .techdemo { grid-template-columns: 1fr 1.15fr; } }
.techdemo__title { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); margin-bottom: var(--s-4); }
.techdemo__lede { color: var(--mist); }

/* ─────────── EDGE DEMO ─────────── */
.edge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(1.2rem, .9rem + 1.4vw, 2rem);
  display: grid;
  gap: var(--s-5);
}
.edge__stage {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--void);
  border: 1px solid var(--line);
}
.edge__svg { width: 100%; height: auto; display: block; }

.edge__control { display: grid; gap: .6rem; }
.edge__label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ice) var(--fill, 13%), var(--surface-3) var(--fill, 13%));
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--snow);
  border: 4px solid var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .6);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--snow);
  border: 4px solid var(--ink);
  cursor: grab;
}
input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }

/* ─────────── FAQ ─────────── */
.faq { display: grid; gap: var(--s-2); }
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .25s var(--ease);
}
.faq__item[open] { border-color: var(--line-strong); }
.faq__item summary {
  cursor: pointer;
  padding: 1.05rem 1.3rem;
  font-weight: 560;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 1.6px solid var(--dim);
  border-bottom: 1.6px solid var(--dim);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .3s var(--ease);
  flex-shrink: 0;
}
.faq__item[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq__body { padding: 0 1.3rem 1.25rem; }
.faq__body p { color: var(--mist); font-size: var(--t-small); line-height: 1.7; max-width: 66ch; }

/* ─────────── DEMO ─────────── */
.section--demo {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(79, 200, 245, .09), transparent 60%),
    var(--surface);
  border-top: 1px solid var(--line);
}

/* ─────────── FOOTER ─────────── */
.footer { background: var(--void); border-top: 1px solid var(--line); padding-top: var(--s-8); }
.footer__inner {
  display: grid;
  gap: var(--s-6);
  padding-bottom: var(--s-7);
}
@media (min-width: 780px) { .footer__inner { grid-template-columns: 1.4fr 1fr; } }
.footer__brand { display: grid; gap: .4rem; align-content: start; }
.footer__lockup { display: flex; align-items: center; gap: .6rem; margin-bottom: var(--s-2); }
.footer__lockup .brand__mark { height: 30px; }
.footer__lockup .brand__wordmark { width: 148px; }
.footer__line { color: var(--mist); font-size: var(--t-small); max-width: 44ch; margin-top: var(--s-2); }
.footer__team { color: var(--dim); font-size: var(--t-micro); max-width: 48ch; margin-top: var(--s-3); line-height: 1.6; }
.footer__nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem var(--s-4);
  align-content: start;
  font-size: var(--t-small);
  color: var(--mist);
}
.footer__nav a:hover { color: var(--snow); }

.footer__base {
  border-top: 1px solid var(--line);
  padding-block: var(--s-5);
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  font-size: var(--t-micro);
  color: var(--dim);
}
.footer__status { color: var(--mist); }

/* ─────────── FULL-BLEED BAND ───────────
   A photograph that carries a section on its own. The supplied posters have
   their headlines baked in, but this site is bilingual — baked English would
   stay English in 中文 — so each poster is cropped below its headline and the
   copy is set in HTML over it. */
.band {
  position: relative;
  min-height: clamp(420px, 62vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-block: clamp(2.5rem, 2rem + 4vw, 5rem);
}
.band__media {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 34% center;
}
.band__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--ink) 3%, rgba(8, 13, 24, .72) 34%, rgba(8, 13, 24, .10) 70%),
    linear-gradient(to right, rgba(8, 13, 24, .82) 0%, rgba(8, 13, 24, .22) 52%, transparent 78%);
}
.band__body { position: relative; z-index: 1; }
.band__title {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.4rem);
  max-width: 18ch;
  margin-bottom: var(--s-4);
}
.band__lede {
  font-size: var(--t-lede);
  color: var(--mist);
  max-width: 52ch;
}
@media (min-width: 900px) { .band__media { object-position: 42% center; } }

/* ─────────── LIGHT SECTION + HARDWARE GALLERY ───────────
   The studio renders are white-on-white. Dropping them into the dark page
   would put five bright rectangles on it; giving the device its own light
   ground matches the product's own finish and gives the page a contrast beat
   between two dark stretches. */
.section--light {
  background: linear-gradient(180deg, #f3f5f8 0%, #e9edf2 100%);
  color: #0d1420;
}
.section--light .section__title { color: #0d1420; }
.section--light .section__lede { color: #46536a; }
.eyebrow--dark { color: #1E92C7; }

.gallery {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 860px) { .gallery { grid-template-columns: repeat(4, 1fr); } }

.gallery__item {
  margin: 0;
  background: #fff;
  border: 1px solid rgba(13, 20, 32, .07);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  display: grid;
  gap: var(--s-3);
  grid-template-rows: clamp(180px, 48vw, 220px) auto;
  align-content: start;
  box-shadow: 0 18px 40px -28px rgba(13, 20, 32, .5);
}
.gallery__item img {
  width: 100%;
  height: clamp(180px, 48vw, 220px);
  object-fit: contain;
  mix-blend-mode: multiply;   /* drops the render's own white sweep into the card */
}
.gallery__item figcaption {
  font-size: var(--t-small);
  color: #46536a;
  text-align: center;
  line-height: 1.5;
}
/* ─────────── STACKED SHOWCASE ───────────
   Replaces absolutely-positioned floats on stages that mix aspect ratios.
   Percentage-sized floats worked while every accent was a short landscape
   crop; once a near-square panel and a full portrait screenshot entered the
   same stage, the accents grew larger than the thing they annotated and
   covered it. A stack overlaps by a small fixed amount and cannot occlude
   whatever its contents turn out to be. */
.stage--stack {
  display: grid;
  justify-items: center;
  gap: 0;
  width: 100%;
}
.stack__main { margin: 0; width: min(100%, 420px); }
.stack__main img {
  display: block; width: 100%;
  border-radius: 20px;
  box-shadow: 0 34px 70px -28px rgba(0, 0, 0, .9);
}
.stack__card { margin: 0; width: min(86%, 360px); position: relative; z-index: 2; }
.stack__card img {
  display: block; width: 100%;
  border-radius: 14px;
  box-shadow: 0 22px 46px -18px rgba(0, 0, 0, .92);
}
.stack__card--sm { width: min(72%, 300px); }
.stack__main + .stack__card,
.device + .stack__card,
.stack__card + .stack__card { margin-top: -16px; }
@media (min-width: 640px) {
  .stack__card--right { justify-self: end; transform: translateX(5%) rotate(1deg); }
  .stack__card--left  { justify-self: start; transform: translateX(-5%) rotate(-1deg); }
}

@media (min-width: 900px) {
  .stage--compare {
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 1fr;
    min-height: 630px;
    align-items: start;
  }
  .stage--compare .stack__main {
    grid-area: 1 / 1;
    grid-column: 1 / 10;
    justify-self: start;
  }
  .stage--compare .stack__card--right {
    grid-area: 1 / 1;
    grid-column: 5 / 13;
    align-self: end;
    justify-self: end;
    transform: translateY(-42px) rotate(1deg);
  }
  .stage--compare .stack__card--left {
    grid-area: 1 / 1;
    grid-column: 1 / 8;
    align-self: end;
    justify-self: start;
    transform: translateY(-2px) rotate(-1deg);
  }
  .stage--compare .stack__main + .stack__card,
  .stage--compare .stack__card + .stack__card,
  .stage--skill .device + .stack__card { margin-top: 0; }

  .stage--skill {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    min-height: 680px;
    align-items: start;
  }
  .stage--skill .device,
  .stage--skill .stack__card {
    grid-area: 1 / 1;
  }
  .stage--skill .stack__card {
    align-self: end;
    justify-self: start;
    transform: translate(-8%, -26px) rotate(-1deg);
  }
}
