/* ═══════════════════════════════════════════════
   Palmystra Design System
   Dark mystical theme for GitHub Pages
   ═══════════════════════════════════════════════ */

/* ── Custom Properties ────────────────────────── */
:root {
  --bg-deep: #0a0a12;
  --bg-base: #0D0D14;
  --bg-surface: #15131e;
  --bg-card: #1c1928;
  --bg-card-hover: #231d30;

  --gold: #c4a265;
  --gold-light: #d9bf8a;
  --gold-dim: #8a7245;
  --purple: #8b6cc7;
  --purple-dim: #5a3f8a;

  --text: #f0ebe0;
  --text-muted: #9a8e7e;
  --text-dim: #6a6058;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold: 0 0 40px rgba(196,162,101,0.08);

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  --max-width: 1120px;
  --nav-height: 64px;
}

/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ── Typography ───────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title { margin-bottom: 1rem; }

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
}

/* ── Layout ───────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

/* ── Navbar ───────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(13,13,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(196,162,101,0.08);
  z-index: 1000;
  transition: background 0.3s;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-cta {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  background: var(--gold);
  color: var(--bg-deep) !important;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196,162,101,0.3);
  color: var(--bg-deep) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Hero ─────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(196,162,101,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: rgba(196,162,101,0.08);
  border: 1px solid rgba(196,162,101,0.15);
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 2rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-deep);
  box-shadow: 0 4px 20px rgba(196,162,101,0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(196,162,101,0.35);
  color: var(--bg-deep);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(196,162,101,0.25);
  color: var(--gold);
}

.btn-ghost:hover {
  background: rgba(196,162,101,0.06);
  border-color: rgba(196,162,101,0.4);
  color: var(--gold-light);
}

/* ── Feature Cards ────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(196,162,101,0.06);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  text-decoration: none;
  display: block;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(196,162,101,0.15);
  box-shadow: var(--shadow-gold);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(196,162,101,0.08);
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 500;
}

/* ── Steps / How it works ─────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.step {
  text-align: center;
  padding: 1.5rem;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  border: 2px solid var(--gold-dim);
  margin-bottom: 1.25rem;
}

.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* ── Testimonials ─────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.testimonial {
  background: var(--bg-card);
  border: 1px solid rgba(196,162,101,0.06);
  border-radius: var(--radius);
  padding: 2rem;
}

.testimonial-stars {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.testimonial p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.testimonial-author {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── CTA Banner ───────────────────────────────── */
.cta-section {
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,108,199,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 { margin-bottom: 1rem; position: relative; }
.cta-section .section-desc {
  margin: 0 auto 2rem;
  position: relative;
}

/* ── Feature Detail Page ──────────────────────── */
.feature-hero {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 4rem;
  text-align: center;
  position: relative;
}

.feature-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(196,162,101,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.feature-hero .feature-icon-lg {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: rgba(196,162,101,0.08);
  margin-bottom: 1.5rem;
}

.feature-body {
  max-width: 740px;
  margin: 0 auto;
}

.feature-body h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-body p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.feature-body ul {
  margin-bottom: 1.5rem;
}

.feature-body ul li {
  padding: 0.5rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text-muted);
}

.feature-body ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold-dim);
  font-size: 0.8rem;
}

/* ── FAQ Accordion ────────────────────────────── */
.faq-list {
  max-width: 740px;
  margin: 3rem auto 0;
}

.faq-item {
  border-bottom: 1px solid rgba(196,162,101,0.08);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem 0;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  transition: color 0.2s;
}

.faq-question:hover { color: var(--gold); }

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--gold-dim);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding-bottom: 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ── Blog ─────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid rgba(196,162,101,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
  display: block;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(196,162,101,0.15);
}

.blog-card-img {
  height: 180px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-card-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Footer ───────────────────────────────────── */
.footer {
  border-top: 1px solid rgba(196,162,101,0.06);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand .nav-logo { margin-bottom: 0.75rem; }
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

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

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(196,162,101,0.04);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Legal Pages ──────────────────────────────── */
.legal-page {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 4rem;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.legal-page .legal-date {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--gold);
}

.legal-page p,
.legal-page li {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.legal-page ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-page ul li {
  list-style: disc;
  padding: 0.2rem 0;
}

/* ── Utilities ────────────────────────────────── */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Animations ───────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.7s ease forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-up-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(13,13,20,0.97);
    backdrop-filter: blur(16px);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(196,162,101,0.08);
  }
  .nav-toggle { display: flex; }

  .hero { min-height: auto; padding-top: calc(var(--nav-height) + 3rem); padding-bottom: 3rem; }
  .hero h1 { font-size: 2.2rem; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }

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

  section { padding: 3rem 0; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
}
