/* ==========================================================================
   Glount — AI Accounting & ERP marketing site
   Design tokens + base styles
   ========================================================================== */

:root {
  /* Brand palette */
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-deep: #04182b;      /* deep navy, darkened from brand-dark for the footer/dark sections */

  /* Brand palette sampled directly from the Glount logo (icon + wordmark):
     deep blue #065EA5, orange #FB8F11, light blue-grey fold #A5C0DE.
     --accent and --gold below are darkened, WCAG-AA-checked versions of the
     logo's orange / light-blue-grey for use as text and icon-stroke colors
     (the raw logo orange is only ~2.3:1 on white); --accent-vivid keeps the
     true, saturated logo orange for fills, buttons, and decorative artwork. */
  --brand: #065ea5;
  --brand-dark: #064377;
  --brand-light: #eaf2fa;
  --accent: #a8600a;        /* accessible ink derived from logo orange — text/icon-stroke use */
  --accent-vivid: #fb8f11;  /* true logo orange — fills, buttons, decorative shapes only */
  --accent-light: #fff4e7;
  --gold: #667789;          /* accessible ink derived from the logo's light blue-grey fold */
  --gold-light: #f2f5f9;

  --success: #157a4a;
  --warn: #a15c07;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Lexend", var(--font-sans);

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.lede { font-size: 1.15rem; color: var(--ink-soft); }

ul, ol { color: var(--ink-soft); padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { color: var(--brand); }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-on-dark.btn-secondary { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.25); }
.btn-on-dark.btn-secondary:hover { background: rgba(255,255,255,0.16); }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo-img { height: 38px; width: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a.nav-link {
  display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 8px;
  color: var(--ink-soft); font-weight: 500; font-size: 0.96rem;
}
.main-nav a.nav-link:hover { color: var(--brand); background: var(--bg-alt); text-decoration: none; }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 300px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 10px; opacity: 0; visibility: hidden;
  transform: translateY(6px); transition: all .15s ease; list-style: none; margin: 0;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--ink);
}
.dropdown li a:hover { background: var(--brand-light); text-decoration: none; }
.dropdown li a small { color: var(--muted); font-weight: 400; font-size: 0.82rem; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

.mobile-only-cta { display: none; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  }
  .nav-actions .btn-secondary { display: none; }
  body.nav-open .main-nav {
    /* NOTE: .site-header uses backdrop-filter, which creates a new containing block for
       position:fixed descendants (per spec) — so `bottom: 0` here would resolve against
       the header's own (short) box, not the viewport, collapsing this panel to ~header-height.
       Viewport units (vh) are unaffected by that, so an explicit height avoids the bug. */
    display: block; position: fixed; top: 76px; left: 0; right: 0; height: calc(100vh - 76px);
    background: #fff; overflow-y: auto; padding: 12px 20px 40px; z-index: 99;
  }
  body.nav-open .main-nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
  body.nav-open .mobile-only-cta { display: block; margin-top: 12px; }
  body.nav-open .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 8px; display: none; }
  body.nav-open .has-dropdown.open .dropdown { display: block; }
}

/* ---------------- Hero ---------------- */
.hero { padding: 72px 0 64px; background: linear-gradient(180deg, var(--bg-alt) 0%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--brand-light); color: var(--brand-dark); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 18px;
}
.eyebrow.accent { background: var(--accent-light); color: var(--accent); }
.eyebrow.gold { background: var(--gold-light); color: var(--gold); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero-note { font-size: 0.9rem; color: var(--muted); }

.hero-art { position: relative; }

/* ---------------- Sections ---------------- */
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-deep); color: #e2e8f0; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #b8c2d6; }
.section-head { max-width: 720px; margin: 0 0 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------------- Grids / Cards ---------------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card-icon.accent { background: var(--accent-light); color: var(--accent); }
.card-icon.gold { background: var(--gold-light); color: var(--gold); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-top: 14px; }

.feature-nav-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.feature-nav-card:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow); }
.feature-nav-card h3 { color: var(--ink); }

.pill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 20px 0; }
.pill-list li {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-size: 0.9rem; color: var(--ink-soft); margin: 0;
}

/* Checklist */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; color: var(--ink-soft); }
.check-list svg { flex: none; margin-top: 3px; color: var(--brand); }

/* Two-column feature rows (icon/text + visual) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 88px; }
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-row-media { order: 2; }
.feature-row.reverse .feature-row-text { order: 1; }
@media (max-width: 900px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-row-media, .feature-row.reverse .feature-row-text { order: initial; }
}
.media-panel {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; display: flex; align-items: center; justify-content: center; min-height: 260px;
}

/* ---------------- Stats ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
@media (max-width: 700px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat-num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--brand); }
.stat-label { color: var(--muted); font-size: 0.92rem; }

/* ---------------- CTA banner ---------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff; border-radius: var(--radius-lg); padding: 56px; text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.88); }
.cta-banner .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-banner .btn-primary:hover { background: #f1f5f9; }

/* ---------------- FAQ ---------------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 1.05rem; color: var(--ink); list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chevron { transition: transform .15s ease; flex: none; color: var(--muted); }
.faq-item[open] summary .chevron { transform: rotate(180deg); }
.faq-item p { margin-top: 12px; }

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); font-size: 0.95rem; }
th { background: var(--bg-alt); color: var(--ink); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* ---------------- Pricing ---------------- */
.pricing-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px;
  display: flex; flex-direction: column; height: 100%;
}
.pricing-card.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); position: relative; }
.pricing-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 6px 14px; border-radius: 999px; text-transform: uppercase;
}
.price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; margin: 10px 0; }
.price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pricing-card .check-list { margin: 20px 0 24px; flex: 1; }

/* ---------------- Blog ---------------- */
.post-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.post-card-body { padding: 24px; }
.post-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.post-thumb {
  height: 160px; background: linear-gradient(135deg, var(--brand-light), var(--accent-light));
  display: flex; align-items: center; justify-content: center; color: var(--brand);
}
article.prose { max-width: 760px; margin: 0 auto; }
article.prose h2 { margin-top: 1.6em; }
article.prose h3 { margin-top: 1.3em; }
article.prose ul, article.prose ol { margin-bottom: 1.2em; }
article.prose blockquote {
  border-left: 3px solid var(--brand); margin: 1.6em 0; padding: 4px 0 4px 20px; color: var(--ink-soft); font-style: italic;
}
.byline { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.9rem; margin-bottom: 32px; }

/* ---------------- Breadcrumbs ---------------- */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }

/* ---------------- Page hero (inner pages) ---------------- */
.page-hero { padding: 40px 0 56px; background: var(--bg-alt); border-bottom: 1px solid var(--line-soft); }
.page-hero .lede { max-width: 700px; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--bg-deep); color: #cbd5e1; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; margin-bottom: 14px; }
.footer-icon-img { width: 30px; height: 30px; flex: none; display: block; }
.footer-tagline { color: #94a3b8; font-size: 0.92rem; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #94a3b8; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: #7c8aa5;
}
.footer-bottom a { color: #7c8aa5; }
.footer-bottom a:hover { color: #fff; }
.footer-legal-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------------- Misc ---------------- */
.badge-soon {
  display: inline-flex; align-items: center; gap: 6px; background: var(--gold-light); color: var(--gold);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.notice-box {
  background: var(--accent-light); border: 1px solid #f5d9b3; border-radius: var(--radius); padding: 20px 24px;
  color: var(--ink-soft); font-size: 0.95rem;
}
.notice-box.gold { background: var(--gold-light); border-color: #dbe3ea; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.two-col-list { columns: 2; gap: 32px; }
@media (max-width: 640px) { .two-col-list { columns: 1; } }
