/* ==========================================================================
   PRIVACY SWAP - design tokens and shared primitives

   Palette: ink and patina.
   A deep violet-black base, warmed by champagne, lived in by a patinated jade.
   The cool and warm accents are held in tension on purpose. One flat accent on
   flat black reads as a default theme; a duotone with a warm base does not.
   ========================================================================== */

:root {
  /* ---------------------------------------------------------- surfaces */
  /* never a neutral black. every step carries a faint violet undertone. */
  --bg:            #07080D;
  --bg-raise:      #0A0C13;
  --surface:       #0E1119;
  --surface-2:     #141826;

  /* washes, layered into backgrounds rather than used as fills */
  --wash-plum:     rgba(123, 106, 168, 0.13);
  --wash-jade:     rgba(111, 211, 192, 0.07);
  --wash-gold:     rgba(217, 184, 124, 0.06);

  /* --------------------------------------------------------------- ink */
  /* warm bone rather than cool white. it is the single biggest reason the
     interface stops looking like every other dark dashboard. */
  --text:          #EDE8E0;
  --text-dim:      #D2CDC5;   /* body copy: bright enough to clear 4.5:1 on the scrim */
  --text-faint:    #BCB6AD;   /* raised: panels are translucent now, so the bed is lighter */   /* kept above 4.5:1 on --bg for body copy */

  /* ------------------------------------------------------------ accents */
  --jade:          #6FD3C0;
  --jade-soft:     #A9EADD;
  --jade-deep:     #1B6A61;
  --jade-wash:     rgba(111, 211, 192, 0.11);
  --jade-glow:     rgba(111, 211, 192, 0.30);

  --gold:          #D9B87C;
  --gold-soft:     #EED8AC;
  --gold-deep:     #6E5528;
  --gold-wash:     rgba(217, 184, 124, 0.10);

  --plum:          #7B6AA8;   /* background gradients only, never a UI fill */
  --copper:        #CB7F5A;   /* warnings and failures */
  /* the one semantic pair: problem and solution. A pure red and a pure green
     are the two most basic colours there are, and both look cheap on ink. */
  --tone-bad:      #DE8F76;
  --tone-good:     #9FE6D2;

  /* --------------------------------------------------------------- lines */
  --line:          rgba(237, 232, 224, 0.07);
  --line-2:        rgba(237, 232, 224, 0.14);
  --edge:          rgba(237, 232, 224, 0.085);
  --edge-gold:     rgba(217, 184, 124, 0.22);

  /* ---------------------------------------------------------------- type */
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-ui:      "Schibsted Grotesk", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* -------------------------------------------------------------- rhythm */
  --gut:   clamp(20px, 4vw, 56px);
  --maxw:  1320px;
  --nav-h: 68px;

  --r-xs:   10px;
  --r-sm:   14px;
  --r-md:   18px;
  --r-lg:   24px;
  --r-xl:   30px;
  --r-pill: 999px;

  --lift-1: 0 1px 0 rgba(237,232,224,0.05) inset,
            0 10px 30px -18px rgba(0,0,0,0.9);
  --lift-2: 0 1px 0 rgba(237,232,224,0.07) inset,
            0 22px 60px -28px rgba(0,0,0,1);

  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:  cubic-bezier(0.62, 0.02, 0.28, 1);
  --dur:      0.7s;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* The browser default is a bright square bar, and it is the single most
   off-brand thing that can appear on a dark page. */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(111,211,192,0.32) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(169,234,221,0.45), rgba(111,211,192,0.28));
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(169,234,221,0.7), rgba(111,211,192,0.45));
  background-clip: content-box;
}
::-webkit-scrollbar-corner { background: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16.5px;
  line-height: 1.66;
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--jade); color: #04211D; }

:focus-visible {
  outline: 1px solid var(--jade);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- typography */

/* Newsreader carries an optical size axis, so the large sizes are drawn with
   the stroke weight they need instead of going spindly. */
.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.lede {
  font-size: clamp(17px, 1.3vw, 19.5px);
  line-height: 1.68;
  color: var(--text-dim);
  font-weight: 400;
}

.mono { font-family: var(--font-mono); }

/* the one gradient in the type system, used only on emphasised words */
.shine {
  background: linear-gradient(96deg, var(--jade-soft) 0%, var(--jade) 42%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------------ layout */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--edge-gold) 22%,
                              var(--edge) 60%, transparent);
}

/* ------------------------------------------------------------------- nav */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 90;
  display: flex;
  align-items: center;
  padding-inline: var(--gut);
  pointer-events: none;
}
.nav__inner {
  pointer-events: auto;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  height: 52px;
  padding: 0 12px 0 20px;
  display: flex;
  align-items: center;
  gap: 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease),
              box-shadow 0.6s var(--ease), backdrop-filter 0.6s var(--ease);
}
.nav.is-stuck .nav__inner {
  background: rgba(10, 12, 19, 0.68);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-color: var(--edge-gold);
  box-shadow: var(--lift-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand__mark {
  width: 25px;
  height: 25px;
  color: var(--jade);
  transition: transform 0.9s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(180deg); }
.brand__name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav__link {
  font-size: 14px;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
  white-space: nowrap;
}
.nav__link:hover { color: var(--text); background: rgba(237,232,224,0.06); }

@media (max-width: 860px) {
  .nav__links { display: none; }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  white-space: nowrap;
  position: relative;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease), transform 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(168deg, var(--jade-soft), var(--jade) 58%, #4FBCA9);
  color: #04211D;
  box-shadow: 0 0 0 1px rgba(169,234,221,0.4),
              0 0 0 3px rgba(217,184,124,0.10),
              0 16px 38px -16px var(--jade-glow);
}
.btn--primary:hover {
  background: linear-gradient(168deg, #C4F2E8, var(--jade-soft) 60%, var(--jade));
  box-shadow: 0 0 0 1px rgba(217,184,124,0.55),
              0 0 0 4px rgba(217,184,124,0.14),
              0 20px 48px -16px var(--jade-glow);
}

.btn--ghost {
  border: 1px solid var(--line-2);
  color: var(--text);
  background: rgba(237,232,224,0.025);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  border-color: var(--edge-gold);
  color: var(--gold-soft);
  background: var(--gold-wash);
}

.btn--wide { width: 100%; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ---------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--edge);
  padding: 56px 0 40px;
  font-size: 13.5px;
  color: var(--text-faint);
  background: linear-gradient(180deg, transparent, rgba(123,106,168,0.05));
}
.foot__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot__col { display: flex; flex-direction: column; gap: 9px; }
.foot__h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3px;
}
.foot a { transition: color 0.3s var(--ease); }
.foot a:hover { color: var(--jade); }
.foot__base {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------- scroll reveal base
   Hidden state is scoped to .js so content stays readable if scripts fail. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
.js [data-reveal][data-delay="1"] { transition-delay: 0.09s; }
.js [data-reveal][data-delay="2"] { transition-delay: 0.18s; }
.js [data-reveal][data-delay="3"] { transition-delay: 0.27s; }
.js [data-reveal][data-delay="4"] { transition-delay: 0.36s; }
.js [data-reveal][data-delay="5"] { transition-delay: 0.45s; }
