/* Brim — landing page.
   Palette lifted straight from Sources/Brim/DesignSystem/Theme.swift so the
   site and the app are unmistakably the same product. */

:root {
  --bg:        #0A0A0C;
  --bg-2:      #0E0E12;
  --surface:   rgba(255,255,255,.035);
  --surface-2: rgba(255,255,255,.055);
  --border:    rgba(255,255,255,.09);
  --border-2:  rgba(255,255,255,.14);
  --text:      #F5F5F7;
  --muted:     #93939F;
  --dim:       #6B6B76;

  --orange:    #FF7A59;
  --purple:    #B47CFF;
  --blue:      #5B8CFF;
  --green:     #3BD68A;
  --cyan:      #4CC9F0;
  --yellow:    #F4D35E;
  --violet:    #9D8DF1;

  --brand: linear-gradient(100deg, #FF7A59 0%, #B47CFF 52%, #5B8CFF 100%);

  --radius:    18px;
  --radius-lg: 26px;
  --maxw:      1120px;

  --ease: cubic-bezier(.22,.68,.24,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A slow-drifting colour wash behind everything, echoing the desktop gradient
   the app is always sitting on top of. */
body::before {
  content: "";
  position: fixed;
  inset: -30% -10% auto -10%;
  height: 90vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 52% at 22% 18%, rgba(255,122,89,.20), transparent 68%),
    radial-gradient(44% 50% at 74% 12%, rgba(91,140,255,.20), transparent 68%),
    radial-gradient(40% 46% at 50% 40%, rgba(180,124,255,.16), transparent 70%);
  filter: blur(28px);
  animation: drift 26s var(--ease) infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ── Navigation ─────────────────────────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,10,12,.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--border);
}
.nav-inner {
  height: 62px; display: flex; align-items: center; gap: 28px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 17px; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: scale(.975); }
.btn-primary {
  background: var(--brand); color: #14040A; font-weight: 700;
  box-shadow: 0 6px 26px rgba(180,124,255,.30);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(180,124,255,.42); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-2px); }
.btn-sm { padding: 9px 17px; font-size: 14px; }
.btn svg { width: 17px; height: 17px; }

/* ── Reveal on scroll ───────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .09s; }
.reveal.d2 { transition-delay: .18s; }
.reveal.d3 { transition-delay: .27s; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero { padding: 168px 0 88px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 15px 6px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted); margin-bottom: 26px;
}
.pill b { color: var(--text); font-weight: 600; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(59,214,138,.18); }

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.35rem);
  line-height: 1.04; letter-spacing: -.035em; font-weight: 700;
  margin: 0 0 22px; max-width: 15ch; margin-inline: auto;
}
h1 .grad {
  background: var(--brand); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lede { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--muted); max-width: 54ch; margin: 0 auto 34px; }
.cta-row { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }
.meta { margin-top: 18px; font-size: 13.5px; color: var(--dim); }
.meta b { color: var(--muted); font-weight: 500; }

/* ── The animated notch demo ────────────────────────────────────────────── */

.stage {
  margin: 66px auto 0; max-width: 860px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(150deg, #2B3A67, #5C4B8B 52%, #A85751);
  padding: 0; overflow: hidden; position: relative;
  aspect-ratio: 16 / 10;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
/* The camera housing: a real cut-out, so nothing behind it is visible. */
.notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 168px; height: 30px; background: #000;
  border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;
  z-index: 3;
}
.island {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  background: #050506; z-index: 2;
  border-bottom-left-radius: 16px; border-bottom-right-radius: 16px;
  width: 176px; height: 32px;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
  animation: islandCycle 12s var(--ease) infinite;
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
}
@keyframes islandCycle {
  0%,   14%  { width: 176px; height: 32px; }
  22%,  36%  { width: 352px; height: 84px; }   /* live activity */
  44%,  58%  { width: 300px; height: 106px; }  /* peek */
  66%,  90%  { width: 680px; height: 340px; }  /* expanded */
  100%       { width: 176px; height: 32px; }
}
.island-inner { width: 100%; height: 100%; position: relative; }

/* Everything the island draws starts BELOW the camera housing. The notch is a
   real cut-out with no display behind it, so content painted underneath it is
   simply not visible to anyone — exactly as the app treats it. */
.stage-layer {
  position: absolute; top: 30px; right: 16px; bottom: 0; left: 16px;
  display: flex; align-items: center; justify-content: center; opacity: 0;
}
.layer-activity { animation: showActivity 12s var(--ease) infinite; }
.layer-peek     { animation: showPeek 12s var(--ease) infinite; }
.layer-panel    { animation: showPanel 12s var(--ease) infinite; }
@keyframes showActivity { 0%,18% {opacity:0} 24%,34% {opacity:1} 40%,100% {opacity:0} }
@keyframes showPeek     { 0%,40% {opacity:0} 46%,56% {opacity:1} 62%,100% {opacity:0} }
@keyframes showPanel    { 0%,62% {opacity:0} 70%,88% {opacity:1} 94%,100% {opacity:0} }

.act { display: flex; align-items: center; gap: 10px; width: 100%; }
.act .ic { width: 17px; height: 17px; color: var(--orange); flex: none; }
.act .t  { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.act .r  { margin-left: auto; font-size: 13.5px; color: var(--orange);
           font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; }
.peekrow { display: flex; gap: 12px; }
.peekrow i {
  width: 30px; height: 30px; border-radius: 9px; display: block;
  background: var(--surface-2); border: 1px solid var(--border);
}
.peekrow i:nth-child(1) { background: rgba(91,140,255,.30);  border-color: rgba(91,140,255,.5); }
.peekrow i:nth-child(2) { background: rgba(180,124,255,.30); border-color: rgba(180,124,255,.5); }
.peekrow i:nth-child(3) { background: rgba(76,201,240,.30);  border-color: rgba(76,201,240,.5); }
.peekrow i:nth-child(4) { background: rgba(255,122,89,.30);  border-color: rgba(255,122,89,.5); }
.mini { display: flex; width: 100%; height: 100%; gap: 12px; padding-bottom: 14px; }
.mini-rail { width: 66px; display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.mini-rail span { height: 10px; border-radius: 5px; background: var(--surface-2); display: block; }
.mini-rail span:first-child { background: rgba(91,140,255,.55); }
.mini-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding-top: 6px; }
.mini-body u {
  display: block; height: 30px; border-radius: 9px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
}
.mini-body u:nth-child(1) { background: rgba(91,140,255,.14); }
.mini-body u:nth-child(2) { background: rgba(180,124,255,.12); }

.stage-cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center;
             font-size: 12.5px; color: rgba(255,255,255,.62); letter-spacing: .01em; }

/* ── Sections ───────────────────────────────────────────────────────────── */

section { padding: 96px 0; position: relative; z-index: 1; }
.sec-head { text-align: center; max-width: 60ch; margin: 0 auto 58px; }
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  background: var(--brand); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; margin-bottom: 13px;
}
h2 { font-size: clamp(1.85rem, 3.9vw, 2.7rem); line-height: 1.13; letter-spacing: -.03em; font-weight: 700; margin: 0 0 15px; }
.sec-head p { color: var(--muted); font-size: 1.04rem; margin: 0; }

/* ── Features ───────────────────────────────────────────────────────────── */

.feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: 60px; align-items: center; margin-bottom: 104px; }
.feature:nth-child(even) .feature-text { order: 2; }
.feature:last-child { margin-bottom: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 17px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.feature h3 { font-size: 1.6rem; letter-spacing: -.025em; margin: 0 0 13px; font-weight: 700; }
.feature p { color: var(--muted); margin: 0 0 20px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.6px; color: var(--muted); }
.ticks svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--accent); }

.shot {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 26px 70px rgba(0,0,0,.5);
  background: var(--bg-2);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.shot:hover { transform: translateY(-6px); box-shadow: 0 34px 88px rgba(0,0,0,.62); }
.shot img { width: 100%; }

/* ── Island explainer ───────────────────────────────────────────────────── */

.states { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.state {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 22px; text-align: center;
  transition: transform .35s var(--ease), border-color .35s;
}
.state:hover { transform: translateY(-5px); border-color: var(--border-2); }
.state-img {
  border-radius: 12px; overflow: hidden; margin-bottom: 17px;
  background: linear-gradient(140deg, #2B3A67, #5C4B8B 55%, #A85751);
  display: grid; place-items: center; min-height: 92px; padding: 0;
}
.state h4 { margin: 0 0 7px; font-size: 1.03rem; letter-spacing: -.015em; }
.state p { margin: 0; color: var(--muted); font-size: 14px; }

/* ── Pricing ────────────────────────────────────────────────────────────── */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: 32px 28px;
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), border-color .35s, background .35s;
  position: relative;
}
.plan:hover { transform: translateY(-6px); border-color: var(--border-2); background: var(--surface-2); }
.plan.best { border-color: rgba(180,124,255,.42); background: rgba(180,124,255,.055); }
.plan.best::before {
  content: "Best value"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #14040A; font-size: 11.5px; font-weight: 700;
  padding: 5px 13px; border-radius: 999px; letter-spacing: .02em; white-space: nowrap;
}
.plan h3 { margin: 0 0 5px; font-size: 1.18rem; letter-spacing: -.02em; }
.plan .sub { color: var(--dim); font-size: 13.6px; margin: 0 0 20px; }
.price { display: flex; align-items: baseline; gap: 5px; margin-bottom: 5px; }
.price .amt { font-size: 2.9rem; font-weight: 700; letter-spacing: -.045em; line-height: 1; }
.price .per { color: var(--muted); font-size: 14.5px; }
.saving { font-size: 13px; color: var(--green); margin: 0 0 22px; min-height: 20px; font-weight: 500; }
.plan .ticks { margin-bottom: 26px; }
.plan .btn { width: 100%; margin-top: auto; }

.trial-note {
  margin-top: 34px; text-align: center; color: var(--muted); font-size: 14.4px;
  padding: 17px; border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.trial-note b { color: var(--text); font-weight: 600; }

/* ── Updates ────────────────────────────────────────────────────────────── */

.releases { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.release {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 22px 24px;
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
}
.release .ver {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13.5px; font-weight: 600;
  padding: 5px 11px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--border); white-space: nowrap;
}
.release.current .ver { background: rgba(59,214,138,.14); border-color: rgba(59,214,138,.34); color: var(--green); }
.release h4 { margin: 0 0 5px; font-size: 1rem; letter-spacing: -.015em; }
.release .date { color: var(--dim); font-size: 13px; margin: 0 0 9px; }
.release ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.3px; }
.release li { margin-bottom: 4px; }

/* ── Download banner ────────────────────────────────────────────────────── */

.download-band {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(255,122,89,.10), rgba(180,124,255,.10) 52%, rgba(91,140,255,.10));
  padding: 56px 40px; text-align: center;
}
.download-band h2 { margin-bottom: 12px; }
.download-band p { color: var(--muted); margin: 0 auto 28px; max-width: 48ch; }
.reqs { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 26px; font-size: 13.4px; color: var(--dim); }
.reqs span { display: flex; align-items: center; gap: 7px; }
.reqs svg { width: 15px; height: 15px; color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--border); padding: 44px 0; margin-top: 40px; }
.foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--dim); font-size: 13.6px; }
.foot .brand { font-size: 15px; }
.foot nav { margin-left: auto; display: flex; gap: 22px; }
.foot nav a:hover { color: var(--text); }

/* ── Purchase dialog ────────────────────────────────────────────────────── */

.modal {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(5,5,7,.76); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
}
.modal.open { display: flex; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.sheet {
  width: 100%; max-width: 440px; background: var(--bg-2);
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  padding: 30px; animation: rise .35s var(--ease);
  max-height: 90vh; overflow-y: auto;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.97) } to { opacity: 1; transform: none } }
.sheet h3 { margin: 0 0 6px; font-size: 1.28rem; letter-spacing: -.025em; }
.sheet > p { margin: 0 0 22px; color: var(--muted); font-size: 14.4px; }
.field { display: block; margin-bottom: 15px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: border-color .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 76px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: rgba(180,124,255,.55); background: var(--surface-2);
}
.field select option { background: var(--bg-2); color: var(--text); }
.sheet-actions { display: flex; gap: 11px; margin-top: 22px; }
.sheet-actions .btn { flex: 1; }
.fallback { margin-top: 18px; font-size: 13px; color: var(--dim); text-align: center; line-height: 1.5; }
.fallback a { color: var(--purple); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 30px; margin-bottom: 74px; }
  .feature:nth-child(even) .feature-text { order: 0; }
  .plans, .states { grid-template-columns: 1fr; }
  .plan.best { order: -1; }
  .nav-links { display: none; }
  .hero { padding: 130px 0 66px; }
  section { padding: 74px 0; }
  .release { grid-template-columns: 1fr; gap: 12px; }
  .release .ver { justify-self: start; }
  .download-band { padding: 42px 24px; }
}
@media (max-width: 560px) {
  .stage { aspect-ratio: 4 / 3; }
  @keyframes islandCycle {
    0%,   14%  { width: 126px; height: 24px; }
    22%,  36%  { width: 262px; height: 70px; }
    44%,  58%  { width: 224px; height: 88px; }
    66%,  90%  { width: 320px; height: 220px; }
    100%       { width: 126px; height: 24px; }
  }
  .notch { width: 118px; height: 22px; }
  .stage-layer { top: 22px; left: 12px; right: 12px; }
  .act .t, .act .r { font-size: 12px; }
  .cta-row .btn { width: 100%; }
}
