/* ==========================================================================
   RainStorm — marketing site
   Design language extracted from the app's Settings window:
   dark navy backgrounds, blue accent gradient, white-opacity text tiers,
   continuous rounded corners, capsule controls, soft blue glows.
   ========================================================================== */

/* ----------  Fonts  ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/inter-700.woff2") format("woff2");
}

/* ----------  Design tokens  ---------- */
:root {
  /* Backgrounds */
  --bg-0: #0b0d17;      /* deepest navy */
  --bg-1: #161c2b;      /* base navy */
  --bg-panel: #080a14;  /* panel / window body */
  --bg-elev: #121726;   /* elevated surface */

  /* Accent blues */
  --blue-bright: #c9e6ff;
  --blue: #63a3ff;
  --blue-mid: #91c2ff;
  --blue-toggle: #7aaeed;

  /* Secondary / status */
  --gold: #faca5a;
  --green: #73f3a6;
  --red: #ff7373;

  /* Gradients */
  --accent-grad: linear-gradient(135deg, rgba(201, 230, 255, 0.95), rgba(99, 163, 255, 0.9));
  --accent-grad-solid: linear-gradient(135deg, #c9e6ff, #63a3ff);
  --bg-grad: linear-gradient(160deg, #161c2b 0%, #0b0d17 55%, #080a14 100%);

  /* Text tiers (white opacity) */
  --text-0: #ffffff;
  --text-1: rgba(255, 255, 255, 0.82);
  --text-2: rgba(255, 255, 255, 0.66);
  --text-3: rgba(255, 255, 255, 0.45);

  /* Surfaces & borders */
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Radii */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Shadows / glows */
  --glow-blue: 0 22px 60px -24px rgba(99, 163, 255, 0.55);
  --glow-blue-soft: 0 16px 48px -28px rgba(99, 163, 255, 0.4);
  --shadow-ambient: 0 24px 60px -30px rgba(0, 0, 0, 0.7);

  /* Layout */
  --maxw: 1140px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Type */
  --font-head: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}

/* ----------  Reset / base  ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  color: var(--text-1);
  background-color: var(--bg-0);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Layered atmospheric background: base gradient + radial blue glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-grad);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 82% -5%, rgba(99, 163, 255, 0.22), transparent 70%),
    radial-gradient(45% 40% at 10% 8%, rgba(122, 174, 237, 0.12), transparent 70%),
    radial-gradient(70% 50% at 50% 110%, rgba(99, 163, 255, 0.1), transparent 70%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-0);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

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

/* ----------  Layout primitives  ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
  position: relative;
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  max-width: var(--maxw);
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-mid);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.section-head h2 {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  margin-top: 0.9rem;
}
.section-head p {
  margin-top: 1rem;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--text-2);
  max-width: 56ch;
}

.grad-text {
  background: var(--accent-grad-solid);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ----------  Buttons  ---------- */
.btn {
  --pad-y: 0.72rem;
  --pad-x: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.22s var(--ease),
    background 0.22s var(--ease), border-color 0.22s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-grad-solid);
  color: #0a1226;
  box-shadow: var(--glow-blue);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 64px -22px rgba(99, 163, 255, 0.7);
}
.btn-ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-1);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* App Store badge button */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 1.4rem 0.62rem 1.2rem;
  border-radius: var(--r);
  background: linear-gradient(180deg, #1b2336, #11151f);
  border: 1px solid var(--border-strong);
  box-shadow: var(--glow-blue-soft);
  transition: transform 0.18s var(--ease), border-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}
.appstore-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(145, 194, 255, 0.5);
  box-shadow: 0 22px 50px -24px rgba(99, 163, 255, 0.6);
}
.appstore-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--text-0);
}
.appstore-badge .ab-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.appstore-badge .ab-small {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--text-2);
  text-transform: uppercase;
}
.appstore-badge .ab-big {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-0);
}

/* ----------  Header / nav  ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 13, 23, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--text-0);
  letter-spacing: -0.01em;
}
.brand img {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 4px 10px rgba(99, 163, 255, 0.45));
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s var(--ease);
}
.nav-links a:hover {
  color: var(--text-0);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-0);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----------  Hero  ---------- */
.hero {
  position: relative;
  padding-top: clamp(8rem, 16vh, 11rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
  text-align: center;
  overflow: hidden;
}
#rain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 1.6rem;
  filter: drop-shadow(0 14px 34px rgba(99, 163, 255, 0.45))
    drop-shadow(0 4px 14px rgba(250, 202, 90, 0.25));
}
.hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.4rem);
  max-width: 16ch;
  margin-inline: auto;
}
.hero .lede {
  margin: 1.4rem auto 0;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--text-2);
}
.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-3);
}

/* Hero product frame */
.hero-shot {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.desktop-video {
  position: relative;
  max-width: 1120px;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  overflow: hidden;
  border-radius: clamp(18px, 2.4vw, 30px);
  background:
    radial-gradient(circle at 50% 0%, rgba(99, 163, 255, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(5, 7, 13, 0.72), rgba(5, 7, 13, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 42px 110px -56px rgba(0, 0, 0, 0.9),
    0 30px 90px -66px rgba(99, 163, 255, 0.72);
}
.desktop-video::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 -32px 70px rgba(5, 7, 13, 0.2);
}

/* ----------  macOS window frame (placeholder)  ---------- */
.window-frame {
  position: relative;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #11141f, var(--bg-panel));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-ambient), var(--glow-blue-soft);
  overflow: hidden;
}
.window-frame.elevate {
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8),
    0 30px 80px -50px rgba(99, 163, 255, 0.6);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-soft);
}
.window-dots {
  display: flex;
  gap: 0.5rem;
}
.window-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.window-dots i:nth-child(1) { background: #ff5f57; }
.window-dots i:nth-child(2) { background: #febc2e; }
.window-dots i:nth-child(3) { background: #28c840; }
.window-title {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-inline: auto;
  font-family: var(--font-head);
  letter-spacing: 0.02em;
}
.window-body {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: clamp(2rem, 5vw, 4rem);
  text-align: center;
  background:
    radial-gradient(60% 60% at 80% 0%, rgba(99, 163, 255, 0.1), transparent 70%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.012) 0 14px,
      transparent 14px 28px
    );
}
.window-body .ph-icon {
  width: 54px;
  height: 54px;
  color: var(--blue-mid);
  opacity: 0.85;
}
.window-body .ph-label {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text-1);
  font-size: 1.02rem;
}
.window-body .ph-sub {
  font-size: 0.85rem;
  color: var(--text-3);
  max-width: 42ch;
}
.ph-tag {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-mid);
  background: rgba(99, 163, 255, 0.1);
  border: 1px solid rgba(99, 163, 255, 0.22);
}

/* ----------  Value band  ---------- */
.value {
  text-align: center;
}
.value p {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 2rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 42ch;
  margin-inline: auto;
  color: var(--text-1);
}
.value p .grad-text {
  font-weight: 700;
}

/* ----------  Video media  ---------- */
.video-player {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Apple-style frosted control cluster, bottom-right */
.video-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.video-ctl {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(20, 24, 36, 0.45);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.video-ctl:hover {
  background: rgba(40, 48, 70, 0.6);
  border-color: rgba(255, 255, 255, 0.32);
}
.video-ctl:active {
  transform: scale(0.94);
}
.video-ctl:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.video-ctl svg {
  width: 19px;
  height: 19px;
  pointer-events: none;
}
/* Icon swap — markup default = playing + muted */
.icon-play,
.icon-sound {
  display: none;
}
.video-ctl--play.is-paused .icon-pause {
  display: none;
}
.video-ctl--play.is-paused .icon-play {
  display: block;
}
.video-ctl--sound.is-on .icon-muted {
  display: none;
}
.video-ctl--sound.is-on .icon-sound {
  display: block;
}

/* ----------  Feature grid / cards  ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}
.feature-card {
  position: relative;
  padding: 1.6rem;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
    background 0.22s var(--ease), box-shadow 0.22s var(--ease);
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(145, 194, 255, 0.4);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: var(--glow-blue-soft);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r);
  background: rgba(99, 163, 255, 0.12);
  border: 1px solid rgba(99, 163, 255, 0.22);
  margin-bottom: 1.1rem;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--blue-mid);
}
.feature-card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--text-2);
}

/* ----------  Split (scheduler) section  ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 1.8rem;
}
.split-list li {
  display: flex;
  gap: 0.9rem;
}
.split-list .li-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 163, 255, 0.12);
  border: 1px solid rgba(99, 163, 255, 0.2);
}
.split-list .li-icon svg {
  width: 18px;
  height: 18px;
  color: var(--blue-mid);
}
.split-list h4 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}
.split-list p {
  font-size: 0.9rem;
  color: var(--text-2);
}

/* ----------  Stat strip  ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.stat {
  background: var(--bg-elev);
  padding: 1.8rem 1.4rem;
  text-align: center;
}
.stat .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1;
}
.stat .lbl {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

/* ----------  Use-case pills  ---------- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-1);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.pill:hover {
  border-color: rgba(145, 194, 255, 0.45);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
}
.pill svg {
  width: 17px;
  height: 17px;
  color: var(--blue-mid);
}

/* ----------  Native section  ---------- */
.native {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.native-points {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
}
.native-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.98rem;
  color: var(--text-1);
}
.native-points .check {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--green);
}

/* ----------  Final CTA  ---------- */
.cta {
  text-align: center;
}
.cta-card {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(99, 163, 255, 0.18), transparent 70%),
    linear-gradient(180deg, var(--bg-elev), var(--bg-panel));
  border: 1px solid var(--border);
  overflow: hidden;
}
.cta-card h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  max-width: 18ch;
  margin: 0 auto 1rem;
}
.cta-card p {
  color: var(--text-2);
  max-width: 50ch;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* ----------  Footer  ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding-block: 3rem;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text-1);
}
.footer-brand img {
  width: 26px;
  height: 26px;
}
.footer-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.18s var(--ease);
}
.footer-links a:hover {
  color: var(--text-0);
}
.footer-meta {
  width: 100%;
  font-size: 0.82rem;
  color: var(--text-3);
  border-top: 1px solid var(--border-soft);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* ----------  Legal pages (privacy / terms)  ---------- */
.legal {
  padding-top: clamp(7rem, 14vh, 10rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.legal-inner {
  max-width: 760px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s var(--ease), gap 0.18s var(--ease);
}
.legal-back:hover {
  color: var(--text-0);
  gap: 0.6rem;
}
.legal-header {
  margin-top: 1.6rem;
  padding-bottom: clamp(1.5rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--border-soft);
}
.legal-header h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin-top: 0.9rem;
}
.legal-meta {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: var(--text-3);
}
.legal-body {
  margin-top: clamp(2rem, 4vw, 2.8rem);
  color: var(--text-2);
  font-size: 1.02rem;
}
.legal-body h2 {
  font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  color: var(--text-0);
  margin-top: 2.6rem;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
}
.legal-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-1);
  margin-top: 1.7rem;
  margin-bottom: 0.55rem;
}
.legal-body p {
  margin-bottom: 1rem;
  max-width: 70ch;
}
.legal-body ul {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
  max-width: 70ch;
}
.legal-body li {
  margin-bottom: 0.5rem;
}
.legal-body li::marker {
  color: var(--blue);
}
.legal-body a {
  color: var(--blue-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.18s var(--ease);
}
.legal-body a:hover {
  color: var(--blue-bright);
}
.legal-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 0.12em 0.42em;
  border-radius: var(--r-sm);
}
.legal-note {
  margin-top: 2.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.85rem;
  color: var(--text-3);
  font-style: italic;
}

/* ----------  Scroll reveal  ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ----------  Responsive  ---------- */
@media (max-width: 900px) {
  .split,
  .native {
    grid-template-columns: 1fr;
  }
  .split .window-frame,
  .native .window-frame {
    order: -1;
  }
}

@media (max-width: 720px) {
  .nav-links,
  .nav-cta .btn,
  .nav-cta .appstore-badge {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.2rem;
    background: rgba(11, 13, 23, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open li {
    width: 100%;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-links.open a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1rem;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ----------  Reduced motion  ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
