/* ==========================================================================
   Fonts (self-hosted, latin + latin-ext)
   ========================================================================== */

@font-face{font-family:'Ubuntu';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/ubuntu-400-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Ubuntu';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/ubuntu-400.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Ubuntu';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/ubuntu-500-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Ubuntu';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/ubuntu-500.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Ubuntu';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/ubuntu-700-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Ubuntu';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/ubuntu-700.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Ubuntu Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/ubuntu-mono-400-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Ubuntu Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/ubuntu-mono-400.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
  --font-family: "Ubuntu", sans-serif;
  /* Radius scale (rem, on the 4/8/12/16/24/32/48 px grid) */
  --radius-xs: 0.25rem;  /* 4px */
  --radius-sm: 0.5rem;   /* 8px */
  --radius-md: 0.75rem;  /* 12px */
  --radius-lg: 1rem;     /* 16px */
  --radius-xl: 1.5rem;   /* 24px */
  --radius-2xl: 2rem;    /* 32px */
  --radius-3xl: 3rem;    /* 48px */
  --header-height: 3rem;

  /* Backgrounds */
  --bg: #121119;
  --bg-raised: #1c1a28;
  --bg-surface: #232133;

  /* Text */
  --white: #fff;
  --white-08: hsla(0, 0%, 100%, 0.08);
  --white-10: hsla(0, 0%, 100%, 0.1);
  --white-12: hsla(0, 0%, 100%, 0.12);
  --white-15: hsla(0, 0%, 100%, 0.15);
  --white-20: hsla(0, 0%, 100%, 0.2);
  --white-30: hsla(0, 0%, 100%, 0.3);
  --white-40: hsla(0, 0%, 100%, 0.4);
  --white-50: hsla(0, 0%, 100%, 0.5);
  --white-60: hsla(0, 0%, 100%, 0.6);
  --white-70: hsla(0, 0%, 100%, 0.7);
  --white-80: hsla(0, 0%, 100%, 0.8);
  --white-90: hsla(0, 0%, 100%, 0.9);

  /* Accent */
  --green: #40FF9C;
  --wind-cyan: #40EFFF;
  --muted: #666;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ==========================================================================
   Ambient Dot-Grid Background (injected by assets/js/dots.js as #dot-bg)
   ========================================================================== */

/* Sits on a dedicated background layer (z-index:-1) so it's always behind
   page content without each content block needing its own z-index. */
#dot-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ==========================================================================
   Site Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--header-height);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--white-10);
  z-index: 100;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo mark + wordmark */
.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo .logo-svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.header-wordmark {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white-90);
  white-space: nowrap;
}

/* Download pill CTA */
.btn-download-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: var(--bg);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.45rem 0.875rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.btn-download-header:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-download-header:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.btn-download-header:active {
  transform: translateY(0);
  opacity: 0.95;
}

/* Header right side: social icons + download CTA */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
}

.header-social a {
  display: inline-flex;
  font-size: 1rem;
  line-height: 1;
  color: var(--white-50);
  transition: color 0.15s ease;
}

.header-social a:hover {
  color: var(--green);
}

.header-social a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Native share button — styled to match the social icon links (button reset) */
.header-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  font-size: 1rem;
  line-height: 1;
  color: var(--white-50);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: color 0.15s ease;
}

/* .is-copied is toggled briefly by share.js when the link is copied to the
   clipboard (the fallback path when the Web Share API is unavailable). */
.header-share:hover,
.header-share.is-copied {
  color: var(--green);
}

.header-share:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Top Banner
   ========================================================================== */

.banner-wrap {
  width: 100vw;
  margin-inline-start: calc(50% - 50vw);
  margin-block-end: 0;
  padding-block-start: var(--header-height);
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

/* Fades banner image into the page background at the bottom edge */
.banner-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, var(--bg) 95%);
  pointer-events: none;
}

.banner {
  width: 100%;
  height: 7rem;
  background-image: url('/assets/images/banner.jpg');
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding-block-start: 0.25rem;
  padding-block-end: 1rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white-90);
  line-height: 1.1;
  text-wrap: balance;
  margin-block-end: 1.5rem;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--white-50);
  max-width: 40rem;
  margin-inline: auto;
  margin-block-end: 2rem;
  text-wrap: balance;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ==========================================================================
   Mac App Store Badge Button
   ========================================================================== */

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #000;
  color: var(--white);
  border: 1px solid var(--white-15);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.app-store-badge:hover {
  border-color: var(--white-30);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.app-store-badge:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.app-store-badge:active {
  transform: translateY(0);
}

.app-store-badge .badge-apple-icon {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--white);
  flex-shrink: 0;
}

.app-store-badge .badge-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}

.app-store-badge .badge-text-top {
  font-size: 0.55rem;
  font-weight: 400;
  color: var(--white-70);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.app-store-badge .badge-text-bottom {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1;
  white-space: nowrap;
}

/* ==========================================================================
   Media Placeholder Blocks (real screenshots drop in here later)
   ========================================================================== */

.media-block {
  border-radius: var(--radius-lg);
  border: 1px solid var(--white-12);
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-raised));
}

/* When the slot holds a real screenshot, fill the box (border-radius clips it).
   The gradient above stays as a placeholder tint while the image loads. */
img.media-block {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.screenshot-section {
  padding-block: 1rem 3rem;
}

.media-block--hero {
  max-width: 64rem;
  margin-inline: auto;
  aspect-ratio: 16 / 10;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Section Title (shared)
   ========================================================================== */

.section-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white-90);
  text-align: center;
  margin-block-end: 2rem;
}

/* ==========================================================================
   Screenshot Gallery
   ========================================================================== */

.gallery {
  padding-block: 2rem 4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.gallery-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-figure .media-block {
  aspect-ratio: 16 / 10;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.45);
}

.gallery-figure figcaption {
  font-size: 0.8rem;
  color: var(--white-50);
  line-height: 1.5;
  text-align: center;
}

/* ==========================================================================
   Loupe (Magnifier)
   — Appended to <body> by JS as: <div class="loupe" aria-hidden="true"></div>
   — JS adds/removes .is-active to show/hide.
   — JS owns: background-image, background-size, background-position, transform
     (per-move positioning). CSS owns: size, appearance, hidden↔shown transition.
   — border-radius: 50% is an intentional exception to the rem radius token
     scale, identical rationale to pill buttons and the app-icon squircle.
   ========================================================================== */

.loupe {
  /* Anchor — JS repositions via transform: translate(x, y) */
  position: fixed;
  top: 0;
  left: 0;

  /* Diameter — single source of truth; JS reads offsetWidth */
  width: 320px;
  height: 320px;

  /* Circle — intentional exception to the --radius-* token scale */
  border-radius: 50%;
  overflow: hidden;

  /* Rim — one step above the .media-block border (--white-12) so it reads
     clearly against both light screenshot areas and the dark page */
  border: 2px solid var(--white-20);

  /* Elevation shadow, consistent with .gallery-figure .media-block */
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px var(--white-08);

  /* Load-time placeholder tint while JS sets the background-image */
  background-color: var(--bg-surface);
  /* JS controls background-image / background-size / background-position */
  background-repeat: no-repeat;

  /* Float above page content; below modals (modals use position:fixed,
     stacking order governed by DOM + z-index; modals have no explicit
     z-index so a dialog opened later in the DOM paints above this) */
  z-index: 400;

  /* Never intercept pointer events — the image below must stay interactive */
  pointer-events: none;

  /* Hidden by default; JS adds .is-active to reveal */
  opacity: 0;
  transition: opacity 120ms ease;

  /* Promote transform and background-position to their own compositor layer
     so JS can move the loupe and pan the background without triggering layout */
  will-change: transform, background-position;
}

.loupe.is-active {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .loupe {
    transition: none;
  }
}

/* ==========================================================================
   Features Grid
   ========================================================================== */

.features {
  padding-block: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--white-08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-icon {
  font-size: 1.75rem;
  color: var(--green);
  line-height: 1;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white-90);
  line-height: 1.3;
}

.feature-body {
  font-size: 0.9rem;
  color: var(--white-50);
  line-height: 1.7;
}

/* ==========================================================================
   Download Section
   ========================================================================== */

.download-section {
  padding-block: 4rem;
}

.download-panel {
  background: var(--bg-raised);
  border: 1px solid var(--white-08);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Wind-lines decorative SVG — sits behind all panel content */
.wind-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  /* Fade out near all four edges so lines don't hard-cut at the border */
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 50%, black 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 70% at 50% 50%, black 30%, transparent 100%);
}

/* Lift all direct panel children above the SVG layer */
.download-panel > :not(.wind-lines) {
  position: relative;
  z-index: 1;
}

/* Each <g> carries the horizontal travel; the inner <path> carries the vertical breathe */
.wind-line--1 {
  opacity: 0.08;
  animation: wind-travel 18s linear infinite;
}
.wind-line--2 {
  opacity: 0.06;
  animation: wind-travel 24s linear infinite;
  animation-delay: -6s;
}
.wind-line--3 {
  opacity: 0.05;
  animation: wind-travel 20s linear infinite;
  animation-delay: -10s;
}
.wind-line--4 {
  opacity: 0.07;
  animation: wind-travel 28s linear infinite;
  animation-delay: -4s;
}
.wind-line--5 {
  opacity: 0.04;
  animation: wind-travel 22s linear infinite;
  animation-delay: -14s;
}

/* Vertical breathe — staggered per line for parallax feel */
.wind-line--1 path { animation: wind-breathe 6s ease-in-out infinite; }
.wind-line--2 path { animation: wind-breathe 8s ease-in-out infinite; animation-delay: -2s; }
.wind-line--3 path { animation: wind-breathe 7s ease-in-out infinite; animation-delay: -4s; }
.wind-line--4 path { animation: wind-breathe 9s ease-in-out infinite; animation-delay: -1s; }
.wind-line--5 path { animation: wind-breathe 5s ease-in-out infinite; animation-delay: -3s; }

/* Horizontal travel: translateX by exactly -400px = one full wave period (paths
   are periodic sines with period 400 user units), so the loop is seamless. */
@keyframes wind-travel {
  from { transform: translateX(0); }
  to   { transform: translateX(-400px); }
}

/* Vertical breathe: tiny ±4px nudge — only transform, compositor-safe */
@keyframes wind-breathe {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* Freeze all motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wind-lines { display: none; }
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22.5%;
  border: 1px solid var(--white-12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.download-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white-90);
  line-height: 1.2;
}

.download-sub {
  font-size: 0.95rem;
  color: var(--white-50);
  margin-block-start: -0.75rem;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--white-08);
  padding-block: 2rem;
  margin-block-start: 2rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  text-decoration: none;
}

.footer-logo .logo-svg {
  width: 2rem;
  height: 2rem;
  opacity: 0.4;
  transition: opacity 0.15s ease;
}

.footer-logo:hover .logo-svg {
  opacity: 0.7;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  list-style: none;
}

.footer-links a,
.footer-social a {
  font-size: 0.8rem;
  color: var(--white-40);
  transition: color 0.15s ease;
}

.footer-social a {
  font-size: 1rem;
}

.footer-links a:hover,
.footer-social a:hover {
  color: var(--green);
}

.footer-links a:focus-visible,
.footer-social a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

.footer-copy {
  margin-block-start: 1.25rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--white-30);
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.not-found-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.not-found-backdrop {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(80vmin, 40rem);
  height: min(80vmin, 40rem);
  translate: -50% -50%;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.not-found-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.not-found-code {
  font-size: clamp(4rem, 18vw, 7rem);
  font-weight: 700;
  color: var(--white-15);
  line-height: 1;
  letter-spacing: -0.04em;
}

.not-found-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--white-60);
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-block-start: 0.75rem;
  background: var(--white-08);
  border: 1px solid var(--white-20);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--white);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.btn-home:hover {
  background: var(--white-12);
  border-color: var(--white-30);
}

.btn-home:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.btn-home:active {
  background: var(--white-15);
}

/* ==========================================================================
   Legal Modals (Privacy / Terms)
   ========================================================================== */

/* Lock background scroll while a modal is open (set by legal.js) */
.modal-open {
  overflow: hidden;
}

.legal-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(42rem, calc(100vw - 2rem));
  height: fit-content;
  max-height: min(85vh, 44rem);
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--white-12);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  color: var(--white-70);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* display only when open, so the UA `dialog:not([open]) { display:none }`
   still hides it when closed */
.legal-dialog[open] {
  display: flex;
}

.legal-dialog::backdrop {
  background: rgba(10, 9, 14, 0.72);
}

.legal-dialog[open] {
  animation: legal-in 0.18s ease;
}

@keyframes legal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}

.legal-modal {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.legal-modal__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--white-10);
  background: var(--bg-raised);
}

.legal-modal__title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white-90);
}

.legal-modal__close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--white-50);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.25rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: color 0.15s ease;
}

.legal-modal__close:hover {
  color: var(--white);
}

.legal-modal__close:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.legal-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem;
}

.legal-modal__body h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white-90);
  margin-block: 1.5rem 0.5rem;
}

.legal-modal__body p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--white-50);
  margin-block-end: 0.75rem;
}

.legal-modal__body ul {
  margin: 0 0 0.75rem;
  padding-inline-start: 1.25rem;
}

.legal-modal__body li {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--white-50);
  margin-block-end: 0.25rem;
}

.legal-modal__body a {
  color: var(--green);
  text-decoration: none;
}

.legal-modal__body a:hover {
  text-decoration: underline;
}

.legal-modal__meta {
  margin-block-start: 1.5rem;
  padding-block-start: 1rem;
  border-top: 1px solid var(--white-08);
  font-size: 0.75rem;
  color: var(--white-30);
}

/* ==========================================================================
   Pre-Launch State
   — Toggle: remove class="pre-launch" from <body> to launch the page.
   — All download CTAs reappear; the coming-soon elements hide automatically.
   ========================================================================== */

/* Coming-soon badge (hero, above the H1) — hidden by default */
.coming-soon-badge {
  display: none;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--green);
  background: hsla(150, 100%, 62%, 0.08);
  border: 1px solid hsla(150, 100%, 62%, 0.2);
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  margin-inline: auto;
  margin-block-end: 1rem;
  line-height: 1;
  user-select: none;
}

/* Status dot — a subtle pulse */
.coming-soon-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: cs-pulse 2.4s ease-in-out infinite;
}

@keyframes cs-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

@media (prefers-reduced-motion: reduce) {
  .coming-soon-dot {
    animation: none;
  }
}

/* Coming-soon CTA (download panel) — hidden by default */
.coming-soon-cta {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--white-50);
  background: var(--white-08);
  border: 1px solid var(--white-12);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  line-height: 1;
  user-select: none;
}

/* Pre-launch toggle — everything driven off body.pre-launch */
.pre-launch .btn-download-header  { display: none; }
.pre-launch .app-store-badge      { display: none; }
.pre-launch .hero-cta             { display: none; }
.pre-launch .coming-soon-badge    { display: inline-flex; }
.pre-launch .coming-soon-cta      { display: inline-flex; }

/* ==========================================================================
   Brand Assets Modal (download grid inside the #brand legal-dialog)
   ========================================================================== */

.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-block-start: 1.25rem;
}

.brand-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.brand-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--white-12);
  border-radius: var(--radius-md);
}

.brand-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--white-80);
  background: var(--white-08);
  border: 1px solid var(--white-12);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.brand-download:hover {
  background: var(--white-12);
  color: var(--white);
  border-color: var(--white-20);
}

.brand-download:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 760px) {
  .features-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .banner {
    height: 6rem;
    background-size: auto 240%;
  }

  .banner-wrap {
    margin-block-end: 0;
  }

  .hero {
    padding-block-start: 0;
    padding-block-end: 1rem;
  }

  .download-panel {
    padding: 2rem 1.5rem;
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

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

  /* Pause all SVG animations in the logo mark */
  .logo-svg animate,
  .logo-svg animateTransform {
    animation-play-state: paused;
  }

  /* Pause via SVG-native pause (belt + suspenders) */
  .logo-svg * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .app-store-badge,
  .btn-download-header,
  .btn-home,
  .footer-links a,
  .footer-social a,
  .header-social a,
  .header-share,
  .footer-logo .logo-svg,
  .legal-modal__close {
    transition: none;
  }

  .legal-dialog[open] {
    animation: none;
  }
}
