/* ═══════════════════════════════════════════════════════════
   ScribeAI — global.css
   Aesthetic: Dark literary editorial — ink, parchment, golden light
   Fonts: Playfair Display (display) + DM Sans (body)
═══════════════════════════════════════════════════════════ */

/* @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500;600&display=swap'); */

/* ── Variables ──────────────────────────────────────────── */
:root {
  /* Core palette */
  --ink:          #0d0f14;
  --ink-soft:     #1a1d27;
  --ink-mid:      #252836;
  --surface:      #1e2130;
  --surface-soft: #262a3a;
  --border:       rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.13);

  /* Type */
  --parchment:    #f5f0e8;
  --parchment-dim:#c8c0b0;
  --muted:        #6b7280;

  /* Accents */
  --gold:         #e8b84b;
  --gold-dim:     #c99a30;
  --gold-glow:    rgba(232,184,75,0.18);
  --ember:        #e05c3a;
  --teal:         #2dd4bf;

  /* Functional */
  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;
  --shadow-card:  0 8px 32px rgba(0,0,0,0.45);
  --shadow-glow:  0 0 40px rgba(232,184,75,0.12);
  --transition:   all 0.25s cubic-bezier(0.4,0,0.2,1);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* Subtle noise grain overlay */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232,184,75,0.07) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}



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

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { color: var(--parchment-dim); }
a { color: inherit; text-decoration: none; }

kbd {
  background: var(--surface-soft);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.78rem;
  font-family: var(--font-body);
  color: var(--gold);
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* ── Header ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header .header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
}

/* Logo */
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--parchment);
  transition: var(--transition);
}
.logo:hover { opacity: 0.85; }
.logo-accent { color: var(--gold); }

/* Hamburger button */
.hamburger {
  display: none; /* hidden on desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 20px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--parchment);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Nav links */
.nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--parchment-dim);
  letter-spacing: 0.03em;
  transition: var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav a:hover { color: var(--parchment); }
.nav a:hover::after { width: 100%; }
.nav a.active { color: var(--gold); }
.nav a.active::after { width: 100%; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn.primary {
  background: var(--gold);
  color: var(--ink);
}
.btn.primary:hover {
  background: var(--gold-dim);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(232,184,75,0.3);
}
.btn.primary:active { transform: translateY(0); }

.btn.accent {
  background: var(--surface-soft);
  color: var(--parchment-dim);
  border: 1px solid var(--border-light);
}
.btn.accent:hover {
  background: var(--surface);
  color: var(--parchment);
  border-color: var(--gold);
}

.btn.btn-lg {
  font-size: 1rem;
  padding: 0.85rem 2rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Hero (index.html) ──────────────────────────────────── */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(232,184,75,0.1) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(224,92,58,0.07) 0%, transparent 60%);
  pointer-events: none;
}

/* Decorative quote marks */
.hero::after {
  content: '❝';
  position: absolute;
  top: 1rem;
  left: 4%;
  font-size: 10rem;
  color: rgba(232,184,75,0.04);
  font-family: var(--font-display);
  line-height: 1;
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero .accent { color: var(--gold); font-style: italic; }

.hero p {
  max-width: 500px;
  margin: 0 auto 1rem;
  font-size: 1rem;
  color: var(--parchment-dim);
}

/* ── Features ───────────────────────────────────────────── */
.features { padding: 5rem 0; }

.features .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.card:hover::before { opacity: 1; }

.card .card-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  display: block;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--parchment);
}

.card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ── CTA / Pricing ──────────────────────────────────────── */
.pricing {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.pricing h2 { margin-bottom: 0.75rem; }
.pricing p { color: var(--muted); }



/* --- SEO & Content Section Styles --- */

.seo-section {
    padding: 80px 0;
    background-color: #ffffff;
    color: #444;
    line-height: 1.8;
}

.seo-section h2 {
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.seo-section h3 {
    font-size: 1.8rem;
    color: #222;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.seo-section p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #555;
}

/* --- How-To Grid Layout --- */

.how-to-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.how-to-card {
    background: #fdfdfd;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    border-left: 5px solid #6c63ff; /* Matching your primary accent color */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.how-to-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.how-to-card strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}


/* ── AI Tools Section ───────────────────────────────────── */

.tools {
  padding: 5rem 0;
}

.tools-sub {
  max-width: 600px;
  margin: 0.5rem auto 3rem;
  color: var(--muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

/* Tool Card */

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* top glow line */
.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.tool-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.tool-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  padding: 3.5rem 0 2rem;
  background: var(--ink-soft);
  border-top: 1px solid var(--border);
}


/* Footer grid layout */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

/* Footer headings */
.footer h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

/* Footer links styling */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-size: 0.88rem;
    color: var(--muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--parchment);
}

/* ── Toast ──────────────────────────────────────────────── */
#global-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-soft);
  border: 1px solid var(--border-light);
  color: var(--parchment);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

#global-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ─────────────────────────────────────────── */
/* @media (max-width: 768px) {
  .nav ul { gap: 1.25rem; }
  .hero { padding: 5rem 0 4rem; }
  .hero::after { display: none; }
}

@media (max-width: 480px) {
  .nav ul { gap: 1rem; }
  .logo { font-size: 1.2rem; }
} */

/* Responsive header fix */
/* Hamburger Button */
.hamburger {
    display: none; /* hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--parchment);
    border-radius: 2px;
}

/* Mobile nav */
/* ── Mobile Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  /* Show hamburger on mobile */
  .hamburger {
    display: flex;
  }

  /* Hide nav by default on mobile */
  .nav {
    display: none;
    position: absolute;
    top: 100%; /* below header */
    left: 0;
    width: 100%;
    background: var(--ink-soft);
    border-top: 1px solid var(--border);
    z-index: 1000;
    flex-direction: column;
  }

  .nav.active {
    display: flex;
  }

  .nav ul {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
  }

  .nav ul li a {
    display: block;
    padding: 0.5rem 0;
  }
  .seo-section {
        padding: 50px 20px;
    }
    
    .seo-section h2 {
        font-size: 1.8rem;
    }
    
    .seo-section h3 {
        font-size: 1.4rem;
    }

  /* Hamburger animation */
  .hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }
}

@media (max-width: 480px) {
  .nav ul {
    flex-direction: column; /* Stack menu vertically on small screens */
    align-items: flex-start;
  }

  .logo {
    font-size: 1.3rem;
  }

  .header .container {
    padding: 0.75rem 1rem;
  }
}