/*
 * brand.css — Basics_ Design System
 * Shared styles for all branded pages.
 * Pages link this BEFORE their inline <style> block.
 * Page-specific overrides go in the inline block.
 *
 * Variable convention: role-based naming (--bg-page, --text-primary, etc.)
 * Pages can override variables in their own :root / body rule.
 */


/* ══════════════════════════════════════
   1. RESET
   ══════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

section[id] {
  scroll-margin-top: 80px;
}


/* ══════════════════════════════════════
   2. CSS VARIABLES
   ══════════════════════════════════════ */
:root {
  /* Backgrounds */
  --bg-page:       #FAFAF8;
  --bg-surface:    #FFFFFF;
  --bg-subtle:     #F5F4F1;

  /* Borders */
  --border:        #E5E4E1;
  --border-light:  #F0EFED;

  /* Text */
  --text-primary:  #111111;
  --text-secondary:#555555;
  --text-muted:    #8A8A8A;

  /* Brand accent */
  --accent:        #0C6B5F;
  --accent-hover:  #085349;
  --accent-tint:   rgba(12,107,95,0.08);
  --accent-light:  #E8F4F2;

  /* Semantic: status indicators */
  --success:       #0C6B5F;
  --success-bg:    rgba(12,107,95,0.06);
  --warning:       #A17A3A;
  --warning-bg:    rgba(161,122,58,0.08);
  --warning-border:rgba(161,122,58,0.15);
  --error:         #A54A3B;
  --error-bg:      rgba(165,74,59,0.08);
  --error-border:  rgba(165,74,59,0.15);
  --info:          #555555;
  --info-bg:       rgba(17,17,17,0.04);
  --info-border:   rgba(17,17,17,0.08);
  --tip:           #0C6B5F;
  --tip-bg:        rgba(12,107,95,0.06);
  --tip-border:    rgba(12,107,95,0.15);

  /* Structural */
  --bg-footer:     #111111;
  --radius:        10px;
  --radius-sm:     5px;
  --radius-lg:     12px;
  --font:          'Manrope', system-ui, sans-serif;
  --mono:          'SF Mono', 'Fira Code', 'Consolas', monospace;
  --max-w:         780px;
  --transition:    150ms ease;
}


/* ══════════════════════════════════════
   3. BASE
   ══════════════════════════════════════ */
body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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


/* ══════════════════════════════════════
   4. NAV
   ══════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.8px;
  text-transform: lowercase;
}
/* Logo mark — bar above the "s" in basics */
.logo-mark {
  position: relative;
  display: inline-block;
}
.logo-mark::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0.38em;
  height: 0.1em;
  margin-bottom: -0.46em;
  background: currentColor;
  border-radius: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links > a,
.nav-dropdown > .nav-dropdown-trigger {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  cursor: pointer;
}
.nav-links > a:hover,
.nav-dropdown:hover > .nav-dropdown-trigger {
  color: var(--text-primary);
}

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 12px;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}
.nav-dropdown-menu a {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.1px;
  transition: background 0.12s;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--bg-subtle); }

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-signin {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-signin:hover { color: var(--text-primary); }
.nav-cta {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  line-height: 1.4;
  display: inline-block;
}
.nav-cta:hover { background: var(--accent-hover); text-decoration: none; }

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all var(--transition);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--border-light);
  background: rgba(255,255,255,0.98);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--text-primary); }


/* ══════════════════════════════════════
   5. HERO / PAGE TITLE
   ══════════════════════════════════════ */
.hero,
.page-title {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px 32px;
  text-align: center;
}
.hero h1,
.page-title h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.hero p,
.page-title p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}
.hero-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}


/* ══════════════════════════════════════
   6. SEARCH BOX (tools)
   ══════════════════════════════════════ */
.search-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 32px;
}
.search-box {
  display: flex;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--accent); }
.search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
}
.search-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font);
}
.search-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 14px 28px;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.search-btn:hover { background: var(--accent-hover); }
.search-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.search-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}


/* ══════════════════════════════════════
   7. CTA / EMAIL CAPTURE
   ══════════════════════════════════════ */
.cta-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 40px;
}
.cta-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  text-align: center;
}
.cta-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.cta-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.cta-form {
  display: flex;
  gap: 0;
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cta-form:focus-within { border-color: var(--accent); }
.cta-email,
.cta-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 14px 16px;
  outline: none;
}
.cta-email::placeholder,
.cta-input::placeholder { color: var(--text-muted); }
.cta-submit {
  background: var(--accent);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 14px 24px;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.cta-submit:hover { background: var(--accent-hover); }
.cta-success {
  display: none;
  font-size: 14px;
  color: var(--accent);
  margin-top: 12px;
}
.cta-privacy,
.cta-consent {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}


/* ══════════════════════════════════════
   8. CALLOUT BOXES
   ══════════════════════════════════════ */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.65;
  border: 1px solid;
}
.callout strong { font-weight: 600; }
.callout.tip {
  background: var(--accent-tint);
  border-color: rgba(12,107,95,0.15);
  color: var(--accent);
}
.callout.warning {
  background: var(--warning-bg);
  border-color: rgba(161,122,58,0.15);
  color: var(--warning);
}
.callout.info {
  background: rgba(17,17,17,0.03);
  border-color: rgba(17,17,17,0.08);
  color: var(--text-secondary);
}
.callout.error {
  background: var(--error-bg);
  border-color: rgba(165,74,59,0.15);
  color: var(--error);
}


/* ══════════════════════════════════════
   9. LOADING SPINNER
   ══════════════════════════════════════ */
.loading { display: none; text-align: center; padding: 40px 0; }
.loading.active { display: block; }
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 13px;
  color: var(--text-muted);
}


/* ══════════════════════════════════════
   10. DISCLAIMER
   ══════════════════════════════════════ */
.disclaimer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 24px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}


/* ══════════════════════════════════════
   11. FOOTER
   ══════════════════════════════════════ */
.footer {
  margin-top: 56px;
  padding: 64px 32px 40px;
  background: var(--bg-footer);
  color: rgba(255,255,255,0.4);
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .footer-logo {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.8px;
  text-transform: lowercase;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}
.footer-col h4 {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  margin-bottom: 10px;
  font-weight: 400;
  transition: color 0.15s;
}
.footer-col a:hover { color: rgba(255,255,255,0.8); }
.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 32px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 400;
}


/* ══════════════════════════════════════
   12. RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 600px) {
  .hero h1,
  .page-title h1 { font-size: 26px; }
  .hero,
  .page-title { padding: 48px 20px 24px; }
  .search-section { padding: 0 16px 32px; }
  .cta-section { padding: 0 16px 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .footer { padding: 48px 24px 32px; }
}
