/* Camlune — camlune.com
   Tokens mirror BeautyCam/App/UI/CamluneBrand.swift (Branding/BRAND.md). */

:root {
  --midnight: #0a0a12;
  --eclipse: #12111c;
  --dusk: #1a1928;
  --twilight: #242236;
  --nebula: #2e2b45;
  --moonlight: #f3f0ff;
  --lune: #9d87ff;
  --rose: #ff8db5;
  --halo: #ffd6a0;

  --text: rgb(243 240 255 / 0.96);
  --text-2: rgb(243 240 255 / 0.68);
  --text-3: rgb(243 240 255 / 0.46);
  --line: rgb(243 240 255 / 0.08);

  --grad-lune: linear-gradient(120deg, #b49dff 0%, #9d87ff 45%, #ff8db5 100%);
  --grad-halo: linear-gradient(120deg, #ffe7c4, #ffd6a0 50%, #ffb38a);

  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;

  --wrap: 1180px;
  --radius: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--midnight);
  color: var(--text);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lune); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--lune); color: var(--midnight); font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(44px, 7vw, 84px); }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: 21px; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--text-2); max-width: 36em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--lune);
}
.grad { background: var(--grad-lune); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-3); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 14px;
  font: 600 16px/1 var(--font-display); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad-lune); color: #fff; box-shadow: 0 10px 30px -10px rgb(157 135 255 / .7); }
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgb(255 141 181 / .7); }
.btn-ghost { background: rgb(243 240 255 / .05); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgb(243 240 255 / .09); }
.btn-sm { height: 40px; padding: 0 16px; border-radius: 11px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }

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

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgb(10 10 18 / .62);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgb(10 10 18 / .82); }
.nav .wrap { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 650 22px/1 var(--font-display); letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; }
.brand .l { background: var(--grad-lune); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 28px; margin-left: auto; list-style: none; padding: 0; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 820px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

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

section { position: relative; }
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

.glow { isolation: isolate; }
.glow::before {
  content: ""; position: absolute; inset: -12% 0; pointer-events: none; z-index: -1;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  background:
    radial-gradient(60% 50% at 70% 20%, rgb(157 135 255 / .28), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgb(255 141 181 / .12), transparent 70%);
}

/* Hero */
.hero { padding: clamp(64px, 9vw, 120px) 0 0; isolation: isolate; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -68px 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% 8%, rgb(157 135 255 / .34), transparent 70%),
    radial-gradient(35% 35% at 85% 40%, rgb(255 141 181 / .14), transparent 70%),
    linear-gradient(180deg, #1b1633 0%, #100e1e 55%, var(--midnight) 100%);
}
.hero .eyebrow { margin-bottom: 24px; padding: 8px 14px; border-radius: 999px; background: rgb(157 135 255 / .1); border: 1px solid rgb(157 135 255 / .25); }
.hero .eyebrow img { width: 16px; height: 16px; }
.hero h1 { margin-inline: auto; text-wrap: balance; }
.hero .lede { margin: 24px auto 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 36px; }
.meta { margin-top: 18px; font-size: 14px; color: var(--text-3); }
.hero-shot { margin: clamp(48px, 7vw, 80px) auto 0; width: min(100%, 1160px); }
.hero-shot img { width: 100%; }

/* Works with */
.works { padding: 28px 0 0; }
.works p { text-align: center; font-size: 14px; color: var(--text-3); margin-bottom: 18px; }
.works ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; }
.works li { font: 600 19px/1 var(--font-display); color: var(--text-2); letter-spacing: -0.01em; opacity: .8; }

/* Feature rows */
.feature { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature.flip { grid-template-columns: 1.4fr 0.9fr; }
.feature.flip .feature-copy { order: 2; }
.feature-copy { display: grid; gap: 20px; }
.feature-media img { width: 112%; max-width: none; margin-inline: -6%; }
@media (max-width: 900px) { .feature-media img { width: 100%; margin-inline: 0; } }
@media (max-width: 900px) {
  .feature, .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .feature-copy { order: 0; }
}

.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--text-2); }
.checks li::before {
  content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: rgb(157 135 255 / .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239D87FF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checks strong { color: var(--text); font-weight: 600; }

/* Looks */
.looks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.look { display: grid; gap: 12px; text-align: center; }
.look .swatch {
  aspect-ratio: 3 / 4; border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 20px 40px -24px rgb(0 0 0 / .8);
  position: relative; overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.look .swatch::after {
  content: ""; position: absolute; left: 50%; bottom: -8%; width: 64%; aspect-ratio: 1 / 1.25; translate: -50% 0;
  background: radial-gradient(closest-side at 50% 28%, rgb(255 255 255 / .5), rgb(255 255 255 / .12) 55%, transparent 56%),
              radial-gradient(closest-side at 50% 100%, rgb(255 255 255 / .18), transparent);
  filter: blur(2px);
}
.look:hover .swatch { transform: translateY(-6px); }
.look span { font: 600 15px/1 var(--font-display); color: var(--text-2); }
@media (max-width: 900px) { .looks { grid-template-columns: repeat(3, 1fr); } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  padding: 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(36 34 54 / .7), rgb(26 25 40 / .7));
  border: 1px solid var(--line);
  display: grid; gap: 12px; align-content: start;
}
.card .icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: rgb(157 135 255 / .12); border: 1px solid rgb(157 135 255 / .22); margin-bottom: 6px;
}
.card .icon svg { width: 22px; height: 22px; stroke: var(--lune); }
.card p { color: var(--text-2); font-size: 16px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* Privacy band */
.privacy-band { text-align: center; isolation: isolate; }
.privacy-band .mark { width: 140px; margin: 0 auto 36px; filter: drop-shadow(0 0 40px rgb(157 135 255 / .45)); }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; padding: 28px 28px 30px; border-radius: var(--radius); border: 1px solid var(--line); background: rgb(26 25 40 / .6); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 18px;
  border-radius: 50%; background: var(--grad-lune); color: #fff; font: 700 15px/1 var(--font-display);
}
.steps p { color: var(--text-2); font-size: 16px; margin-top: 8px; }
.steps code { font: 500 14px/1 ui-monospace, "SF Mono", monospace; color: var(--text); background: rgb(243 240 255 / .07); padding: 3px 7px; border-radius: 6px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; gap: 24px; }
.plan { padding: 36px; border-radius: 24px; border: 1px solid var(--line); background: rgb(26 25 40 / .7); display: grid; gap: 22px; align-content: start; }
.plan.pro { position: relative; background: linear-gradient(180deg, rgb(46 43 69 / .85), rgb(26 25 40 / .85)); border-color: rgb(255 214 160 / .3); box-shadow: 0 30px 80px -40px rgb(255 214 160 / .35); }
.plan .tag { justify-self: start; font: 700 11px/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: rgb(243 240 255 / .07); color: var(--text-2); }
.plan.pro .tag { background: var(--grad-halo); color: var(--midnight); }
.price { font: 650 52px/1 var(--font-display); letter-spacing: -0.03em; }
.price small { font-size: 17px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.plan .checks li { font-size: 16px; }
.plan.pro .checks li::before { background-color: rgb(255 214 160 / .14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD6A0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E"); }
.plan .btn { width: 100%; }
.btn-halo { background: var(--grad-halo); color: var(--midnight); box-shadow: 0 10px 30px -12px rgb(255 214 160 / .7); }
.fine { font-size: 13px; color: var(--text-3); text-align: center; margin-top: 28px; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: rgb(26 25 40 / .55); transition: background-color .2s ease; }
.faq details[open] { background: rgb(36 34 54 / .7); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 26px; display: flex; justify-content: space-between; gap: 20px; align-items: center; font: 600 18px/1.35 var(--font-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); rotate: 45deg; translate: 0 -3px; transition: rotate .25s ease, translate .25s ease; }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details > div { padding: 0 26px 24px; color: var(--text-2); }
.faq details > div p + p { margin-top: 12px; }

/* Final CTA */
.final { text-align: center; isolation: isolate; overflow: hidden; }
.final::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 60% at 50% 60%, rgb(157 135 255 / .28), transparent 70%);
}
.final .icon { width: 128px; margin: 0 auto 32px; }
.final .lede { margin: 20px auto 0; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 56px 0 48px; font-size: 14px; color: var(--text-3); }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot h4 { margin: 0 0 14px; font: 600 13px/1 var(--font-display); color: var(--text-2); letter-spacing: .06em; text-transform: uppercase; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; color: var(--text-3); }
.foot a:hover { color: var(--text); }
.foot .tag { margin-top: 14px; max-width: 26ch; }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* ---------- Document pages (privacy / terms / support) ---------- */

.doc { padding: clamp(56px, 8vw, 96px) 0 clamp(80px, 10vw, 120px); isolation: isolate; }
.doc::before { content: ""; position: absolute; inset: -68px 0 auto; height: 520px; z-index: -1; background: radial-gradient(60% 70% at 50% 0%, rgb(157 135 255 / .22), transparent 70%); }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(40px, 5.5vw, 60px); margin: 14px 0 12px; }
.doc .updated { color: var(--text-3); font-size: 15px; margin-bottom: 48px; }
.doc h2 { font-size: 26px; margin: 48px 0 14px; }
.doc h3 { margin: 28px 0 10px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; display: grid; gap: 8px; margin: 14px 0; }
.doc a { color: var(--lune); text-underline-offset: 3px; }
.doc strong { color: var(--text); }
.callout { margin: 28px 0; padding: 22px 24px; border-radius: 16px; border: 1px solid rgb(157 135 255 / .28); background: rgb(157 135 255 / .08); color: var(--text); }
.callout p { color: var(--text); }
.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 32px 0 8px; }
.help-grid .card { padding: 24px; }
.help-grid .card a { color: var(--lune); font-weight: 600; text-decoration: none; }
@media (max-width: 700px) { .help-grid { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 480px) {
  .hero .eyebrow { font-size: 11px; letter-spacing: .08em; }
  .cta-row .btn { width: 100%; max-width: 320px; }
}
