/* ============================================================================
   Sabel's Library — Shared stylesheet
   Marketing site: cream background, navy text, gold used sparingly.
   Navy full-bleed bands for hero and footer. Themes entirely from tokens.css.
   ========================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Typography ---------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--navy);
  margin: 0 0 0.5em;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); }
h4 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }
a  { color: #8A6A1F; text-decoration: none; }         /* accessible gold-ink link on cream */
a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

.lead {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 62ch;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8A6A1F;
  margin: 0 0 0.75rem;
}
.eyebrow--on-navy { color: var(--gold); }

/* ---- Layout -------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max-content); margin-inline: auto; padding-inline: 1.5rem; }
.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.band-cream-deep { background: var(--cream-deep); }
.band-navy { background: var(--navy); color: var(--text-on-navy); }
.band-navy h1, .band-navy h2, .band-navy h3, .band-navy h4 { color: #FFF; }
.band-navy .lead { color: var(--text-on-navy); }
.rule { height: 1px; border: 0; background: var(--gold-line); margin-block: 2.5rem; }
.center { text-align: center; }
.measure { max-width: 68ch; }
.measure-narrow { max-width: 54ch; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .06s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-hover); color: var(--navy); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--gold-line); }
.btn-ghost:hover { border-color: var(--gold); background: var(--gold-soft); text-decoration: none; }
.btn-on-navy { background: var(--gold); color: var(--navy); }
.btn-on-navy:hover { background: var(--gold-hover); }
.btn-ghost-on-navy { background: transparent; color: var(--text-on-navy); border-color: rgba(233,226,206,0.4); }
.btn-ghost-on-navy:hover { border-color: var(--gold); color: #FFF; background: rgba(200,162,75,0.12); }

/* ---- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(200,162,75,0.25);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { height: 40px; width: auto; display: block; }
.brand-word {
  font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem;
  color: #FFF; letter-spacing: 0.01em;
}
.brand-word span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text-on-navy); font-size: 0.95rem; font-weight: 500;
  padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: #FFF; border-bottom-color: var(--gold); text-decoration: none;
}
.nav-cta { margin-left: 0.5rem; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem;
  color: var(--text-on-navy);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* dropdown for Services */
.has-menu { position: relative; }
.menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 240px;
  background: var(--navy-card); border: 1px solid rgba(200,162,75,0.28);
  border-radius: var(--radius); box-shadow: var(--shadow-navy);
  padding: 0.5rem; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: translateY(0); }
.menu a { display: block; padding: 0.55rem 0.75rem; border-radius: 6px; border: 0; color: var(--text-on-navy); }
.menu a:hover { background: rgba(200,162,75,0.14); color: #FFF; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--navy); }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(1200px 500px at 78% -10%, rgba(200,162,75,0.16), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(3.5rem, 2.5rem + 5vw, 7rem); }
.hero h1 { color: #FFF; max-width: 16ch; }
.hero .lead { color: var(--text-on-navy); margin-block: 1.25rem 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-mark { height: 132px; width: auto; margin-bottom: 1.5rem; }

/* ---- Service card grid --------------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #FFF; border: 1px solid var(--gold-line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  display: flex; flex-direction: column;
}
a.card { color: inherit; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold); text-decoration: none; }
/* featured, full-width flagship card (e.g. the Sabel AI writing assistant) */
.card--wide { grid-column: 1 / -1; }
.card--wide p { max-width: 72ch; }
.card--featured { border: 2px solid var(--gold); background: linear-gradient(180deg, #FFF 0%, var(--gold-soft) 100%); }
.card--featured h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem); }
.card .card-num {
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700;
  color: var(--gold); border: 1.5px solid var(--gold); border-radius: 50%;
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center; margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--ink-muted); margin-bottom: 1rem; }
.card .card-link { margin-top: auto; font-weight: 600; color: #8A6A1F; }
a.card:hover .card-link { color: var(--navy); }

/* ---- Flywheel / step list ------------------------------------------------ */
.steps { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step { padding: 1.5rem; border-left: 3px solid var(--gold); background: #FFF; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow-sm); }
.step h4 { color: var(--navy); }
.step p { color: var(--ink-muted); margin: 0; }

/* ---- Feature list -------------------------------------------------------- */
.feature-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.9rem; }
.feature-list li { position: relative; padding-left: 1.9rem; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.7rem; height: 0.7rem; border: 2px solid var(--gold); border-radius: 50%;
}
.band-navy .feature-list li::before { border-color: var(--gold); }

/* ---- Pricing ------------------------------------------------------------- */
.price-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: #FFF; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.price-table th, .price-table td { text-align: left; padding: 1rem 1.25rem; border-bottom: 1px solid var(--gold-line); }
.price-table thead th { background: var(--navy); color: var(--gold); font-family: var(--font-sans); font-weight: 600; letter-spacing: 0.02em; }
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-table .price { font-weight: 700; color: var(--navy); white-space: nowrap; }
.tiers { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }
.tier { background: #FFF; border: 1px solid var(--gold-line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.tier--featured { border: 2px solid var(--gold); box-shadow: var(--shadow-md); }
.tier .amount { font-family: var(--font-serif); font-size: 2.4rem; font-weight: 700; color: var(--navy); margin: 0.25rem 0; }
.tier .amount small { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 500; color: var(--ink-muted); }
.tier ul { margin: 1rem 0 1.5rem; }
.tier .btn { margin-top: auto; }
.note { font-size: 0.9rem; color: var(--slate); font-style: italic; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--navy); background: var(--gold);
  padding: 0.2rem 0.6rem; border-radius: 100px; margin-bottom: 0.75rem;
}

/* ---- Forms --------------------------------------------------------------- */
.form { max-width: 34rem; }
.form-row { margin-bottom: 1.1rem; }
.form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.4rem; color: var(--navy); }
.form input, .form textarea, .form select {
  width: 100%; font-family: var(--font-sans); font-size: 1rem; color: var(--ink);
  padding: 0.7rem 0.85rem; border: 1.5px solid var(--gold-line); border-radius: var(--radius);
  background: #FFF;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.form textarea { min-height: 8rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }  /* honeypot */
.form-note { font-size: 0.88rem; color: var(--slate); margin-top: 0.6rem; }
.inline-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.inline-form input { flex: 1 1 16rem; }
.form-status { margin-top: 0.75rem; font-size: 0.92rem; font-weight: 600; min-height: 1.2em; }
.form-status[data-state="ok"] { color: #2E6B3E; }
.form-status[data-state="err"] { color: #B23B3B; }

/* pending-backend banner */
.pending {
  border: 1px dashed var(--gold); background: var(--gold-soft);
  border-radius: var(--radius); padding: 0.75rem 1rem; font-size: 0.9rem;
  color: var(--ink-muted); margin-bottom: 1.25rem;
}

/* ---- Split / media ------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; }
.split img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split--rev { direction: rtl; }
.split--rev > * { direction: ltr; }
/* brand logo used in a cream section slot (replaces the old portrait image) */
.brand-figure { display: grid; place-items: center; background: #FFF; border: 1px solid var(--gold-line); border-radius: var(--radius); padding: clamp(1.5rem, 1rem + 2vw, 3rem); box-shadow: var(--shadow-md); }
.brand-figure img { width: min(340px, 82%); height: auto; box-shadow: none; border-radius: 0; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--text-on-navy); padding-block: 3rem 2rem; border-top: 3px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: var(--gold); font-family: var(--font-sans); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: var(--text-on-navy); font-size: 0.95rem; }
.site-footer a:hover { color: var(--gold); text-decoration: none; }
.footer-brand .brand-word { display: block; margin-bottom: 0.75rem; }
.footer-brand p { color: var(--slate); font-size: 0.92rem; max-width: 34ch; }
.footer-legal { border-top: 1px solid rgba(233,226,206,0.15); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--slate); }
.footer-legal address { font-style: normal; }

/* ---- Utilities (keep markup inline-style-free for a strict CSP) ---------- */
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 1.5rem; }
.mt-xl { margin-top: 2rem; }
.mt-lg { margin-top: 2.5rem; }
.mx-auto { margin-inline: auto; }
.tl { text-align: left; }
.actions-center { justify-content: center; margin-top: 1.5rem; }
.tiers--narrow { max-width: 640px; margin-inline: auto; }
.form--center { margin: 1.5rem auto 0; }
.byline { font-family: var(--font-serif); font-size: 1.3rem; color: var(--navy); }
.amount--audio { font-family: var(--font-serif); font-size: 2.6rem; color: var(--navy); margin: 1rem 0; }
.amount--audio small { font-family: var(--font-sans); font-size: 1rem; font-weight: 500; color: var(--ink-muted); }
.site-footer .brand-word span { color: var(--gold); }

/* ---- Skip link + a11y ---------------------------------------------------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--gold); color: var(--navy); padding: 0.6rem 1rem; border-radius: 0 0 var(--radius) 0; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .grid-3, .grid-2, .steps, .tiers { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); border-bottom: 1px solid rgba(200,162,75,0.25);
    padding: 0.5rem 1.5rem 1.25rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0; border-bottom: 1px solid rgba(233,226,206,0.1); }
  .nav-cta { margin: 0.75rem 0 0; }
  .menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; border: 0; padding: 0 0 0 1rem; }
  .nav-toggle { display: inline-flex; }
  .has-menu .menu a { color: var(--text-on-navy); }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
