/* ══════════════════════════════════════════════════
   public-shell.css — the shared nav + footer + base chrome for
   layouts/public (the public directory pages).

   Round 218 (SEO audit M16a): extracted VERBATIM from
   home-assets/css/landing.css, which the public shell used to load whole —
   60KB of render-blocking marketing CSS for ~11KB of rules these pages
   actually match (measured by class-intersection against every blade the
   public layout renders). landing.css itself is untouched and still owns
   the standalone marketing heads (welcome/pricing/features/...), the error
   pages, and layouts/auth.

   RULES OF THIS FILE:
   - Load order is tokens.css → THIS FILE → public-directory.css (source
     order is load-bearing for equal-specificity rules; this file sits
     exactly where landing.css sat).
   - A nav/footer/base rule changed in landing.css must change here too —
     the two files render the same public-nav + footer partials and must
     not drift (grep both before shipping a shell change).
   - The :root block deliberately DUPLICATES landing's local token
     overrides: nav/footer rules resolve vars against it exactly as they
     did when landing.css loaded, so the split is pixel-identical.
   ══════════════════════════════════════════════════ */

:root {
  /* Frontend-consistency pass: canonical values live in tokens.css (loaded
     first). These local declarations are aligned to those canonical values
     so public/auth pages converge (soft lavender, real muted gray, 12px
     card radius) instead of drifting. */
  --brand: #511c66;
  --brand-vivid: #6500F8;
  --brand-soft: #f3edf7;   /* was #ede9fe → canonical warm lavender */
  --brand-dark: #6a2485;   /* was #280374 → canonical */
  --brand-deepdark: #1a0a2e;
  --ink: #1a1a2e;
  --ink-light: #4b5563;    /* was #1a1a2e (no-op) → real muted gray */
  --ink-muted: #4b5563;    /* was #1a1a2e (no-op) → real muted gray */
  --line: #e2e8f0;
  --bg: #ffffff;
  --white: #fff;
  --green: #0f7b5f;
  --gold: #fcc200;        /* Round 68 — accent already used on /pricing "30 days" text; promoted to a token so the hero CTA + future accent surfaces can reference it. */
  --radius-sm: 8px;
  --radius-md: 12px;      /* was 14px → canonical card radius */
  --radius-full: 999px;
  --shadow-md: 0 4px 20px rgba(81,28,102,0.08);
  --shadow-lg: 0 12px 40px rgba(81,28,102,0.12);
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

body { margin: 0; padding: 0; font-family: var(--font); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

html { scroll-behavior: smooth; }

.skip-link {
  position: absolute; top: -48px; left: 12px;
  z-index: 1100;
  padding: 10px 18px; border-radius: 8px;
  background: var(--brand, #511c66); color: #fff;
  font-weight: 600; font-size: 14px;
  text-decoration: none;
  transition: top 120ms ease-out;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  outline: 3px solid #fcc200; outline-offset: 2px;
}

main[tabindex="-1"]:focus { outline: none; }

.nav {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
}

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}

.nav-logo { height: 44px; width: auto; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; padding: 0; margin: 0;
}

.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--ink);
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  /* Round 88 (a11y / older-user audience): 44px min tap target. inline-flex +
     center keeps the text position identical while the hit area meets 44px. */
  display: inline-flex; align-items: center; min-height: 44px;
}

.nav-links a:hover { background: var(--bg); color: var(--brand); }

.nav-links a.active { color: var(--brand); font-weight: 600; }

.nav-backdrop {
  position: fixed;
  inset: 64px 0 0 0;  /* nav is 64px tall; dim everything below it */
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 98;
}

.nav-cta {
  background: var(--brand) !important; color: var(--white) !important;
  padding: 9px 22px !important; border-radius: 60px !important;
  font-weight: 600 !important; font-size: 14px !important;
  margin-left: 8px; transition: background 0.15s !important;
  /* Round 88 added `min-height: 44px` (a11y tap target) to .nav-links a, but
     these elements are content-box, so 44px content + 9px*2 padding rendered
     the filled CTA pill at 62px — visibly "fat" vs the 48px hero buttons.
     border-box makes min-height:44px size the whole element to 44px: a slim,
     proportionate pill that still meets the 44px tap target Round 88 wanted. */
  box-sizing: border-box;
}

.nav-cta:hover { background: var(--brand-vivid) !important; }

.nav-burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;     /* Apple HIG min */
  height: 44px;
  padding: 6px;    /* Round 66 follow-up #4: 8 → 6 to give the X more room
                      so rotated bars don't kiss the button's bordered edge. */
  background: transparent;
  border: 1px solid var(--line, #e2e8f0);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
  color: var(--ink, #1a1a2e);
}

.nav-burger:hover {
  background: var(--brand-soft, #ede9fe);
  border-color: var(--brand-soft, #ede9fe);
}

.nav-burger:focus-visible {
  outline: 2px solid var(--brand, #511c66);
  outline-offset: 2px;
}

.nav-burger-bar {
  display: block;
  width: 20px;     /* Round 66 follow-up #4: 24 → 20 so the rotated X stays
                      visibly inset from the 44×44 bordered button. */
  height: 2px;
  flex: 0 0 2px;   /* don't grow, don't shrink, hold the exact bar height —
                      without this, flex-shrink: 1 (default) collapses bars
                      toward 0px even when there's enough space. */
  background: currentColor;
  margin: 3px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav.nav-open .nav-burger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav.nav-open .nav-burger-bar:nth-child(2) {
  opacity: 0;
}

.nav.nav-open .nav-burger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav.nav-open .nav-burger {
  border-color: transparent;
}

.nav.nav-open .nav-burger:hover {
  background: var(--brand-soft, #ede9fe);
  border-color: var(--brand-soft, #ede9fe);
}

.nav-link--signup {
  background-color: var(--brand); color: #fff !important;
  border-radius: 30px; padding: 0.4rem 1.25rem !important;
  margin-left: 0.5rem; margin-right: 1rem; transition: background-color 0.2s ease;
}

.nav-link--signup:hover { background-color: var(--brand-vivid); color: #fff !important; }

.site-footer {
  background-color: var(--brand); color: #fff;
  font-family: var(--font-sans);
  border-top: none;
  box-shadow: 0 -4px 0 0 #fcc200;
  margin-top: 0;
  /* Round 51 follow-up: hoist the footer into a positioned stacking
     context so its negative-y box-shadow (the 4px golden top bar) paints
     OVER the .cta section above it. Pre-fix the .cta section ([landing.css
     line ~408] sets `position: relative;`) painted AFTER the static footer
     in CSS stacking order, so .cta's lavender background (`#EEE7FF`) covered
     the footer's box-shadow that extends 4px upward into .cta's area —
     the golden bar disappeared visually even though it was computed
     correctly. With `position: relative; z-index: 1;` on the footer, both
     siblings are positioned, painting falls back to DOM order, and footer
     (which comes AFTER .cta in the DOM) paints last → its shadow stays
     visible. The app/auth layout doesn't have this issue because its
     pre-footer content (.container, dashboard cards, etc.) is unpositioned. */
  position: relative;
  z-index: 1;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
}

.site-footer__columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.site-footer__col { min-width: 0; }

.site-footer__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.site-footer__tagline {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.8);
  max-width: 340px;
}

.site-footer__address {
  font-style: normal;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
}

.site-footer__heading {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
}

.site-footer__col--nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.site-footer__col--nav a {
  display: inline-block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.site-footer__col--nav a:hover,
.site-footer__col--nav a:focus {
  color: #fcc200;
  text-decoration: none;
}

@media (max-width: 768px) {
  .site-footer__col--nav ul {
    gap: 0.1rem;
  }
  .site-footer__col--nav a {
    display: block;
    padding: 0.72rem 0;
  }
}

.site-footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-footer__copyright {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.site-footer__socials {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-footer__social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255,255,255,0.7);
  background: transparent;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-footer__social-icon:hover,
.site-footer__social-icon:focus {
  color: #fcc200;
  background-color: rgba(252,194,0,0.1);
  text-decoration: none;
}

.site-footer__social-icon:focus-visible {
  outline: 2px solid #fcc200;
  outline-offset: 2px;
}

section { position: relative; padding: 100px 0; }

@media (max-width: 900px) {
  .site-footer__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
  .site-footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .site-footer__inner { padding: 2.5rem 1.25rem 1.25rem; }
  .site-footer__columns {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-bottom: 1.5rem;
  }
  .site-footer__col--brand { grid-column: auto; }
  .site-footer__tagline { max-width: none; }
}

@media (max-width: 1023.98px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    padding: 6px 0 10px;
    gap: 0;
    /* Round 67 — box-sizing: border-box so max-height INCLUDES the 16px
       vertical padding. Pre-fix used content-box default; max-height was
       `calc(100vh - 64px)` of CONTENT, then padding pushed total height
       +16px past the viewport bottom on short heights (e.g. landscape
       phone 375x480 — drawer extended to y=496 in a 480-tall viewport,
       hiding the Sign In row). */
    box-sizing: border-box;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 99;
  }
  .nav.nav-open .nav-links li {
    width: 100%;
    margin: 0;
  }
  .nav.nav-open .nav-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink, #1a1a2e);
    border-radius: 0;
    border-left: 3px solid transparent;
    min-height: 44px; /* Round 88 (a11y): mobile-drawer tap target floor */
    line-height: 1.4;
    background: transparent;
    transition: background 0.15s, color 0.15s;
  }
  .nav.nav-open .nav-links li a:hover {
    background: var(--brand-soft, #f3edf7);
    color: var(--brand, #511c66);
  }
  .nav.nav-open .nav-links li a.active {
    background: var(--brand-soft, #f3edf7);
    color: var(--brand, #511c66);
    font-weight: 600;
  }
  .nav.nav-open .nav-links .nav-cta {
    margin: 8px 16px 0 !important;
    padding: 10px 22px !important;
    background: var(--brand, #511c66) !important;
    color: var(--white, #fff) !important;
    border-radius: 999px !important;
    border-left: 0 !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-align: center !important;
    justify-content: center !important;
    min-height: 40px !important;
  }
  .nav.nav-open .nav-links .nav-cta:hover {
    background: var(--brand-vivid, #6500F8) !important;
    color: var(--white, #fff) !important;
  }
  .nav.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

.nav-links a:focus-visible,
.stat-item:focus-visible,
.billing-cta .bill-btn:focus-visible,
.cta-btn:focus-visible,
.faq-header p a:focus-visible,
.faq-body a:focus-visible {
  outline: 3px solid var(--brand-vivid);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.site-footer__col--nav a:focus-visible {
  outline: 3px solid #fcc200;
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
