/* AppX-inspired course landing layer
   Direction: warm paper, black type, vermilion CTA, product-first course stage.
   The original content and interaction rules remain in styles.css. */

:root {
  --bg: #f6f3ed;
  --bg-soft: #fffdf9;
  --panel: #ffffff;
  --paper: #ffffff;
  --ink: #141311;
  --ink-strong: #050505;
  --muted: #625f59;
  --dim: #6b665f;
  --line: rgba(20, 19, 17, 0.15);
  --line-strong: rgba(20, 19, 17, 0.34);
  --line-dark: #ded8cf;
  --orange: #c83a24;
  --orange-strong: #ff3227;
  --orange-soft: #ffd8cc;
  --orange-ink: #ffffff;
  --dark: #151513;
  --dark-soft: #201f1c;
  --wrap: 1180px;
}

body {
  background: var(--bg);
  color: var(--ink);
}

::selection {
  background: var(--orange);
  color: #fff;
}

:where(a, button, summary):focus-visible {
  outline: 3px solid #1b61ff;
  outline-offset: 4px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 44px));
}

.nav {
  top: 12px;
  width: min(var(--wrap), calc(100% - 32px));
  height: 58px;
  margin: 12px auto 0;
  padding: 0 16px 0 20px;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(34, 29, 22, 0.05);
  backdrop-filter: blur(12px);
  transition: transform 0.28s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.nav.motion-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-100% - 24px));
}

.nav.scrolled {
  border-color: var(--ink);
}

.logo {
  color: var(--ink-strong);
}

.logo span {
  border: 0;
  width: 18px;
  height: 22px;
  background: var(--orange);
  clip-path: polygon(50% 0, 100% 18%, 86% 100%, 14% 100%, 0 18%);
  transform: rotate(-8deg);
}

.nav-links {
  color: #37342f;
  gap: 24px;
}

.nav-links a:hover {
  color: var(--orange);
}

.nav-cta {
  position: relative;
  padding: 10px 34px 10px 18px;
  color: #fff;
  background: var(--orange);
  border-radius: 7px;
}

.nav-cta::after {
  content: "→";
  position: absolute;
  right: 14px;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(72px, 9vw, 132px) 0 clamp(78px, 9vw, 126px);
  background: var(--bg);
  border: 0;
}

.hero-appx {
  display: grid;
  justify-items: center;
}

.hero-copy {
  width: min(900px, 100%);
  text-align: center;
}

.hero-copy .kicker {
  display: inline-block;
  margin-bottom: 22px;
  padding: 8px 12px;
  color: #4e4942;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.hero-copy h1 {
  max-width: 11.5em;
  margin: 0 auto 24px;
  font-size: clamp(46px, 6.7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.058em;
}

.hero-copy h1 em {
  color: var(--ink-strong);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.12em;
}

.hero-statement {
  max-width: 670px;
  margin: 0 auto;
  color: #494640;
  font-size: clamp(17px, 1.55vw, 21px);
}

.hero-actions {
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
}

.btn {
  min-height: 52px;
  border-radius: 9px;
  padding: 15px 24px;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.btn.primary {
  position: relative;
  padding-right: 46px;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 8px 0 #8c2819;
}

.btn.primary::after {
  content: "→";
  position: absolute;
  right: 22px;
}

.btn.primary:hover {
  background: #b93621;
  transform: translateY(-2px);
}

.btn.primary:active {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #8c2819;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink-strong);
  font-weight: 750;
  border-bottom: 1px solid var(--ink);
}

.text-link span {
  color: var(--orange);
}

.text-link.strong {
  margin-top: 26px;
}

.hero-note {
  margin: 26px 0 0;
  color: var(--dim);
  font-size: 13px;
}

.course-stage {
  position: relative;
  isolation: isolate;
  width: min(790px, 100%);
  min-height: 470px;
  margin: clamp(64px, 8vw, 104px) 0 0;
  padding: clamp(30px, 5vw, 58px);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(130deg, var(--orange-strong), #ff7a38 55%, #dc2d72);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(77, 38, 22, 0.2);
}

.course-stage::before,
.course-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 48% 52% 62% 38%;
  transform: rotate(25deg);
}

.course-stage::before {
  top: -180px;
  right: -60px;
}

.course-stage::after {
  bottom: -220px;
  left: -90px;
}

.course-stage-copy {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  text-align: left;
}

.course-stage-copy span {
  font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.course-stage-copy strong {
  max-width: 9em;
  font-size: clamp(25px, 4vw, 48px);
  line-height: 0.94;
  letter-spacing: -0.055em;
  text-align: right;
}

.course-screen {
  width: 80%;
  margin: 0 auto;
  padding: 10px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  box-shadow: 0 24px 50px rgba(54, 10, 3, 0.33);
  transform: perspective(900px) rotateX(2deg) rotateY(-4deg);
}

.course-screen img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
}

.course-stage figcaption {
  display: grid;
  gap: 3px;
  margin-top: 24px;
  text-align: left;
}

.course-stage figcaption span {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.76;
}

.course-stage figcaption strong {
  font-size: 17px;
}

.bar-section {
  color: #fff;
  background: var(--dark);
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.stats div {
  border-color: rgba(255, 255, 255, 0.16);
}

.stats strong {
  color: #fff;
}

.stats span {
  color: #bdb7ad;
}

.results {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(38px, 6vw, 86px);
  align-items: center;
}

.results-visual {
  position: relative;
  margin: 0;
  padding: 18px;
  background: var(--orange-strong);
  border-radius: 14px;
  transform: rotate(-1.3deg);
}

.results-visual::after {
  content: "REFERENCE → DECISION";
  position: absolute;
  right: 24px;
  bottom: 24px;
  padding: 7px 10px;
  color: #111;
  background: #fff;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.results-visual img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 7px;
}

.results-copy h2 {
  color: var(--ink-strong);
}

.results-copy .lead {
  color: #4a4640;
}

.result-list {
  margin-top: 30px;
  border-top: 1px solid var(--line-strong);
}

.result-list li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.result-list b {
  color: var(--orange);
  font: 800 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.result-list li > span {
  color: var(--muted);
}

.result-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-strong);
}

.problem {
  color: #f8f4ed;
  background: var(--dark);
}

.problem .section-copy h2,
.problem .pain-list h3 {
  color: #fff;
}

.problem .section-copy h2 {
  letter-spacing: -0.07em;
}

.problem .section-copy .kicker {
  letter-spacing: -0.015em;
}

.problem .pain-list h3 {
  margin-bottom: 0;
  letter-spacing: -0.055em;
}

.problem .kicker.orange,
.problem .pain-list b,
.pricing .kicker.orange {
  color: #ff8a70;
}

.problem .pain-list article {
  background: var(--dark-soft);
  border-color: rgba(255, 255, 255, 0.16);
}

.problem .pain-list p {
  color: #bbb5ac;
}

.full-visual {
  padding: 24px;
  background: var(--orange-strong);
}

.full-visual img {
  max-width: var(--wrap);
  max-height: 580px;
  margin: 0 auto;
  border-radius: 10px;
}

.method,
.audience,
.faq {
  background: var(--bg-soft);
}

.method-list,
.checks,
.prep,
.lectures,
.faq-list {
  border-color: var(--line-strong);
}

.method-list li,
.checks li,
.prep li,
.lectures > li,
.faq details {
  border-color: var(--line);
}

.method-list p,
.checks li,
.prep span,
.lec-body ul li,
.faq details p {
  color: var(--muted);
}

.method-list h3 {
  margin-bottom: 0;
}

.dark-band {
  background: #ebe6dd;
  border-color: var(--line);
}

.dark-band .band-grid {
  display: block;
}

.dark-band .band-grid img {
  width: min(820px, 100%);
  margin: 0 auto;
  border: 12px solid #fff;
  border-radius: 10px;
  box-shadow: 0 22px 48px rgba(34, 29, 22, 0.15);
}

.curriculum {
  background: var(--bg);
}

.loop-strip li,
.mentor-tags li {
  color: #4a4640;
  background: #fff;
  border-color: var(--line);
}

.lec-idx {
  color: #6f6a62;
}

.mentor {
  background: #e8e2d8;
}

.mentor .kicker.orange {
  color: #a72d1c;
}

.mentor-photo {
  overflow: visible;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.mentor-photo img {
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle at center, #000 0 67%, rgba(0, 0, 0, 0.96) 74%, rgba(0, 0, 0, 0.58) 84%, transparent 98%);
  mask-image: radial-gradient(circle at center, #000 0 67%, rgba(0, 0, 0, 0.96) 74%, rgba(0, 0, 0, 0.58) 84%, transparent 98%);
}

.mentor-copy .role {
  color: var(--ink-strong);
}

.pricing {
  color: #f7f2ea;
  background: var(--dark);
  border-color: #000;
}

.pricing .apply-box h2,
.pricing .schedule strong {
  color: #fff;
}

.pricing .dim,
.pricing .schedule span {
  color: #bbb5ac;
}

.pricing .schedule div,
.pricing .price-note p {
  border-color: rgba(255, 255, 255, 0.18);
}

.tier {
  background: #fff;
  color: #101010;
  border-color: #fff;
  border-radius: 10px;
}

.tier.featured {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 3px var(--orange);
}

.tier-price del {
  color: #676767;
}

.pricing .btn.primary {
  box-shadow: none;
}

footer {
  color: var(--muted);
  background: #fff;
  border-color: var(--line);
}

.foot-mark {
  color: var(--ink-strong);
}

.fbar {
  background: var(--dark);
  border-color: rgba(255, 255, 255, 0.24);
}

.fbar-msg b,
.fbar-count .clock i {
  color: #fff;
}

.fbar-cta {
  color: #fff;
  background: var(--orange);
  border-radius: 7px;
}

@media (max-width: 980px) {
  .results-grid {
    grid-template-columns: 1fr;
  }

  .results-visual {
    width: min(720px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(var(--wrap), calc(100% - 32px));
  }

  .nav {
    top: 8px;
    width: calc(100% - 20px);
    margin-top: 8px;
  }

  .nav-toggle {
    border-color: var(--line-strong);
  }

  .nav-toggle span {
    background: var(--ink);
  }

  .nav-links {
    top: 64px;
    left: -1px;
    right: -1px;
    padding: 8px 16px 16px;
    color: var(--ink);
    background: #fffdf9;
    border: 1px solid var(--line-strong);
    border-top: 0;
    border-radius: 0 0 10px 10px;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .course-stage {
    min-height: 0;
    padding: 28px 18px;
  }

  .course-stage-copy {
    display: grid;
  }

  .course-stage-copy strong {
    text-align: left;
  }

  .course-screen {
    width: 94%;
    transform: none;
  }

  .stats div {
    border-color: rgba(255, 255, 255, 0.16);
  }

  .results-visual {
    padding: 10px;
    transform: none;
  }

  .full-visual {
    padding: 12px;
  }

  .result-list li {
    grid-template-columns: 36px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* ============================================================
   SCROLL STORY — 평균에서 취향으로
   정적 상태가 기본값이며 GSAP은 transform/opacity만 덧씌웁니다.
   ============================================================ */
.motion-story {
  --motion-ink: #11110f;
  --motion-paper: #f6f3ed;
  --motion-red: #c64731;
  --motion-orange: #f26431;
  position: relative;
  overflow: clip;
  background: #0b0b0a;
  color: var(--motion-paper);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.motion-story-head {
  max-width: 980px;
  padding-top: clamp(96px, 13vw, 190px);
  padding-bottom: clamp(70px, 9vw, 128px);
  text-align: center;
}

.motion-story-head h2 {
  margin: 16px 0 24px;
  font-size: clamp(3.4rem, 7.4vw, 7.7rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.motion-story-head h2 em {
  color: var(--motion-red);
  font-style: normal;
}

.motion-story-head > p:last-child {
  max-width: 650px;
  margin: 0 auto;
  color: #625f58;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.75;
}

.motion-scene {
  position: relative;
  min-height: 260vh;
  background: #0b0b0a;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.motion-scene-inner {
  position: sticky;
  top: 0;
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

.motion-scene-copy {
  position: relative;
  z-index: 3;
}

.scene-step {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 8px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--motion-red);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.motion-scene-copy h3 {
  margin: 0 0 24px;
  font-size: clamp(2.25rem, 4.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.motion-scene-copy p {
  max-width: 460px;
  margin: 0;
  color: #64615b;
  font-size: clamp(0.96rem, 1.25vw, 1.1rem);
  line-height: 1.75;
}

.motion-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: calc(100svh - 80px);
  border: 0;
  border-radius: 0;
  background: #0b0b0a;
  box-shadow: none;
  overflow: hidden;
}

/* Scene 01 — reference cards + regression */
.reference-lab {
  background:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    #0b0b0a;
  background-size: 36px 36px;
}

.reference-stack {
  position: absolute;
  top: 5%;
  left: 8%;
  z-index: 2;
  width: 190px;
  height: 150px;
}

.reference-card {
  position: absolute;
  display: grid;
  grid-template-rows: 1fr auto;
  width: 96px;
  height: 112px;
  padding: 7px;
  border: 1px solid #121210;
  background: #fbfaf6;
  box-shadow: 4px 5px 0 rgba(17, 17, 15, 0.15);
  transform-origin: 50% 100%;
}

.reference-card i {
  display: block;
  background: #191917;
}

.reference-card b {
  padding-top: 6px;
  font-size: 0.68rem;
}

.reference-card.ref-a { left: 0; top: 7px; transform: rotate(-9deg); }
.reference-card.ref-b { left: 42px; top: 0; transform: rotate(4deg); }
.reference-card.ref-c { left: 83px; top: 12px; transform: rotate(10deg); }
.reference-card.ref-d { left: 118px; top: 4px; transform: rotate(-2deg); }
.reference-card.ref-a i { background: linear-gradient(135deg, #dad6cd 52%, #fff 52%); }
.reference-card.ref-b i { background: linear-gradient(110deg, #111 0 42%, #d9d5cc 42%); }
.reference-card.ref-c i { background: repeating-linear-gradient(45deg, #d2cec5 0 3px, #f9f7f2 3px 7px); }
.reference-card.ref-d i { background: linear-gradient(#c64731 0 18%, #e7e3da 18%); }

.taste-regression {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1180px, 92vw);
  height: auto;
  overflow: visible;
  transform: translate(-50%, -48%);
}

.reg-grid path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
}

.reg-points circle {
  fill: #f6f3ed;
  opacity: 0.42;
}

.reg-line {
  fill: none;
  stroke: #f6f3ed;
  stroke-width: 3;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.outlier-dot { fill: var(--motion-orange); }
.outlier-ring {
  fill: none;
  stroke: var(--motion-red);
  stroke-width: 4;
}

.markup-arrow {
  fill: none;
  stroke: var(--motion-red);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
}

.reg-markup text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.average-markup .markup-arrow { stroke: #f6f3ed; }
.average-markup text { fill: #f6f3ed; }
.taste-markup text { fill: var(--motion-red); }

.outlier text,
.reg-caption,
.axis-label {
  fill: #151513;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-weight: 800;
}

.outlier text { fill: var(--motion-red); }
.reg-caption { font-size: 13px; opacity: .55; }
.axis-label { font-size: 12px; opacity: .5; }

.signal-stamp {
  position: absolute;
  right: 34px;
  bottom: 30px;
  padding: 10px 14px 8px;
  border: 3px solid var(--motion-red);
  color: var(--motion-red);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  transform: rotate(-5deg);
}

/* Scene 02 — image → prompt → keywords → image */
.prompt-scene {
  color: #f7f3ec;
  background: #0b0b0a;
  border-color: rgba(255,255,255,.12);
}

.prompt-scene .motion-scene-copy p { color: #aaa69d; }
.prompt-scene .scene-step { color: #ff7652; }

.prompt-forge {
  min-height: calc(100svh - 80px);
  border-color: rgba(255,255,255,.36);
  background: #0b0b0a;
  box-shadow: 0 22px 70px rgba(0,0,0,.42);
}

.source-images {
  position: absolute;
  top: 28px;
  left: 28px;
  display: flex;
  gap: 12px;
  width: calc(100% - 56px);
}

.source-card {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 140px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.25);
  background: #292925;
  overflow: hidden;
}

.source-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.source-card figcaption {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 5px 8px;
  background: #f7f3ec;
  color: #121210;
  font-size: .67rem;
  font-weight: 900;
}

.prompt-terminal {
  position: absolute;
  top: 194px;
  left: 28px;
  width: calc(59% - 36px);
  min-height: 205px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 12px;
  background: #0b0b0a;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}

.terminal-label {
  display: block;
  margin-bottom: 28px;
  color: #77736a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .66rem;
  letter-spacing: .08em;
}

.prompt-terminal p {
  margin: 0;
  color: #dfdacf;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(.8rem, 1.1vw, .96rem);
  line-height: 1.8;
}

.prompt-terminal mark {
  padding: 2px 4px;
  background: #e7dfd0;
  color: #151513;
  font-weight: 900;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 17px;
  margin-top: 14px;
  background: var(--motion-orange);
}

.keyword-field {
  position: absolute;
  left: 35px;
  bottom: 39px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  width: 53%;
}

.keyword-chip {
  display: inline-flex;
  padding: 9px 12px;
  border: 1px solid #ff7652;
  border-radius: 999px;
  background: #241712;
  color: #ff8a69;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .72rem;
  font-weight: 800;
}

.generated-frame {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 38%;
  height: 420px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.45);
  background: #090908;
  overflow: hidden;
}

.generated-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.generated-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 10px solid #191916;
  pointer-events: none;
}

.generated-frame figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: #f6f3ed;
  color: #11110f;
  font-size: .64rem;
}

.generation-scan {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: #ff7652;
  box-shadow: 0 0 25px 8px rgba(255,118,82,.45);
}

/* Scene 03 — writing / PPT / diffusion */
.application-scene {
  min-height: 220vh;
  background: #0b0b0a;
  border-color: rgba(255,255,255,.12);
}

.application-layout {
  grid-template-columns: minmax(230px, .58fr) minmax(0, 1.72fr);
}

.application-scene .scene-step { color: #11110f; }
.application-scene .motion-scene-copy p { color: rgba(17,17,15,.72); }

.application-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: calc(100svh - 80px);
  padding: 12px;
  border-color: #11110f;
  border-radius: 22px;
  background: #11110f;
  box-shadow: 0 22px 70px rgba(68,21,5,.28);
}

.single-application-stage {
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 72px);
  background: #0b0b0a;
}

.single-application-stage .apply-demo {
  width: min(1080px, 100%);
  height: min(720px, calc(100svh - 150px));
  min-height: 520px;
  border: 2px solid #11110f;
  box-shadow: 16px 18px 0 rgba(255,255,255,.09);
}

.single-application-stage .apply-demo > header {
  height: 56px;
  padding: 0 22px;
  font-size: .86rem;
}

.single-application-stage .writing-demo {
  grid-row: auto;
  width: min(900px, 100%);
}

.single-application-stage .paper-copy {
  padding: clamp(34px, 6vw, 76px);
}

.single-application-stage .after-label {
  margin-top: clamp(58px, 8vh, 110px);
}

.single-application-stage .typed-copy {
  font-size: clamp(2.15rem, 4.7vw, 5rem);
}

.single-application-stage .slide-canvas,
.single-application-stage .diffusion-frame {
  min-height: 0;
  height: calc(100% - 56px);
}

.single-application-stage .node-title {
  top: 7%;
  left: 6%;
  width: 55%;
  height: 13%;
  font-size: clamp(1rem, 2vw, 1.65rem);
  white-space: nowrap;
}

.single-application-stage .node-chart {
  top: 25%;
  left: 6%;
  width: 55%;
  height: 52%;
}

.single-application-stage .node-copy {
  top: 25%;
  right: 6%;
  width: 28%;
  height: 30%;
  font-size: clamp(.75rem, 1.25vw, 1rem);
}

.single-application-stage .node-accent {
  right: 6%;
  bottom: 9%;
  width: 28%;
  height: 15%;
  font-size: clamp(1rem, 2vw, 1.5rem);
}

.single-application-stage .node-note {
  left: 6%;
  bottom: 9%;
  width: 55%;
  height: 8%;
}

.apply-demo {
  min-width: 0;
  border: 1px solid rgba(17,17,15,.25);
  background: #f6f3ed;
  color: #11110f;
  overflow: hidden;
}

.apply-demo > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(17,17,15,.25);
  font-size: .72rem;
}

.apply-demo > header span {
  color: #77726a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .58rem;
  letter-spacing: .08em;
}

.writing-demo {
  grid-row: 1 / 3;
}

.paper-copy { padding: clamp(22px, 3vw, 42px) clamp(18px, 2.5vw, 34px); }
.copy-label {
  display: block;
  margin-bottom: 10px;
  color: #8a867e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .6rem;
  font-weight: 800;
}

.copy-before {
  margin: 0;
  color: #aaa69e;
  font-size: clamp(.78rem, 1.1vw, .94rem);
  line-height: 1.55;
  text-decoration: line-through;
}

.after-label { margin-top: clamp(44px, 8vw, 92px); }
.typed-copy {
  display: flex;
  align-items: flex-end;
  min-height: 120px;
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3.25rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.055em;
}

.typed-copy span {
  display: inline-block;
  width: 100%;
  overflow: hidden;
}

.typed-copy i {
  flex: 0 0 auto;
  width: 4px;
  height: 1em;
  margin-left: 5px;
  background: var(--motion-red);
}

.slide-canvas {
  position: relative;
  height: calc(100% - 42px);
  min-height: 245px;
  background:
    linear-gradient(rgba(17,17,15,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,17,15,.04) 1px, transparent 1px),
    #efebe3;
  background-size: 24px 24px;
}

.slide-before {
  position: absolute;
  z-index: 5;
  inset: 7%;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid #c9c4ba;
  background: #f3f1ec;
  color: #8c887f;
}

.slide-before span,
.design-stamp,
.slide-tokens b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.slide-before b {
  font-size: clamp(1.4rem, 3.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.slide-before i {
  display: block;
  width: min(520px, 82%);
  height: 8px;
  background: #d8d4cc;
}

.slide-before i:nth-of-type(2) { width: 66%; }
.slide-before i:nth-of-type(3) { width: 48%; }

.design-stamp {
  position: absolute;
  z-index: 4;
  top: 5%;
  right: 5%;
  padding: 7px 10px;
  border: 1px solid #c64731;
  color: #c64731;
  background: #f6f3ed;
}

.slide-node {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid #171714;
  background: #f9f7f2;
  font-size: .66rem;
  font-weight: 800;
  text-align: center;
}

.node-title { top: 18px; left: 18px; width: 54%; height: 42px; font-size: .88rem; }
.node-chart { top: 77px; left: 18px; width: 52%; height: 136px; background: linear-gradient(145deg,#111 0 47%,#c64731 47% 60%,#ece8df 60%); }
.node-copy { top: 72px; right: 16px; width: 34%; height: 84px; color: #817c73; line-height: 1.6; }
.node-accent { right: 16px; bottom: 17px; width: 34%; height: 47px; background: #c64731; color: #fff; font-size: 1rem; }
.node-note { left: 18px; bottom: 17px; width: 52%; height: 26px; }

.node-copy b {
  display: block;
  margin-bottom: 7px;
  color: #171714;
  font-size: .62rem;
  letter-spacing: .08em;
}

.slide-tokens {
  position: absolute;
  z-index: 3;
  right: 6%;
  bottom: 29%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.slide-tokens i {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(17,17,15,.28);
  border-radius: 50%;
  background: #111;
}

.slide-tokens i:nth-child(2) { background: #f26431; }
.slide-tokens i:nth-child(3) { background: #f6f3ed; }
.slide-tokens b { margin-left: 5px; color: #67635c; }

.diffusion-frame {
  position: relative;
  height: calc(100% - 42px);
  min-height: 245px;
  background: #181816;
  overflow: hidden;
}

.diffusion-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.diffusion-noise {
  position: absolute;
  inset: -30%;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.95) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,.95) 0 1px, transparent 2px),
    radial-gradient(circle at 45% 80%, rgba(255,255,255,.75) 0 2px, transparent 3px);
  background-size: 8px 8px, 11px 11px, 13px 13px;
  opacity: .55;
  mix-blend-mode: hard-light;
  transform: rotate(8deg);
}

.diffusion-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  background: var(--motion-orange);
  transform-origin: left;
}

.diffusion-frame > b {
  position: absolute;
  right: 10px;
  bottom: 13px;
  padding: 6px 8px;
  background: #11110f;
  color: #f6f3ed;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .58rem;
}

/* Story closing CTA */
.motion-cta {
  display: grid;
  justify-items: center;
  padding-top: clamp(110px, 16vw, 210px);
  padding-bottom: clamp(120px, 17vw, 230px);
  text-align: center;
}

.motion-cta h3 {
  display: grid;
  margin: 18px 0 26px;
  font-size: clamp(3.1rem, 7.5vw, 8rem);
  line-height: .92;
  letter-spacing: -.075em;
}

.motion-cta h3 span:last-child { color: var(--motion-red); }
.motion-cta > p:not(.kicker) {
  max-width: 650px;
  margin: 0 0 34px;
  color: #a7a197;
  line-height: 1.75;
}

.motion-pay-button {
  min-width: min(100%, 330px);
  min-height: 62px;
  box-shadow: 0 7px 0 #7e2115;
}

/* JS enhancement marker */
.gsap-ready .terminal-cursor,
.gsap-ready .typed-copy i {
  animation: motion-blink .75s steps(1) infinite;
}

@keyframes motion-blink { 50% { opacity: 0; } }

@media (max-width: 980px) {
  .motion-scene { min-height: auto; }
  .motion-scene-inner,
  .application-layout {
    position: relative;
    top: auto;
    width: 100%;
    max-width: none;
    min-height: auto;
    padding: 0;
  }

  .motion-stage { min-height: 100svh; }
  .application-scene { min-height: auto; }
}

@media (max-width: 680px) {
  .motion-story-head { text-align: left; }
  .motion-story-head h2 { font-size: clamp(3rem, 15vw, 4.8rem); }
  .motion-story-head > p:last-child { margin: 0; }
  .motion-stage { min-height: 100svh; }
  .reference-stack { top: 24px; left: 20px; transform: scale(.78); transform-origin: top left; }
  .taste-regression { top: 50%; left: 50%; width: 145vw; transform: translate(-50%, -50%); }

  .prompt-forge { min-height: 760px; }
  .source-images { top: 18px; left: 18px; gap: 7px; width: calc(100% - 36px); }
  .source-card { height: 104px; }
  .source-card figcaption { font-size: .56rem; }
  .prompt-terminal { top: 140px; left: 18px; width: calc(100% - 36px); min-height: 180px; }
  .keyword-field { top: 345px; bottom: auto; left: 18px; width: calc(100% - 36px); }
  .generated-frame { right: 18px; bottom: 18px; left: 18px; width: auto; height: 310px; }

  .application-board {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: auto;
  }
  .writing-demo { grid-row: auto; min-height: 430px; }
  .ppt-demo, .image-demo { min-height: 310px; }
  .motion-cta { justify-items: stretch; text-align: left; }
  .motion-cta h3 { font-size: clamp(3rem, 14vw, 5.2rem); }
  .motion-pay-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-scene { min-height: auto; }
  .motion-scene-inner { position: relative; top: auto; }
  .gsap-ready .terminal-cursor,
  .gsap-ready .typed-copy i { animation: none; }
}
