/* ══════════════════════════════════════════════════════════════════════
   QALAM STUDIO — Design System
   The qalam (reed pen) is the actual instrument Urdu literature has been
   written with for centuries. This system is built from that: warm
   parchment paper, ink-dark masthead, brass gilding, and a deep lac-red
   "correction ink" accent — not a generic dark-mode SaaS palette.
   ══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Noto+Nastaliq+Urdu:wght@400;500;600;700&family=Syne:wght@700;800&display=swap');

:root {
  /* Paper (page background + light surfaces) */
  --bg-primary: #F1E7D2;      /* warm parchment — page background */
  --bg-surface: #E7D6AC;      /* deeper paper — alternating sections */
  --bg-elevated: #FBF6EA;     /* lightest ivory — cards, modals, toasts */
  --bg-glass: #F8F1DF;        /* card surface (flat, no blur) */

  /* Ink (dark masthead surfaces: nav, footer) */
  --ink: #211A12;
  --ink-soft: #362A19;

  --border-subtle: rgba(33, 26, 18, 0.14);
  --border-glow: rgba(156, 107, 46, 0.45);

  --text-primary: #211A12;
  --text-secondary: rgba(33, 26, 18, 0.64);
  --text-muted: rgba(33, 26, 18, 0.42);
  --text-on-ink: #F1E7D2;
  --text-on-ink-muted: rgba(241, 231, 210, 0.6);

  --accent: #9C6B2E;                 /* brass / gilding */
  --accent-bright: #B98037;
  --accent-secondary: #7C2A2E;       /* lac-red correction ink */
  --accent-gradient: linear-gradient(135deg, #9C6B2E 0%, #7C2A2E 100%);
  --accent-glow: 0 0 0 3px rgba(156, 107, 46, 0.12);

  --danger: #963232;
  --warning: #A6752A;
  --success: #3F6B4A;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  --shadow-sm: 0 1px 3px rgba(33, 26, 18, 0.10);
  --shadow-md: 0 6px 20px rgba(33, 26, 18, 0.12);
  --shadow-lg: 0 16px 40px rgba(33, 26, 18, 0.18);

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.45s ease;

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-urdu: 'Noto Nastaliq Urdu', serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-surface);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Faint fibrous paper texture — a subtle nod to laid paper, not a photo
     texture. Kept extremely light so it reads as material, not decoration. */
  background-image:
    radial-gradient(rgba(33,26,18,0.03) 1px, transparent 1px);
  background-size: 3px 3px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-bright); }

/* ── Layout ── */
.page-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation (ink masthead) ── */
.nav-floating {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ink);
  border-bottom: 1px solid rgba(241, 231, 210, 0.1);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-base);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: 1.25rem;
  color: var(--text-on-ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  margin-right: 0.5rem;
}

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

.nav-link {
  color: var(--text-on-ink-muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-on-ink);
  background: rgba(241, 231, 210, 0.08);
}

.nav-link.active {
  color: var(--accent-bright);
  background: rgba(156, 107, 46, 0.14);
}

.nav-pro-badge {
  background: var(--accent-gradient);
  color: var(--text-on-ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-left: 0.5rem;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-on-ink);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem;
  margin-left: auto;
}

/* ── Hero ── */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Ghosted Nastaliq watermark — the actual word "qalam" (پن), sitting
   behind the headline. Grounds the page in the language it's actually
   for, not a generic English SaaS wrapper. */
.hero-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  font-family: var(--font-urdu);
  font-size: clamp(10rem, 32vw, 26rem);
  color: var(--text-primary);
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
  user-select: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.7s ease-out;
}

.hero-title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  animation: fadeInUp 0.7s ease-out 0.1s both;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-secondary);
}

/* The signature element: a single continuous pen-stroke, drawn once on
   load, used as the hero's underline flourish. */
.hero-stroke {
  display: block;
  width: min(360px, 70vw);
  height: 20px;
  margin: -0.5rem auto 1.75rem;
}

.hero-stroke path {
  fill: none;
  stroke: var(--accent-secondary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw-stroke 1.1s 0.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes draw-stroke {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stroke path { animation: none; stroke-dashoffset: 0; }
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--text-on-ink);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

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

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

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(33,26,18,0.04);
}

.btn-danger {
  background: rgba(150,50,50,0.08);
  color: var(--danger);
  border: 1px solid rgba(150,50,50,0.25);
}

.btn-danger:hover { background: rgba(150,50,50,0.15); }

.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.78rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition-base);
  position: relative;
}

/* Small brass corner mark — a quiet nod to manuscript-page corner
   ornaments, instead of a glow/shadow lift on hover. */
.card::before {
  content: '';
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  width: 8px; height: 8px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  opacity: 0;
  transition: var(--transition-base);
}

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}

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

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

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  color: var(--accent-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.card-link:hover { gap: 0.5rem; }

/* ── Glass Panel (kept name for compat — now a flat ivory panel) ── */
.glass-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239C6B2E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ── Output Box ── */
.output-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--text-primary);
  position: relative;
  overflow: auto;
  max-height: 600px;
}

.output-box.urdu {
  direction: rtl;
  text-align: right;
  font-family: var(--font-urdu);
  line-height: 2.4;
}

.output-box.ltr {
  direction: ltr;
  text-align: left;
  font-family: var(--font-body);
}

/* ── Stats / Pills ── */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-pill.pro {
  border-color: var(--border-glow);
  color: var(--accent);
  background: rgba(156,107,46,0.06);
}

/* ── Progress Ring ── */
.progress-ring { position: relative; width: 48px; height: 48px; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: var(--border-subtle); stroke-width: 3; }
.progress-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}
.progress-ring-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.7rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent-secondary); border-bottom-color: var(--accent-secondary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

/* ── Pricing Cards ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.pricing-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition-base);
}

.pricing-card:hover { border-color: var(--border-glow); }

.pricing-card.pro {
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  position: relative;
}

.pricing-card.pro::after {
  content: '';
  position: absolute;
  top: 0; left: 1.5rem; right: 1.5rem;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 0 0 3px 3px;
}

.pricing-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.pricing-label.pro { color: var(--accent-secondary); }
.pricing-label.free { color: var(--text-muted); }

.pricing-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.pricing-price span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-body);
}

.pricing-features { list-style: none; padding: 0; margin: 0; }
.pricing-features li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}
.pricing-features li:first-child { border-top: none; }

/* ── Stepper ── */
.stepper { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.5rem 0; }
.step { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem; font-weight: 600;
  transition: var(--transition-base);
}
.step-dot.pending { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border-subtle); }
.step-dot.active { background: var(--accent-secondary); color: var(--text-on-ink); }
.step-dot.completed { background: rgba(156,107,46,0.15); color: var(--accent); border: 1px solid var(--border-glow); }
.step-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
.step-label.active { color: var(--accent-secondary); font-weight: 700; }
.step-line { width: 40px; height: 2px; background: var(--border-subtle); border-radius: 1px; }
.step-line.completed { background: var(--accent); }

/* ── Bank Cards ── */
.bank-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-bottom: 0.75rem;
  transition: var(--transition-fast);
}
.bank-card:hover { border-color: var(--border-glow); }
.bank-name { font-weight: 700; color: var(--text-primary); font-size: 0.9rem; margin-bottom: 0.3rem; }
.bank-detail { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.15rem; }
.bank-number {
  font-size: 1rem;
  color: var(--accent-secondary);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

/* ── Blog ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.blog-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  cursor: pointer;
}
.blog-card:hover { border-color: var(--border-glow); box-shadow: var(--shadow-md); }
.blog-card-body { padding: 1.25rem; }
.blog-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.blog-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.blog-excerpt { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.blog-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.75rem; font-family: var(--font-mono); }

/* ── Admin ── */
.admin-header {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin: 1rem 0; }
.kpi-card { background: var(--bg-glass); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 1rem; text-align: center; }
.kpi-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--accent-secondary); }
.kpi-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; font-family: var(--font-mono); }

.status-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.6rem; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; font-family: var(--font-mono);
}
.status-pending { background: rgba(166,117,42,0.1); color: var(--warning); border: 1px solid rgba(166,117,42,0.25); }
.status-approved { background: rgba(63,107,74,0.1); color: var(--success); border: 1px solid rgba(63,107,74,0.25); }
.status-rejected { background: rgba(150,50,50,0.1); color: var(--danger); border: 1px solid rgba(150,50,50,0.25); }

/* ── Key Row ── */
.key-row {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.key-row.fresh { border-color: rgba(63,107,74,0.3); background: rgba(63,107,74,0.04); }
.key-row.used { border-color: rgba(166,117,42,0.3); background: rgba(166,117,42,0.04); }
.key-row.revoked { border-color: rgba(150,50,50,0.3); background: rgba(150,50,50,0.04); }

/* ── Toast ── */
.toast-container {
  position: fixed; top: 5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.75rem;
  min-width: 280px; max-width: 400px;
  pointer-events: all;
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.85rem;
  color: var(--text-primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--accent-secondary); }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--accent-secondary); }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0.2rem; margin-left: auto; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(33, 26, 18, 0.55);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 500px; width: 100%;
  transform: scale(0.97) translateY(8px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }

/* ── Loading States ── */
.skeleton {
  background: linear-gradient(90deg, rgba(33,26,18,0.04) 25%, rgba(33,26,18,0.08) 50%, rgba(33,26,18,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.loading-dots { display: inline-flex; gap: 0.3rem; }
.loading-dots span { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; }
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

/* ── Section Headers ── */
.section-header { margin-bottom: 1.5rem; }
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--text-secondary); font-size: 0.92rem; max-width: 500px; }

/* ── Footer (ink masthead, matches nav) ── */
.footer {
  margin-top: auto;
  background: var(--ink);
  padding: 2.5rem 0;
  text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-link { color: var(--text-on-ink-muted); text-decoration: none; font-size: 0.8rem; transition: var(--transition-fast); }
.footer-link:hover { color: var(--accent-bright); }
.footer-copy { color: rgba(241,231,210,0.3); font-size: 0.75rem; font-family: var(--font-mono); }

/* ── Animations ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Utility ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .hero { padding-top: 3rem; min-height: auto; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; }
  .card-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stepper { gap: 0.5rem; }
  .step-line { width: 20px; }
}

/* ── Admin Login ── */
.admin-login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--ink); }
.admin-login-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%; max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.admin-login-box h2 { font-family: var(--font-display); font-weight: 600; color: var(--accent-secondary); margin-bottom: 1.5rem; }

/* ── License Modal Trigger ── */
.license-trigger {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  background: var(--ink);
  border-radius: 100px;
  padding: 0.6rem 1.2rem;
  color: var(--text-on-ink-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-base);
  display: flex; align-items: center; gap: 0.5rem;
  box-shadow: var(--shadow-md);
}
.license-trigger:hover { color: var(--accent-bright); }

/* ── Copy Button ── */
.copy-btn {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.copy-btn:hover { background: rgba(156,107,46,0.1); color: var(--accent); border-color: var(--border-glow); }

/* ── Divider ── */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border-subtle), transparent); margin: 1.5rem 0; }

/* ── Interstitial Ad Overlay ── */
.ad-interstitial {
  position: fixed; inset: 0;
  background: rgba(33, 26, 18, 0.85);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.ad-interstitial.active { opacity: 1; pointer-events: all; }
.ad-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 460px; width: 100%;
  text-align: center;
  transform: scale(0.96);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ad-interstitial.active .ad-box { transform: scale(1); }
.ad-label { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.8rem; font-family: var(--font-mono); }
.ad-timer { color: var(--text-secondary); font-size: 0.85rem; margin: 0.6rem 0; }
.ad-skip {
  background: var(--ink); color: var(--text-on-ink);
  border: none; padding: 0.6rem 1.4rem; border-radius: var(--radius-md);
  font-weight: 700; cursor: pointer; font-size: 0.88rem; margin-top: 0.4rem;
  transition: var(--transition-fast);
}
.ad-skip:disabled { background: var(--border-subtle); color: var(--text-muted); cursor: not-allowed; }
.ad-pro-link { color: var(--text-muted); font-size: 0.72rem; margin-top: 0.6rem; }
.ad-pro-link a { color: var(--accent-secondary); text-decoration: none; }

/* ── Mobile Nav Dropdown ── */
.nav-links.mobile-open {
  display: flex !important;
  position: absolute; top: 100%; left: 0; right: 0;
  flex-direction: column;
  background: var(--ink);
  padding: 1rem;
  border-top: 1px solid rgba(241,231,210,0.1);
  gap: 0.25rem;
  box-shadow: var(--shadow-lg);
}
.nav-links.mobile-open .nav-link { padding: 0.6rem 1rem; width: 100%; text-align: center; }

/* ── FileDesk External Badge ── */
.external-badge::after { content: "↗"; font-size: 0.65em; margin-left: 0.3rem; opacity: 0.6; }
