/* One quiet reading area beside a single, layered product composition. */
.story-home {
  --hero-surface: oklch(.975 .012 220);
  --hero-ink: oklch(.3 .075 145);
  --headline-accent: oklch(.56 .16 42);
}
.story-home .headline-accent { color: var(--headline-accent); }
.action-hero h1 em.headline-accent { font-weight: inherit; font-style: normal; letter-spacing: inherit; }
.story-home .site-header {
  background: var(--hero-surface);
  border-bottom-color: transparent;
  color: var(--hero-ink);
}
.story-home .desktop-nav a { color: var(--hero-ink); font-size: 14px; }
.story-home .site-header .story-skip {
  min-height: 44px;
  padding: 6px 20px;
  border-radius: 999px;
  background: oklch(.95 .055 92);
  color: var(--hero-ink);
  font-weight: 600;
}

#story-town { background: var(--hero-surface); }
#story-town .action-hero-scene {
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  mask-image: linear-gradient(180deg, transparent, black 26%);
}
#story-town .action-hero-shade {
  background:
    radial-gradient(ellipse 78% 76% at 0% 0%, var(--hero-surface) 28%, oklch(.975 .012 220 / .92) 62%, oklch(.975 .012 220 / 0) 100%),
    linear-gradient(180deg, var(--hero-surface), oklch(.975 .012 220 / .8) 20%, oklch(.975 .012 220 / .2) 66%, oklch(.975 .012 220 / .16));
}
#story-town .town-atmosphere { opacity: .2; }
#story-town .action-hero-layout {
  width: min(1200px, calc(100% - 128px));
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(48px, 5.5vw, 80px);
  padding: 32px 0 256px;
  min-height: max(740px, calc(100svh - var(--story-header)));
}
#story-town .action-hero-copy {
  width: 100%;
  max-width: 620px;
  margin: 0;
  padding: 0;
  text-align: left;
  color: var(--hero-ink);
}
#story-town #action-hero-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.75rem, 4.6vw, 4.375rem);
  font-weight: 650;
  line-height: 1.09;
  letter-spacing: -.03em;
}
#story-town #action-hero-title > span { display: block; animation: none; }
#story-town .action-hero-description {
  max-width: 40ch;
  margin: 20px 0 0;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.65;
  color: var(--hero-ink);
  text-wrap: pretty;
}
#story-town .action-hero-links { justify-content: start; flex-wrap: nowrap; gap: 24px; margin-top: 28px; }
#story-town .action-hero-links .pixel-button {
  flex-shrink: 0;
  min-height: 52px;
  padding: 12px 24px;
  gap: 20px;
  border: 0;
  border-radius: 999px;
  background: oklch(.89 .14 91);
  color: var(--hero-ink);
  box-shadow: none;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
}
#story-town .action-hero-links .pixel-button:hover { transform: translateY(-2px); background: oklch(.92 .13 91); }
#story-town .action-hero-links .pixel-button:active { transform: translateY(0); }
#story-town .action-beta-note { margin: 10px 0 0; padding: 0; background: none; color: var(--hero-ink); font-size: 12px; line-height: 1.5; }
#story-town .action-video-link {
  display: grid;
  grid-template-columns: 16px auto;
  column-gap: 7px;
  align-content: center;
  min-height: 48px;
  padding: 0;
  background: none;
  color: var(--hero-ink);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
#story-town .action-video-link > span { grid-row: 1 / 3; align-self: center; font-size: 19px; }
#story-town .action-video-link > small { grid-column: 2; color: var(--hero-ink); font-size: 10px; }

#story-town .phone-pair {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  width: 100%;
  max-width: 460px;
  align-items: start;
  gap: 0;
  margin: 0;
}
#story-town .phone-preview { grid-row: 1; margin: 0; animation: none; }
#story-town .phone-habits { grid-column: 1 / 7; padding-right: 6px; z-index: 2; transform: none; }
#story-town .phone-game { grid-column: 7 / 13; justify-self: end; width: 224px; z-index: 3; margin-top: 32px; transform: none; }
#story-town .phone-preview img { filter: drop-shadow(0 8px 8px oklch(.22 .04 160 / .12)); }
#story-town .game-phone-device {
  position: relative;
  width: 100%;
  aspect-ratio: 852 / 1846;
  border: 2px solid oklch(.4 .018 155);
  border-radius: 15% / 7%;
  background: oklch(.18 .012 155);
  box-shadow: inset 0 0 0 1px oklch(.6 .012 155), 0 8px 8px oklch(.22 .04 160 / .12);
}
#story-town .game-phone-device::before {
  content: "";
  position: absolute;
  top: 10px;
  left: calc(50% - 24px);
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: oklch(.08 .005 155);
}
#story-town .game-phone-screen {
  position: absolute;
  inset: 24px 8px 12px;
  overflow: hidden;
  border-radius: 8px 8px 22px 22px;
  background: black;
}
#story-town .game-phone-screen iframe { display: block; width: 100%; height: 100%; border: 0; }

#story-town .action-art-credit {
  bottom: 12px;
  left: max(32px, calc((100% - 1200px) / 2));
  padding: 3px 7px;
  font-size: 9px;
  background: oklch(.975 .012 220 / .9);
  color: var(--hero-ink);
}

@media (max-width: 1100px) and (min-width: 961px) {
  #story-town .action-hero-layout { width: calc(100% - 80px); gap: 40px; padding: 32px 0 192px; min-height: max(680px, calc(100svh - var(--story-header))); }
  #story-town .phone-pair { max-width: 440px; }
  #story-town .action-hero-links { gap: 16px; }
  #story-town .action-hero-links .pixel-button { padding-inline: 18px; font-size: 15px; gap: 14px; }
  #story-town .action-video-link { font-size: 12px; }
}
@media (max-width: 960px) {
  #story-town .action-hero-layout {
    grid-template-columns: minmax(0, 1fr);
    width: min(540px, calc(100% - 48px));
    gap: 36px;
    padding: 32px 0 80px;
    min-height: 0;
  }
  #story-town .action-hero-copy { order: 1; max-width: none; text-align: left; }
  #story-town #action-hero-title { font-size: clamp(2.125rem, 7.2vw, 3rem); }
  #story-town .action-hero-description { max-width: 40ch; margin: 16px 0 0; font-size: 16px; line-height: 1.6; }
  #story-town .action-hero-links { justify-content: start; gap: 24px; margin-top: 24px; }
  #story-town .action-beta-note { margin: 10px 0 0; }
  #story-town .phone-pair { order: 2; max-width: 460px; margin: 0; }
  #story-town .phone-game { margin-top: 32px; }
  #story-town .action-hero-scene { width: 190%; left: -70%; }
  #story-town .action-hero-shade { background: linear-gradient(180deg, var(--hero-surface) 15%, oklch(.975 .012 220 / .9) 34%, oklch(.975 .012 220 / .28) 68%, oklch(.975 .012 220 / .16)); }
}
@media (max-width: 480px) {
  .story-home .site-header .story-skip { padding: 6px 13px; font-size: 11px; gap: 7px; }
  #story-town .action-hero-layout { width: calc(100% - 48px); gap: 32px; padding: 24px 0 64px; }
  #story-town #action-hero-title { font-size: clamp(1.875rem, 9.2vw, 2.625rem); line-height: 1.12; }
  #story-town .action-hero-description { font-size: 15px; }
  #story-town .action-hero-links { gap: 20px; margin-top: 22px; }
  #story-town .action-hero-links .pixel-button { min-height: 48px; padding: 12px 18px; font-size: 15px; gap: 14px; }
  #story-town .action-beta-note { font-size: 11px; }
  #story-town .action-video-link { font-size: 12px; column-gap: 5px; }
  #story-town .phone-pair { max-width: 360px; }
  #story-town .phone-habits { grid-column: 1 / 8; max-width: 180px; padding-right: 0; }
  #story-town .phone-game { grid-column: 1 / -1; margin-top: 112px; }
  #story-town .action-hero-scene { width: 235%; left: -95%; }
  #story-town .action-art-credit { left: 24px; bottom: 10px; font-size: 7px; }
}
@media (max-width: 370px) {
  .story-home .site-header .brand > span { font-size: 1.5rem; }
  .story-home .header-actions { gap: 4px; }
  .story-home .site-header .story-skip { padding-inline: 7px; font-size: 10px; }
  #story-town .action-hero-layout { width: calc(100% - 40px); }
  #story-town .phone-habits { max-width: 150px; }
  #story-town .phone-game { margin-top: 160px; }
  #story-town .action-hero-links { gap: 8px; }
  #story-town .action-hero-links .pixel-button { padding-inline: 12px; font-size: 14px; gap: 10px; }
  #story-town .action-video-link { font-size: 11px; grid-template-columns: 12px auto; }
}
@media (prefers-reduced-motion: reduce) {
  #story-town .phone-preview, #story-town .pixel-button:hover { transform: none !important; }
}
