/* ============================================================
   Annotrack — global styles
   ============================================================ */

/* ---------------- Fonts ---------------- */
@font-face {
  font-family: "Baskerville";
  src: url("fonts/Baskervville-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Baskerville";
  src: url("fonts/Baskervville-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Baskerville";
  src: url("fonts/Baskervville-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Baskerville";
  src: url("fonts/Baskervville-MediumItalic.ttf") format("truetype");
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Baskerville";
  src: url("fonts/Baskervville-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Baskerville";
  src: url("fonts/Baskervville-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("fonts/Gotham-Light_2.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("fonts/Gotham-Book.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("fonts/Gotham-Medium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Gotham";
  src: url("fonts/GOTHAM-BOLD.TTF") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------------- Tokens ---------------- */
:root {
  --primary:           #0E8C6A;
  --primary-deep:      #0A6B51;
  --primary-disabled:  #2E4A3F;
  --accent-sage:       #82B8A3;
  --accent-sage-soft:  #A6CDBF;

  --canvas:            #0A1A13;
  --canvas-edge:       #060F0A;
  --grid-line:         #1C3A2C;
  --surface-pill-dark: #1C3A2D;

  --surface-dash-dark:     #102A1F;
  --surface-dash-tile:     #163829;
  --surface-dash-hairline: #214434;

  --app-bg:            #F6F6F7;
  --surface-card:      #FFFFFF;
  --surface-card-soft: #FAFAFB;
  --hairline:          #E3E3E3;
  --hairline-soft:     #EBEBEB;
  --selected-tint:     #EAF4EF;

  --on-dark-heading:   #FFFFFF;
  --on-dark-body:      #CBD4CE;
  --on-dark-muted:     #8FA39A;

  --ink:               #1A1A1A;
  --body:              #4A4A4A;
  --muted:             #6D7175;
  --on-primary:        #FFFFFF;

  --success:        #1FA06A;
  --warning:        #E0852F;
  --error:          #D72C0D;
  --error-on-dark:  #EF4E6B;

  --radius-xs:    4px;
  --radius-sm:    6px;
  --radius-md:    8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-pill: 9999px;

  --shadow-marquee: 0 24px 60px -24px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-raised:  0 1px 3px rgba(20, 20, 20, 0.08);

  --font-display: "Baskerville", "Libre Baskerville", Georgia, serif;
  --font-body: "Gotham", "Helvetica Neue", Arial, sans-serif;
}

/* ---------------- Base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--on-dark-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { display: block; }
button { font-family: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
}

/* ---------------- Headings ---------------- */
.h-display-xl { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.6px; margin: 0; text-wrap: balance; }
.h-display-lg { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 4vw, 48px); line-height: 1.08; letter-spacing: -0.3px; margin: 0; text-wrap: balance; }
.h-display-md { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -0.2px; margin: 0; text-wrap: balance; }

.accent {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-sage);
}

.lede {
  font-family: var(--font-body);
  font-size: 18px; line-height: 1.55;
  color: var(--on-dark-body);
  margin: 18px 0 0;
  max-width: 56ch;
}
.lede.on-light { color: var(--body); }

/* ---------------- Layout helpers ---------------- */
.wrap        { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 920px;  margin: 0 auto; padding: 0 32px; }
.wrap-prose  { max-width: 760px;  margin: 0 auto; padding: 0 32px; }

/* ---------------- Canvas ---------------- */
.canvas {
  position: relative;
  background-color: var(--canvas);
  background-image:
    linear-gradient(to right,  rgba(28,58,44,0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28,58,44,0.45) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  overflow: hidden;
}
.canvas::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, transparent 0%, rgba(6,15,10,0.7) 100%);
  pointer-events: none;
}
.canvas > * { position: relative; z-index: 1; }

.light-band { background: var(--app-bg); color: var(--body); }
.light-band h1, .light-band h2, .light-band h3 { color: var(--ink); }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0; z-index: 50;
  background: rgba(10, 26, 19, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(28,58,44,0.55);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  max-width: 1240px; margin: 0 auto;
  gap: 24px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-link {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  color: var(--on-dark-body);
  text-decoration: none;
  white-space: nowrap;
  transition: color 140ms ease-out;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent-sage);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover { color: var(--on-dark-heading); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { height: 38px; width: auto; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  line-height: 1;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: background 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out, transform 240ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-deep); box-shadow: 0 10px 24px -10px rgba(14, 140, 106, 0.6); }
.btn--secondary-dark {
  background: transparent;
  color: var(--on-dark-heading);
  border: 1px solid var(--surface-dash-hairline);
}
.btn--secondary-dark:hover { border-color: var(--accent-sage-soft); }
.btn--secondary-light {
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn--secondary-light:hover { background: var(--surface-card-soft); border-color: var(--primary); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 15px; }

/* ---------------- Eyebrow ---------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 14px;
  background: var(--surface-pill-dark);
  border: 1px solid rgba(130, 184, 163, 0.18);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  color: var(--accent-sage-soft);
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-sage);
}
.eyebrow.on-light {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  color: var(--primary-deep);
}
.eyebrow.on-light .eyebrow-dot { background: var(--primary); }

/* ---------------- Trust marquee ---------------- */
.trust-marquee {
  padding: 40px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.trust-marquee .trust-label {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--on-dark-muted);
}
.trust-track-mask {
  width: 100%;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
.trust-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.trust-track-set {
  display: flex;
  gap: 64px;
  padding-right: 64px;
  flex: 0 0 auto;
}
.trust-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  color: var(--on-dark-body);
  opacity: 0.7;
  letter-spacing: -0.2px;
  white-space: nowrap;
  transition: opacity 240ms ease-out, color 240ms ease-out;
}
.trust-logo:hover { opacity: 1; color: var(--on-dark-heading); }

@media (max-width: 700px) {
  .trust-logo { font-size: 22px; }
  .trust-track-set { gap: 48px; padding-right: 48px; }
}

/* ---------------- Footer ---------------- */
.footer {
  background: var(--canvas-edge);
  border-top: 1px solid rgba(28,58,44,0.6);
  padding: 64px 0 32px;
  color: var(--on-dark-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: flex-start;
}
.footer h4 {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--on-dark-heading);
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--on-dark-body);
  text-decoration: none;
  transition: color 140ms ease-out;
}
.footer a:hover { color: var(--on-dark-heading); }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(28,58,44,0.6);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-body); font-size: 12px;
  color: var(--on-dark-muted);
  flex-wrap: wrap; gap: 16px;
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; }
}

/* ---------------- Prose pages ---------------- */
.prose {
  background: var(--app-bg);
  color: var(--body);
  padding: 96px 0;
}
.prose h1 { color: var(--ink); font-family: var(--font-display); font-weight: 400; font-size: 48px; line-height: 1.1; letter-spacing: -0.3px; margin: 0 0 12px; }
.prose .meta { font-family: var(--font-body); font-size: 13px; color: var(--muted); margin: 0 0 40px; }
.prose h2 { color: var(--ink); font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.2; letter-spacing: -0.2px; margin: 40px 0 12px; scroll-margin-top: 96px; }
.prose h3 { color: var(--ink); font-family: var(--font-body); font-weight: 500; font-size: 18px; line-height: 1.3; margin: 28px 0 8px; }
.prose p, .prose li { font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--body); }
.prose ul { padding-left: 22px; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.prose a { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 3px; }
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 48px 0; }
.prose .lead {
  font-family: var(--font-body);
  font-size: 19px; line-height: 1.55;
  color: var(--ink);
  margin: 0 0 24px;
}

/* ---------------- GSAP reveal helpers ---------------- */
.reveal-up { opacity: 0; transform: translateY(28px); }
.reveal-fade { opacity: 0; }
.reveal-scale { opacity: 0; transform: scale(0.96); }

@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-fade, .reveal-scale { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
