/* ═══════════════════════════════════════════════════════════
   FICTION IGNITION — Global Styles
   Brand: Navy #1b2e5e + Orange #e8610a + White
═══════════════════════════════════════════════════════════ */

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

/* ── Brand Variables ──────────────────────────────────────*/
:root {
  /* Primary brand palette (from logo) */
  --navy:          #1b2e5e;
  --navy-dark:     #111e40;
  --navy-mid:      #243470;
  --navy-light:    #2e4494;
  --orange:        #e8610a;
  --orange-light:  #f07830;
  --orange-dark:   #c04d06;
  --orange-glow:   rgba(232,97,10,0.18);

  /* Parchment warmth (body backgrounds) */
  --parchment:     #faf6f0;
  --parchment-2:   #f2ebe0;
  --cream:         #e8dece;
  --white:         #ffffff;

  /* Text */
  --ink:           #0e1726;
  --ink-soft:      #2a3a5a;
  --muted:         #6a7a9a;
  --muted-light:   #9aaac0;

  /* Borders */
  --border:        rgba(27,46,94,0.14);
  --border-strong: rgba(27,46,94,0.28);

  /* Status */
  --success:       #2e7d4a;
  --error:         #c0350a;
  --warning:       #c07800;

  /* Shadows */
  --shadow-sm:     0 2px 12px rgba(14,23,38,0.08);
  --shadow-md:     0 6px 32px rgba(14,23,38,0.13);
  --shadow-lg:     0 16px 64px rgba(14,23,38,0.18);
  --shadow-navy:   0 4px 24px rgba(27,46,94,0.25);
  --shadow-orange: 0 4px 20px rgba(232,97,10,0.35);

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;
}

/* ── Reset ───────────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}
img  { max-width: 100%; display: block; }
a    { color: var(--orange-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange); }

/* ── Typography ──────────────────────────────────────────*/
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; color: var(--ink); }

.display-xl {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.07;
}
.display-lg {
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.display-md {
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 600;
}
.lead {
  font-family: var(--font-body);
  font-size: clamp(0.97rem, 1.4vw, 1.15rem);
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.8;
}
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ── Layout ──────────────────────────────────────────────*/
.container        { max-width: 1160px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 760px;  margin: 0 auto; padding: 0 2rem; }
section           { padding: 5rem 0; }

/* ── Decorative rule ─────────────────────────────────────*/
.rule { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; }
.rule::before, .rule::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.rule-diamond {
  width: 7px; height: 7px;
  background: var(--orange);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────*/
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  padding: 0.72rem 1.5rem;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow-orange);
}
.btn-primary:hover  { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(232,97,10,0.45); color: #fff; }
.btn-primary:active { transform: translateY(0); }

.btn-navy {
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-navy);
}
.btn-navy:hover { background: var(--navy-dark); transform: translateY(-2px); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border-strong);
}
.btn-outline:hover { background: var(--parchment-2); border-color: var(--navy-light); color: var(--navy); }

.btn-outline-orange {
  background: transparent;
  color: var(--orange-dark);
  border: 1.5px solid var(--orange);
}
.btn-outline-orange:hover { background: var(--orange-glow); color: var(--orange-dark); }

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }

.btn-lg  { font-size: 1rem; padding: 0.88rem 2rem; }
.btn-sm  { font-size: 0.8rem; padding: 0.45rem 1rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── Navbar ──────────────────────────────────────────────*/
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-navy);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 66px;
  max-width: 1160px; margin: 0 auto;
}
.navbar-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.navbar-logo-img {
  height: 44px; width: auto;
}
. navbar-logo-wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  display: none; /* shown on small screens if logo image fails */
}
.navbar-links {
  display: flex; align-items: center; gap: 0.1rem; list-style: none;
}
.navbar-links a {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-sm);
  transition: background 0.15s, color 0.15s;
}
.navbar-links a:hover, .navbar-links a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.navbar-actions { display: flex; align-items: center; gap: 0.5rem; }

.navbar-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.navbar-hamburger span { width: 24px; height: 2px; background: rgba(255,255,255,0.8); border-radius: 2px; transition: all 0.2s; }

/* Mobile nav */
.mobile-nav {
  position: fixed; top: 66px; left: 0; right: 0;
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0.75rem 1.5rem 1.25rem;
  z-index: 199; display: none; flex-direction: column; gap: 0.1rem;
  box-shadow: var(--shadow-md);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-ui); font-size: 1rem;
  color: rgba(255,255,255,0.8);
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.15s;
}
.mobile-nav a:hover { color: #fff; }
.mobile-nav a:last-child { border-bottom: none; }

/* ── Tier badges ─────────────────────────────────────────*/
.fi-tier-badge {
  font-family: var(--font-ui);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0.2rem 0.6rem; border-radius: 20px; border: 1px solid;
}
.tier-free        { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.2); }
.tier-starter     { background: rgba(232,97,10,0.15);  color: var(--orange-light);   border-color: rgba(232,97,10,0.4); }
.tier-writer      { background: rgba(255,255,255,0.15);color: #a0c4ff;               border-color: rgba(160,196,255,0.4); }
.tier-author_pro  { background: rgba(255,200,80,0.15); color: #ffd060;               border-color: rgba(255,200,80,0.5); }

/* Colored versions (for light backgrounds) */
.tier-free.on-light        { background: #f0f0f0; color: #888; border-color: #ccc; }
.tier-starter.on-light     { background: #fff3e0; color: var(--orange-dark); border-color: var(--orange); }
.tier-writer.on-light      { background: #e8f0fe; color: var(--navy); border-color: var(--navy-light); }
.tier-author_pro.on-light  { background: #f3e8ff; color: #5a1a8a; border-color: #c090f0; }

/* ── Forms ───────────────────────────────────────────────*/
.field-group  { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; }
.field-label  {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
}
.field-input {
  font-family: var(--font-ui); font-size: 0.95rem;
  color: var(--ink); background: var(--white);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm); padding: 0.7rem 1rem;
  width: 100%; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,97,10,0.12);
}
.field-input::placeholder { color: var(--muted-light); }
.field-error { font-family: var(--font-ui); font-size: 0.78rem; color: var(--error); margin-top: 0.2rem; }

.form-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.1rem 0;
  color: var(--muted); font-size: 0.8rem; font-family: var(--font-ui);
}
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }

.form-switch {
  text-align: center; font-family: var(--font-ui); font-size: 0.84rem; color: var(--muted); margin-top: 1rem;
}
.form-switch a { color: var(--orange-dark); font-weight: 500; }

/* ── Auth Modal ──────────────────────────────────────────*/
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(14,23,38,0.65);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 440px;
  padding: 2.25rem;
  position: relative;
  transform: translateY(14px);
  transition: transform 0.22s;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-logo {
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
}
.modal-logo img { height: 48px; width: auto; }

.modal-title {
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 700;
  text-align: center; color: var(--navy); margin-bottom: 0.25rem;
}
.modal-subtitle {
  font-size: 0.88rem; color: var(--muted); font-style: italic;
  text-align: center; margin-bottom: 1.75rem;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; font-size: 1.3rem;
  color: var(--muted); cursor: pointer; line-height: 1;
  padding: 4px 8px; border-radius: 4px; transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--ink); background: var(--parchment-2); }

.demo-hint {
  background: rgba(27,46,94,0.05);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.6rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
  line-height: 1.5;
}
.demo-hint strong { color: var(--navy); }

/* ── Footer ──────────────────────────────────────────────*/
.footer { background: var(--navy-dark); color: rgba(255,255,255,0.7); padding: 4rem 0 2rem; }

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-brand-name {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.footer-brand-name img { height: 36px; width: auto; }
.footer-brand-wordmark {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: #fff;
}
.footer-tagline { font-size: 0.87rem; color: rgba(255,255,255,0.5); font-style: italic; line-height: 1.65; margin-bottom: 0.75rem; }
.footer-col-heading { font-family: var(--font-ui); font-size: 0.67rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-light); margin-bottom: 0.9rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-family: var(--font-ui); font-size: 0.87rem; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.75rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-copy { font-family: var(--font-ui); font-size: 0.78rem; color: rgba(255,255,255,0.35); }
.footer-copy a { color: rgba(255,255,255,0.5); }
.footer-copy a:hover { color: #fff; }

/* ── Ad placeholder ──────────────────────────────────────*/
.ad-banner {
  background: var(--parchment-2); border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm); padding: 0.9rem 1rem;
  text-align: center; font-family: var(--font-ui);
  font-size: 0.72rem; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ── Utility classes ─────────────────────────────────────*/
.text-center   { text-align: center; }
.text-orange   { color: var(--orange); }
.text-navy     { color: var(--navy); }
.text-muted    { color: var(--muted); }
.text-italic   { font-style: italic; }
.mt-1 { margin-top: 0.5rem; }  .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }  .mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }    .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-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }

/* ── Animations ──────────────────────────────────────────*/
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fadeUp 0.55s ease both; }
.fade-up-2 { animation: fadeUp 0.55s 0.12s ease both; }
.fade-up-3 { animation: fadeUp 0.55s 0.24s ease both; }
.fade-up-4 { animation: fadeUp 0.55s 0.36s ease both; }

@keyframes spinRing { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────*/
@media (max-width: 768px) {
  .navbar-links, .navbar-actions .btn-outline { display: none; }
  .navbar-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  section { padding: 3.5rem 0; }
  .container, .container-narrow { padding: 0 1.25rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Show logo wordmark beside icon on navbar ────────────*/
.navbar-logo-wordmark {
  display: block !important;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
