/* YiCast Marketing Site — Dark theme, app-matching aesthetic */

:root {
  --bg: #12100e;
  --bg-alt: #1a1714;
  --surface: #231f1a;
  --border: #3a332b;
  --text: #e8e0d4;
  --text-muted: #9a8e7f;
  --gold: #c9a84c;
  --gold-dim: #a68a3a;
  --jade: #4caf7c;
  --amber: #d4a043;
  --font-serif: 'Noto Serif', Georgia, serif;
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.content-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(18, 16, 14, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  @supports (backdrop-filter: blur(12px)) {
    background: rgba(18, 16, 14, 0.85);
  }
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-logo { border-radius: 6px; }

.nav-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:not(.btn):hover { color: var(--text); }

/* Language Picker */
.lang-picker {
  position: relative;
}

.lang-picker-btn {
  background: var(--surface);
  border: 1px solid var(--gold-dim);
  color: var(--text);
  padding: 8px 14px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.lang-picker-btn:hover { color: var(--text); border-color: var(--text-muted); }

.lang-picker-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 150px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.lang-picker.open .lang-picker-menu { display: block; }

.lang-picker-menu a {
  display: block;
  padding: 10px 16px;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.lang-picker-menu a:hover {
  background: var(--border);
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s, transform 0.1s;
  cursor: pointer;
  border: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--gold);
  color: #12100e;
}

.btn-primary:hover { background: var(--amber); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--border); }

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 6px;
  background: var(--gold);
  color: #12100e;
}

.btn-sm:hover { background: var(--amber); }

/* Hero */
.hero {
  position: relative;
  padding: 160px 24px 100px;
  text-align: center;
  background-color: var(--bg);
  background-image:
    linear-gradient(to bottom, rgba(18, 16, 14, 0.82) 0%, rgba(18, 16, 14, 0.6) 40%, rgba(18, 16, 14, 0.92) 100%),
    url('/assets/screenshots/casting.webp');
  background-image:
    linear-gradient(to bottom, rgba(18, 16, 14, 0.82) 0%, rgba(18, 16, 14, 0.6) 40%, rgba(18, 16, 14, 0.92) 100%),
    image-set(url('/assets/screenshots/casting.webp') type('image/webp'), url('/assets/screenshots/casting.png') type('image/png'));
  background-position: center 65%;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(232, 224, 212, 0.9);
  margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--bg-alt);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
  font-size: 16px;
}

/* What is YiCast (standalone paragraph) */
.what-is-yicast {
  font-size: 18px;
  line-height: 1.8;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  margin-top: 48px;
}

.step { text-align: center; }

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.feature h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 8px;
  text-align: left;
}

.feature p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

/* Readers Grid */
.readers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.reader {
  text-align: center;
  padding: 24px 16px;
}

.reader img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid var(--border);
}

.reader h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  margin-bottom: 4px;
}

.reader-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 8px;
}

.reader p:last-child {
  color: var(--text-muted);
  font-size: 14px;
}

/* I Ching Section */
#i-ching p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
}

#i-ching p:last-child { margin-bottom: 0; }

/* FAQ */
.faq-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] summary::after { content: '-'; }

.faq-item summary::-webkit-details-marker { display: none; }

.faq-answer {
  padding: 0 24px 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* CTA Section */
.cta-section {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(201, 168, 76, 0.06) 0%, transparent 60%),
    var(--bg);
}

.cta-inner { text-align: center; }

.cta-section h2 {
  font-size: clamp(22px, 4vw, 32px);
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 16px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col:first-child { flex: 1; min-width: 200px; }

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--text); }

.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Zoomable images */
.zoomable { cursor: zoom-in; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.active { display: flex; }

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 36px;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.lightbox-close:hover { color: #fff; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

/* Step Screenshots */
.step-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

/* Trailer */
.trailer-lang-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.trailer-lang {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 22px;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.trailer-lang:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.trailer-lang.active {
  background: var(--gold);
  color: #12100e;
  border-color: var(--gold);
  font-weight: 600;
}

.trailer-wrap {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.trailer-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.trailer-subscribe {
  text-align: center;
  margin-top: 16px;
}

.trailer-subscribe a {
  color: var(--gold);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.trailer-subscribe a:hover { color: var(--amber); }

/* Responsive */
@media (max-width: 768px) {
  .nav-links > a:not(.btn) { display: none; }
  .nav-links { gap: 12px; }

  .hero { padding: 120px 20px 70px; min-height: 420px; }

  .section { padding: 60px 20px; }

  .features-grid { grid-template-columns: 1fr; }

  .readers-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .reader img { width: 100px; height: 100px; }

  .footer-inner { gap: 32px; }
}

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

  .hero-cta { flex-direction: column; align-items: center; }

  .hero-cta .btn { width: 100%; max-width: 280px; text-align: center; }
}
