/* ColuCortex marketing site. Palette mirrors the app's tokens.css (Apple system colours on black glass). */
:root {
  color-scheme: dark;
  --bg: #000;
  --aurora-1: #1c2a3d;
  --aurora-3: #10201f;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-2: rgba(255, 255, 255, 0.11);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-strong: rgba(255, 255, 255, 0.26);
  --ink: #fff;
  --ink-2: rgba(235, 235, 245, 0.66);
  --ink-3: rgba(235, 235, 245, 0.4);
  --lift: #0a84ff;
  --lift-deep: #0060df;
  --go: #30d158;
  --warn: #ff9f0a;
  --danger: #ff453a;
  --ice: #64d2ff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--lift); text-decoration: none; }
a:hover { text-decoration: underline; }
em { font-style: normal; color: var(--ink); font-weight: 600; }

.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 85% -5%, var(--aurora-1), transparent 70%),
    radial-gradient(50vw 50vh at -10% 60%, var(--aurora-3), transparent 70%),
    radial-gradient(70vw 40vh at 50% 115%, rgba(10, 132, 255, 0.22), transparent 70%),
    var(--bg);
}

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.small { font-size: 14px; }
.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(20px, calc((100% - var(--max)) / 2));
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }

/* buttons: glass with the app's blue */
.btn {
  appearance: none; border: 1px solid rgba(255, 255, 255, 0.28); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px; border-radius: 999px;
  font: 600 16px/1 var(--font); color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 55%), var(--lift);
  box-shadow: 0 8px 30px rgba(10, 132, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.45);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); box-shadow: 0 10px 36px rgba(10, 132, 255, 0.5), inset 0 1px 0 rgba(255,255,255,0.45); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-small { padding: 9px 16px; font-size: 14px; }

/* type */
.eyebrow { margin: 0 0 12px; color: var(--lift); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.025em; }
h1 { font-size: clamp(42px, 6.4vw, 74px); line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; font-weight: 750; margin-bottom: 18px; }
h3 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 6px; }
.accent { background: linear-gradient(90deg, var(--lift), var(--ice)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--ink-2); font-size: clamp(18px, 1.6vw, 20px); max-width: 34em; margin: 22px 0 0; }
p { color: var(--ink-2); }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 72px 0 40px; }
.hero-phones { position: relative; height: 640px; }
.hero-phones .phone { position: absolute; width: 290px; }
.phone-front { right: 30px; top: 10px; z-index: 2; }
.phone-back { right: 230px; top: 70px; transform: rotate(-6deg); opacity: .8; }

/* phone frame */
.phone {
  margin: 0;
  width: min(330px, 100%);
  aspect-ratio: 390 / 844;
  border-radius: 46px;
  padding: 10px;
  background: linear-gradient(160deg, #2a2a2e, #0c0c0e 40%, #1d1d20);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 40px 80px rgba(0,0,0,0.7), 0 0 80px rgba(10,132,255,0.12);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 37px; }

/* form */
.join { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.join input[type=email] {
  flex: 1 1 240px; min-width: 0;
  padding: 14px 18px; border-radius: 999px;
  font: 16px var(--font); color: var(--ink);
  background: var(--glass); border: 1px solid var(--glass-border-strong);
  outline: none; transition: border-color .15s, background .15s;
}
.join input[type=email]::placeholder { color: var(--ink-3); }
.join input[type=email]:focus { border-color: var(--lift); background: var(--glass-2); }
.form-note { flex-basis: 100%; margin: 4px 0 0 18px; font-size: 14px; color: var(--ink-3); }
.form-note.ok { color: var(--go); }
.form-note.err { color: var(--danger); }
.join.done input, .join.done .selects, .join.done button { display: none; }

.join-full { margin-inline: auto; flex-direction: column; align-items: stretch; }
.join-full input[type=email] { flex: none; }
.join-full .form-note { text-align: center; margin-left: 0; }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.selects label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-3); text-align: left; padding-left: 6px; }
.selects select {
  appearance: none; -webkit-appearance: none;
  padding: 12px 16px; border-radius: 14px; font: 15px var(--font); color: var(--ink);
  background: var(--glass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' fill='none' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--glass-border-strong);
}
.selects select:focus { outline: none; border-color: var(--lift); }
.selects option { background: #111; }

/* stat strip */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 30px; border-radius: var(--radius); overflow: hidden;
  background: var(--glass-border); border: 1px solid var(--glass-border);
}
.strip div { background: rgba(10,10,12,0.85); padding: 22px 24px; display: flex; flex-direction: column; gap: 2px; }
.strip b { font: 800 30px/1.1 var(--display); letter-spacing: -0.02em; }
.strip span { color: var(--ink-2); font-size: 14px; }

/* features */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 110px 0 0; }
.feature .phone { justify-self: center; }
.feature-flip .feature-copy { order: 2; }
.feature-copy { max-width: 32em; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--go) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='black' fill='none' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center;
}
.ticks b { color: var(--ink); }
.key { font-weight: 700; padding: 1px 8px; border-radius: 999px; font-size: .92em; }
.key-good { color: var(--go); background: rgba(48,209,88,.16); }
.key-under { color: #4da3ff; background: rgba(10,132,255,.18); }
.key-over { color: var(--warn); background: rgba(255,159,10,.16); }

/* the atlas film (film.js): three plate scenes in one perspective stage */
.film {
  position: relative; margin: 0; justify-self: center;
  width: min(420px, 100%); aspect-ratio: 3 / 4;
  border-radius: 30px; overflow: hidden;
  background: radial-gradient(80% 60% at 50% 35%, #12161d, #050506 75%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0.5px rgba(255,255,255,0.14), 0 40px 80px rgba(0,0,0,0.7), 0 0 80px rgba(10,132,255,0.14);
}
.film-stage { position: absolute; inset: 0; perspective: 1400px; }
.film-scene { position: absolute; inset: 0; backface-visibility: hidden; transform-origin: 50% 50%; opacity: 0; will-change: transform, opacity; }
.film-scene svg { display: block; width: 100%; height: 100%; }
.film-fill { fill: var(--lift); fill-opacity: 0; mix-blend-mode: color; }
.film-deep { fill: #8f7bff; fill-opacity: 0; }
.film-line { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(10,132,255,0.9)); }
.film-line-deep { stroke: #d7c2ff; stroke-width: 3; filter: drop-shadow(0 0 8px rgba(191,155,255,0.95)); }
.film-tag { opacity: 0; }
.film-tag line { stroke: rgba(255,255,255,0.75); stroke-width: 2; }
.film-tag circle { fill: #fff; }
.film-tag text { fill: #fff; font: 600 34px var(--font); paint-order: stroke; stroke: rgba(0,0,0,0.75); stroke-width: 6px; dominant-baseline: central; }
.film-tag.is-deep circle { fill: #d7c2ff; }
.film-tag.is-deep text { fill: #e6dbff; }
.film-caption {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 999px;
  background: rgba(20, 20, 24, 0.5); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0.5px rgba(255,255,255,0.18);
  color: #fff; font-size: 14px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none;
}
.film:not(.is-ready) .film-scene.film-front { opacity: 1; }
.film.is-failed .film-stage { background: url("/shots/atlas.webp") center top / cover no-repeat; }

/* two phones side by side (the atlas see-through + sheet) */
.phone-pair { display: flex; gap: 18px; justify-content: center; align-items: flex-start; }
.phone-pair .phone { width: min(250px, 46%); border-radius: 36px; padding: 8px; }
.phone-pair .phone img { border-radius: 29px; }
.phone-pair .phone:last-child { margin-top: 48px; }

/* gallery */
.gallery { padding: 120px 0 0; }
.gallery-row {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 20px 4px 30px; margin-top: 10px; scrollbar-width: thin;
}
.gallery-row figure { margin: 0; flex: 0 0 220px; scroll-snap-align: center; }
.gallery-row .phone { width: 220px; border-radius: 32px; padding: 7px; }
.gallery-row .phone img { border-radius: 26px; }
.gallery-row figcaption { text-align: center; margin-top: 14px; color: var(--ink-2); font-size: 15px; font-weight: 600; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 90px 0 0; }
.card {
  padding: 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.card p { margin: 0; font-size: 15px; }

.story { padding: 120px 0 0; max-width: 760px; text-align: center; }
.story p:last-child { font-size: 19px; }

.faq { padding: 100px 0 0; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--glass-border); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; }

.cta {
  margin-top: 110px; padding: 64px 28px; text-align: center; border-radius: 32px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(10,132,255,0.28), rgba(10,132,255,0) 70%), rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border-strong);
  max-width: 760px;
}
.cta .lede { margin-inline: auto; }

.foot { display: flex; justify-content: space-between; padding: 50px 0 60px; color: var(--ink-3); font-size: 14px; }

/* privacy page */
.doc { max-width: 720px; padding: 70px 0 40px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 24px; }
.doc h2 { font-size: 24px; margin: 36px 0 8px; }
.doc li { color: var(--ink-2); margin-bottom: 6px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .hero-phones { height: 470px; }
  .hero-phones .phone { width: 205px; border-radius: 34px; padding: 7px; }
  .hero-phones .phone img { border-radius: 28px; }
  .phone-front { right: auto; left: 50%; transform: translateX(-22%); }
  .phone-back { right: auto; left: 50%; transform: translateX(-80%) rotate(-6deg); top: 45px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr; gap: 40px; padding-top: 90px; }
  .feature-flip .feature-copy { order: 0; }
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .selects { grid-template-columns: 1fr; }
  .feature .phone { width: min(290px, 100%); }
  .nav .btn-small { padding: 8px 13px; }
  .join .btn { flex: 1 1 100%; }
  .form-note { margin-left: 0; text-align: center; }
}
/* ---- swipe deck ------------------------------------------------------------------------
   Desktop: slides are transparent wrappers (display: contents) and the page scrolls as before.
   Phones (≤ 760px): each slide is a full-screen panel in a horizontal scroll-snap strip. */
.slide { display: contents; }
.pager, .swipe-hint { display: none; }

@media (max-width: 760px) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  body { display: flex; flex-direction: column; height: 100dvh; }
  .nav { position: relative; flex: none; padding-block: 10px; }
  .foot, .desk-only, .strip, .hero-phones { display: none !important; }

  .deck {
    flex: 1; min-height: 0;
    display: flex; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .deck::-webkit-scrollbar { display: none; }
  .slide {
    display: flex; flex-direction: column;
    flex: 0 0 100%; width: 100%; min-height: 0;
    scroll-snap-align: start; scroll-snap-stop: always;
    overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain;
  }

  /* the nudge: everything slides left to show the next panel's edge, then settles back */
  .deck.nudge .slide { animation: nudge 1.5s cubic-bezier(.3, .7, .25, 1); }
  @keyframes nudge {
    0% { transform: none; }
    30%, 50% { transform: translateX(-72px); }
    100% { transform: none; }
  }

  /* slide 1: the pitch and the form */
  .hero { display: flex; flex-direction: column; justify-content: center; flex: 1; padding: 20px 0 24px; gap: 0; }
  h1 { font-size: clamp(36px, 11vw, 46px); }
  .lede { font-size: 16.5px; margin-top: 16px; }
  .hero .join { margin-top: 22px; }
  .swipe-hint { display: flex; align-items: center; gap: 8px; margin: 26px 0 0; color: var(--ink-2); font-weight: 600; font-size: 15px; }
  .swipe-arrow { display: inline-block; color: var(--lift); font-size: 20px; animation: hint 1.4s ease-in-out infinite; }
  @keyframes hint { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(9px); } }
  .swiped .swipe-hint { opacity: 0; transition: opacity .4s; }

  /* slides 2-5: copy on top, the phone rising from the bottom edge */
  .feature { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 18px; padding: 22px 0 0; }
  .feature-flip .feature-copy { order: 0; }
  .feature .eyebrow { margin-bottom: 8px; }
  .feature h2 { font-size: clamp(26px, 7.6vw, 32px); margin-bottom: 10px; }
  .feature-copy p { margin: 0; font-size: 16px; }
  .feature .phone {
    flex: 1 1 0; min-height: 160px; align-self: center;
    width: min(300px, 76vw); max-height: calc(min(300px, 76vw) * 2.164);
    aspect-ratio: auto; padding: 8px 8px 0; margin-bottom: 0;
    border-radius: 40px 40px 0 0;
  }
  .feature .phone img { height: 100%; object-fit: cover; object-position: top; border-radius: 32px 32px 0 0; }
  .feature .film { flex: 1 1 0; min-height: 200px; width: min(340px, 84vw); aspect-ratio: auto; align-self: center; margin-bottom: 14px; border-radius: 26px; }
  .film-caption { font-size: 12.5px; bottom: 10px; padding: 6px 12px; }
  .feature .phone-pair { flex: 1 1 0; min-height: 160px; gap: 10px; align-items: stretch; }
  .feature .phone-pair .phone { flex: 1 1 0; width: auto; max-width: 46vw; max-height: none; min-height: 0; padding: 6px 6px 0; border-radius: 28px 28px 0 0; margin-top: 0; }
  .feature .phone-pair .phone img { border-radius: 23px 23px 0 0; }
  .feature .phone-pair .phone:last-child { margin-top: 26px; }
  .feature .phone-mid img { object-position: 50% 42%; }

  /* slide 6: details and the story, compact */
  .slide-details { justify-content: center; padding: 18px 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0; }
  .card { padding: 14px; border-radius: 18px; }
  .card h3 { font-size: 15px; }
  .card p { font-size: 13px; line-height: 1.45; }
  .story { padding: 26px 0 0; }
  .story h2 { font-size: 28px; margin-bottom: 8px; }
  .story p:last-child { font-size: 15px; margin: 0; }

  /* slide 7: the form first, questions below (scrolls inside the slide) */
  .cta { order: -1; margin-top: 18px; padding: 30px 18px; border-radius: 26px; }
  .cta h2 { font-size: 28px; margin-bottom: 0; }
  .cta .lede { font-size: 15px; }
  .faq { padding: 34px 0 30px; }
  .faq h2 { font-size: 24px; }
  .faq summary { font-size: 16px; }

  /* the pager */
  .pager {
    display: flex; flex: none; align-items: center; justify-content: space-between;
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-top: 1px solid var(--glass-border);
  }
  .dots { display: flex; gap: 8px; align-items: center; }
  .dots button {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--ink-3); transition: width .3s ease, background .3s ease;
  }
  .dots button[aria-current="true"] { width: 26px; background: var(--lift); }
  .next {
    width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; font-size: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 55%), var(--lift);
    box-shadow: 0 6px 22px rgba(10, 132, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.45);
    transition: opacity .3s ease, transform .15s ease;
  }
  .next:active { transform: scale(.92); }
  .pager:not(.swiped-once) .next { animation: pulse 2s ease-in-out infinite; }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 6px 22px rgba(10,132,255,.45), 0 0 0 0 rgba(10,132,255,.5), inset 0 1px 0 rgba(255,255,255,.45); }
    50% { box-shadow: 0 6px 22px rgba(10,132,255,.45), 0 0 0 12px rgba(10,132,255,0), inset 0 1px 0 rgba(255,255,255,.45); }
  }
  .pager.at-end .next { opacity: 0; pointer-events: none; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .lede { font-size: 15px; }
  .feature { padding-top: 14px; gap: 12px; }
  .feature h2 { font-size: 24px; }
  .feature-copy p { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .deck.nudge .slide, .swipe-arrow, .pager .next { animation: none !important; }
}
