/* AffirmGear — site styles (Cobalt Volt) */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--cobalt); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 0; }
p { margin: 0; }

/* ---------- Layout primitives ---------- */
.wrap { max-width: var(--max-w); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---------- Type scale ---------- */
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cobalt); }
.eyebrow--muted { color: var(--ink-300); }
.h-hero { font-size: 66px; font-weight: 800; line-height: 0.98; letter-spacing: -0.035em; }
.h-xl { font-size: 50px; line-height: 0.98; }
.h-lg { font-size: 46px; }
.h-md { font-size: 38px; }
.h-sm { font-size: 24px; letter-spacing: -0.02em; }
.lede { font-size: 18px; line-height: 1.65; color: var(--ink-500); }
.text-accent {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-accent--volt { background: var(--grad-volt); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Announcement bar ---------- */
.announce { background: var(--ink); color: #fff; text-align: center; font-size: 13px; font-weight: 600; line-height: 1.5; padding: 10px 16px; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; border-bottom: 1px solid var(--line); background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand svg { flex-shrink: 0; }
.brand__word { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; }
.brand__word span { color: var(--cobalt); }
.site-nav { display: flex; gap: 6px 18px; font-size: 14px; font-weight: 700; flex-wrap: wrap; justify-content: center; }
.site-nav a { color: var(--ink); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cobalt); }
.header-cta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.site-header .header-cta .btn { font-size: 13px; white-space: nowrap; }
/* Nine links do not fit beside the logo and button on a small desktop: the nav takes a second, centred row. */
@media (min-width: 1024px) and (max-width: 1180px) {
  .site-header { flex-wrap: wrap; row-gap: 12px; }
  .site-nav:not(.site-nav--home) { order: 3; flex: 1 0 100%; }
}
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle svg { display: block; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; border-radius: var(--r-sm); font-weight: 700; text-align: center; cursor: pointer; transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.btn--primary { background: var(--cobalt); color: #fff; padding: 18px 30px; font-size: 16px; }
.btn--primary:hover { background: var(--cobalt-600); color: #fff; }
.btn--primary.btn--sm { padding: 13px 22px; font-size: 14px; }
.btn--outline { border: 2px solid var(--ink); color: var(--ink); padding: 16px 28px; font-size: 16px; }
.btn--outline:hover { color: var(--ink); background: var(--mist); }
.btn--white { background: #fff; color: var(--ink); padding: 18px 30px; font-size: 16px; }
.btn--white:hover { color: var(--ink); background: var(--mist); }
.btn--outline-white { border: 2px solid #fff; color: #fff; padding: 16px 28px; font-size: 16px; }
.btn--outline-white:hover { color: #fff; background: rgba(255,255,255,0.12); }
.btn--ghost { color: var(--ink); font-size: 14px; font-weight: 700; padding: 12px 14px; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
a.card:hover, .card--hover:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card--pad { padding: 32px; }
.tile { background: var(--mist); border-radius: var(--r-lg); padding: 28px; }
.badge { background: #fff; color: var(--cobalt-600); font-size: 11px; font-weight: 800; padding: 6px 10px; border-radius: var(--r-pill); }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--cobalt-050); color: var(--cobalt-600); font-size: 12px; font-weight: 800; padding: 8px 14px; border-radius: var(--r-pill); width: fit-content; }
.stars { color: var(--magenta); letter-spacing: 2px; }

/* ---------- Photo frames ---------- */
.ph { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--mist); }
.ph > img { width: 100%; height: 100%; object-fit: cover; }
.ph--xl { border-radius: var(--r-xl); }
.ph__label {
  position: absolute; left: 18px; bottom: 18px; right: 18px; color: #fff;
  font-weight: 700; font-size: 13px; line-height: 1.4; z-index: 2;
}
.ph__scrim::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.6)); z-index: 1; }

/* ---------- Sections ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head--center { display: block; text-align: center; margin-bottom: 48px; }
.dark { background: var(--ink); color: #fff; }
.dark .lede { color: var(--ink-200); }
.mist { background: var(--mist); }

/* ---------- Logo strip ---------- */
.logo-strip {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 26px var(--pad-x); display: flex; justify-content: center; gap: 48px; align-items: center; flex-wrap: wrap;
  font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--ink-200); letter-spacing: -0.02em;
}
.logo-strip__label { font-family: var(--font-body); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-300); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--grad-cobalt); border-radius: var(--r-xl); padding: 80px 64px; color: #fff;
  display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--ink-200); padding: 64px var(--pad-x) 32px; }
.site-footer__grid { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 40px; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: #fff; }
.site-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.site-footer__col a { color: var(--ink-200); }
.site-footer__col a:hover { color: #fff; }
.site-footer__col--brand { gap: 14px; }
.site-footer__word { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -0.04em; line-height: 1; }
.site-footer__word span { color: var(--cobalt); }
.site-footer__blurb { font-size: 13px; line-height: 1.7; max-width: 300px; }
.site-footer__head { font-weight: 800; color: #fff; margin-bottom: 4px; }
.site-footer__base { max-width: var(--max-w); margin: 48px auto 0; padding-top: 20px; border-top: 1px solid var(--ink-700); display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-400); flex-wrap: wrap; gap: 8px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 800; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 14px;
  font-family: var(--font-body); font-size: 14px; outline: none; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-050); }

/* ---------- Assistant / chat widget ---------- */
.chat-fab {
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-float); border: 0; font-family: var(--font-body);
}
.chat-dock { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-panel { width: 360px; max-width: calc(100vw - 48px); background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-panel); overflow: hidden; border: 1px solid var(--line); color: var(--ink); }
.chat-panel__head { background: var(--grad-cobalt); color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 10px; }
.chat-panel__log { height: 300px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.55; }
.chat-msg { padding: 10px 13px; border-radius: 12px; max-width: 85%; }
.chat-msg--user { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 12px 12px 2px 12px; }
.chat-msg--ai { align-self: flex-start; background: var(--mist); border-radius: 12px 12px 12px 2px; }
.chat-panel__input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-panel__input input { flex: 1; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; font-family: var(--font-body); font-size: 13px; outline: none; }
.typing-dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300); margin-right: 3px; animation: blink 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* ---------- Tables ---------- */
.spec-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-row span:first-child { color: var(--ink-500); }
.spec-row span:last-child { font-weight: 700; text-align: right; }

/* ---------- Utility ---------- */
.checks { display: flex; gap: 28px; font-size: 13px; color: var(--ink-500); font-weight: 600; flex-wrap: wrap; }
.muted { color: var(--ink-300); }
.small { font-size: 13px; }
.mt-0 { margin-top: 0; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; } .mb-40 { margin-bottom: 40px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--volt); color: var(--ink); padding: 10px 16px; font-weight: 800; z-index: 100; }
.skip-link:focus { left: 0; }

/* =========================================================
   Breakpoints: wide ≥1440 / desktop 1024–1439 / tablet 768–1023 / mobile <768
   ========================================================= */

/* Wide desktop */
@media (min-width: 1440px) {
  :root { --max-w: 1360px; }
  .h-hero { font-size: 76px; }
  .h-xl { font-size: 56px; }
  .h-lg { font-size: 50px; }
}

/* Tablet */
@media (max-width: 1023px) {
  :root { --pad-x: 32px; --section-y: 72px; }
  [data-hero], section[style*="grid-template-columns:1.05fr"], section[style*="grid-template-columns:1.1fr"], section[style*="grid-template-columns:1fr 1.1fr"] { grid-template-columns: 1fr !important; }
  .grid-2[style*="grid-template-columns"], .bg-hero[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .h-hero { font-size: 52px; }
  .h-xl { font-size: 42px; }
  .h-lg { font-size: 38px; }
  .h-md { font-size: 32px; }
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 16px 32px 24px; gap: 16px; box-shadow: var(--shadow-card); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .cta-banner { padding: 56px 40px; }
}

/* Mobile */
@media (max-width: 767px) {
  :root { --pad-x: 20px; --section-y: 56px; }
  body { font-size: 15px; }
  .h-hero { font-size: 40px; }
  .h-xl { font-size: 34px; }
  .h-lg { font-size: 30px; }
  .h-md { font-size: 26px; }
  .lede { font-size: 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .site-header { padding: 12px 16px; gap: 10px; }
  .brand { gap: 8px; }
  .brand svg { width: 28px; height: 28px; }
  .brand__word { font-size: 20px; }
  .header-cta { gap: 4px; }
  .btn--primary.btn--sm { padding: 11px 14px; font-size: 13px; }
  body { overflow-x: hidden; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-banner { padding: 40px 24px; border-radius: var(--r-lg); }
  .logo-strip { gap: 24px; font-size: 16px; }
  .announce { font-size: 12px; padding: 8px 12px; }
  .chat-dock { right: 16px; bottom: 16px; }
}

/* Narrow phones: keep logo, button and menu toggle on one row */
@media (max-width: 359px) {
  .site-header { padding: 12px; gap: 8px; }
  .brand__word { font-size: 18px; }
  .site-header .header-cta .btn { padding: 10px; font-size: 12px; }
  .nav-toggle { padding: 4px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
