/* threatdesk.app
   Brand register (locked, from the app): true black, ONE accent (Signal
   #FF5F1F), severity colours exactly as the app draws them, Anton display,
   JetBrains Mono furniture, Space Grotesk reading. Dark only, like the app.
   No scripts, no trackers. Motion is CSS-only and switched off under
   prefers-reduced-motion. */

:root {
  --bg: #000000;
  --bg-2: #07080B;
  --surface: #0F1116;
  --surface-2: #14171E;
  --line: #1B1E26;
  --line-2: #262A34;
  --signal: #FF5F1F;
  --signal-soft: rgba(255, 95, 31, 0.14);
  --text: #EDEFF3;
  --text-2: #9AA0AA;
  --text-3: #6B7280;
  --crit: #FF4D4D;
  --high: #FF9F45;
  --med: #9FB2C9;
  --low: #5C6675;
  --r: 18px;
  --max: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--signal); text-underline-offset: 3px; }
a:hover { color: #FF8047; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.display {
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 0.98;
}
.display em { font-style: normal; color: var(--signal); }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav .wrap { height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.wordmark { font-family: "Anton", Impact, sans-serif; font-size: 24px; letter-spacing: 0.6px; color: var(--text); line-height: 1; }
.wordmark span { color: var(--signal); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--signal);
  color: #0B0B0B;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.btn:hover { background: #FF7A42; color: #0B0B0B; }
.btn:active { transform: translateY(1px) scale(0.98); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100dvh - 68px);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* The Slash mark, scaled up as the hero's ground. Brand asset, not decoration. */
  content: "";
  position: absolute;
  inset: auto -8% -30% auto;
  width: 780px;
  height: 780px;
  background: url("/favicon.svg") center / contain no-repeat;
  opacity: 0.09;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 50% at var(--gx, 78%) var(--gy, 45%), rgba(255, 95, 31, 0.18), transparent 70%);
  transition: background-position 0.3s;
  z-index: -2;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 56px 0 72px;
}
.hero h1 { font-size: clamp(56px, 5.7vw, 88px); margin: 0 0 26px; white-space: nowrap; }
.hero .lede { font-size: 20px; line-height: 1.55; color: var(--text-2); max-width: 30ch; margin: 0 0 36px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  height: 58px;
  min-width: 178px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--text);
  color: #050505;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.store small { font-size: 11px; line-height: 1.1; color: #3A3F48; }
.store strong { font-size: 20px; line-height: 1.15; font-weight: 600; letter-spacing: -0.2px; }
.store.alt { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.store.alt small { color: var(--text-2); }
.store:hover { transform: translateY(-2px); color: inherit; box-shadow: 0 12px 30px rgba(255, 95, 31, 0.18); }
.store[aria-disabled="true"] { cursor: default; }
.store[aria-disabled="true"]:hover { transform: none; box-shadow: none; }
.store-badge { display: inline-block; line-height: 0; border-radius: 12px; transition: transform 0.25s var(--ease); }
.store-badge img { height: 60px; width: auto; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge[aria-disabled="true"] { cursor: default; }
.store-badge[aria-disabled="true"]:hover { transform: none; }
.store-note { margin: 14px 0 0; font-size: 13px; color: var(--text-3); }

/* App tour: phones + tabs */
.hero-visual { display: grid; justify-items: center; gap: 18px; }
.hero-visual .phones { width: 100%; }
.phones {
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}
.phone.front .shot {
  position: absolute;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.55s var(--ease), transform 0.8s var(--ease);
}
.phone.front .shot.on { opacity: 1; transform: none; }
.tour {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  z-index: 3;
}
.tour button {
  position: relative;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: 500 12px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, background 0.25s;
}
.tour button:hover { color: var(--text); }
.tour button[aria-selected="true"] { color: #0B0B0B; background: var(--signal); }
.tour button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.tour.auto button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  transform-origin: left;
  animation: var(--progress-run, tour-progress) 4.2s linear forwards;
}
@keyframes tour-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Spotlight cards */
[data-spotlight] { position: relative; isolation: isolate; }
[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 95, 31, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: -1;
}
[data-spotlight]:hover::before { opacity: 1; }
.src:hover { border-color: rgba(255, 95, 31, 0.35); }
.src { transition: border-color 0.3s; }

/* Phones */
.phones { position: relative; height: 640px; }
.phone {
  position: absolute;
  width: 296px;
  aspect-ratio: 923 / 2000;
  padding: 9px;
  border-radius: 52px;
  background: linear-gradient(160deg, #2A2D35, #0B0C10 40%, #1A1C22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 90px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 44px; display: block; }
.phone.front { right: 0; top: 10px; transform: rotate(-4deg); z-index: 2; }
.phone.back { right: 168px; top: 70px; width: 262px; transform: rotate(5deg); opacity: 0.88; }

/* ── Where the news comes from ─────────────────────────────────────── */
.sources-sec { padding: 120px 0 100px; border-top: 1px solid var(--line); }
.sources-sec h2 { font-size: clamp(40px, 5.4vw, 72px); margin: 0 0 18px; }
.sources-lede { max-width: 56ch; color: var(--text-2); font-size: 19px; margin: 0 0 48px; }
.src-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 16px; }
.src { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.src h3 { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--signal); font-weight: 500; margin: 0 0 18px; }
.src ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.src li { font-family: "Anton", Impact, sans-serif; font-size: 26px; line-height: 1.1; letter-spacing: 0.3px; text-transform: uppercase; }

/* ── Support + privacy ───────────────────────────────────────────────── */
.help-sec { padding: 0 0 40px; }
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.help-card {
  display: block;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 40px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.help-card:first-child { background: radial-gradient(120% 140% at 100% 0%, rgba(255, 95, 31, 0.26), transparent 55%), linear-gradient(160deg, #1A0D07, #0B0B0B 60%); border-color: rgba(255, 95, 31, 0.25); }
.help-card:hover { border-color: var(--signal); transform: translateY(-2px); color: var(--text); }
.help-card h2 { font-size: 48px; margin: 0 0 12px; }
.help-card p { color: var(--text-2); margin: 0 0 26px; max-width: 40ch; }
.help-card span { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--signal); }

/* ── Long-form pages ─────────────────────────────────────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: 72px 24px 24px; }
.doc h1 { font-family: "Anton", Impact, sans-serif; font-weight: 400; font-size: clamp(44px, 7vw, 76px); line-height: 1; letter-spacing: 0.4px; text-transform: uppercase; margin: 0 0 14px; }
.meta { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--text-3); margin: 0 0 36px; }
.doc h2 { font-family: "Anton", Impact, sans-serif; font-weight: 400; font-size: 26px; letter-spacing: 0.4px; text-transform: uppercase; margin: 48px 0 12px; }
.doc p, .doc li, .doc td { color: #C3C8D0; }
.doc ul { padding-left: 20px; }
.doc li { margin: 8px 0; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.summary p { margin: 0; }
.summary p + p { margin-top: 10px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 10px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 14px 10px 14px 0; }
.doc tr + tr td { border-top: 1px solid var(--line); }
.doc th { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); font-weight: 500; border-bottom: 1px solid var(--line-2); }
.faq { border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; }
.faq details { background: var(--surface); padding: 18px 22px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--signal); font-family: "JetBrains Mono", monospace; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 2px; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer { margin-top: 80px; border-top: 1px solid var(--line); padding: 30px 0 48px; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a, .footer small { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--text-3); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ── Motion: entrances + scroll reveals (CSS only) ───────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  @keyframes phone-in-front { from { opacity: 0; transform: translateY(60px) rotate(-4deg); } to { opacity: 1; transform: rotate(-4deg); } }
  @keyframes phone-in-back { from { opacity: 0; transform: translateY(80px) rotate(5deg); } to { opacity: 0.88; transform: rotate(5deg); } }

  .hero h1, .hero .lede, .hero .stores, .hero .store-note { animation: rise 0.9s var(--ease) both; }
  .hero .lede { animation-delay: 0.08s; }
  .hero .stores { animation-delay: 0.16s; }
  .hero .store-note { animation-delay: 0.22s; }
  .phone.front { animation: phone-in-front 1.1s var(--ease) 0.15s both; }
  .phone.back { animation: phone-in-back 1.1s var(--ease) 0.3s both; }

  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1320px) and (min-width: 981px) {
  .phone { width: 262px; }
  .phone.back { width: 232px; right: 170px; }
}
@media (max-width: 980px) {
  .src-grid, .help { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 40px; }
  .hero h1 { white-space: normal; }
  .phones { height: 560px; }
  .phone.front { right: 50%; transform: translateX(62%) rotate(-4deg); }
  .phone.back { right: 50%; transform: translateX(-22%) rotate(5deg); }
}
@media (max-width: 980px) and (prefers-reduced-motion: no-preference) {
  @keyframes phone-in-front { from { opacity: 0; transform: translate(62%, 60px) rotate(-4deg); } to { opacity: 1; transform: translateX(62%) rotate(-4deg); } }
  @keyframes phone-in-back { from { opacity: 0; transform: translate(-22%, 80px) rotate(5deg); } to { opacity: 0.88; transform: translateX(-22%) rotate(5deg); } }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .nav .wrap { gap: 14px; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .hero-grid { padding-top: 44px; }
  .sources-sec { padding-top: 88px; }
  .help-card { padding: 30px; }
  .src li { font-size: 22px; }
  .hero h1 { font-size: clamp(52px, 15vw, 72px); }
  .hero .lede { font-size: 18px; }
  .stores .store { flex: 1 1 160px; }
  .phones { height: 470px; }
  .phone { width: 220px; border-radius: 40px; padding: 7px; }
  .phone img { border-radius: 34px; }
  .phone.front .shot { inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); }
  .tour button { padding: 10px 11px; font-size: 11px; letter-spacing: 0.6px; }
  .phone.back { width: 196px; }
}
