/* X-Ray v2 — mobile-first · all breakpoints · reduced-motion safe */
:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #0a0a0a;
  --elevated: #16181c;
  --fg: #e7e9ea;
  --muted: #71767b;
  --subtle: #536471;
  --border: rgba(231, 233, 234, 0.12);
  --border-strong: rgba(231, 233, 234, 0.2);
  --accent: #1d9bf0;
  --accent-soft: rgba(29, 155, 240, 0.18);
  --danger: #f4212e;
  --success: #00ba7c;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 9999px;
  --shadow-glow: 0 0 28px rgba(29, 155, 240, 0.28);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --tap: 48px;
  --content-max: 72rem;
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Shell ===== */
.app-shell {
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(29, 155, 240, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(29, 155, 240, 0.08), transparent 50%),
    radial-gradient(ellipse 40% 30% at 0% 80%, rgba(0, 186, 124, 0.06), transparent 45%),
    #000;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(231, 233, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 233, 234, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.bg-scan {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.35) 2px,
    rgba(255, 255, 255, 0.35) 3px
  );
}

/* ===== Landing ===== */
.landing {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding:
    max(0.75rem, var(--safe-t))
    max(1rem, var(--safe-r))
    max(1.25rem, var(--safe-b))
    max(1rem, var(--safe-l));
}

.top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-glow);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.logo svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--fg);
}

.logo-pulse {
  animation: logo-pulse 3.2s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(29, 155, 240, 0.25);
  }
  50% {
    box-shadow: 0 0 28px 2px rgba(29, 155, 240, 0.35);
  }
}

.brand-text .eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.brand-text .name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.locale-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.locale-btn {
  min-height: 2rem;
  min-width: 2.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  touch-action: manipulation;
}

.locale-btn[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: transparent;
}

/* Hero grid: stacks on phone, splits on large */
.hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero-copy {
  text-align: center;
}

.hero-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero-sub {
  margin-top: 0.55rem;
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  color: var(--muted);
}

.hero-lede {
  margin: 0.75rem auto 0;
  max-width: 34rem;
  font-size: clamp(0.8125rem, 2.8vw, 0.95rem);
  color: var(--subtle);
  line-height: 1.55;
}

.cta-stack {
  margin-top: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: stretch;
  max-width: 22rem;
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0 1.35rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  touch-action: manipulation;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(29, 155, 240, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.45);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
  min-height: 2.25rem;
  font-size: 0.8rem;
  padding: 0 0.9rem;
}

.privacy-note {
  text-align: center;
  font-size: 0.7rem;
  color: var(--subtle);
  line-height: 1.4;
  padding: 0 0.5rem;
}

/* Feature list */
.feature-list {
  list-style: none;
  margin: 1.35rem auto 0;
  max-width: 28rem;
  display: grid;
  gap: 0.5rem;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(22, 24, 28, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
}

.feature-icon {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  color: var(--accent);
}

/* Device preview (landing) */
.device-preview {
  position: relative;
  width: min(100%, 22rem);
  margin: 0 auto;
  aspect-ratio: 9 / 17.5;
  max-height: min(70dvh, 36rem);
  border-radius: 1.75rem;
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, #121417 0%, #050505 55%, #0a1018 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(29, 155, 240, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.device-preview .notch {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 0.7rem;
  border-radius: 999px;
  background: #000;
  z-index: 3;
}

.device-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 2.1rem 0.75rem 1rem;
  gap: 0.55rem;
  perspective: 900px;
}

.float-chip {
  align-self: flex-start;
  max-width: 78%;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 155, 240, 0.28);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: rotate(-4deg) translateZ(20px);
  animation: float-y 6.5s ease-in-out infinite;
}

.float-chip:nth-child(2) {
  align-self: flex-end;
  transform: rotate(5deg);
  animation-delay: 0.8s;
  opacity: 0.88;
}

.float-chip:nth-child(3) {
  align-self: center;
  transform: rotate(-2deg) scale(0.96);
  animation-delay: 1.4s;
  opacity: 0.72;
}

.float-chip .handle {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
}

.float-chip .body {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--fg);
  line-height: 1.35;
}

@keyframes float-y {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

.device-hint {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.85rem;
  text-align: center;
  font-size: 0.65rem;
  color: var(--subtle);
}

/* Sections under hero */
.section {
  margin-top: 2.25rem;
  padding-top: 0.25rem;
}

.section-title {
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  text-align: center;
}

.section-lede {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  max-width: 36rem;
  margin: 0 auto 1.1rem;
}

.bento {
  display: grid;
  gap: 0.65rem;
}

.bento-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(22, 24, 28, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.bento-card h3 {
  font-size: 0.95rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}

.bento-card p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(22, 24, 28, 0.45);
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}

.faq summary {
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.faq details p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.footer {
  margin-top: 2.5rem;
  padding: 1.25rem 0 0.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.72rem;
  color: var(--subtle);
  display: grid;
  gap: 0.55rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer a:hover {
  color: var(--fg);
}

/* ===== AR Mode ===== */
.ar-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  display: none;
  flex-direction: column;
}

.ar-root.is-open {
  display: flex;
}

.ar-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  perspective: 1280px;
  perspective-origin: 50% 38%;
}

.ar-video,
.ar-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050505;
}

.ar-fallback {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(29, 155, 240, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 186, 124, 0.1), transparent 45%),
    linear-gradient(160deg, #0a0c10, #000 60%);
}

.ar-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, transparent 18% 82%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(rgba(0, 0, 0, 0.5) 0%, transparent 14% 78%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0;
  transition: opacity 0.24s;
}

.ar-vignette.is-scrolling {
  opacity: 1;
}

.feed-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  padding:
    max(5.5rem, calc(var(--safe-t) + 4.5rem))
    max(0.75rem, var(--safe-r))
    max(8.5rem, calc(var(--safe-b) + 7.5rem))
    max(0.75rem, var(--safe-l));
  transform-style: preserve-3d;
}

.feed-scroll::-webkit-scrollbar {
  display: none;
}

.feed-inner {
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform-style: preserve-3d;
}

.post-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(231, 233, 234, 0.14);
  background: rgba(12, 14, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.85rem 0.95rem 0.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(29, 155, 240, 0.08);
  transform-style: preserve-3d;
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform, opacity;
}

.post-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(29, 155, 240, 0.5), transparent 40% 60%, rgba(29, 155, 240, 0.22));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.post-card.near {
  opacity: 0.98;
  transform: translateZ(24px) scale(1);
}

.post-card.mid {
  opacity: 0.86;
  transform: translateZ(0) scale(0.98);
}

.post-card.far {
  opacity: 0.62;
  transform: translateZ(-40px) scale(0.94);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #0a66a8);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.post-meta {
  min-width: 0;
  flex: 1;
}

.post-meta .name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-meta .handle {
  font-size: 0.72rem;
  color: var(--muted);
}

.post-body {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--fg);
}

.post-stats {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.85rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.insight-bubble {
  margin-top: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 155, 240, 0.35);
  background: rgba(29, 155, 240, 0.1);
  font-size: 0.75rem;
  color: #b6e0ff;
  line-height: 1.4;
}

/* AR chrome */
.chrome {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  transition: opacity 0.22s, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.22s;
  pointer-events: none;
}

.chrome > * {
  pointer-events: auto;
}

.chrome-top {
  top: 0;
  padding:
    max(0.55rem, var(--safe-t))
    max(0.65rem, var(--safe-r))
    0.5rem
    max(0.65rem, var(--safe-l));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
}

.chrome-bottom {
  bottom: 0;
  padding:
    0.5rem
    max(0.65rem, var(--safe-r))
    max(0.85rem, var(--safe-b))
    max(0.65rem, var(--safe-l));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 0.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.chrome.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
}

.chrome-top.is-hidden {
  transform: translateY(-110%);
}

.chrome-bottom.is-hidden {
  transform: translateY(120%);
}

.icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--fg);
  touch-action: manipulation;
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.mode-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.pill {
  min-height: 1.85rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  touch-action: manipulation;
}

.pill[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: transparent;
}

.shutter-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.shutter-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 2px #000;
}

.shutter {
  position: relative;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.shutter-inner {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
}

.shutter:active .shutter-inner {
  transform: scale(0.94);
}

.side-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.blend-box {
  width: min(100%, 7.5rem);
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.blend-box label {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.blend-slider {
  width: 100%;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(29, 155, 240, 0.25), var(--accent));
  outline: none;
}

.blend-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--fg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.2);
  cursor: pointer;
}

.blend-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--fg);
  border: 2px solid var(--accent);
  cursor: pointer;
}

.toast {
  position: absolute;
  left: 50%;
  top: max(4.5rem, calc(var(--safe-t) + 3.5rem));
  transform: translateX(-50%);
  z-index: 30;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(22, 24, 28, 0.95);
  border: 1px solid var(--border-strong);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.toast.is-on {
  opacity: 1;
}

.capture-flash {
  position: absolute;
  inset: 0;
  z-index: 35;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.capture-flash.is-on {
  animation: flash-out 0.42s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes flash-out {
  0% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
  }
}

/* Sheets / modals */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: max(0.75rem, var(--safe-b)) max(0.75rem, var(--safe-r)) max(0.75rem, var(--safe-b))
    max(0.75rem, var(--safe-l));
}

.sheet-backdrop.is-open {
  display: flex;
}

.sheet {
  width: min(100%, 28rem);
  max-height: min(85dvh, 40rem);
  overflow: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--elevated);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  padding: 1rem;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.sheet-head h2 {
  font-size: 0.95rem;
  font-weight: 650;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
}

.toggle-row input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

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

.gallery-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

.handles-input {
  width: 100%;
  min-height: 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
}

.handles-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Capture preview */
.capture-preview img {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  background: #000;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.sheet-actions {
  display: flex;
  gap: 0.5rem;
}

.sheet-actions .btn {
  flex: 1;
  min-height: 2.75rem;
  font-size: 0.875rem;
}

/* High contrast */
html.high-contrast {
  --border: rgba(255, 255, 255, 0.35);
  --border-strong: rgba(255, 255, 255, 0.55);
  --muted: #c4c9ce;
  --subtle: #a8b0b8;
}

html.high-contrast .post-card {
  background: rgba(0, 0, 0, 0.88);
  border-color: rgba(255, 255, 255, 0.45);
}

/* Battery saver */
html.battery-saver .logo-pulse,
html.battery-saver .float-chip,
html.battery-saver .bg-scan {
  animation: none !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .logo-pulse,
  .float-chip,
  .capture-flash.is-on {
    animation: none !important;
  }

  .btn,
  .chrome,
  .post-card {
    transition: none !important;
  }
}

html.motion-reduce *,
html.motion-reduce *::before,
html.motion-reduce *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* ===== Breakpoints ===== */

/* Small phones */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .feature-item {
    font-size: 0.75rem;
  }

  .shutter {
    width: 3.85rem;
    height: 3.85rem;
  }

  .shutter-inner {
    width: 3rem;
    height: 3rem;
  }
}

/* Phablet / large phone */
@media (min-width: 480px) {
  .cta-stack {
    max-width: 24rem;
  }

  .feature-list {
    max-width: 30rem;
  }
}

/* Tablet portrait */
@media (min-width: 640px) {
  .landing {
    padding-inline: max(1.5rem, var(--safe-r));
  }

  .logo {
    width: 3rem;
    height: 3rem;
  }

  .logo svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .feed-inner {
    max-width: 32rem;
  }

  .sheet-backdrop {
    align-items: center;
  }
}

/* Tablet landscape / small laptop — split hero */
@media (min-width: 900px) {
  .landing {
    padding-top: max(1.25rem, var(--safe-t));
    padding-bottom: max(2rem, var(--safe-b));
  }

  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
    align-items: center;
    min-height: min(78dvh, 42rem);
  }

  .hero-copy {
    text-align: left;
  }

  .hero-lede {
    margin-inline: 0;
  }

  .cta-stack {
    margin-inline: 0;
    flex-direction: row;
    flex-wrap: wrap;
    max-width: none;
  }

  .cta-stack .btn {
    flex: 1 1 11rem;
  }

  .privacy-note {
    text-align: left;
    width: 100%;
  }

  .feature-list {
    margin-inline: 0;
    max-width: 28rem;
  }

  .section-title,
  .section-lede {
    text-align: left;
  }

  .section-lede {
    margin-inline: 0;
  }

  .bento {
    grid-template-columns: repeat(3, 1fr);
  }

  .device-preview {
    width: min(100%, 20rem);
  }

  /* Desktop AR: constrain feed, show side HUD */
  .feed-inner {
    max-width: 26rem;
  }

  .ar-stage {
    display: grid;
    grid-template-columns: 1fr minmax(20rem, 28rem) 1fr;
  }

  .ar-video,
  .ar-fallback,
  .ar-vignette {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .feed-scroll {
    grid-column: 2;
    grid-row: 1;
    position: relative;
  }

  .chrome-top,
  .chrome-bottom,
  .toast,
  .capture-flash {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

/* Large desktop */
@media (min-width: 1200px) {
  .landing {
    padding-inline: 2rem;
  }

  .hero-grid {
    gap: 3.5rem;
  }

  .device-preview {
    width: 22rem;
  }
}

/* Landscape phone — compact AR chrome */
@media (max-height: 480px) and (orientation: landscape) {
  .chrome-top {
    padding-top: 0.35rem;
  }

  .shutter {
    width: 3.4rem;
    height: 3.4rem;
  }

  .shutter-inner {
    width: 2.6rem;
    height: 2.6rem;
  }

  .feed-scroll {
    padding-top: 3.5rem;
    padding-bottom: 5.5rem;
  }

  .device-preview {
    max-height: 55dvh;
  }
}

/* Prefer no hover on touch — keep :active */
@media (hover: hover) and (pointer: fine) {
  .feature-item:hover,
  .bento-card:hover {
    border-color: rgba(29, 155, 240, 0.35);
  }
}
