/* Echowrought Games — site styles
   Palette: Void Slate #0B0F17 · Nightfall #152238 · Aster Violet #5A4B8A
            Antique Gold #C9A66B · Parchment #E6D9B8 · Moonlit #C8D4E8 */
:root {
  --void: #0B0F17;
  --panel: #0F1522;
  --nightfall: #152238;
  --violet: #5A4B8A;
  --violet-glow: #8A70D6;
  --violet-text: #B7A8E6;
  --violet-soft: #D6CCF5;
  --gold: #C9A66B;
  --parchment: #E6D9B8;
  --moonlit: #C8D4E8;
  --muted: #8E9AB0;
  --line: rgba(201, 166, 107, .18);
  --display: "Cinzel", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--moonlit);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); }
a:hover { color: var(--parchment); }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shared bits ---------- */
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--violet-text); }
.h-serif { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4vw, 52px); line-height: 1.1; color: var(--parchment); }
.muted { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border-radius: 4px; text-decoration: none; letter-spacing: .03em;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-gold { background: var(--gold); color: var(--void); font-weight: 600; }
.btn-gold:hover { background: var(--parchment); color: var(--void); }
.btn-ghost { border: 1px solid rgba(183, 168, 230, .55); color: var(--violet-soft); }
.btn-ghost:hover { background: var(--violet-soft); border-color: var(--violet-soft); color: var(--void); }
.btn-sm { min-height: 44px; padding: 0 18px; }
.medallion { border-radius: 50%; overflow: hidden; }
.medallion img {
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%);
          mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%);
}

/* ---------- header ---------- */
.site-header { position: relative; z-index: 5; border-bottom: 1px solid var(--line); background: rgba(11, 15, 23, .72); }
.site-nav { max-width: 1240px; margin: 0 auto; padding: 18px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: .1em; color: var(--parchment); }
.brand-sub { font-family: var(--display); font-size: 10px; letter-spacing: .62em; color: var(--gold); margin-top: 5px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 14px; letter-spacing: .04em; }
.nav-links a:not(.btn) { color: var(--moonlit); text-decoration: none; }
.nav-links a:not(.btn):hover { color: var(--parchment); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 880px; margin-top: -81px; display: flex; align-items: center; justify-content: center; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero-shade { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 50% 46%, rgba(11,15,23,.5) 0%, rgba(11,15,23,0) 50%),
  linear-gradient(180deg, rgba(11,15,23,.7) 0%, rgba(11,15,23,0) 16%, rgba(11,15,23,0) 72%, var(--void) 100%); }
.hero-stars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }
.hero-inner { position: relative; z-index: 2; max-width: 980px; padding: 160px 32px 120px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.hero-emblem { width: 176px; height: 176px; animation: glow 5s ease-in-out infinite; }
.hero-title { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.hero-title .big { font-family: var(--display); font-weight: 600; font-size: clamp(44px, 8.4vw, 116px); letter-spacing: .06em; color: var(--parchment); text-shadow: 0 2px 40px rgba(201,166,107,.35); }
.hero-title .small { display: flex; align-items: center; gap: 18px; margin-top: 14px; font-family: var(--display); font-weight: 500; font-size: clamp(16px, 2vw, 26px); letter-spacing: .9em; color: var(--gold); }
.hero-title .rule { width: 64px; height: 1px; background: var(--gold); opacity: .6; }
.tagline { margin: 10px 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 32px); color: var(--parchment); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 18px; }
.descend { margin-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); text-decoration: none; }

/* ---------- sections ---------- */
.section { padding: 120px 32px; }
.section-alt { background: var(--panel); border-top: 1px solid rgba(201,166,107,.14); border-bottom: 1px solid rgba(201,166,107,.14); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-head > div { display: flex; flex-direction: column; gap: 10px; }

.studio-intro { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end; justify-content: space-between; margin-bottom: 64px; }
.studio-intro h2 { margin: 0; flex: 1 1 560px; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4vw, 54px); line-height: 1.12; color: var(--parchment); }
.studio-intro h2 em { color: var(--gold); }
.studio-intro p { margin: 0; flex: 1 1 320px; max-width: 400px; color: var(--muted); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card { border: 1px solid rgba(201,166,107,.22); border-radius: 8px; background: var(--panel); transition: transform .3s, border-color .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); border-color: rgba(183,168,230,.6); box-shadow: 0 0 40px rgba(138,112,214,.18); }
.pillar { padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.pillar .label { margin: 0; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--violet-text); }
.pillar h3, .project h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; color: var(--parchment); }
.pillar p, .project p { margin: 0; color: var(--muted); }

/* featured */
.rule-row { display: flex; align-items: center; gap: 16px; margin-bottom: 48px; }
.rule-row .line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(183,168,230,.6), rgba(201,166,107,.25) 40%, rgba(201,166,107,0)); }
.featured { display: flex; flex-wrap: wrap; gap: 56px; align-items: stretch; }
.featured-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.cwg-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(52px, 6vw, 80px); line-height: 1; letter-spacing: .04em; color: var(--parchment); text-shadow: 0 0 34px rgba(138,112,214,.55); }
.cwg-title span { color: var(--gold); }
.cwg-sub { margin: 8px 0 0; font-family: var(--display); font-size: 14px; letter-spacing: .34em; color: var(--violet-text); }
.lead { margin: 0; font-size: 18px; max-width: 540px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid rgba(201,166,107,.2); padding-bottom: 2px; }
.tab { min-height: 44px; padding: 0 18px; background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -3px; font: 14px var(--sans); letter-spacing: .06em; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--parchment); border-bottom-color: var(--gold); }
.tab:hover { color: var(--parchment); }
.tabpanel { display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.tabpanel[hidden] { display: none; }
.tabpanel h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 30px; color: var(--parchment); }
.tabpanel p { margin: 0; color: var(--muted); max-width: 540px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(201,166,107,.2); border: 1px solid rgba(201,166,107,.2); border-radius: 6px; overflow: hidden; }
.stats div { background: var(--panel); padding: 18px 20px; }
.stats strong { display: block; font-family: var(--display); font-weight: 400; font-size: 34px; color: var(--gold); line-height: 1.1; }
.stats span { font-size: 13px; color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.cast { flex: 1 1 440px; min-width: 0; min-height: 620px; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid rgba(183,168,230,.3); background: var(--void); margin: 0; }
.cast img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cast::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse at 50% 45%, rgba(11,15,23,0) 45%, rgba(11,15,23,.75) 100%),
  linear-gradient(180deg, rgba(11,15,23,0) 60%, rgba(11,15,23,.92) 100%); }
.cast figcaption { position: absolute; z-index: 1; left: 22px; right: 22px; bottom: 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
.cast figcaption strong { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: .06em; color: var(--parchment); }
.cast figcaption span { font-size: 13px; }
.pill { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; background: rgba(11,15,23,.7); border: 1px solid rgba(183,168,230,.3); padding: 6px 10px; border-radius: 3px; }

/* projects */
.project { overflow: hidden; display: flex; flex-direction: column; }
.project-art { height: 220px; display: flex; align-items: center; justify-content: center; }
.project-body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.status { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; padding: 3px 10px; border-radius: 3px; border: 1px solid rgba(200,212,232,.45); color: var(--moonlit); }
.status.live { background: var(--gold); border-color: var(--gold); color: var(--void); }
.project a { margin-top: 6px; font-size: 14px; font-weight: 500; letter-spacing: .04em; }

/* chronicle */
.chronicle a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; padding: 26px 0; border-top: 1px solid var(--line); text-decoration: none; }
.chronicle a:last-child { border-bottom: 1px solid var(--line); }
.chronicle .date { flex: 0 0 120px; font-size: 13px; letter-spacing: .1em; color: var(--muted); }
.chronicle .tag { flex: 0 0 120px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--violet-text); }
.chronicle .title { flex: 1 1 360px; font-family: var(--serif); font-size: 26px; color: var(--parchment); }
.chronicle a:hover .title { color: var(--gold); }

/* community */
.community { position: relative; padding: 130px 32px; overflow: hidden; background: radial-gradient(ellipse at 50% 100%, #2A2550 0%, var(--void) 65%); }
.community .wrap { max-width: 760px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.community h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(34px, 4.4vw, 56px); letter-spacing: .04em; color: var(--parchment); }
.community p { margin: 0; font-size: 18px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 32px 40px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 56px; font-size: 14px; }
.footer-cols div { display: flex; flex-direction: column; gap: 10px; }
.footer-cols .head { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--violet-text); }
.footer-cols a { color: var(--moonlit); text-decoration: none; }
.footer-cols a:hover { color: var(--parchment); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid rgba(201,166,107,.12); font-size: 13px; color: var(--muted); }
.footer-bottom span:last-child { max-width: 640px; }

/* motion */
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(201,166,107,.35)); } 50% { filter: drop-shadow(0 0 26px rgba(201,166,107,.7)); } }
.tw1 { animation: twinkle 4s ease-in-out infinite; }
.tw2 { animation: twinkle 6s ease-in-out infinite 1.5s; }
.tw3 { animation: twinkle 5s ease-in-out infinite 3s; }
.rise1 { animation: rise 1.1s ease-out both; }
.rise2 { animation: rise 1.1s ease-out .25s both; }
.rise3 { animation: rise 1.1s ease-out .5s both; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease-out, transform .9s ease-out; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* small screens */
@media (max-width: 720px) {
  .site-nav { padding: 14px 20px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .section { padding: 88px 20px; }
  .hero { min-height: 760px; }
  .hero-inner { padding: 140px 20px 90px; }
  .hero-emblem { width: 132px; height: 132px; }
  .hero-title .rule { width: 32px; }
  .hero-title .small { letter-spacing: .6em; }
  .cast { min-height: 520px; }
}
