/* Each surface catches the light differently within the existing palette. */
:is(.pillar-card, .engine-card) .card-core {
  background:
    radial-gradient(ellipse at var(--light-x, 12%) var(--light-y, 8%), var(--light-color, rgba(117,240,220,.13)), transparent 78%),
    linear-gradient(var(--light-angle, 155deg), rgba(255,255,255,.055), transparent 65%),
    var(--core);
}
.pillar-card:nth-child(2) { --light-x: 96%; --light-y: 2%; --light-color: rgba(196,177,255,.17); --light-angle: 225deg; }
.pillar-card:nth-child(3) { --light-x: 80%; --light-y: 100%; --light-color: rgba(144,181,205,.16); --light-angle: 30deg; }
.pillar-card:nth-child(4) { --light-x: 0%; --light-y: 75%; --light-color: rgba(186,194,159,.13); --light-angle: 65deg; }
.engine-card:nth-child(1) { --light-x: 5%; --light-y: 0%; --light-color: rgba(145,183,200,.16); --light-angle: 145deg; }
.engine-card:nth-child(2) { --light-x: 90%; --light-y: 10%; --light-color: rgba(196,177,255,.17); --light-angle: 235deg; }
.engine-card:nth-child(3) { --light-x: 25%; --light-y: 100%; --light-color: rgba(117,240,220,.12); --light-angle: 25deg; }
/* Keep the approved desktop crop from enlarging on wider displays. */
.thermal-detail { margin: 0; min-width: 0; width: 100%; max-width: 424px; justify-self: center; }
.thermal-detail-photo { position: relative; height: clamp(280px, 32vw, 374px); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 14%, #000 78%, transparent); mask-composite: intersect; }
/* Same crop as scale(3) around 87.5% 17%, sized before rasterization instead. */
.thermal-detail-photo img { position: absolute; left: -175%; top: -34%; width: 300%; height: 300%; max-width: none; object-fit: cover; object-position: 75% 22%; }
.thermal-detail figcaption { display: flex; flex-direction: column; gap: 12px; padding: 20px 0 0; border-top: 1px solid rgba(255,255,255,.22); }
.thermal-detail strong { font-size: clamp(3rem, 5vw, 5rem); line-height: 1; letter-spacing: -.055em; font-weight: 600; }
.thermal-detail small { font-size: 1rem; letter-spacing: 0; color: var(--muted); }
.thermal-detail figcaption span { font-size: .9rem; color: var(--muted); }

/* The video establishes scale; the result presents only the original card and base light. */
.cartridge-detail { margin: 0; min-width: 0; width: 85%; max-width: 425px; justify-self: end; }
.cartridge-detail-photo {
  mask-image: url("images/card-only-mask.svg"), linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, #000 0%, #000 94%, transparent);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  mask-composite: intersect;
}
.cartridge-detail-photo img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(.55) brightness(.95);
}

.craft-story { padding: 0; overflow: visible; background: #070909; }
.craft-story::before { display: none; }
.craft-story-stage { padding: 110px 0 60px; }
.craft-story-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 38px; }
.craft-story-heading h2 { max-width: 780px; font-size: clamp(2rem, 3.5vw, 3.4rem); line-height: 1.18; letter-spacing: -.04em; margin: 0; text-wrap: balance; }
.craft-story-panels { display: grid; gap: 80px; }
.craft-story-panel { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: center; }
.craft-story-photo { margin: 0; height: clamp(300px, 48vh, 600px); overflow: hidden; background: #050606; }
.craft-story-photo img { width: 100%; height: 100%; object-fit: cover; }
.craft-story-panel:nth-child(3) img { transform: scale(1.6); transform-origin: 35% 40%; }
.craft-story-value { margin: 0 0 22px; font-size: clamp(3rem, 6.8vw, 7rem); font-weight: 600; letter-spacing: -.06em; line-height: 1.1; white-space: nowrap; }
.craft-story-value small { font-size: clamp(.9rem, 1.6vw, 1.25rem); color: var(--muted); letter-spacing: 0; }
.craft-story-text h3 { margin: 0 0 20px; font-size: clamp(1.25rem, 2vw, 2rem); font-weight: 600; }
.craft-story-text > p:last-child { max-width: 27em; color: var(--muted); line-height: 1.85; font-size: 1rem; }
.craft-story-progress { margin-top: 40px; height: 1px; background: rgba(255,255,255,.12); }
.craft-story-progress span { display: block; height: 1px; background: rgba(255,255,255,.65); width: 25%; transition: width 600ms ease; }
.craft-story.is-scroll-story { height: 380vh; }
.is-scroll-story .craft-story-stage { position: sticky; top: 0; min-height: 100svh; display: flex; align-items: center; }
.is-scroll-story .craft-story-panels { gap: 0; }
.is-scroll-story .craft-story-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 550ms ease, transform 650ms ease, visibility 550ms; }
.is-scroll-story .craft-story-panel.is-active { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 820px) {
  .thermal-detail { width: 100%; max-width: 424px; justify-self: center; }
  .thermal-detail-photo { height: 280px; }
  .thermal-detail figcaption { padding-top: 16px; }
  .cartridge-detail { max-width: 374px; justify-self: center; }
  .craft-story-stage { padding: 100px 0 36px; }
  .craft-story-heading { margin-bottom: 24px; gap: 14px; }
  .craft-story-heading h2 { font-size: 1.7rem; max-width: 13em; }
  .craft-story-panel { grid-template-columns: 1fr; gap: 22px; }
  .craft-story-photo { height: 30svh; min-height: 180px; }
  .craft-story-value { font-size: 3.4rem; margin-bottom: 10px; }
  .craft-story-text h3 { font-size: 1.25rem; margin-bottom: 10px; }
  .craft-story-text > p:last-child { font-size: .9rem; margin-bottom: 0; }
  .craft-story-progress { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .craft-story-progress span { transition: none; }
}

/* Shared vertical rhythm; pinned stories retain their scroll distance. */
:root {
  --section-space: clamp(64px, 6vw, 96px);
  --content-space: calc(var(--section-space) * .618);
}
main > .section:not(.agent-terminal-section) {
  padding-block: var(--section-space);
}
main .pillar-grid,
main .module-bento,
main .engine-rail {
  margin-top: var(--content-space);
}
main .craft-story-heading { margin-bottom: var(--content-space); }
main .craft-story-stage,
main .teardown-layout { padding-block: var(--section-space); }

@media (min-width: 761px) {
  main > .thermal-section,
  main > .sapphire-section,
  main > .glass-touch-section,
  main > .agent-terminal-section,
  main > .cartridge-section {
    min-height: clamp(680px, calc(45vw + var(--section-space) * 2), 1080px);
    padding-block: var(--section-space);
  }
}

/* Exactly two responsive sizes for the page's primary section headings. */
:root {
  --title-large: clamp(2.75rem, 5.4vw, 5rem);
  --title-small: clamp(2.25rem, 4.4vw, 4rem);
}
html main #heroTitle,
html main section h2[data-ui] { font-size: var(--title-small); }
html main #heroTitle,
html main section h2[data-title-size="large"] { font-size: var(--title-large); }
html[lang="zh-CN"] main #heroTitle > .hero-title-line { font-size: inherit; }

/* Shared heading typography. */
main h1[data-hero-title],
main h2[data-ui] {
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

html[lang="zh-CN"] main :is(h1, h2, h3) {
  font-family: "Noto Sans SC", "Geist", sans-serif;
  font-kerning: normal;
}

main h3 {
  letter-spacing: 0;
}

main :is(h1, h2, h3) .rm-mark {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: 0;
}
