/* ============================================================
   RetroWriter — Amber CRT Terminal Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:           #0a0700;
  --amber:        #ffb200;
  --amber-bright: #ffd060;
  --amber-dim:    #c08830;
  --amber-muted:  #6a4e18;
  --amber-panel:  rgba(255,178,0,0.035);
  --glow-xs: 0 0 4px rgba(255,178,0,0.55);
  --glow-sm: 0 0 7px rgba(255,178,0,0.7), 0 0 14px rgba(255,178,0,0.3);
  --glow-md: 0 0 10px rgba(255,178,0,0.8), 0 0 26px rgba(255,178,0,0.4), 0 0 50px rgba(255,178,0,0.15);
  --glow-lg: 0 0 12px rgba(255,178,0,0.9), 0 0 36px rgba(255,178,0,0.55), 0 0 72px rgba(255,178,0,0.25);
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-disp: 'VT323', 'Courier New', monospace;
  --max-w: 960px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Body ──────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── CRT Scanlines ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.12) 3px,
    rgba(0,0,0,0.12) 4px
  );
  pointer-events: none;
  z-index: 9000;
}

/* ── CRT Vignette ──────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%,
    transparent 52%,
    rgba(0,0,0,0.38) 78%,
    rgba(0,0,0,0.82) 100%
  );
  pointer-events: none;
  z-index: 8999;
}

/* ── Flicker ───────────────────────────────────────────────── */
@keyframes flicker {
  0%,44%,46%,73%,75%,100% { opacity:1; }
  45%  { opacity:0.97; }
  74%  { opacity:0.95; }
}
.flicker { animation: flicker 14s ease-in-out infinite; }

/* ── Cursor blink ──────────────────────────────────────────── */
@keyframes blink {
  0%,49%  { opacity:1; }
  50%,100%{ opacity:0; }
}
.cursor {
  display: inline-block;
  width: 0.58em;
  height: 1.05em;
  background: var(--amber);
  vertical-align: bottom;
  margin-left: 2px;
  box-shadow: var(--glow-sm);
  animation: blink 1.1s step-start infinite;
}

/* ── Fade-in helpers ───────────────────────────────────────── */
@keyframes fadein {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}
.fi   { opacity:0; animation: fadein 0.5s ease forwards; }
.fi-1 { opacity:0; animation: fadein 0.45s 0.08s ease forwards; }
.fi-2 { opacity:0; animation: fadein 0.45s 0.22s ease forwards; }
.fi-3 { opacity:0; animation: fadein 0.45s 0.38s ease forwards; }
.fi-4 { opacity:0; animation: fadein 0.45s 0.56s ease forwards; }
.fi-5 { opacity:0; animation: fadein 0.45s 0.76s ease forwards; }
.fi-6 { opacity:0; animation: fadein 0.45s 0.98s ease forwards; }
.fi-7 { opacity:0; animation: fadein 0.45s 1.22s ease forwards; }
.fi-8 { opacity:0; animation: fadein 0.45s 1.48s ease forwards; }

/* ── Navigation ────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(10,7,0,0.96);
  border-bottom: 1px solid var(--amber-muted);
  backdrop-filter: blur(6px);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: stretch;
  height: 56px;
}
.nav-logo {
  font-family: var(--font-disp);
  font-size: 28px;
  color: var(--amber-bright);
  text-shadow: var(--glow-md);
  text-decoration: none;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  padding-right: 1.5rem;
  border-right: 1px solid var(--amber-muted);
  flex-shrink: 0;
}
.nav-logo .br { color: var(--amber-dim); text-shadow: none; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: stretch;
  margin-left: auto;
}
.nav-links li { display: flex; align-items: stretch; }
.nav-links a {
  display: flex;
  align-items: center;
  padding: 0 1.1rem;
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--amber-dim);
  text-decoration: none;
  border-left: 1px solid transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s, text-shadow 0.18s;
}
.nav-links a:hover {
  color: var(--amber);
  background: rgba(255,178,0,0.04);
  text-shadow: var(--glow-xs);
}
.nav-links a.active {
  color: var(--amber-bright);
  text-shadow: var(--glow-sm);
  background: rgba(255,178,0,0.06);
  border-left-color: var(--amber-muted);
}
.nav-links a.active::before { content: '› '; }

/* ── Page wrap ─────────────────────────────────────────────── */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 5rem;
  position: relative;
  z-index: 1;
}

/* ── Status bar ────────────────────────────────────────────── */
.status-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  background: var(--amber);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.5rem;
  z-index: 600;
  box-shadow: 0 -2px 14px rgba(255,178,0,0.2);
}
.status-bar .sb-left {
  margin-right: auto;
  display: flex;
  gap: 1.5rem;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 5.5rem 0 3rem;
  border-bottom: 1px solid var(--amber-muted);
}
.hero-pre {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin-bottom: 1.4rem;
}
.hero-title {
  font-family: var(--font-disp);
  font-size: clamp(4.5rem, 11vw, 9rem);
  line-height: 0.9;
  letter-spacing: 3px;
  color: var(--amber-bright);
  text-shadow: var(--glow-lg);
  margin-bottom: 1.8rem;
}
.hero-lead {
  font-size: 20px;
  color: var(--amber);
  text-shadow: var(--glow-xs);
  max-width: 600px;
  line-height: 1.85;
  margin-bottom: 1rem;
}
.hero-body {
  font-size: 17px;
  color: var(--amber-dim);
  max-width: 580px;
  line-height: 2;
  margin-bottom: 2.5rem;
}
.cta-wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--amber-dim);
  color: var(--amber);
  text-shadow: var(--glow-xs);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover {
  border-color: var(--amber);
  color: var(--amber-bright);
  text-shadow: var(--glow-sm);
  background: rgba(255,178,0,0.07);
  box-shadow: 0 0 22px rgba(255,178,0,0.12);
}
.btn-ghost {
  border-color: var(--amber-muted);
  color: var(--amber-dim);
}
.btn-ghost:hover {
  border-color: var(--amber-dim);
  color: var(--amber);
  background: rgba(255,178,0,0.04);
  box-shadow: none;
}

/* ── Section label ─────────────────────────────────────────── */
.sec-label {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber-dim);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 4.5rem;
  margin-bottom: 2.5rem;
}
.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--amber-muted);
}

/* ── About lists ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 620px) { .about-grid { grid-template-columns: 1fr; gap: 2rem; } }

.about-col h3 {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: var(--glow-xs);
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--amber-muted);
}
.about-col ul { list-style: none; }
.about-col ul li {
  font-size: 17px;
  color: var(--amber-dim);
  line-height: 2;
  padding-left: 1.3rem;
  position: relative;
}
.about-col ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--amber);
  text-shadow: var(--glow-xs);
}

/* ── Screenshot gallery ────────────────────────────────────── */
.gallery-section { padding-bottom: 2rem; }

.gallery-main {
  border: 1px solid var(--amber-muted);
  background: #000;
  margin-bottom: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-main img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.3s;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.gallery-thumb {
  flex: 1 1 100px;
  border: 1px solid var(--amber-muted);
  background: #000;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.4;
  transition: opacity 0.2s, border-color 0.2s;
}
.gallery-thumb:hover  { opacity: 0.65; }
.gallery-thumb.active { opacity: 1; border-color: var(--amber-dim); box-shadow: var(--glow-xs); }
.gallery-thumb img {
  display: block;
  width: 100%;
  height: 52px;
  object-fit: cover;
  object-position: top left;
}

/* ── HR ────────────────────────────────────────────────────── */
hr.div {
  border: none;
  border-top: 1px solid var(--amber-muted);
  margin: 3rem 0;
  opacity: 0.45;
}

/* ── Policy pages ──────────────────────────────────────────── */
.policy-head {
  padding: 4.5rem 0 2.5rem;
  border-bottom: 1px solid var(--amber-muted);
  margin-bottom: 3rem;
}
.policy-head h1 {
  font-family: var(--font-disp);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--amber-bright);
  text-shadow: var(--glow-md);
  letter-spacing: 3px;
  line-height: 0.95;
  margin-bottom: 0.8rem;
}
.policy-meta {
  font-size: 14px;
  color: var(--amber-dim);
  letter-spacing: 2px;
}
.policy-body { max-width: 720px; }

.policy-section { margin-bottom: 2.8rem; }
.policy-section h2 {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: var(--glow-xs);
  margin-bottom: 1.1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--amber-muted);
}
.policy-section p {
  font-size: 17px;
  color: var(--amber-dim);
  line-height: 2;
  margin-bottom: 0.85rem;
}
.policy-section ul { list-style: none; margin-bottom: 0.85rem; }
.policy-section ul li {
  font-size: 17px;
  color: var(--amber-dim);
  line-height: 1.95;
  padding-left: 1.3rem;
  position: relative;
  margin-bottom: 0.25rem;
}
.policy-section ul li::before {
  content: '›';
  position: absolute; left: 0;
  color: var(--amber); text-shadow: var(--glow-xs);
}
.policy-section a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--amber-dim);
  transition: text-shadow 0.2s;
}
.policy-section a:hover { text-shadow: var(--glow-xs); }

/* ── Support ───────────────────────────────────────────────── */
.support-head {
  padding: 4.5rem 0 2.5rem;
  border-bottom: 1px solid var(--amber-muted);
  margin-bottom: 3rem;
}
.support-head h1 {
  font-family: var(--font-disp);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--amber-bright);
  text-shadow: var(--glow-md);
  letter-spacing: 3px;
  line-height: 0.95;
  margin-bottom: 0.8rem;
}
.support-head p {
  font-size: 17px;
  color: var(--amber-dim);
  max-width: 520px;
  line-height: 2;
}

.email-box {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--amber-dim);
  padding: 0.85rem 1.4rem;
  margin: 1.8rem 0 2.5rem;
  font-size: 17px;
}
.email-box .e-label {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber-dim);
  padding-right: 0.8rem;
  border-right: 1px solid var(--amber-muted);
}
.email-box a {
  color: var(--amber-bright);
  text-decoration: none;
  text-shadow: var(--glow-sm);
}
.email-box a:hover { text-shadow: var(--glow-md); }

.contact-form { max-width: 580px; }
.form-field { margin-bottom: 1.5rem; }
.form-field label {
  display: block;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin-bottom: 0.5rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  display: block;
  width: 100%;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--amber-muted);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 17px;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--amber-dim); opacity: 0.45; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--amber-dim);
  box-shadow: 0 0 12px rgba(255,178,0,0.07), inset 0 0 8px rgba(255,178,0,0.04);
}
.form-field select option { background: #0a0700; }
.form-field textarea { min-height: 160px; }
.form-note {
  font-size: 14px;
  color: var(--amber-muted);
  margin-top: 1.2rem;
  line-height: 1.85;
}
.form-note a { color: var(--amber-dim); text-decoration: underline; }

/* ── FAQ (support page) ────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--amber-muted);
  padding: 1.3rem 0;
}
.faq-item:first-child { border-top: 1px solid var(--amber-muted); }
.faq-q {
  font-size: 17px;
  color: var(--amber);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  user-select: none;
}
.faq-q::before {
  content: '+';
  font-family: var(--font-disp);
  font-size: 24px;
  color: var(--amber-dim);
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
  transition: color 0.2s;
}
.faq-item.open .faq-q::before { content: '–'; color: var(--amber); }
.faq-a {
  font-size: 17px;
  color: var(--amber-dim);
  line-height: 2;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.2s;
  padding-left: 1.5rem;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding-top: 0.75rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--amber-muted);
  padding: 2rem 0 3.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-copy { font-size: 13px; color: var(--amber-muted); letter-spacing: 1.5px; }
.footer-links { list-style: none; display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--amber-dim); }

/* ── Form message (support page) ───────────────────────────── */
.form-msg {
  display: none;
  border: 1px solid var(--amber-dim);
  padding: 1rem 1.4rem;
  margin-top: 1.5rem;
  font-size: 17px;
  color: var(--amber);
  text-shadow: var(--glow-xs);
  line-height: 1.85;
}
.form-msg.show { display: block; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-inner  { padding: 0 1rem; }
  .nav-logo   { font-size: 22px; padding-right: 1rem; }
  .nav-links a { padding: 0 0.65rem; font-size: 12px; letter-spacing: 2px; }
  .page-wrap  { padding: 0 1rem 5rem; }
  .hero       { padding: 3rem 0 2rem; }
  .policy-head, .support-head { padding: 3rem 0 2rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
