/* ============================================================
   RIDELINE PRO — shared site stylesheet
   Plain HTML/CSS site. No build step. Edit directly.
   Token source of truth: :root vars below (match brief exactly).
   ============================================================ */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
a { color: inherit; }
:focus { outline: none; }

/* ---------- 2. Design tokens ---------- */
:root {
  --navy: #07182F;            /* primary */
  --gold: #D6A629;            /* accent ONLY: buttons, rules, highlights */
  --gold-dark: #B8891F;       /* hover/darker gold (still never large bg) */
  --gold-ink: #8a6716;        /* darker gold reserved for small text on light backgrounds (4.5:1+ on white) */
  --white: #FFFFFF;
  --section-alt: #EEF2F5;     /* light cool gray section backgrounds */
  --body-copy: #232A33;       /* charcoal body copy on white */
  --muted: #4A586E;           /* muted text */
  --font-serif: Georgia, 'Palatino Linotype', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(7, 24, 47, .08);
  --shadow-md: 0 8px 28px rgba(7, 24, 47, .12);
  --header-h: 72px;
  --wrap: 1180px;
  --space-section: clamp(3.5rem, 7vw, 6rem);
}

/* ---------- 3. Typography ---------- */
body {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--body-copy);
  background: var(--white);
}
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
p { margin: 0 0 1.1em; }
.lede { font-size: 1.2em; color: var(--muted); max-width: 44rem; }
.on-navy h1, .on-navy h2, .on-navy h3,
.on-navy p, .on-navy .lede { color: var(--white); }
.on-navy .lede { color: rgba(255, 255, 255, .85); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: .75rem;
}
.on-navy .eyebrow { color: var(--gold); }
.gold-rule {
  width: 64px; height: 4px; background: var(--gold);
  border: 0; margin: 1.25rem 0;
}
.section-head { max-width: 52rem; margin-bottom: 2.75rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .gold-rule { margin-left: auto; margin-right: auto; }

/* ---------- 4. Layout ---------- */
.wrap { width: min(var(--wrap), 100% - 3rem); margin-inline: auto; }
section.section { padding-block: var(--space-section); }
.section-alt { background: var(--section-alt); }
.hero { padding: calc(var(--header-h) + 3.5rem) 0 4.5rem; background: var(--navy); }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 3.5rem; align-items: center;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-2col { grid-template-columns: repeat(2, 1fr); }   /* 2-up variant; collapses to 1 col on mobile */

/* ---------- 5. Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid rgba(7, 24, 47, .08);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(7, 24, 47, .14); }
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { height: 40px; width: auto; }
.main-nav ul {
  display: flex; align-items: center; gap: 1.75rem;
  list-style: none; padding: 0;
}
.main-nav a {
  text-decoration: none; font-weight: 600; font-size: 1rem;
  color: var(--navy); padding: .5rem 0; border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--gold-dark); }
.main-nav a.login-link { border: 0; }
.header-cta { display: flex; align-items: center; gap: 1rem; }
.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 48px; height: 48px; padding: 12px;
  border-radius: 8px;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 24px; height: 3px; background: var(--navy);
  border-radius: 2px; position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0;
}
.nav-toggle .bars::before { top: -8px; }
.nav-toggle .bars::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(0); opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-90deg); }

/* Focus: visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-navy a:focus-visible, .site-footer a:focus-visible {
  outline-color: var(--gold);
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  min-height: 48px; padding: .85rem 1.75rem;
  font-family: var(--font-sans); font-weight: 700; font-size: 1.05rem;
  text-decoration: none; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #0d2748; color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.on-navy .btn-outline { color: var(--white); border-color: var(--white); }
.on-navy .btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-lg { min-height: 56px; padding: 1rem 2.25rem; font-size: 1.15rem; }
.btn-sm { min-height: 44px; padding: .6rem 1.15rem; font-size: .95rem; }
.btn-block { width: 100%; }
.hero-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }

/* ---------- 7. Device frames ---------- */
.device { text-align: center; }
.device-laptop {
  background: #0d1626; border-radius: 14px; padding: 12px;
  box-shadow: var(--shadow-md); border: 1px solid rgba(255,255,255,.08);
}
.device-laptop .screen {
  background: var(--white); border-radius: 6px; overflow: hidden;
  aspect-ratio: 16 / 10; position: relative;
}
.device-laptop .base {
  height: 14px; margin: 10px -12px -12px; border-radius: 0 0 14px 14px;
  background: linear-gradient(#2a3a52, #1a2740);
}
.device-phone {
  width: min(320px, 80%); margin-inline: auto;
  background: #0d1626; border-radius: 34px; padding: 12px;
  box-shadow: var(--shadow-md); border: 1px solid rgba(255,255,255,.08);
}
.device-phone .screen {
  background: var(--white); border-radius: 24px; overflow: hidden;
  aspect-ratio: 9 / 18.6; position: relative;
}
.device-phone .screen::before {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 24px; background: #0d1626; border-radius: 12px; z-index: 2;
}
.device-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Clearly-labeled placeholder panel (use ONLY when no real screenshot exists) */
.device-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem; padding: 2rem;
  background: repeating-linear-gradient(45deg, #f3f6f9, #f3f6f9 12px, #e9eff5 12px, #e9eff5 24px);
  color: var(--muted); font-size: .95rem; text-align: center;
}
.device-placeholder strong { color: var(--navy); font-size: 1.05rem; }
.device-label {
  margin-top: 1rem; font-size: .9rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.device-label .badge {
  display: inline-block; background: var(--navy); color: var(--white);
  font-size: .72rem; padding: .25rem .6rem; border-radius: 999px; margin-left: .5rem;
  letter-spacing: .06em; vertical-align: middle;
}
/* RULE: never put the desktop monthly planning board inside a phone frame.
   Laptop frame = "Desktop monthly planning" placeholder ONLY.
   Phone frame = "Mobile day view" + real phone screenshots only. */

/* ---------- 8. Feature cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow-sm);
  border: 1px solid rgba(7, 24, 47, .08);
}
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; margin-bottom: 1.1rem;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

/* ---------- 9. Pricing cards ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; align-items: stretch; }
.plan {
  background: var(--white); border-radius: var(--radius);
  border: 2px solid rgba(7, 24, 47, .12);
  padding: 2.25rem; display: flex; flex-direction: column;
  position: relative; box-shadow: var(--shadow-sm);
}
.plan.featured { border-color: var(--gold); box-shadow: var(--shadow-md); }
.plan-flag {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--navy);
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: .4rem 1rem; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-size: 1.6rem; }
.plan .plan-sub { color: var(--muted); font-size: 1rem; margin-bottom: 1.25rem; }
.plan .price { font-family: var(--font-serif); font-size: 2.6rem; color: var(--navy); line-height: 1; }
.plan .price small { font-family: var(--font-sans); font-size: 1rem; color: var(--muted); font-weight: 400; }
.plan .price-note { font-size: .92rem; color: var(--muted); margin: .5rem 0 1.5rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.75rem; flex: 1; }
.plan li {
  padding: .55rem 0 .55rem 1.9rem; position: relative; font-size: 1rem;
  border-bottom: 1px solid rgba(7, 24, 47, .07);
}
.plan li:last-child { border-bottom: 0; }
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: .55rem;
  color: var(--gold-dark); font-weight: 800;
}
.plan .fine { font-size: .85rem; color: var(--muted); margin-top: 1rem; }

/* ---------- 10. FAQ accordion (details/summary, keyboard native) ---------- */
.faq-list { max-width: 46rem; margin-inline: auto; }
.faq-list details {
  background: var(--white); border: 1px solid rgba(7, 24, 47, .12);
  border-radius: var(--radius); margin-bottom: .9rem; overflow: hidden;
}
.faq-list summary {
  list-style: none; cursor: pointer;
  padding: 1.25rem 1.5rem; font-weight: 700; color: var(--navy); font-size: 1.08rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 44px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font-size: 1.6rem; font-weight: 400; color: var(--gold-dark);
  flex-shrink: 0; line-height: 1;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list summary:hover { background: rgba(7, 24, 47, .03); }
.faq-list .faq-body { padding: 0 1.5rem 1.5rem; color: var(--body-copy); }
.faq-list .faq-body p:last-child { margin-bottom: 0; }

/* ---------- 11. Forms ---------- */
.form { max-width: 36rem; }
.field { margin-bottom: 1.25rem; }
.field label {
  display: block; font-weight: 700; margin-bottom: .4rem; color: var(--navy);
}
.field .hint { font-size: .88rem; color: var(--muted); margin-top: .35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="date"], .field input[type="time"], .field select, .field textarea {
  width: 100%; min-height: 52px; padding: .8rem 1rem;
  border: 2px solid rgba(7, 24, 47, .2); border-radius: var(--radius);
  background: var(--white); color: var(--body-copy);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--navy); outline: 3px solid var(--gold); outline-offset: 2px;
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: #b3261e; background: #fdf3f3;
}
.field .error {
  display: none; color: #b3261e; font-size: .9rem; font-weight: 600; margin-top: .35rem;
}
.field.invalid .error { display: block; }
.form .btn { margin-top: .5rem; }

/* ---------- 12. Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .82); padding: 3.5rem 0 2rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.footer-brand img { height: 44px; width: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: .95rem; max-width: 24rem; }
.site-footer h4 {
  font-family: var(--font-sans); color: var(--white);
  font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-contact a { color: var(--white); font-weight: 600; }
.footer-bottom {
  padding-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem;
  justify-content: space-between; font-size: .88rem; color: rgba(255, 255, 255, .6);
}
.footer-bottom .legal { display: flex; gap: 1.5rem; }

/* ---------- 13. Mobile demo bar (persistent but unobtrusive, ≤768px only) ---------- */
.demo-bar { display: none; }

/* ---------- 14. Video ---------- */
.video-frame {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  background: var(--navy);
}
.video-frame video { width: 100%; aspect-ratio: 16 / 9; }

/* ---------- 15. Utility ---------- */
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--navy); color: var(--white); padding: .8rem 1.25rem;
  border-radius: 0 0 8px 8px; text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 0; }

/* ---------- 16. Responsive ---------- */
@media (max-width: 1024px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 34rem; margin-inline: auto; }
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .header-cta .btn { min-height: 44px; padding: .6rem 1.1rem; font-size: .92rem; }
  .header-inner { gap: 1rem; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid rgba(7, 24, 47, .1);
    box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .75rem 1.5rem 1.25rem; }
  .main-nav li { border-bottom: 1px solid rgba(7, 24, 47, .07); }
  .main-nav li:last-child { border-bottom: 0; }
  .main-nav a { display: block; padding: 1rem .25rem; min-height: 44px; }
  /* persistent-but-unobtrusive bottom demo bar */
  .demo-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: rgba(7, 24, 47, .97); color: var(--white);
    padding: .7rem 1.25rem calc(.7rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 18px rgba(7, 24, 47, .25);
  }
  .demo-bar span { font-size: .9rem; font-weight: 600; }
  body { padding-bottom: 76px; }                    /* keep footer reachable above bar */
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--header-h) + 2rem); }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { width: calc(100% - 2.5rem); }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .plan { padding: 1.75rem; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- 17. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
