/* ============================================================
 * CLAVER — site.css
 * Single shared baseline for the entire marketing site (goclaver.com).
 * Drop this into any new page and the chrome (nav, footer, mobile
 * drawer, tap targets, safe-area, fluid type, responsive images,
 * print) is handled.
 *
 * USAGE (one-time per page):
 *   <link rel="stylesheet" href="/shared/site.css">
 *   <script src="/shared/site.js" defer></script>
 *
 * Then paste the standard <header> and <footer> blocks (see
 * /shared/MARKETING_PAGE_TEMPLATE.md). No mobile work per page.
 *
 * Source-of-truth tokens come from BRAND.md.
 * ============================================================ */

/* ── 1. Tokens (BRAND.md §3, §5) ── */
:root {
  --color-navy: #002266;            --navy-rgb: 0,34,102;
  --color-navy-deep: #001A52;
  --color-amber: #f59e0b;           --amber-rgb: 245,158,11;
  --color-cta: #d97706;
  --color-cta-hover: #b45309;
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #0a0a0a;
  --color-muted: #525252;
  --color-border: #e5e5e5;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(0, 34, 102, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 34, 102, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 34, 102, 0.12);

  --site-max: 1240px;

  color-scheme: light only;
}

/* ── 2. Mobile-first base reset ── */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;     /* lock font size when iOS rotates */
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;          /* long URLs don't blow out the layout */
  word-wrap: break-word;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, picture, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}
button { font: inherit; cursor: pointer; }
input, textarea, select, button { font-family: inherit; }
/* Inputs: 16px on mobile to prevent iOS zoom-on-focus */
@media (max-width: 768px) {
  input, textarea, select { font-size: 16px !important; }
}

/* ── 3. Layout helpers ── */
.container {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── 4. NAV (sticky, blur, sticky-on-iOS-with-notch) ── */
.nav-wrap {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  max-width: var(--site-max);
  margin: 0 auto;
  min-height: 88px;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.logo-horizontal { height: 80px; width: auto; display: block; }

.nav-r { display: flex; align-items: center; gap: 30px; }
.nav-l {
  color: var(--color-navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.005em;
  padding: 8px 0;
  min-height: 44px;            /* tap target */
  display: inline-flex;
  align-items: center;
  transition: color .15s ease;
}
.nav-l:hover, .nav-l:focus-visible { color: var(--color-cta); }
.nav-cta {
  background: var(--color-cta);
  color: #fff;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.005em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, box-shadow .15s ease;
}
.nav-cta:hover, .nav-cta:focus-visible {
  background: var(--color-cta-hover);
  box-shadow: 0 4px 14px rgba(217, 119, 6, .25);
}

/* Mobile hamburger button */
.nav-mob-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 44px; height: 44px;
  padding: 0;
  color: var(--color-navy);
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}
.nav-mob-btn:hover, .nav-mob-btn:focus-visible {
  background: rgba(0, 34, 102, .04);
  border-color: var(--color-navy);
}
.nav-mob-btn svg { width: 22px; height: 22px; display: block; }

/* Mobile drawer (slides down from sticky nav) */
.nav-mob-drawer {
  display: none;
  flex-direction: column;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  padding: 8px 16px max(16px, env(safe-area-inset-bottom));
  gap: 2px;
}
.nav-mob-drawer.open { display: flex; }
.nav-mob-drawer a {
  padding: 14px 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-navy);
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-mob-drawer a:hover, .nav-mob-drawer a:focus-visible {
  background: rgba(0, 34, 102, .04);
  color: var(--color-cta);
}
.nav-mob-drawer a.is-cta {
  background: var(--color-cta);
  color: #fff;
  justify-content: center;
  margin-top: 8px;
  font-size: 15px;
}
.nav-mob-drawer a.is-cta:hover { background: var(--color-cta-hover); color: #fff; }

/* Tablet portrait + phone landscape */
@media (max-width: 1024px) {
  .nav { padding: 12px 24px; gap: 18px; }
  .nav-r { gap: 22px; }
}

/* Phone */
@media (max-width: 768px) {
  .logo-horizontal { height: 66px; }
  .nav { padding: 10px 16px; min-height: 72px; gap: 10px; }
  .nav-r { gap: 8px; }
  .nav-l.hide-m, .nav-cta.hide-m { display: none; }
  .nav-mob-btn { display: inline-flex; }
}

/* Small phone */
@media (max-width: 380px) {
  .logo-horizontal { height: 58px; }
  .nav { padding: 10px 12px; min-height: 66px; }
}

/* ── 5. FOOTER (composed white-mark + wordmark + tagline) ── */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,.65);
  padding: 64px 0 calc(36px + env(safe-area-inset-bottom));
  margin-top: 80px;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.f-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-decoration: none;
}
.f-mark { height: 128px; width: 128px; display: block; }
.f-wordmark {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -.035em;
  color: #fff;
  line-height: .95;
}
.f-wordmark .hq { color: var(--color-amber); }
.f-tagline {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  line-height: 1.4;
  text-align: center;
  margin-top: 4px;
}
.f-links {
  display: flex; gap: 28px; flex-wrap: wrap; justify-content: center;
  font-size: 13px; font-weight: 600;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08);
  width: 100%; max-width: 720px;
}
.f-links a { color: rgba(255,255,255,.72); }
.f-links a:hover { color: #fff; text-decoration: underline; }
.f-legal {
  display: flex; gap: 18px; flex-wrap: wrap; justify-content: center;
  font-size: 12px; font-weight: 400; color: rgba(255,255,255,.45);
  max-width: 760px; line-height: 1.6;
}
.f-legal a { color: rgba(255,255,255,.55); }
.f-legal a:hover { color: rgba(255,255,255,.85); text-decoration: underline; }
.f-copy { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 8px; }

@media (max-width: 768px) {
  .site-footer { padding: 48px 0 calc(28px + env(safe-area-inset-bottom)); margin-top: 56px; }
  .f-mark { height: 96px; width: 96px; }
  .f-wordmark { font-size: 40px; }
  .f-tagline { font-size: 11px; letter-spacing: .12em; }
  .f-links { gap: 18px; font-size: 13px; padding-top: 16px; }
  .f-legal { gap: 12px 14px; font-size: 11.5px; }
}

/* ── 5b. CTA TRIO (final-CTA button row, brand-consistent across pages) ── */
.cta-trio { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cta-trio .t-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px;
  min-height: 48px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.005em;
  text-decoration: none;
  border: 1.5px solid;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .12s ease;
  white-space: nowrap;
}
.cta-trio .t-btn:hover, .cta-trio .t-btn:focus-visible { transform: translateY(-1px); }
.cta-trio .t-btn:active { transform: translateY(0); }

/* Ghost (entry — Start free) */
.cta-trio .t-ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.45);
}
.cta-trio .t-ghost:hover, .cta-trio .t-ghost:focus-visible {
  background: rgba(255,255,255,.10); border-color: #fff;
}

/* White solid (default — Pro+) */
.cta-trio .t-white {
  background: #fff; color: var(--color-navy); border-color: #fff;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.cta-trio .t-white:hover, .cta-trio .t-white:focus-visible {
  background: #fffbeb;
  box-shadow: 0 6px 18px rgba(255,255,255,.20), 0 1px 2px rgba(0,0,0,.18);
}

/* Orange CTA (upsell — Business) */
.cta-trio .t-cta {
  background: var(--color-cta); color: #fff; border-color: var(--color-cta);
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(217, 119, 6, .25);
}
.cta-trio .t-cta:hover, .cta-trio .t-cta:focus-visible {
  background: var(--color-cta-hover); border-color: var(--color-cta-hover);
  box-shadow: 0 6px 18px rgba(217, 119, 6, .35);
}

/* Mobile: stack so each trio button is full-width and hits 48px tap */
@media (max-width: 560px) {
  .cta-trio { flex-direction: column; align-items: stretch; max-width: 320px; margin-left: auto; margin-right: auto; }
  .cta-trio .t-btn { width: 100%; }
}

/* ── 6. Universal page-content tap-target compliance ── */
@media (max-width: 768px) {
  /* Any link that's clearly a button-like control gets minimum 44px */
  a.btn, button.btn,
  .btn-p, .btn-s, .btn-white,
  a[role="button"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ── 7. Focus state (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── 8. Selection ── */
::selection { background: rgba(245, 158, 11, .35); color: var(--color-text); }

/* ── 9. Print baseline ── */
@media print {
  .nav-wrap, .site-footer, .nav-mob-drawer { display: none !important; }
  body { background: #fff; }
  a { color: var(--color-text); }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: var(--color-muted); }
}
