/* Astory scroll-style case study page */
:root {
  --bg: #110a05;
  --ink: #2b1608;
  --ink-soft: #5a3518;
  --paper: #d7b77a;
  --paper-light: #eed9a5;
  --paper-deep: #b98645;
  --gold: #f4b84a;
  --red: #b83a32;
  --green: #376747;
  --cyan: #2c6c74;
  --violet: #614c84;
  --line: rgba(72, 37, 13, 0.42);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 184, 74, .22), transparent 36%),
    radial-gradient(circle at 12% 24%, rgba(184, 58, 50, .16), transparent 32%),
    linear-gradient(180deg, #100905 0%, #1c0f07 48%, #090503 100%);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow-x: hidden;
}

.paper-noise,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.paper-noise {
  opacity: .28;
  mix-blend-mode: multiply;
  background:
    repeating-radial-gradient(circle at 30% 40%, rgba(72, 37, 13, .16) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(105deg, rgba(255,255,255,.08) 0 1px, transparent 1px 7px);
}

.vignette {
  background: radial-gradient(circle at center, transparent 42%, rgba(0,0,0,.45) 100%);
}

.back-link {
  position: fixed;
  left: 24px;
  top: 20px;
  z-index: 20;
  color: var(--paper-light);
  text-decoration: none;
  border: 1px solid rgba(244, 184, 74, .36);
  background: rgba(35, 17, 6, .74);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 10px 15px;
  font-size: 14px;
}

.back-link:hover { color: var(--gold); }

.archive-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 158px;
}

.nav-dot {
  border: 1px solid rgba(244, 184, 74, .28);
  color: rgba(238, 217, 165, .72);
  background:
    linear-gradient(90deg, rgba(70, 35, 12, .88), rgba(25, 12, 5, .72));
  border-radius: 999px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: .2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
}

.nav-dot span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #2b1608;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.nav-dot:hover,
.nav-dot.active {
  color: var(--paper-light);
  border-color: var(--gold);
  transform: translateX(-4px);
}

.scroll-page {
  width: min(1220px, calc(100vw - 230px));
  margin: 0 auto;
  padding: 92px 0 96px;
  position: relative;
  z-index: 2;
}

.scroll-panel {
  position: relative;
  min-height: 760px;
  margin: 0 0 46px;
  padding: 48px;
  border-radius: 24px;
  border: 1px solid rgba(80, 40, 11, .44);
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.28), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(120, 64, 20, .18), transparent 32%),
    linear-gradient(90deg, rgba(118, 72, 31, .22), transparent 8%, transparent 92%, rgba(118, 72, 31, .22)),
    linear-gradient(180deg, var(--paper-light), var(--paper) 42%, #c99a56 100%);
  box-shadow: var(--shadow);
  scroll-margin-top: 42px;
  overflow: hidden;
}

.scroll-panel::before,
.scroll-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 18px;
  border: 1px dashed rgba(72, 37, 13, .28);
  border-radius: 18px;
}

.scroll-panel::after {
  inset: 0;
  border: 0;
  background:
    linear-gradient(90deg, rgba(75, 38, 13, .18), transparent 10%, transparent 90%, rgba(75, 38, 13, .18)),
    repeating-linear-gradient(0deg, rgba(72, 37, 13, .025) 0 2px, transparent 2px 9px);
  mix-blend-mode: multiply;
}

.roller {
  position: absolute;
  left: 24px;
  right: 24px;
  height: 24px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #2a1206, #7b4117 15%, #3b1b08 42%, #9a5b22 58%, #2a1206);
  box-shadow: inset 0 4px 8px rgba(255,255,255,.15), 0 12px 26px rgba(0,0,0,.25);
  z-index: 3;
}

.roller.top { top: 16px; }
.roller.bottom { bottom: 16px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 38px;
  align-items: center;
  min-height: 820px;
}

.hero-copy,
.hero-art,
.section-head,
.overview-grid,
.loop-map,
.screen-strip,
.system-board,
.tech-grid,
.ai-layout,
.rumor-board,
.android-layout,
.review-board,
.final-statement {
  position: relative;
  z-index: 4;
}

.case-id,
.section-head p {
  margin: 0 0 12px;
  color: #7b2c1d;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 900;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(82px, 10vw, 144px);
  line-height: .86;
  letter-spacing: -.07em;
  color: #2b1608;
  text-shadow: 0 2px 0 rgba(255,255,255,.22);
}

.hero h2,
.section-head h2 {
  margin: 18px 0 0;
  color: #2b1608;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.lead,
.section-head span {
  color: rgba(43, 22, 8, .76);
  line-height: 1.85;
  font-size: 18px;
}

.lead { max-width: 720px; margin-top: 24px; }

.stamp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.stamp-row span {
  border: 1px solid rgba(72, 37, 13, .34);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.22);
  color: #5a2b0d;
  font-weight: 700;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

button.primary,
button.secondary {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: .18s ease;
}

button.primary {
  color: #2b1608;
  background: linear-gradient(135deg, #f9cf72, #d8872d);
  box-shadow: 0 14px 28px rgba(109, 55, 9, .25);
}

button.secondary {
  color: #4b210c;
  background: rgba(255,255,255,.26);
  border: 1px solid rgba(72, 37, 13, .28);
}

button:hover { transform: translateY(-2px); }

.hero-art {
  margin: 0;
  border: 1px solid rgba(72, 37, 13, .34);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255,255,255,.18);
  transform: rotate(1.2deg);
  box-shadow: 0 26px 48px rgba(72, 37, 13, .18);
}

.hero-art img {
  width: 100%;
  display: block;
  border-radius: 16px;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.hero-art figcaption {
  margin-top: 12px;
  line-height: 1.65;
  color: rgba(43,22,8,.72);
}

.hero-art b { color: #7b2c1d; }

.section-head {
  max-width: 920px;
  margin-bottom: 30px;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}

.parchment-card,
.loop-item,
.tech-grid article,
.negotiation-table div,
.rumor-board article,
.layer,
.review-board article,
.final-statement {
  border: 1px solid rgba(72, 37, 13, .28);
  border-radius: 20px;
  background: rgba(255,255,255,.22);
  box-shadow: 0 16px 34px rgba(72,37,13,.12);
}

.parchment-card {
  padding: 24px;
}

.parchment-card.large {
  grid-row: span 2;
}

.parchment-card h3,
.loop-item b,
.tech-grid b,
.rumor-board h3,
.review-board h3,
.layer b {
  margin: 0 0 10px;
  color: #7b2c1d;
  font-size: 22px;
}

.parchment-card p,
.parchment-card li,
.loop-item p,
.tech-grid p,
.rumor-board p,
.review-board p,
.layer p,
.final-statement p {
  color: rgba(43, 22, 8, .74);
  line-height: 1.75;
}

.parchment-card .big {
  font-size: 28px;
  line-height: 1.55;
  color: #2b1608;
  font-weight: 800;
}

.loop-map {
  min-height: 560px;
  border-radius: 28px;
  border: 1px solid rgba(72,37,13,.28);
  background:
    radial-gradient(circle at center, rgba(255,255,255,.18), transparent 34%),
    rgba(255,255,255,.16);
}

.loop-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 210px;
  height: 210px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px;
  border: 1px solid rgba(72,37,13,.34);
  background: rgba(255,255,255,.28);
}

.loop-center img {
  position: absolute;
  inset: 24px;
  width: calc(100% - 48px);
  height: calc(100% - 48px);
  opacity: .38;
}

.loop-center strong,
.loop-center small { position: relative; z-index: 1; }
.loop-center strong { color: #7b2c1d; font-size: 24px; }
.loop-center small { color: rgba(43,22,8,.65); }

.loop-item {
  position: absolute;
  width: 230px;
  min-height: 126px;
  padding: 18px;
}

.i1 { left: 8%; top: 9%; }
.i2 { right: 8%; top: 12%; }
.i3 { right: 5%; bottom: 13%; }
.i4 { left: 10%; bottom: 12%; }
.i5 { left: 50%; bottom: 5%; transform: translateX(-50%); }

.screen-strip {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.screen-strip figure,
.android-shot {
  margin: 0;
  border-radius: 20px;
  padding: 12px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(72,37,13,.28);
}

.screen-strip img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.screen-strip figcaption,
.android-shot figcaption {
  margin-top: 10px;
  color: rgba(43,22,8,.72);
  font-weight: 700;
}

.system-board {
  display: grid;
  grid-template-columns: 1fr .92fr;
  gap: 22px;
}

.system-image {
  width: 100%;
  min-height: 560px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(72,37,13,.28);
  background: rgba(255,255,255,.20);
}

.system-notes {
  display: grid;
  gap: 14px;
}

.system-notes article {
  border-left: 5px solid #7b2c1d;
  padding: 16px 18px;
  background: rgba(255,255,255,.22);
  border-radius: 16px;
}

.system-notes h3 { margin: 0 0 6px; color: #7b2c1d; }
.system-notes p { margin: 0; color: rgba(43,22,8,.74); line-height: 1.65; }

.tech-grid,
.rumor-board,
.review-board {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tech-grid article,
.rumor-board article,
.review-board article,
.layer {
  padding: 20px;
}

.ai-layout {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: 22px;
}

.negotiation-table {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.negotiation-table div {
  padding: 16px;
  display: grid;
  grid-template-columns: 120px 80px 1fr;
  gap: 12px;
  align-items: center;
}

.negotiation-table b { color: #7b2c1d; }
.negotiation-table span {
  border-radius: 999px;
  color: #2b1608;
  background: rgba(244,184,74,.52);
  padding: 7px 10px;
  text-align: center;
  font-weight: 900;
}
.negotiation-table p { margin: 0; color: rgba(43,22,8,.72); }

.rumor-board {
  grid-template-columns: repeat(3, 1fr);
}

.android-layout {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 22px;
}

.android-shot img {
  width: 100%;
  min-height: 540px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

.layer-list {
  display: grid;
  gap: 14px;
}

.final-statement {
  margin-top: 22px;
  padding: 26px;
  border-left: 7px solid #7b2c1d;
}

.final-statement p {
  font-size: 22px;
  color: #2b1608;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .scroll-page {
    width: min(94vw, 960px);
    padding-top: 84px;
  }

  .archive-nav {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(94vw, 760px);
    overflow-x: auto;
    flex-direction: row;
    border-radius: 999px;
    padding: 8px;
    background: rgba(35, 17, 6, .82);
    backdrop-filter: blur(14px);
  }

  .nav-dot { flex: 0 0 auto; }

  .hero,
  .overview-grid,
  .system-board,
  .ai-layout,
  .android-layout {
    grid-template-columns: 1fr;
  }

  .screen-strip,
  .tech-grid,
  .review-board,
  .rumor-board {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .scroll-panel {
    padding: 28px;
    border-radius: 18px;
  }

  .hero h1 { font-size: 68px; }

  .screen-strip,
  .tech-grid,
  .review-board,
  .rumor-board {
    grid-template-columns: 1fr;
  }

  .loop-map {
    min-height: auto;
    padding: 20px;
    display: grid;
    gap: 12px;
  }

  .loop-center,
  .loop-item {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    height: auto;
  }

  .loop-center {
    border-radius: 20px;
  }

  .negotiation-table div {
    grid-template-columns: 1fr;
  }
}
