/*
 * Pavu Labs site styles.
 * Dark navy theme with cyan accents, matching the original site palette and
 * the app icon.
 */

:root {
  color-scheme: dark;
  --max: 1160px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 1rem;
  --radius-lg: 1.5rem;

  /* Always-dark surfaces */
  --navy: #071229;
  --navy-2: #0c1d3d;
  --navy-ink: #f4f8ff;
  --navy-muted: #a9b9d2;
  --navy-faint: #8597b4;
  --navy-line: rgba(142, 172, 214, 0.2);
  --cyan: #2cead9;
  --sky: #2aa8ff;
  --coral: #ff9a89;

  /* The original site palette: deep navy with cyan accents. */
  --bg: #071229;
  --surface: #0d1f3e;
  --surface-2: #0a1935;
  --ink: #f4f8ff;
  --muted: #a9b9d2;
  --faint: #8a9bb8;
  --line: rgba(142, 172, 214, 0.16);
  --line-strong: rgba(142, 172, 214, 0.28);
  --accent: #2cead9;
  --accent-soft: rgba(44, 234, 217, 0.1);
  --blue: #5bb8ff;
  --warn: #ffc56b;
  --warn-soft: rgba(255, 197, 107, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(7, 18, 41, 0.8);
  --canvas-opacity: 1;

  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.privacy-section {
  --navy: #050d1f;
}

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

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

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(60rem 36rem at 85% -10%, rgba(42, 168, 255, 0.14), transparent 70%),
    radial-gradient(48rem 30rem at -10% 20%, rgba(44, 234, 217, 0.1), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.network-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: var(--canvas-opacity);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
}

main,
footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 0.35rem;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: 0.6rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 1rem;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  min-height: 68px;
  padding: 0 max(var(--gutter), calc((100% - var(--max)) / 2));
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 24%;
  box-shadow: 0 4px 12px rgba(7, 18, 41, 0.2);
}

nav {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

nav a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease;
}

nav a:hover,
nav a:focus-visible {
  background: var(--accent-soft);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-button {
  min-width: 3.25rem;
  min-height: 38px;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.language-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  background: linear-gradient(135deg, var(--cyan), var(--sky));
  box-shadow: 0 12px 30px -12px rgba(18, 162, 228, 0.5);
  color: var(--navy);
  font-weight: 680;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -10px rgba(11, 22, 48, 0.6);
}

.button-small {
  min-height: 38px;
  padding: 0.4rem 1rem;
  box-shadow: none;
  font-size: 0.88rem;
}

.button-small:hover {
  box-shadow: none;
}

.text-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: var(--ink);
  font-weight: 620;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.35em;
  transition: text-decoration-color 160ms ease;
}

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

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

.hero {
  display: grid;
  width: min(calc(100% - 2 * var(--gutter)), var(--max));
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(4rem, 9vw, 7rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(13, 160, 150, 0.45);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(13, 160, 150, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 160, 150, 0); }
}

h1 {
  max-width: 13ch;
  margin-bottom: 1.4rem;
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

:lang(zh-CN) h1 {
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.hero-lede {
  max-width: 36rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 550;
}

.trust-list li::before {
  width: 1rem;
  height: 1rem;
  flex: none;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 100% no-repeat,
    #0e9e93;
  content: "";
}

/* ---------- Illustrative finding (always dark) ---------- */

.signal-console {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 1.6rem);
  border: 1px solid rgba(89, 210, 255, 0.22);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(20rem 14rem at 100% 0%, rgba(44, 234, 217, 0.16), transparent 70%),
    linear-gradient(160deg, var(--navy-2), var(--navy));
  box-shadow: 0 40px 80px -30px rgba(7, 18, 41, 0.55), inset 0 1px rgba(255, 255, 255, 0.06);
  color: var(--navy-ink);
}

.console-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.console-topbar strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.console-kicker {
  color: var(--navy-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.severity {
  flex: none;
  border: 1px solid rgba(255, 154, 137, 0.35);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  background: rgba(255, 154, 137, 0.1);
  color: var(--coral);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.flow-map {
  display: grid;
  margin: 1.75rem 0;
  padding: 1.6rem 1rem 1.4rem;
  grid-template-columns: 1fr minmax(1.5rem, 0.6fr) 1fr minmax(1.5rem, 0.6fr) 1fr;
  align-items: start;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.flow-node {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

/* The letter inside each node is decorative (the map is aria-hidden); a line
   icon replaces it visually. */
.node-icon {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid var(--navy-line);
  border-radius: 0.85rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  color: var(--navy-muted);
  font-size: 0;
}

.node-icon::before {
  position: absolute;
  top: calc(50% - 11px);
  left: calc(50% - 11px);
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  content: "";
}

.app-node .node-icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M3 9h18M6.5 6.5h.01M9 6.5h.01'/%3E%3C/svg%3E");
  border-color: rgba(44, 234, 217, 0.45);
  background: rgba(44, 234, 217, 0.1);
  color: var(--cyan);
}

.file-node .node-icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5A2.5 2.5 0 0 1 5.5 5H9l2 2h7.5A2.5 2.5 0 0 1 21 9.5v7a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 16.5z'/%3E%3C/svg%3E");
  animation: file-active 6s ease-in-out infinite;
}

.net-node .node-icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.4 2.5 3.6 5.5 3.6 9s-1.2 6.5-3.6 9c-2.4-2.5-3.6-5.5-3.6-9S9.6 5.5 12 3z'/%3E%3C/svg%3E");
  animation: net-active 6s ease-in-out infinite;
}

.flow-node small {
  display: block;
  color: var(--navy-faint);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.flow-node b {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Connectors fill in sequence, tracing app -> file -> network, then reset. */
.flow-line {
  position: relative;
  height: 2px;
  margin-top: 23px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(142, 172, 214, 0.16);
}

.flow-line::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cyan), var(--sky));
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  animation: trace-first 6s ease-in-out infinite;
}

.flow-line ~ .flow-line::after {
  background: linear-gradient(90deg, var(--sky), var(--coral));
  animation-name: trace-second;
}

@keyframes trace-first {
  0%, 5% { transform: scaleX(0); opacity: 1; }
  22%, 82% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

@keyframes trace-second {
  0%, 30% { transform: scaleX(0); opacity: 1; }
  47%, 82% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

@keyframes file-active {
  0%, 20%, 92%, 100% { border-color: var(--navy-line); color: var(--navy-muted); }
  25%, 82% { border-color: rgba(42, 168, 255, 0.5); color: var(--sky); }
}

@keyframes net-active {
  0%, 45%, 92%, 100% { border-color: var(--navy-line); background: rgba(255, 255, 255, 0.03); color: var(--navy-muted); }
  50%, 82% { border-color: rgba(255, 154, 137, 0.55); background: rgba(255, 154, 137, 0.1); color: var(--coral); }
}

.evidence-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--navy-line);
  color: var(--navy-muted);
  font-size: 0.86rem;
}

.evidence-list div:first-child {
  border-top: 1px solid var(--navy-line);
}

.evidence-list b {
  color: var(--navy-ink);
  font-weight: 630;
  text-align: right;
}

.console-note {
  margin: 1rem 0 0;
  color: var(--navy-faint);
  font-size: 0.78rem;
  line-height: 1.55;
}

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

.section {
  width: min(calc(100% - 2 * var(--gutter)), var(--max));
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 7rem) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

/* Index number and label share one line above the heading. */
.section-heading > div {
  display: contents;
}

.section-index {
  display: inline-grid;
  min-width: 2.1rem;
  height: 1.6rem;
  margin-right: 0.6rem;
  padding: 0 0.5rem;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  vertical-align: middle;
}

.section-label {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  vertical-align: middle;
}

h2 {
  max-width: 22ch;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
}

:lang(zh-CN) h2 {
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.section-heading p:last-child,
.status-section p:not(.section-label) {
  max-width: 40rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

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

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.feature-grid article {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-number {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 2.5rem;
  place-items: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--cyan), var(--sky));
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
}

.feature-grid p,
.architecture-flow p,
.platform-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.rule-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.rule-strip span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 550;
}

.rule-strip span::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

/* ---------- Privacy (dark band) ---------- */

.privacy-section {
  --line: var(--navy-line);
  color: var(--navy-ink);
  background: var(--navy);
  box-shadow: 0 0 0 100vmax var(--navy);
  clip-path: inset(0 -100vmax);
}

.section + .privacy-section,
.privacy-section + .section {
  border-top-color: transparent;
}

.privacy-section .section-index {
  background: rgba(44, 234, 217, 0.12);
  color: var(--cyan);
}

.privacy-section .section-label {
  color: var(--cyan);
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.boundary-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-lg);
}

.boundary-card.collect {
  background: linear-gradient(150deg, rgba(44, 234, 217, 0.12), rgba(12, 29, 61, 0.6) 60%);
}

.boundary-card.never {
  background: linear-gradient(150deg, rgba(255, 154, 137, 0.1), rgba(12, 29, 61, 0.6) 60%);
}

.boundary-label {
  margin-bottom: 1.5rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.never .boundary-label {
  color: var(--coral);
}

.boundary-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.boundary-card li {
  position: relative;
  padding: 0.9rem 0 0.9rem 2.1rem;
  border-top: 1px solid var(--navy-line);
  color: #dbe5f4;
}

.boundary-card li::before {
  position: absolute;
  top: 1.1rem;
  left: 0;
  display: grid;
  width: 1.3rem;
  height: 1.3rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(44, 234, 217, 0.16);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  content: "✓";
}

.never li::before {
  background: rgba(255, 154, 137, 0.14);
  color: var(--coral);
  content: "✕";
}

.retention-note {
  max-width: 52rem;
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  color: var(--navy-muted);
}

.boundary-grid + .retention-note {
  margin-top: 2rem;
}

/* ---------- How it works ---------- */

.architecture-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.75rem;
}

.architecture-flow article {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.architecture-flow article > span {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 2rem;
  place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.architecture-arrow {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.25rem;
}

/* ---------- Availability ---------- */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.platform-grid article {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.platform-mark {
  margin-bottom: 1.75rem;
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.platform-grid strong {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.platform-grid strong::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

/* Status colours follow card order: macOS is in testing, Linux is a prototype. */
.platform-grid article:nth-child(1) strong {
  background: var(--accent-soft);
  color: var(--accent);
}

.platform-grid article:nth-child(2) strong {
  background: var(--warn-soft);
  color: var(--warn);
}

.platform-download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.platform-download p {
  font-size: 0.88rem;
}

.open-source-link {
  display: inline-flex;
  min-height: 44px;
  margin-top: 1.5rem;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.35em;
}

.open-source-link:hover {
  text-decoration-color: var(--accent);
}

/* ---------- About ---------- */

.contact-card {
  display: grid;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  grid-template-areas:
    "title address"
    "lead address"
    "note address";
  align-items: start;
  gap: 0 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-card h3 {
  grid-area: title;
  font-size: 1.4rem;
}

.contact-card p {
  grid-area: lead;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.contact-address {
  display: block;
  grid-area: address;
  align-self: center;
  width: 360px;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(11, 22, 48, 0.1);
  border-radius: 0.75rem;
}

.contact-card .contact-note {
  grid-area: note;
  max-width: 34rem;
  margin-bottom: 0;
  color: var(--faint);
  font-size: 0.88rem;
}

/* ---------- Status (dark band) ---------- */

.status-section {
  display: grid;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem 3rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(30rem 18rem at 100% 100%, rgba(44, 234, 217, 0.2), transparent 70%),
    radial-gradient(26rem 18rem at 0% 0%, rgba(42, 168, 255, 0.18), transparent 70%),
    var(--navy);
  color: var(--navy-ink);
}

.section + .status-section {
  border-top: 0;
}

.status-section .section-label {
  color: var(--cyan);
}

.status-section h2 {
  max-width: none;
}

.status-section p:not(.section-label) {
  color: var(--navy-muted);
}

.button-light {
  background: linear-gradient(135deg, var(--cyan), var(--sky));
  box-shadow: 0 12px 30px -12px rgba(44, 234, 217, 0.6);
  color: var(--navy);
  white-space: nowrap;
}

.button-light:focus-visible {
  outline-color: var(--cyan);
}

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

footer {
  display: flex;
  flex-wrap: wrap;
  width: min(calc(100% - 2 * var(--gutter)), var(--max));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  align-items: center;
  gap: 0.75rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.88rem;
}

footer p {
  margin: 0;
}

footer p:last-child {
  margin-left: auto;
}

.footer-brand {
  font-size: 1rem;
}

.footer-brand img {
  width: 30px;
  height: 30px;
}

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

@media (max-width: 1080px) {
  .feature-grid,
  .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
    padding-top: 0.6rem;
  }

  /* Keep every section reachable on small screens with a scrollable link row. */
  .site-header nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin: 0.4rem calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter) 0.55rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-header nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }

  nav a:first-child {
    margin-left: -0.75rem;
  }

  html {
    scroll-padding-top: 8rem;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .signal-console {
    max-width: 640px;
  }

  .boundary-grid,
  .architecture-flow {
    grid-template-columns: 1fr;
  }

  .architecture-arrow {
    transform: rotate(90deg);
  }

  .contact-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "lead"
      "address"
      "note";
  }

  .contact-address {
    justify-self: start;
    margin: 0.25rem 0 1rem;
  }

  .status-section {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 560px) {
  .button-small {
    display: none;
  }

  h1 {
    font-size: clamp(2.5rem, 12vw, 3.4rem);
  }

  .hero-actions .button,
  .button-light {
    width: 100%;
  }

  .feature-grid,
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .feature-number {
    margin-bottom: 1.5rem;
  }

  .platform-mark {
    margin-bottom: 1rem;
  }

  .flow-map {
    padding: 1.25rem 0.25rem;
    grid-template-columns: 1fr 0.3fr 1fr 0.3fr 1fr;
  }

  .flow-node b {
    font-size: 0.62rem;
    letter-spacing: -0.02em;
  }

  .evidence-list div {
    font-size: 0.82rem;
  }

  .status-section {
    border-radius: var(--radius);
  }

  footer p:last-child {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .flow-line::after {
    animation: none !important;
    transform: scaleX(1);
  }

  .file-node .node-icon,
  .net-node .node-icon {
    animation: none !important;
  }

  .file-node .node-icon {
    border-color: rgba(42, 168, 255, 0.5);
    color: var(--sky);
  }

  .net-node .node-icon {
    border-color: rgba(255, 154, 137, 0.55);
    background: rgba(255, 154, 137, 0.1);
    color: var(--coral);
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .trust-list li::before,
  .rule-strip span::before,
  .platform-grid strong::before {
    forced-color-adjust: none;
    background: CanvasText;
  }
}

/* The contact address is a mail link, not an image. */
a.contact-address {
  width: auto;
  padding: 1rem 1.25rem;
  overflow-wrap: anywhere;
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

a.contact-address:hover {
  text-decoration: underline;
}

/* The illustrative finding's middle node is a network port, not a folder. */
.flow-node.port-node .node-icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='2'/%3E%3Cpath d='M8 15v-4h2v-2h4v2h2v4z'/%3E%3C/svg%3E");
}
