/* Liquid Lens landing page: shared styles */

:root {
  --bg: #12003d;
  --bg-soft: #170047;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #f4f1ff;
  --text-dim: #bbd8f1;
  --text-dimmer: rgba(187, 216, 241, 0.55);
  --accent-a: #83e748;   /* primary accent (green)         */
  --accent-b: #83e748;   /* primary accent, alias          */
  --accent-flat: #83e02b; /* flat color that replaced the former two-tone gradients */
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-w: 1120px;

  /* Design tokens lifted from the real app's `enum DC` in ContentView.swift.
     These describe the app's own UI, not the marketing site, so they stay
     separate from the brand palette above. */
  --dc-accent: #ffc93c;
  --dc-chrome: #0b0b0b;
  --dc-line: rgba(255, 255, 255, 0.16);
  --dc-muted: rgba(255, 255, 255, 0.55);
  --dc-faint: rgba(255, 255, 255, 0.32);
}

* { box-sizing: border-box; }

/* The `hidden` attribute must always win over component `display` rules
   below, regardless of selector specificity ties. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(131, 224, 43, 0.16), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(131, 224, 43, 0.22), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Spline Sans Mono", "SF Mono", "Menlo", ui-monospace, monospace;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(7, 8, 13, 0.6);
  border-bottom: 1px solid var(--panel-border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  color: var(--text-dim);
}

.nav-links a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }

/* ---------- Buttons / badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text-dim);
  white-space: nowrap;
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-a);
  box-shadow: 0 0 8px var(--accent-a);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-flat);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--panel-border);
  color: var(--text);
}

.btn-small {
  padding: 10px 18px;
  font-size: 14px;
}

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

.hero {
  padding: 76px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-icon {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 0 24px;
  filter: drop-shadow(0 18px 30px rgba(35, 0, 211, 0.45));
}

.eyebrow {
  color: var(--accent-a);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

h1 .grad {
  color: var(--accent-flat);
}

.lede {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 46ch;
  margin: 0 0 34px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-note {
  font-size: 13.5px;
  color: var(--text-dimmer);
}

/* ---------- Phone mockup ----------
   A static recreation of the real app's UI (see ContentView.swift): the
   chrome (top bar, tool squares, bottom deck) is non-interactive artwork,
   not a working control panel. Only the two arrows beside the photo are
   real controls, and they browse real photos shot with the app. */

.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.phone-glow {
  position: absolute;
  inset: -50px;
  background: radial-gradient(closest-side, rgba(131, 224, 43, 0.28), transparent 70%);
  filter: blur(12px);
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: 372px;
  height: 806px;
  background: #050505;
  border-radius: 60px;
  padding: 15px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06),
    0 50px 100px -20px rgba(0, 0, 0, 0.8),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.phone::before {
  /* side buttons */
  content: "";
  position: absolute;
  left: -3px;
  top: 150px;
  width: 3px;
  height: 66px;
  background: #111;
  border-radius: 3px 0 0 3px;
  box-shadow: 0 100px 0 #111, 0 166px 0 #111;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 44px;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}

.island {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 16px;
  z-index: 6;
}

/* Green "camera active" status dot, just above the top control bar.
   In the real app it sits slightly right of center (edge of the island),
   at ~3.6% of the screen height. */
.status-dot {
  position: absolute;
  top: 3.1%;
  left: 55%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  z-index: 6;
}

/* -- camera preview: 9:16 image anchored to the bottom, with a black
   letterbox bar at the top where the reset/aspect/flip controls sit.
   The image extends down behind the bottom shutter row, like the real app. -- */

.preview-frame {
  position: absolute;
  left: 0;
  right: 0;
  /* The photo's top edge sits 10.5% down the screen in the real app —
     everything above it is the black control bar. */
  top: 10.5%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.photo-layer { position: absolute; inset: 0; }

.photo-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.photo-layer img.active { opacity: 1; }

.photo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-arrow.prev { left: 10px; }
.photo-arrow.next { right: 10px; }

/* -- top bar: reset · aspect bracket · flip (decorative) -- */

.ui-top-bar {
  position: absolute;
  /* Row center lands at ~7.3% of screen height, matching the app. */
  top: 4.8%;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.ui-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aspect-bracket {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 0;
}

.aspect-bracket .bracket {
  width: 8px;
  height: 16px;
  border: 1.6px solid #fff;
}

.aspect-bracket .bracket.left { border-right: none; }
.aspect-bracket .bracket.right { border-left: none; }

/* -- bottom deck (decorative) -- */

.ui-bottom-deck {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  /* Transparent so the full-bleed photo shows through behind the shutter
     row, exactly like the real app. Only the lower mode strip gets a solid
     black background (see .deck-row-lower). */
  background: transparent;
}

.deck-row { display: flex; align-items: center; }

.deck-row-main {
  justify-content: space-between;
  padding: 13px 22px 9px;
}

.tool-square {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.tool-square .tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--dc-chrome);
  border: 1.4px solid var(--dc-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
}

.tool-square .tool-label {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--dc-muted);
}

.rgb-mark-wrap {
  background: transparent;
  isolation: isolate;
}

.rgb-mark {
  position: relative;
  width: 24px;
  height: 24px;
}

.rgb-mark .dot {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.rgb-mark .dot.r { background: #ff2e4a; top: 2px; left: 2px; }
.rgb-mark .dot.b { background: #2e6bff; top: 2px; right: 2px; }
.rgb-mark .dot.g { background: #1fc871; bottom: 0; left: 50%; transform: translateX(-50%); }

.shutter-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3px solid #fff;
}

.shutter-inner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
}

.deck-row-lower {
  justify-content: space-between;
  /* Tall enough that the strip's top edge meets the 9:16 photo's bottom
     edge — the photo never shows below the mode strip in the real app. */
  padding: 20px 22px 21px;
  background: var(--dc-chrome);
}

.thumb-btn {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1.4px solid rgba(255, 255, 255, 0.28);
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--dc-faint);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-labels {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mode-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--dc-faint);
}

.mode-label.active { color: var(--dc-accent); }

.lens-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Feature sections ---------- */

section { padding: 84px 0; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.section-head p {
  color: var(--text-dim);
  font-size: 16.5px;
  margin: 0;
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 26px;
}

.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 19px;
  background: rgba(131, 224, 43, 0.22);
  border: 1px solid var(--panel-border);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
}

.effects-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.effects-list .pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ---------- Support ---------- */

.support-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Privacy summary strip ---------- */

.privacy-strip {
  border-radius: var(--radius-lg);
  border: 1px solid var(--panel-border);
  background: rgba(131, 224, 43, 0.12);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}

.privacy-strip h2 {
  font-size: 1.8rem;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.privacy-strip p {
  color: var(--text-dim);
  margin: 0 0 20px;
  font-size: 15.5px;
}

.privacy-facts {
  display: grid;
  gap: 10px;
}

.privacy-fact {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
}

.privacy-fact .check {
  color: var(--accent-b);
  font-weight: 800;
}

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

footer {
  border-top: 1px solid var(--panel-border);
  padding: 36px 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: var(--text-dimmer);
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text-dim); }

/* ---------- Privacy policy page ---------- */

.policy {
  padding: 64px 0 90px;
}

.policy .wrap { max-width: 760px; }

.policy h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 8px;
}

.policy .updated {
  color: var(--text-dimmer);
  font-size: 14px;
  margin: 0 0 40px;
}

.policy-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 44px;
}

.policy h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}

.policy p, .policy li {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.7;
}

.policy ul { padding-left: 20px; }

.policy code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text);
}

.policy .contact-box {
  margin-top: 36px;
  padding: 22px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  background: var(--panel);
}

.policy .contact-box a {
  color: var(--accent-a);
  text-decoration: none;
  font-weight: 600;
}

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

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .phone-stage { margin-top: 12px; }
  .lede { max-width: none; }
  .grid-features { grid-template-columns: 1fr; }
  .privacy-strip { grid-template-columns: 1fr; padding: 28px; }
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .phone { width: 320px; height: 693px; }
  .deck-row-main { padding-left: 12px; padding-right: 12px; }
  .tool-square .tool-icon { width: 38px; height: 38px; font-size: 15px; }
  .tool-square .tool-label { font-size: 7.5px; }
  .deck-row-lower { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 380px) {
  .phone { width: 280px; height: 607px; }
}

@media (max-width: 560px) {
  .nav > .wrap > .btn-small { display: none; }
}
