/* TaliiVue website — shared styles
   Scope: design tokens, reset, body/typography, full-page background layer,
   and the shared footer. Page-specific rules (hero, cards, CTA, slider,
   intro-section, etc.) stay inline on the page that uses them until a
   second page needs them.
   Last change: 260513. Self-hosted fonts (replaces Google Fonts CDN).
*/

/* -- Self-hosted fonts (260513) ------------------------------------------
   Replaces Google Fonts CDN to eliminate render-blocking external CSS
   round-trip + the fonts.googleapis.com / fonts.gstatic.com DNS chain.
   Files live at /assets/fonts/. Cache headers in .htaccess set to 1 year
   (woff2 file content is stable across releases; renames bust the cache).
   font-display: swap shows a system fallback immediately then swaps to
   the web font when it loads, so no invisible-text flash. */
@font-face {
  font-family: 'DM Serif Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/dm-serif-text-v13-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/outfit-v15-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/outfit-v15-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/outfit-v15-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/outfit-v15-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/outfit-v15-latin-700.woff2') format('woff2');
}

/* -- Design tokens ------------------------------------------------------- */
:root {
  --bg: #09090f;
  --accent: #7c6fff;
  --green: #1fd6a0;
  --text: #f0f0f4;
  --muted: #8e8ea8;
  --border: rgba(255,255,255,.06);
}

/* -- Reset + base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hh-sm); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
h1, h2, h3 {
  font-family: 'DM Serif Text', Georgia, 'Times New Roman', serif;
  font-weight: 400;
}

/* -- Ambient background layer (every page) ------------------------------ */
.bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 20% 10%,  rgba(124,111,255,.22) 0%, transparent 55%),
    radial-gradient(ellipse 100% 70% at 80% 20%,  rgba(31,214,160,.14)  0%, transparent 55%),
    radial-gradient(ellipse 90%  70% at 50% 80%,  rgba(192,132,252,.14) 0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 50% 45%,  rgba(124,111,255,.08) 0%, transparent 60%);
}
.bg-layer::after {
  content: ''; position: absolute; inset: 0; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

/* -- Shared footer ------------------------------------------------------- */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(10,10,18,.5);
  backdrop-filter: blur(16px);
  padding: 20px 28px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.footer-wordmark { height: 18px; width: auto; }
.footer-copy { font-size: 12px; color: var(--muted); }

/* -- Sticky site header ------------------------------------------------- */
/* Two states:
     • Tall "initial" state at rest (page top)           — .site-header[data-state="lg"]
     • Compact "scrolled" state after ~120px of scroll   — .site-header[data-state="sm"]
   The liquid-glass look (translucent bg + backdrop blur) is preserved in BOTH
   states; only height/padding/logo/nav sizes change.
   The body reserves the LARGE header's height via padding-top so content
   never shifts when the header shrinks.
*/
:root {
  --hh-lg: 96px;
  --hh-sm: 68px;
  --hh-logo-lg: 40px;
  --hh-logo-sm: 28px;
  --hh-nav-fs-lg: 16px;
  --hh-nav-fs-sm: 13.5px;
  --hh-pad-x-lg: 40px;
  --hh-pad-x-sm: 28px;
  --hh-ease: cubic-bezier(.4,0,.2,1);
  --hh-dur: .35s;
}

body { padding-top: var(--hh-lg); }

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--hh-lg);
  padding: 0 var(--hh-pad-x-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(12,12,20,.4);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: height var(--hh-dur) var(--hh-ease),
              padding var(--hh-dur) var(--hh-ease),
              border-color var(--hh-dur) var(--hh-ease);
}
.site-header[data-state="sm"] {
  height: var(--hh-sm);
  padding: 0 var(--hh-pad-x-sm);
  border-bottom-color: rgba(255,255,255,.1);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  line-height: 0;
}
.site-header__logo {
  height: var(--hh-logo-lg);
  width: auto;
  transition: height var(--hh-dur) var(--hh-ease);
}
.site-header[data-state="sm"] .site-header__logo {
  height: var(--hh-logo-sm);
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Hamburger — hidden on desktop; asymmetric 3-line pattern matches app */
.site-header__hamburger {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.site-header__hlines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
}
.site-header__hlines span {
  display: block;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: width .2s ease, opacity .2s ease;
}
.site-header__hlines span:nth-child(1) { width: 20px; }
.site-header__hlines span:nth-child(2) { width: 14px; opacity: .6; }
.site-header__hlines span:nth-child(3) { width: 17px; opacity: .35; }
.site-header__hamburger:hover .site-header__hlines span:nth-child(2) { opacity: .85; }
.site-header__hamburger:hover .site-header__hlines span:nth-child(3) { opacity: .7; }

/* Mobile drawer — full-viewport blurred overlay, centered nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.mobile-nav__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,8,16,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-nav__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.97);
  transition: opacity .25s ease, transform .25s cubic-bezier(.4,0,.2,1);
}
.mobile-nav.open { pointer-events: all; }
.mobile-nav.open .mobile-nav__overlay { opacity: 1; }
.mobile-nav.open .mobile-nav__panel { opacity: 1; transform: scale(1); }

.mobile-nav__close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav__close:hover { color: var(--text); }

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 320px;
  padding: 0 24px;
}
.mobile-nav__links a {
  display: block;
  font-family: inherit;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .01em;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  padding: 14px 24px;
  transition: color .18s ease;
}
.mobile-nav__links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .mobile-nav__overlay,
  .mobile-nav__panel { transition: none; }
}

.site-header__link {
  color: var(--muted);
  text-decoration: none;
  font-family: inherit;
  font-size: var(--hh-nav-fs-lg);
  font-weight: 400;
  letter-spacing: .01em;
  transition: color .16s ease,
              font-size var(--hh-dur) var(--hh-ease);
}
.site-header__link:hover { color: var(--text); }
.site-header[data-state="sm"] .site-header__link {
  font-size: var(--hh-nav-fs-sm);
}

/* Buy Now — persistent green CTA */
.site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #09090f;
  font-family: inherit;
  font-size: var(--hh-nav-fs-lg);
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 2px 18px rgba(31,214,160,.22);
  transition: background .16s ease,
              transform .16s ease,
              box-shadow .16s ease,
              font-size var(--hh-dur) var(--hh-ease),
              padding var(--hh-dur) var(--hh-ease);
}
.site-header__cta:hover {
  background: #2ae0ad;
  transform: translateY(-1px);
  box-shadow: 0 4px 22px rgba(31,214,160,.3);
}
.site-header[data-state="sm"] .site-header__cta {
  font-size: var(--hh-nav-fs-sm);
  padding: 9px 16px;
}

/* Current-page active state — driven by <body data-page="..."> */
body[data-page="privacy"]   .site-header__link[data-nav="privacy"],
body[data-page="privacy"]   .mobile-nav__links a[data-nav="privacy"],
body[data-page="changelog"] .site-header__link[data-nav="changelog"],
body[data-page="changelog"] .mobile-nav__links a[data-nav="changelog"],
body[data-page="blog"]      .site-header__link[data-nav="blog"],
body[data-page="blog"]      .mobile-nav__links a[data-nav="blog"] {
  color: var(--text);
  cursor: default;
  pointer-events: none;
}

/* Reduced motion: keep state change, drop the animation */
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__logo,
  .site-header__link,
  .site-header__cta { transition: none; }
}

/* -- Mobile overrides (shared only) ------------------------------------- */
@media (max-width: 600px) {
  :root {
    --hh-lg: 76px;
    --hh-sm: 56px;
    --hh-logo-lg: 30px;
    --hh-logo-sm: 22px;
    --hh-nav-fs-lg: 13px;
    --hh-nav-fs-sm: 12px;
    --hh-pad-x-lg: 16px;
    --hh-pad-x-sm: 14px;
  }
  .site-header { gap: 12px; }
  .site-header__nav { display: none; }
  .site-header__hamburger { display: flex; }
  .site-header__right { gap: 10px; }
  .site-header__cta { padding: 9px 14px; border-radius: 9px; white-space: nowrap; }
  .site-header[data-state="sm"] .site-header__cta { padding: 7px 12px; }
  .mobile-nav__links a { font-size: 20px; }

  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
}
