/* ============================================================
   TERRAN STUDIO — brand system
   Aesthetic: dark industrial, AAA-game-cinematic.
   References: Detroit Become Human / Death Stranding / Ghost of Tsushima.
   ============================================================ */

:root {
  --bg-0: #0a0c0f;
  --bg-1: #11141a;
  --bg-2: #181d26;
  --bg-3: #232a36;

  --fg-0: #f2f4f7;
  --fg-1: #c4cad4;
  --fg-2: #8a93a3;
  --fg-3: #5a6373;

  --accent: #2ee6e6;
  --accent-warm: #ff7a3d;
  --accent-dim: #1aa3a3;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);

  --font-display: "Rajdhani", "Oxanium", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --w-max: 1280px;
  --w-prose: 720px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  background-color: #070a0f;
  background-image:
    /* ARK9 circuit board layer */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cdefs%3E%3Cfilter id='glow'%3E%3CfeGaussianBlur stdDeviation='1.5' result='blur'/%3E%3CfeMerge%3E%3CfeMergeNode in='blur'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Crect width='200' height='200' fill='none'/%3E%3Cg stroke='%232ee6e6' stroke-width='0.6' fill='none' opacity='0.18' filter='url(%23glow)'%3E%3Cline x1='0' y1='40' x2='60' y2='40'/%3E%3Cline x1='60' y1='40' x2='60' y2='10'/%3E%3Cline x1='60' y1='10' x2='120' y2='10'/%3E%3Cline x1='120' y1='10' x2='120' y2='70'/%3E%3Cline x1='120' y1='70' x2='180' y2='70'/%3E%3Cline x1='180' y1='70' x2='180' y2='40'/%3E%3Cline x1='180' y1='40' x2='200' y2='40'/%3E%3Cline x1='0' y1='100' x2='40' y2='100'/%3E%3Cline x1='40' y1='100' x2='40' y2='130'/%3E%3Cline x1='40' y1='130' x2='100' y2='130'/%3E%3Cline x1='100' y1='130' x2='100' y2='160'/%3E%3Cline x1='100' y1='160' x2='160' y2='160'/%3E%3Cline x1='160' y1='160' x2='160' y2='130'/%3E%3Cline x1='160' y1='130' x2='200' y2='130'/%3E%3Cline x1='80' y1='0' x2='80' y2='50'/%3E%3Cline x1='80' y1='50' x2='150' y2='50'/%3E%3Cline x1='150' y1='50' x2='150' y2='90'/%3E%3Cline x1='150' y1='90' x2='200' y2='90'/%3E%3Cline x1='20' y1='0' x2='20' y2='80'/%3E%3Cline x1='20' y1='80' x2='0' y2='80'/%3E%3Cline x1='0' y1='160' x2='30' y2='160'/%3E%3Cline x1='30' y1='160' x2='30' y2='200'/%3E%3Cline x1='70' y1='170' x2='70' y2='200'/%3E%3Cline x1='70' y1='170' x2='120' y2='170'/%3E%3Cline x1='120' y1='170' x2='120' y2='200'/%3E%3Cline x1='170' y1='100' x2='200' y2='100'/%3E%3Cline x1='170' y1='100' x2='170' y2='200'/%3E%3C/g%3E%3Cg fill='%232ee6e6' opacity='0.35'%3E%3Ccircle cx='60' cy='40' r='2'/%3E%3Ccircle cx='120' cy='10' r='2'/%3E%3Ccircle cx='120' cy='70' r='2'/%3E%3Ccircle cx='180' cy='70' r='2'/%3E%3Ccircle cx='180' cy='40' r='2'/%3E%3Ccircle cx='40' cy='100' r='2'/%3E%3Ccircle cx='40' cy='130' r='2'/%3E%3Ccircle cx='100' cy='130' r='2'/%3E%3Ccircle cx='100' cy='160' r='2'/%3E%3Ccircle cx='160' cy='160' r='2'/%3E%3Ccircle cx='160' cy='130' r='2'/%3E%3Ccircle cx='80' cy='50' r='2'/%3E%3Ccircle cx='150' cy='50' r='2'/%3E%3Ccircle cx='150' cy='90' r='2'/%3E%3Ccircle cx='20' cy='80' r='2'/%3E%3Ccircle cx='30' cy='160' r='2'/%3E%3Ccircle cx='70' cy='170' r='2'/%3E%3Ccircle cx='120' cy='170' r='2'/%3E%3Ccircle cx='170' cy='100' r='2'/%3E%3C/g%3E%3Cg fill='%23ff7a3d' opacity='0.5'%3E%3Crect x='58' y='8' width='4' height='4'/%3E%3Crect x='118' y='128' width='4' height='4'/%3E%3Crect x='78' y='48' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(at 20% 0%, rgba(46, 230, 230, 0.06) 0%, transparent 50%),
    radial-gradient(at 80% 100%, rgba(255, 122, 61, 0.04) 0%, transparent 50%);
  background-size: 200px 200px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--fg-0); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-0);
  line-height: 1.15;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 500; }

p { margin-bottom: var(--space-2); max-width: var(--w-prose); }

/* ============================================================
   LAYOUT
   ============================================================ */

.wrap {
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section { padding: var(--space-6) 0; }
section:first-of-type { padding-top: var(--space-4); }

/* ============================================================
   NAV
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-2) 0;
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-0);
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.brand .mark {
  width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.nav-links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
}

.nav-links a {
  color: var(--fg-2);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25em 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg-0);
  border-bottom-color: var(--accent);
}

/* Mobile nav */
.nav-toggle { display: none; background: none; border: 0; color: var(--fg-0); cursor: pointer; padding: 0.5rem; }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-1);
    flex-direction: column;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-5) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

.hero-logo-lockup {
  margin-bottom: var(--space-3);
}

.hero-logo {
  width: 144px;
  height: 144px;
  border-radius: 28px;
  box-shadow: 0 0 20px rgba(46, 230, 230, 0.25);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  display: inline-block;
  padding: 0.25em 0.75em;
  border: 1px solid var(--accent-dim);
  border-radius: var(--r-sm);
}

.hero h1 { margin-bottom: var(--space-3); }

.hero-lede {
  font-size: 1.2rem;
  color: var(--fg-1);
  margin-bottom: var(--space-4);
  max-width: 38ch;
}

.hero-art {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(46, 230, 230, 0.08),
              0 0 0 1px var(--border) inset;
  min-height: 520px;
  display: flex;
  align-items: stretch;
}

.hero-art::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10, 12, 15, 0.7) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ── Character Carousel ── */
.char-carousel {
  position: relative;
  width: 100%;
  min-height: 520px;
}

@keyframes char-enter {
  0%   { opacity: 0; transform: scale(1.06) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes char-exit {
  0%   { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.96) translateY(-6px); }
}

.char-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: linear-gradient(160deg, #0d1520 0%, #070a0f 100%);
}

.char-slide.active {
  opacity: 1;
  pointer-events: auto;
  animation: char-enter 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.char-slide.exiting {
  animation: char-exit 0.5s ease forwards;
}

.char-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 0 24px rgba(46, 230, 230, 0.2));
  padding: 1rem 1rem 2.5rem;
}

.char-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.char-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(46, 230, 230, 0.3);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.char-dot.active {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 8px var(--accent);
}

/* Character name label */
.char-label {
  position: absolute;
  bottom: 2.8rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease 0.35s, transform 0.4s ease 0.35s;
  pointer-events: none;
  z-index: 3;
}
.char-slide.active .char-label {
  opacity: 1;
  transform: translateY(0);
}

/* Carousel progress bar */
.char-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  z-index: 4;
  transition: none;
}
.char-progress.running {
  width: 100%;
  transition: width 3.5s linear;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, border 0.15s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--bg-0);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--fg-0); border-color: var(--fg-0); color: var(--bg-0); }

.btn-ghost {
  background: transparent;
  color: var(--fg-0);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   CARDS / VERTICAL LINEUP
   ============================================================ */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
  flex-wrap: wrap;
}

.section-head h2 { margin: 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}

.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
}

.card-img {
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}



.card:hover .card-img img { transform: scale(1.04); }

.card-body { padding: var(--space-3); flex: 1; display: flex; flex-direction: column; }

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5em;
}

.card h3 { color: var(--fg-0); font-size: 1.4rem; text-transform: none; letter-spacing: 0; margin-bottom: 0.5em; font-weight: 600; }

.card p { color: var(--fg-2); font-size: 0.95rem; margin-bottom: var(--space-2); }

.card .card-cta {
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.card .card-cta::after { content: "→"; transition: transform 0.15s ease; }
.card:hover .card-cta::after { transform: translateX(4px); }

.card.status-shipped .card-tag { color: var(--accent); }
.card.status-production .card-tag { color: var(--accent-warm); }
.card.status-upcoming .card-tag { color: var(--fg-3); }

/* ============================================================
   FOUNDER / ABOUT BLOCKS
   ============================================================ */

.founder-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

@media (max-width: 760px) {
  .founder-block { grid-template-columns: 1fr; text-align: left; }
}

.founder-portrait {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.founder-portrait img { width: 100%; height: 100%; object-fit: cover; }

.founder-block h2 { margin-bottom: var(--space-2); }
.founder-block .meta { color: var(--accent); font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-2); }

/* ============================================================
   BOOK PROMO (Conflict Space page)
   ============================================================ */

.book-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5) 0;
}

@media (max-width: 760px) {
  .book-hero { grid-template-columns: 1fr; }
}

.book-cover {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    -20px 0 40px rgba(46, 230, 230, 0.08),
    0 0 0 1px var(--border-strong) inset;
}

.book-cover img { width: 100%; display: block; }

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.book-meta dt { font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em; }
.book-meta dd { color: var(--fg-1); font-size: 0.95rem; margin-bottom: var(--space-2); }

.synopsis {
  max-width: var(--w-prose);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
}

.synopsis p { font-size: 1.1rem; }
.synopsis p + p { margin-top: var(--space-2); }

.sample-chapter {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: var(--space-4);
  border-radius: var(--r-md);
  max-width: var(--w-prose);
}

.sample-chapter h3 { color: var(--accent); margin-bottom: var(--space-3); }
.sample-chapter p { font-size: 1.05rem; color: var(--fg-1); }
.sample-chapter p:first-letter { font-size: 2.2em; font-weight: 600; font-family: var(--font-display); color: var(--fg-0); float: left; line-height: 0.9; padding-right: 0.1em; margin-top: 0.05em; }

/* ============================================================
   POSTER GALLERY
   ============================================================ */

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.poster-card {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(46, 230, 230, 0.15);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.poster-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(46, 230, 230, 0.2);
}

.poster-card img {
  width: 100%;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.poster-card:hover img {
  transform: scale(1.03);
}

.poster-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(to top, rgba(10,12,15,0.95) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.poster-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.poster-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .poster-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: var(--space-5) 0 var(--space-3);
  margin-top: var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

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

.footer-col h4 { color: var(--fg-2); font-size: 0.8rem; margin-bottom: var(--space-2); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4em; }
.footer-col a { color: var(--fg-1); font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }

.footer-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-3);
  max-width: 38ch;
}

.copyline {
  border-top: 1px solid var(--border);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-3);
}

/* ============================================================
   UTILITY
   ============================================================ */

.center { text-align: center; }
.muted { color: var(--fg-2); }
.mono { font-family: var(--font-mono); }
.tag {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--fg-2);
}

.tag-accent { color: var(--accent); border-color: var(--accent-dim); }
.tag-warm { color: var(--accent-warm); border-color: var(--accent-warm); }

.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-4) 0;
}
