/* =============================================================
   VetSync AI — shared stylesheet
   Tokens, typography, layout primitives for all three pages.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@300;400;500;600;700;800&display=swap');

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

:root {
  /* Type stack: Alliance No.2 is primary; Hanken Grotesk loads via @import
     above as the secondary while Alliance is being licensed/self-hosted. */
  --font-display: 'Alliance No.2', 'Hanken Grotesk', system-ui, sans-serif;
  --font-body:    'Alliance No.2', 'Hanken Grotesk', system-ui, sans-serif;

  --bg:        #08090b;
  --ink:       #f1f3f6;
  --ink-dim:   #aab0bc;
  --ink-faint: #6a7080;
  --hairline:  rgba(230, 232, 236, 0.08);

  --pad-x:     clamp(24px, 4vw, 56px);
  --pad-y:     clamp(28px, 4vw, 40px);
  --read-width: 64ch;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
}

/* Vignette on every page */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at 55% 50%, transparent 0%, transparent 50%, rgba(0,0,0,0.55) 100%);
}

/* Film grain on every page */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 6;
  opacity: 0.30;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.6' 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.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Animated halftone (homepage only) */
#halftone {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 1;
}

/* Static masthead mark (about + legal) */
.mark { width: 22px; height: 22px; display: block; }

/* Page container */
.page {
  position: relative; z-index: 3;
  min-height: 100svh;
  padding: var(--pad-y) var(--pad-x);
  overflow: hidden;
}

/* ============== Shared: masthead ============== */
.masthead {
  position: relative; z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(13px, 1.05vw, 15px);
  letter-spacing: -0.005em;
  color: var(--ink);
}
.back-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: -0.005em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.back-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink-dim);
}

/* ============== Shared: footer ============== */
.pg-footer {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: var(--pad-y);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  z-index: 5;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: -0.005em;
  color: var(--ink-faint);
}
.pg-footer a {
  color: var(--ink-faint);
  text-decoration: none;
  margin-right: 18px;
  transition: color 180ms ease;
}
.pg-footer a:hover { color: var(--ink); }

/* ============== Homepage hero ============== */
.home-content {
  position: relative; z-index: 3;
  min-height: calc(100svh - var(--pad-y) * 2 - 40px);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.home-bottom {
  align-self: end;
  max-width: 620px;
}
.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.042em;
  color: var(--ink);
  animation: fade-up 1.6s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.home-wordmark   { animation: fade-up 1.2s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.home-pg-footer  { animation: fade-up 1.6s 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }

/* ============== Reading pages (about + legal) ============== */
.reader {
  position: relative; z-index: 3;
  padding-top: clamp(48px, 8vw, 80px);
  max-width: var(--read-width);
}
.reader h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: clamp(28px, 3vw, 40px);
}
.reader h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 36px;
  margin-bottom: 14px;
}
.reader p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-dim);
  letter-spacing: -0.005em;
  margin-bottom: 18px;
  max-width: 56ch;
}
.reader .rule {
  height: 1px;
  background: var(--hairline);
  margin: 40px 0;
  max-width: 56ch;
}
.reader .meta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: -0.005em;
  line-height: 1.8;
}
.reader .meta strong { color: var(--ink); font-weight: 500; }
.reader a.inline {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-dim);
  transition: border-color 180ms ease;
}
.reader a.inline:hover { border-bottom-color: var(--ink); }

/* ============== Motion ============== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  [class*="fade"],
  .home-wordmark,
  .headline,
  .home-pg-footer { animation: none; }
}

/* ============== Mobile headline scale (< 760px) ============== */
@media (max-width: 759px) {
  .headline {
    font-size: clamp(44px, 12vw, 64px);
    letter-spacing: -0.035em;
  }
}

/* ============== Focus styles (a11y) ============== */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}
