/* ===========================================
   PERSUASIAN — GLOBAL DESIGN SYSTEM
   Shared across all pages
   =========================================== */

/* --- Tokens --- */
:root {
  --ink: #0E0E0F;
  --bone: #F5F2EC;
  --bone-warm: #EDE8DD;
  --oxblood: #6E1F1F;
  --oxblood-deep: #4A1414;
  --oxblood-light: #C97A7A;
  --gray-1: #2A2A2C;
  --gray-2: #6B6962;
  --gray-3: #A8A39A;
  --neon: #00F0FF;
  --display: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --max: 1440px;
  --pad: clamp(1.25rem, 4vw, 3rem);

  /* Interaction tokens */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.08);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Paper grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--ink);
  color: var(--bone);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  z-index: 9999;
  font-size: 0.9rem;
  transition: top var(--duration-fast);
}
.skip-link:focus {
  top: 1rem;
}

/* --- Focus Styles --- */
:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 2px;
}
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 2px;
}

/* ===========================================
   NAV
   =========================================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--duration-normal) var(--ease-out);
  backdrop-filter: blur(0);
}
nav.scrolled {
  background: rgba(245, 242, 236, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(14,14,15,0.08);
}
/* Apply page and inner pages start with frosted nav */
nav.frosted {
  background: rgba(245, 242, 236, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(14,14,15,0.08);
}

.logo {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.logo sup {
  font-size: 0.5em;
  font-family: var(--mono);
  color: var(--oxblood);
  margin-left: 4px;
  vertical-align: super;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  transition: opacity var(--duration-fast);
}
.nav-links a:hover { opacity: 0.6; }
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width 0.3s ease;
}
.nav-links a:not(.btn):hover::after { width: 100%; }

/* Active nav state */
.nav-links a.active { color: var(--oxblood); }
.nav-links a.active::after {
  width: 100% !important;
  background: var(--oxblood) !important;
}

/* CTA Button */
.btn {
  background: var(--ink);
  color: var(--bone);
  padding: 0.7rem 1.4rem;
  border-radius: 100px;
  transition: all 0.3s ease;
  border: 1px solid var(--ink);
}
.btn:hover {
  background: var(--oxblood);
  border-color: var(--oxblood);
  transform: translateY(-1px);
}
.btn-light {
  background: transparent;
  color: var(--ink);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 200;
  flex-direction: column;
  gap: 5px;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100dvh;
    background: var(--bone);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-out), visibility var(--duration-normal);
    z-index: 150;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }
  .nav-links a {
    display: block !important;
    font-size: 2rem;
    font-family: var(--display);
    font-weight: 400;
    font-variation-settings: "opsz" 144, "SOFT" 50;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--duration-normal) ease, transform var(--duration-normal) ease, color var(--duration-fast);
  }
  .nav-links.open a { opacity: 1; transform: translateY(0); }
  .nav-links.open a:nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open a:nth-child(2) { transition-delay: 0.1s; }
  .nav-links.open a:nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open a:nth-child(4) { transition-delay: 0.2s; }
  .nav-links.open a:nth-child(5) { transition-delay: 0.25s; }
  .nav-links a.btn {
    margin-top: 1rem;
    font-size: 1rem;
    font-family: var(--sans);
  }
  .nav-links a::after { display: none !important; }
}

/* ===========================================
   SHARED LAYOUT
   =========================================== */
.container { max-width: var(--max); margin: 0 auto; }

/* Common page header */
.page-header {
  padding: 9rem var(--pad) 3rem;
  position: relative;
  z-index: 2;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gray-2);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--oxblood);
}

/* Reveal animation for sections on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================
   FOOTER
   =========================================== */
footer {
  background: var(--bone-warm);
  padding: 5rem var(--pad) 2.5rem;
  border-top: 1px solid rgba(14,14,15,0.1);
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  max-width: var(--max);
  margin: 0 auto 4rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand .logo { font-size: 2rem; margin-bottom: 1rem; }
.footer-brand p {
  font-family: var(--display);
  font-style: italic;
  color: var(--gray-1);
  font-size: 1.1rem;
  line-height: 1.4;
  max-width: 22rem;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-2);
  margin-bottom: 1.2rem;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a {
  font-size: 0.95rem;
  transition: color var(--duration-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-col a:hover { color: var(--oxblood); }

/* Social icons */
.footer-col .social-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--duration-fast);
}
.footer-col a:hover .social-icon { opacity: 1; }

.footer-newsletter input {
  width: 100%;
  padding: 0.8rem 0;
  border: none;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  margin-top: 0.5rem;
  outline: none;
}
.footer-newsletter input::placeholder { color: var(--gray-2); }
.footer-newsletter button {
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink);
  cursor: pointer;
  margin-top: 1rem;
  padding: 0;
  transition: color var(--duration-fast);
}
.footer-newsletter button:hover { color: var(--oxblood); }

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(14,14,15,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-2);
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-bottom .right { display: flex; gap: 2rem; }

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none !important; }
}

/* ===========================================
   CTA SYSTEM
   Link separately in <head> — do NOT @import here.
   Add this to each page <head> after global.css:
   <link rel="stylesheet" href="/assets/css/cta-system.css">
   <script defer src="/assets/js/cta-system.js"></script>
   =========================================== */
