/* ============================================================
   ATLAS — PUBLIC SITE DESIGN SYSTEM
   Shared across: /, /about/, /privacy-policy/, /terms/
   ============================================================ */

:root {
  --paper: #F4EFE5;
  --paper-warm: #EFE8D9;
  --paper-deep: #E7DFCD;
  --paper-soft: #F9F5EB;
  --ink: #1C1A15;
  --ink-soft: #3D3A32;
  --ink-muted: #6B6558;
  --ink-faint: #9A9283;
  --rule: #D8CEB8;
  --rule-soft: #E4DBC6;
  --blue: #1E3A6F;
  --blue-deep: #152749;
  --blue-soft: #7A9BD8;
  --blue-tint: #E6EBF4;
  --blue-wash: #EEF1F8;
  --ochre: #A87A32;
  --green-deep: #3A5A3C;
  --radius: 10px;
  --radius-lg: 14px;
  --max-width: 1180px;
  --prose-width: 720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  font-weight: 400;
  position: relative;
  overflow-x: hidden;
}

/* Paper grain overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(60,50,30,0.035) 1px, transparent 0);
  background-size: 3px 3px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.serif { font-family: 'Fraunces', Georgia, serif; font-weight: 400; letter-spacing: -0.012em; }
.mono { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before { content: '— '; color: var(--ink-faint); }

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 380;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 320;
  color: var(--blue);
}

/* ============================================================
   ANNOUNCEMENT STRIP
   ============================================================ */

.announce {
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.005em;
  position: relative;
  z-index: 51;
}
.announce-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.announce-tag {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-soft);
  font-weight: 500;
  padding-right: 16px;
  border-right: 1px solid rgba(244, 239, 229, 0.2);
}
.announce-msg { color: rgba(244, 239, 229, 0.9); }
.announce-msg strong { color: var(--paper); font-weight: 500; }
.announce-link {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--blue-soft);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.announce-link:hover { border-color: var(--paper); }
.announce-link::after { content: ' →'; color: var(--blue-soft); }

/* ============================================================
   NAVIGATION
   ============================================================ */

nav.site-nav {
  position: sticky; top: 0;
  z-index: 50;
  background: rgba(244, 239, 229, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  max-width: var(--max-width); margin: 0 auto;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.logo-mark {
  width: 48px; height: 48px;
  border-radius: 8px;
  display: inline-block;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}
.footer-brand .logo-mark { width: 40px; height: 40px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 400;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 18px; height: 1.5px;
  background: var(--blue);
}

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}
.nav-toggle-bar {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-demo-link { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}
.btn.btn-primary,
a.btn.btn-primary {
  background: var(--blue);
  color: #FFFFFF;
}
.btn.btn-primary:hover,
a.btn.btn-primary:hover {
  background: var(--blue-deep);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(21, 39, 73, 0.5);
}
.btn.btn-secondary,
a.btn.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn.btn-secondary:hover,
a.btn.btn-secondary:hover {
  border-color: var(--ink);
  background: rgba(0,0,0,0.02);
  color: var(--ink);
}
/* Belt-and-suspenders: .nav-links a had higher specificity and was overriding button text color.
   These rules guarantee buttons inside nav still render with their intended color. */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: #FFFFFF;
}
.nav-links a.btn-secondary,
.nav-links a.btn-secondary:hover {
  color: var(--ink);
}
.btn-arrow { transition: transform 0.2s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */

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

.section-header { max-width: 720px; margin-bottom: 64px; }
.section-header h2 {
  font-size: clamp(32px, 3.8vw, 46px);
  margin: 18px 0 20px;
}
.section-header p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 620px;
}
.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-header.center p { margin-left: auto; margin-right: auto; }
.section-header.center .eyebrow { display: inline-block; }

/* ============================================================
   FOOTER
   ============================================================ */

footer.site-footer {
  padding: 72px 0 40px;
  border-top: 1px solid var(--rule-soft);
  background: var(--paper);
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule-soft);
}
.footer-brand .logo { font-size: 22px; margin-bottom: 14px; }
.footer-brand p {
  font-size: 13.5px;
  color: var(--ink-muted);
  max-width: 260px;
  line-height: 1.55;
}
.footer-col h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  font-weight: 500;
  margin-bottom: 18px;
  font-family: 'DM Sans', sans-serif;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { color: var(--ink-muted); text-decoration: none; }
.footer-bottom-links a:hover { color: var(--ink); }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-1 { animation: fadeUp 0.8s ease-out 0.05s both; }
.fade-2 { animation: fadeUp 0.8s ease-out 0.15s both; }
.fade-3 { animation: fadeUp 0.8s ease-out 0.25s both; }
.fade-4 { animation: fadeUp 0.8s ease-out 0.35s both; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .wrap, .wrap-narrow { padding: 0 24px; }

  .nav-toggle { display: flex; }
  .nav-inner { flex-wrap: wrap; padding: 16px 24px; }
  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 0 8px;
    margin-top: 12px;
    border-top: 1px solid var(--rule-soft);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 12px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--rule-soft);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.btn {
    margin-top: 14px;
    justify-content: center;
    padding: 14px 20px;
    border-bottom: 1px solid transparent;
  }
  .nav-demo-link { display: block; }

  section { padding: 64px 0; }
  .section-header { margin-bottom: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .announce-inner { font-size: 12px; gap: 12px; flex-direction: column; padding: 8px 24px; }
  .announce-tag { padding-right: 0; border-right: none; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
