/* Phemera landing — design system of the Phemera app (theme "phemera"):
   cool near-black, warm brass, film grain, Science Gothic whose width
   encodes reach. One stylesheet for index, privacy and terms. */

:root {
  --background: #0a0b0d;
  --foreground: #f3f5f6;
  --accent: #e3c08d;
  --accent-2: #d6a45f;
  --grad-accent: linear-gradient(135deg, #eccf9f, #d6a45f);
  --on-accent: #0b0c0e;

  --n-50: #f4f6f7;
  --n-100: #e8ebed;
  --n-200: #cdd2d8;
  --n-300: #aab1ba;
  --n-400: #878e98;
  --n-500: #69707a;
  --n-600: #4b515a;
  --n-700: #333842;
  --n-800: #23262d;
  --n-900: #14161a;
  --n-950: #0a0b0d;

  /* Radius ladder — rank, not decoration. */
  --r-field: 6px;
  --r-button: 8px;
  --r-panel: 12px;
  --r-feature: 16px;
  --r-chip: 9999px;

  --hairline: rgba(255, 255, 255, 0.08);
  --font-display: "Science Gothic", "Onest", sans-serif;
  --font-body: "Onest", Arial, Helvetica, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1160px;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  /* Faint fixed brass glows give the .glass panels something to blur. */
  background:
    radial-gradient(80rem 42rem at 72% -12%, rgba(227, 192, 141, 0.07), transparent 60%),
    radial-gradient(64rem 32rem at 8% 112%, rgba(214, 164, 95, 0.05), transparent 60%),
    var(--background);
  background-attachment: fixed;
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Film-grain overlay: pure texture, no pointer events. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(227, 192, 141, 0.3);
  color: var(--n-50);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
figure,
ol,
ul {
  margin: 0;
}

/* Visible keyboard focus on every interactive element. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  border-radius: var(--r-button);
  box-shadow:
    0 0 0 2px var(--background),
    0 0 0 4px var(--accent);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--r-button);
  background: var(--n-900);
  color: var(--n-50);
  font-size: 14px;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

/* Lucide-style inline icons. */
.i {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Type voices ---------- */

/* Display voice: Science Gothic set wide. */
.display {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 650;
  letter-spacing: -0.005em;
}

/* The wordmark spreads once on load: condensed whisper → wide shout. */
.wordmark {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 170;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 0.9;
  animation: wordmark-spread 1.4s cubic-bezier(0.16, 0.8, 0.12, 1) both;
}
@keyframes wordmark-spread {
  from {
    font-variation-settings: "wdth" 50;
    font-weight: 300;
    opacity: 0.35;
  }
  to {
    font-variation-settings: "wdth" 170;
    font-weight: 800;
    opacity: 1;
  }
}

/* Reach numerals: width and weight scale with --reach (0–1), so louder
   numbers literally read wider. --reach = min(1, log2(outlier) / 6). */
.reach {
  font-family: var(--font-display);
  font-variation-settings: "wdth" calc(60 + var(--reach, 0) * 140);
  font-weight: calc(500 + var(--reach, 0) * 350);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

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

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

/* ---------- Surfaces ---------- */

/* Frosted glass: translucent panel over the page glow. */
.glass {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(20, 22, 26, 0.8);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: #14161a;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .glass {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #14161a;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-button);
  border: 1px solid transparent;
  font: 600 16px/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    filter 0.15s ease,
    transform 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}
.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

/* Primary: brass fill with dark ink. */
.btn-accent {
  background-image: var(--grad-accent);
  color: var(--on-accent);
  font-weight: 600;
}
.btn-accent:hover {
  filter: brightness(1.06);
}
.btn-accent:active {
  transform: translateY(1px) scale(0.99);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--n-700);
  color: var(--n-100);
  font-weight: 500;
}
.btn-ghost:hover {
  border-color: var(--n-500);
  color: var(--n-50);
}
.btn-ghost:active {
  transform: translateY(1px) scale(0.99);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 13, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--n-50);
  text-decoration: none;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: var(--r-button);
  background: var(--accent);
  color: var(--n-950);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 160;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}
.brand .wordmark {
  font-size: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: var(--r-button);
  color: var(--n-400);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover {
  color: var(--n-100);
  background: rgba(20, 22, 26, 0.6);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.header-mail {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--n-400);
  text-decoration: none;
  transition: color 0.15s ease;
}
.header-mail:hover {
  color: var(--accent);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(72px, 9vw, 120px) 0 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.eyebrow .i {
  font-size: 14px;
}

h2.display {
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.08;
  color: var(--n-50);
}

.section-lead {
  margin-top: 16px;
  font-size: 18px;
  color: var(--n-300);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(56px, 9vw, 112px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-chip);
  border: 1px solid rgba(227, 192, 141, 0.22);
  background: rgba(227, 192, 141, 0.06);
  color: var(--n-200);
  font-size: 13px;
  font-weight: 500;
}
.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(227, 192, 141, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px rgba(227, 192, 141, 0);
  }
}

.hero h1 {
  margin-top: 24px;
  max-width: 17ch;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.02;
  color: var(--n-50);
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 28px;
  max-width: 62ch;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--n-300);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.live-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(56px, 7vw, 80px);
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n-400);
}
.live-label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

/* Live metrics. Markup is regenerated by a script, so per-tile loudness and
   icons come from :nth-child, not attributes. */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metrics > div {
  position: relative;
  min-width: 0;
  padding: 22px 22px 20px;
  border-radius: var(--r-panel);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(20, 22, 26, 0.8);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.metrics > div::after {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  width: 18px;
  height: 18px;
  background: var(--n-500);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.metrics b {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: "wdth" calc(60 + var(--reach, 0) * 140);
  font-weight: calc(500 + var(--reach, 0) * 350);
  font-variant-numeric: tabular-nums;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1;
  color: var(--n-50);
  white-space: nowrap;
}
.metrics span {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--n-400);
}
.metrics > div:nth-child(1) {
  --reach: 0.5;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.metrics > div:nth-child(2) {
  --reach: 0.75;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 7 13.5 15.5 8.5 10.5 2 17'/%3E%3Cpolyline points='16 7 22 7 22 13'/%3E%3C/svg%3E");
}
.metrics > div:nth-child(3) {
  --reach: 1;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z'/%3E%3C/svg%3E");
  border-color: rgba(227, 192, 141, 0.2);
}
.metrics > div:nth-child(3) b {
  font-size: clamp(28px, 2.7vw, 40px);
  padding-right: 26px;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metrics > div:nth-child(3)::after {
  background: var(--accent);
}

/* ---------- Product mockup ---------- */

.showcase {
  position: relative;
}
.showcase::before {
  content: "";
  position: absolute;
  inset: 8% 10% auto;
  height: 60%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(214, 164, 95, 0.12), transparent);
  filter: blur(40px);
  pointer-events: none;
}

.app {
  border-radius: var(--r-feature);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 40px 120px -40px rgba(0, 0, 0, 0.9);
}

.app-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(10, 11, 13, 0.55);
}
.app-dots {
  display: flex;
  gap: 7px;
}
.app-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--n-700);
}
.app-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: min(280px, 50vw);
  justify-content: center;
  padding: 4px 14px;
  border-radius: var(--r-field);
  border: 1px solid var(--hairline);
  background: var(--n-900);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n-400);
}
.app-url .i {
  font-size: 11px;
  color: var(--n-500);
}

.app-body {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
}

.app-side {
  padding: 12px 8px;
  border-right: 1px solid var(--n-900);
  background: rgba(10, 11, 13, 0.6);
}
.app-side .brand {
  padding: 10px 12px 18px;
}
.app-side .brand-mark {
  width: 28px;
  height: 28px;
  font-size: 16px;
}
.app-side .brand-name {
  font-size: 16px;
}
.app-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  padding: 0;
}
.app-nav li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-button);
  font-size: 14px;
  color: var(--n-400);
}
.app-nav .i {
  font-size: 18px;
}
.app-nav li.active {
  background: var(--n-900);
  color: var(--n-50);
  font-weight: 500;
}
.app-nav li.active .i {
  color: var(--accent);
}
/* "You are here": a brass rule on the rail edge. */
.app-nav li.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 9999px 9999px 0;
  background: var(--accent);
}

.app-main {
  min-width: 0;
  padding: 28px 32px 32px;
}
.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.app-head h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.15;
  color: var(--n-50);
}
.period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-chip);
  border: 1px solid var(--n-800);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n-300);
  white-space: nowrap;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}
.kpis li {
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--r-panel);
  border: 1px solid var(--hairline);
  background: rgba(20, 22, 26, 0.6);
}
.kpis b {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 650;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--n-50);
}
.kpis b.reach {
  font-variation-settings: "wdth" calc(60 + var(--reach, 0) * 140);
  font-weight: calc(500 + var(--reach, 0) * 350);
  color: var(--accent);
}
.kpis span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--n-400);
}

.field-label {
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1rem;
  font-weight: 500;
  color: var(--n-400);
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  list-style: none;
}
.row {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border-radius: var(--r-panel);
  border: 1px solid var(--n-800);
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.row:hover {
  border-color: var(--n-700);
  background: rgba(255, 255, 255, 0.03);
}
.mult {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
  white-space: nowrap;
}
.mult .i {
  font-size: 14px;
  flex: none;
}
.row-body {
  min-width: 0;
}
.row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.user {
  font-weight: 600;
  font-size: 15px;
  color: var(--n-50);
  overflow-wrap: anywhere;
}
.type {
  padding: 1px 8px;
  border-radius: var(--r-chip);
  border: 1px solid var(--n-700);
  font-size: 11px;
  line-height: 1.6;
  color: var(--n-300);
}
.date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n-500);
}
.row-stats {
  margin-top: 4px;
  font-size: 13px;
  color: var(--n-300);
  font-variant-numeric: tabular-nums;
}
.row-cap {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--n-400);
  overflow-wrap: anywhere;
}
.row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n-500);
}
.row-tags span {
  overflow-wrap: anywhere;
}
.row-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n-400);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}
.row-link:hover {
  color: var(--accent);
}
.row-link .i {
  font-size: 13px;
}

.digest-extra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.subpanel {
  min-width: 0;
  padding: 16px 18px;
  border-radius: var(--r-panel);
  border: 1px solid var(--n-800);
  background: rgba(255, 255, 255, 0.015);
}
.htags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  list-style: none;
}
.htags li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--r-chip);
  background: var(--n-900);
  border: 1px solid var(--n-800);
  font-size: 13px;
  color: var(--n-200);
  overflow-wrap: anywhere;
}
.htags li b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--accent);
}
.patterns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.5;
  color: var(--n-300);
}
.patterns li {
  position: relative;
  padding-left: 18px;
}
.patterns li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}

.showcase figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--n-400);
  text-align: center;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link .i {
  font-size: 14px;
}

/* ---------- Cards ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  min-width: 0;
  padding: 26px;
  border-radius: var(--r-feature);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--n-700);
}
.card h3 {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--n-50);
}
.card p {
  margin-top: 8px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--n-400);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-panel);
  border: 1px solid var(--hairline);
  background: linear-gradient(135deg, rgba(227, 192, 141, 0.2), transparent);
  color: var(--accent);
  font-size: 20px;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  list-style: none;
}
.steps li {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
}
.steps li:nth-child(n + 4) {
  grid-column: span 3;
}
.step-num {
  font-size: 44px;
  line-height: 1;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.steps h3 {
  margin-top: 28px;
}

/* Claude: emphasised cards */
.card-claude {
  position: relative;
  border-color: rgba(227, 192, 141, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(227, 192, 141, 0.04),
    0 24px 64px -32px rgba(214, 164, 95, 0.35);
}
.card-claude:hover {
  border-color: rgba(227, 192, 141, 0.38);
}
.card-claude .icon-tile {
  border: 0;
  background-image: var(--grad-accent);
  color: var(--on-accent);
  box-shadow: 0 8px 24px -8px rgba(214, 164, 95, 0.55);
}

/* MCP */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.split .section-head {
  margin-bottom: 0;
}

.terminal {
  min-width: 0;
  border-radius: var(--r-panel);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 14px;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(10, 11, 13, 0.55);
  font-size: 12px;
  color: var(--n-400);
}
.terminal-bar .app-dots i {
  width: 9px;
  height: 9px;
}
.terminal-bar .label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.terminal-body {
  padding: 20px 22px 22px;
  line-height: 1.9;
}
.terminal-body .comment {
  color: var(--n-500);
}
.terminal-body ul {
  padding: 0;
  margin-top: 6px;
  list-style: none;
}
.terminal-body li {
  color: var(--n-100);
  overflow-wrap: anywhere;
}
.terminal-body li::before {
  content: "›";
  margin-right: 10px;
  color: var(--accent);
}

/* Status */
.status-note a,
.legal a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(227, 192, 141, 0.35);
  transition: border-color 0.15s ease;
}
.status-note a:hover,
.legal a:hover {
  border-bottom-color: var(--accent);
}

.facts {
  padding: 0;
  list-style: none;
}
.facts li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.facts .icon-tile {
  width: 40px;
  height: 40px;
  font-size: 18px;
}
.facts p {
  margin-top: 0;
  font-size: 15.5px;
  color: var(--n-200);
}

/* Final CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  margin-top: clamp(72px, 9vw, 120px);
  padding: clamp(40px, 7vw, 80px) clamp(24px, 5vw, 64px);
  border-radius: var(--r-feature);
  border-color: rgba(227, 192, 141, 0.2);
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 120%;
  background: radial-gradient(closest-side, rgba(227, 192, 141, 0.16), transparent);
  pointer-events: none;
}
.cta-band > * {
  position: relative;
}
.cta-band .big {
  max-width: 20ch;
  margin: 0 auto;
  font-size: clamp(28px, 4.6vw, 56px);
  line-height: 1.06;
  color: var(--n-50);
  text-wrap: balance;
}
.cta-band .cta-row {
  justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(72px, 9vw, 120px);
  border-top: 1px solid var(--hairline);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 32px;
  padding-bottom: 48px;
}
.site-footer .brand .wordmark {
  font-size: 18px;
  animation: none;
}
.site-footer .brand-mark {
  width: 28px;
  height: 28px;
  font-size: 16px;
}
.footer-line {
  font-size: 14px;
  color: var(--n-400);
}
.footer-line a {
  color: var(--n-200);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-line a:hover {
  color: var(--accent);
}

/* ---------- Legal pages ---------- */

.legal-main {
  padding-top: clamp(40px, 7vw, 80px);
}
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-feature);
  color: var(--n-200);
  font-size: 16.5px;
  line-height: 1.7;
}
.legal h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  color: var(--n-50);
}
.legal .updated {
  display: inline-flex;
  margin: 16px 0 32px;
  padding: 4px 12px;
  border-radius: var(--r-chip);
  border: 1px solid var(--n-700);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n-300);
}
.legal h2 {
  margin: 40px 0 12px;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 650;
  font-size: 21px;
  line-height: 1.25;
  color: var(--n-50);
}
.legal p {
  margin: 0 0 14px;
}
.legal ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.legal li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 22px;
}
.legal li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.legal b {
  color: var(--n-50);
  font-weight: 600;
}

/* ---------- Reveal on scroll ---------- */

/* Only hidden when JS is present; without JS everything stays visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .header-mail {
    display: none;
  }
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps li,
  .steps li:nth-child(n + 4) {
    grid-column: span 1;
  }
  .steps li:last-child {
    grid-column: span 2;
  }
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .app-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-side {
    display: none;
  }
  .app-main {
    padding: 20px 16px 20px;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }
  .digest-extra {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-bar {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .app-url {
    min-width: 0;
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }
  .site-header .wrap {
    gap: 12px;
  }
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps li:last-child {
    grid-column: span 1;
  }
  .cta-row .btn {
    flex: 1 1 100%;
  }
  .card {
    padding: 22px;
  }
}

@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;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
