/* ============================================================
   AWARENOVA (NOVA PHASE5) — GLOBAL STYLESHEET
   Loaded on every page. Design tokens, base type, navigation,
   buttons, footer, and shared utilities.

   Mobile-first: base rules target phones. Larger breakpoints
   scale type and layout up. ~98% of visitors are on mobile, so
   comfortable spacing and large tap targets come first.

   Page-specific styles live in their own files (home.css, etc).
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Backgrounds */
  --bg-0: #050505;          /* page base */
  --bg-1: #080808;          /* raised surface */
  --bg-2: #0D0D0D;          /* cards / panels */
  --bg-3: #121212;          /* hover / elevated card */

  /* Text */
  --text-0: #FFFFFF;        /* primary headings */
  --text-1: #EAEAEA;        /* body */
  --text-2: #CFCFCF;        /* secondary body */
  --text-muted: #8A8A8A;    /* fine print, captions */

  /* Accent — warm bronze / copper */
  --accent: #C58B5C;
  --accent-light: #D09A6A;
  --accent-dark: #B97A4A;

  /* Lines & glows (derived from accent / white) */
  --border-copper: rgba(197, 139, 92, 0.16);
  --border-soft: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --glow-copper: rgba(197, 139, 92, 0.14);

  /* Typography */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Spacing scale (used for section rhythm + gaps) */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;

  /* Layout */
  --max-width: 1140px;
  --nav-height: 64px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 100px;

  /* Soft shadows — premium, never harsh */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-btn: 0 8px 22px rgba(197, 139, 92, 0.22);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.5s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---------- 3. BASE TYPOGRAPHY (mobile-first scale) ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-0);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 5.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3.6vw, 1.4rem); }

p { color: var(--text-2); text-wrap: pretty; }

.accent { color: var(--accent); }

/* Mono eyebrow / label — the recurring brand marker */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

/* Pulsing status dot used alongside eyebrows (signature element) */
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--glow-copper);
  animation: pulse 2.4s var(--ease) infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(197, 139, 92, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(197, 139, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(197, 139, 92, 0); }
}

/* ---------- 4. LAYOUT HELPERS ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: clamp(72px, 12vw, 130px) 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 7vw, 60px);
}

.section-head .eyebrow { margin-bottom: 18px; }

.section-head h2 { margin-bottom: 16px; }

.section-head p {
  font-size: 1.05rem;
  color: var(--text-2);
}

.section-head.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head.centered .eyebrow { justify-content: center; }

main {
  flex: 1 0 auto;
}

@media (min-width: 720px) {
  .container { padding: 0 32px; }
}

/* ---------- 5. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  min-height: 52px;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease),
              background-color 0.25s var(--ease),
              border-color 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              color 0.25s var(--ease);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
}

/* Primary — solid copper with a soft glow */
.btn-primary {
  background: var(--accent);
  color: #1a0f06;
  font-weight: 600;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(197, 139, 92, 0.3);
}

/* Secondary — outlined */
.btn-secondary {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* Disabled state — used for pre-launch checkout buttons */
.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn-block { width: 100%; }

/* ---------- 6. NAVIGATION ---------- */
/* Nav markup is duplicated in each HTML page so the site works
   with zero JS and zero build step. To change a link, update it
   in index.html and in every file under /pages. navigation.js
   only handles the mobile toggle. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text-0);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo .mark { color: var(--accent); }

/* Brand mark in the top navigation. Only the nav logo carries the image;
   the footer wordmark stays text-only. The image is sized ~32px and kept
   from distorting (width:auto). The existing 8px flex gap plus this small
   margin gives ~11px between the mark and the wordmark, while the Nova/Phase5
   letter spacing is left untouched. Transparency is preserved (PNG alpha). */
.site-nav .nav-logo img {
  height: 32px;
  width: auto;
  display: block;
  flex-shrink: 0;
  margin-right: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links > li { display: flex; }

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-2);
  position: relative;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-links a:hover { color: var(--text-0); }

.nav-links a.active { color: var(--accent); }

/* The Get Started nav item reads as a compact CTA */
.nav-links a.nav-cta {
  color: #1a0f06;
  background: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 9px 18px;
}

.nav-links a.nav-cta:hover {
  background: var(--accent-light);
  color: #1a0f06;
}

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ---------- 7. MOBILE NAVIGATION ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    width: min(82vw, 340px);
    height: calc(100vh - var(--nav-height));
    height: calc(100dvh - var(--nav-height));
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 28px 24px calc(28px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-1);
    border-left: 1px solid var(--border-soft);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    overflow-y: auto;
  }

  .nav-links.open { transform: translateX(0); }

  .nav-links a {
    font-size: 1.05rem;
    padding: 16px 14px;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .nav-links a.active {
    background: rgba(197, 139, 92, 0.08);
  }

  .nav-links a.nav-cta {
    justify-content: center;
    text-align: center;
    font-size: 1rem;
    padding: 16px 14px;
    margin-top: 6px;
  }

  /* Animate hamburger into an X when open */
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- 8. FOOTER ---------- */
.site-footer {
  flex-shrink: 0;
  background: var(--bg-1);
  border-top: 1px solid var(--border-soft);
  padding: clamp(48px, 8vw, 72px) 0 36px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-soft);
}

.footer-brand .nav-logo { margin-bottom: 14px; }

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 300px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.95rem;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

@media (min-width: 720px) {
  .footer-top {
    grid-template-columns: 1.4fr 2fr;
    gap: 48px;
  }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 9. SCROLL REVEAL (driven by animations.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- 10. ACCESSIBILITY: REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
