/* CamLoop — landing page. Brand: friendly-native, with a wink.
   Tokens mirror the app's DESIGN.md (Loop Coral, warm paper, Cabinet Grotesk + JetBrains Mono). */

@font-face {
  font-family: "Cabinet Grotesk"; font-weight: 700; font-display: swap;
  src: url("fonts/CabinetGrotesk-Bold.otf") format("opentype");
}
@font-face {
  font-family: "Cabinet Grotesk"; font-weight: 800; font-display: swap;
  src: url("fonts/CabinetGrotesk-Extrabold.otf") format("opentype");
}
@font-face {
  font-family: "Cabinet Grotesk"; font-weight: 900; font-display: swap;
  src: url("fonts/CabinetGrotesk-Black.otf") format("opentype");
}
@font-face {
  font-family: "JetBrains Mono"; font-weight: 500; font-display: swap;
  src: url("fonts/JetBrainsMono-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "JetBrains Mono"; font-weight: 700; font-display: swap;
  src: url("fonts/JetBrainsMono-Bold.ttf") format("truetype");
}

:root {
  --coral: #FF6B6B; --coral-hover: #F0514E; --coral-pressed: #D63A37; --coral-soft: #FFF0EF;
  --mint: #2ED3A0; --mint-soft: #E4FAF3;
  --ink: #1B1A1F; --graphite: #3A3942; --slate: #6E6C78; --mist: #9C99A6;
  --cloud: #E7E5EC; --paper: #F7F5F2; --white: #FFFFFF;
  --display: "Cabinet Grotesk", ui-sans-serif, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --maxw: 1080px;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(27,26,31,.06), 0 18px 48px -18px rgba(27,26,31,.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
}
/* Warm atmosphere: a soft coral glow up top + a faint grain. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% -8%, rgba(255,107,107,.16), transparent 60%),
    radial-gradient(50% 40% at 8% 4%, rgba(46,211,160,.10), transparent 60%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-size: 15px; font-weight: 600;
  padding: 12px 20px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 8px 20px -8px rgba(255,107,107,.7); }
.btn-coral:hover { background: var(--coral-hover); }
.btn-ghost { background: rgba(27,26,31,.04); color: var(--ink); border-color: rgba(27,26,31,.10); }
.btn-ghost:hover { background: rgba(27,26,31,.07); }
.btn small { font-family: var(--mono); font-weight: 500; opacity: .8; font-size: 12px; }

/* keycap */
.kbd {
  display: inline-flex; gap: 2px; vertical-align: middle;
}
.kbd span {
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--slate);
  min-width: 18px; text-align: center; padding: 2px 4px;
  background: var(--white); border: 1px solid var(--cloud);
  border-bottom-width: 2px; border-radius: 6px;
}

/* ---- nav ---- */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px);
  background: rgba(247,245,242,.72);
  border-bottom: 1px solid rgba(27,26,31,.06);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a.lnk { font-size: 14px; color: var(--slate); transition: color .15s; }
.nav-links a.lnk:hover { color: var(--ink); }
@media (max-width: 720px){ .nav-links a.lnk { display: none; } }

/* ---- hero ---- */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 880px){ .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--coral-pressed);
  background: var(--coral-soft); border: 1px solid rgba(255,107,107,.25);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 22px;
}
h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -.035em; line-height: .98;
  font-size: clamp(44px, 7vw, 76px); color: var(--ink);
}
h1 .loop { color: var(--coral); position: relative; white-space: nowrap; }
.lede { font-size: 19px; color: var(--graphite); max-width: 30ch; margin: 22px 0 30px; }
.cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta-note { font-size: 13px; color: var(--slate); margin-top: 16px; }
.cta-note b { color: var(--graphite); font-weight: 600; }

/* staggered entrance */
.fade { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d1{animation-delay:.05s}.d2{animation-delay:.15s}.d3{animation-delay:.25s}.d4{animation-delay:.35s}.d5{animation-delay:.45s}

/* ---- hero device (the memorable bit) ---- */
.device { position: relative; }
.menubar {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  height: 26px; padding: 0 14px; border-radius: 9px 9px 0 0;
  background: rgba(27,26,31,.82); color: rgba(255,255,255,.85);
  font-size: 12px; font-family: var(--mono);
  box-shadow: var(--shadow);
}
.menubar .glyph {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid currentColor; position: relative;
  transition: background .35s ease;            /* open ring (live) -> filled disc (loop) */
}
.device.is-looping .menubar .glyph { background: currentColor; }
.tile {
  position: relative; aspect-ratio: 16/9; border-radius: 0 0 16px 16px; overflow: hidden;
  background: linear-gradient(160deg, #20303a, #2b2440 70%, #3a2b34);
  box-shadow: var(--shadow);
  border: 1px solid rgba(27,26,31,.10);
}
/* abstract "you" — a calm portrait, not a real face */
.portrait { position: absolute; inset: 0; }
.portrait .room { position: absolute; inset: 0; background:
  radial-gradient(40% 55% at 50% 120%, rgba(255,255,255,.06), transparent 70%); }
.portrait .shoulders {
  position: absolute; left: 50%; bottom: -8%; width: 64%; height: 52%;
  transform: translateX(-50%); border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, #e9b08f, #caa080);
}
.portrait .head {
  position: absolute; left: 50%; top: 30%; width: 30%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: linear-gradient(165deg, #f0c3a3, #d9a585);
  box-shadow: inset -6px -10px 20px rgba(0,0,0,.18);
}
.tile .guides { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(transparent 49.5%, rgba(255,255,255,.16) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,.16) 49.5% 50.5%, transparent 50.5%);
  mask: radial-gradient(circle, #000 60%, transparent 85%);
  opacity: .5;
}
/* the looping "wink": a quick jump + brief freeze the moment it starts looping */
.tile .portrait { transition: transform .12s ease; }
.device.is-looping .tile .portrait { animation: lagWink .9s ease both; }
@keyframes lagWink {
  0% { transform: translateX(3px); filter: contrast(1.06); }  /* the catch-up jump */
  18%, 70% { transform: none; }                                /* freeze */
  100% { transform: none; filter: none; }
}
/* state chip toggles live <-> looping (driven by the .is-looping class) */
.chip {
  position: absolute; top: 12px; left: 12px; min-width: 104px; height: 28px;
  font-size: 12px; font-weight: 600; font-family: var(--body);
  border-radius: 999px; color: #fff;
  background: rgba(0,0,0,.42); backdrop-filter: blur(8px);
}
.chip .state { position: absolute; inset: 0; display: flex; align-items: center; gap: 7px;
  padding: 0 11px; transition: opacity .3s ease; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip [data-loop] { opacity: 0; }
.device.is-looping .chip [data-live] { opacity: 0; }
.device.is-looping .chip [data-loop] { opacity: 1; }
.chip .dot-live { background: var(--mint); animation: pulse 1.6s ease-out infinite; }
.chip .dot-loop { background: var(--coral); }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(46,211,160,.5)} 100%{box-shadow:0 0 0 7px rgba(46,211,160,0)} }
.tile .hint {
  position: absolute; bottom: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.9);
  font-size: 11px; background: rgba(0,0,0,.4); padding: 5px 9px; border-radius: 8px; backdrop-filter: blur(6px);
}
.tile .hint .kbd span { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.2); }

/* ---- section scaffolding ---- */
section.band { padding: 80px 0; }
.sec-label { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--coral-pressed); letter-spacing: .04em; text-transform: uppercase; }
.sec-title { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.04; margin: 12px 0 0; }
.sec-sub { color: var(--slate); font-size: 17px; max-width: 56ch; margin-top: 14px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; margin-top: 44px; }
@media (max-width: 760px){ .steps { grid-template-columns: 1fr; } }
.step { background: var(--white); border: 1px solid var(--cloud); border-radius: var(--radius); padding: 26px; box-shadow: 0 1px 2px rgba(27,26,31,.04); }
.step .n { font-family: var(--mono); font-size: 13px; color: var(--coral); font-weight: 700; }
.step h3 { font-family: var(--display); font-weight: 700; font-size: 21px; margin: 12px 0 8px; letter-spacing: -.02em; }
.step p { color: var(--slate); font-size: 15px; }

/* features grid */
.feat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 44px; }
@media (max-width: 860px){ .feat-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .feat-grid { grid-template-columns: 1fr; } }
.feat { background: var(--white); border: 1px solid var(--cloud); border-radius: 14px; padding: 22px; transition: transform .15s ease, box-shadow .15s ease; }
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feat .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral-pressed); font-size: 19px; margin-bottom: 14px; }
.feat h4 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 6px; }
.feat p { color: var(--slate); font-size: 14px; }
.feat .kbd { margin-top: 10px; }

/* lag spotlight */
.spotlight { background: var(--ink); color: var(--paper); border-radius: 28px; padding: 56px; position: relative; overflow: hidden; }
.spotlight::after { content:""; position:absolute; inset:0; background: radial-gradient(50% 80% at 85% 10%, rgba(255,107,107,.22), transparent 60%); }
.spotlight .wrap2 { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 820px){ .spotlight { padding: 36px; } .spotlight .wrap2 { grid-template-columns: 1fr; } }
.spotlight .sec-title { color: #fff; }
.spotlight p { color: rgba(244,242,247,.7); font-size: 16px; margin-top: 16px; }
.glitchcard { aspect-ratio: 4/3; border-radius: 16px; background: linear-gradient(160deg,#26323c,#2c2540); position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.glitchcard .bars { position:absolute; inset:0; animation: barsMove 3.2s steps(1) infinite; }
.glitchcard .bar { position:absolute; left:0; right:0; height: 14%; background: rgba(255,255,255,.04); }
@keyframes barsMove { 0%,70%{transform:none;opacity:0} 72%{opacity:1; transform: translateY(4px)} 78%{transform:none} 100%{opacity:0} }
.glitchcard .label { position:absolute; bottom:12px; left:12px; font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.85); background: rgba(0,0,0,.4); padding: 5px 9px; border-radius: 7px; }
.glitchcard .scene { position:absolute; inset:0; background: radial-gradient(35% 50% at 50% 60%, rgba(240,195,163,.9), transparent 60%); animation: lagWink 3.2s linear infinite; }

/* pricing */
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 44px; max-width: 760px; }
@media (max-width: 720px){ .prices { grid-template-columns: 1fr; } }
.price { background: var(--white); border: 1px solid var(--cloud); border-radius: 18px; padding: 30px; }
.price.pro { border-color: var(--coral); box-shadow: 0 18px 48px -22px rgba(255,107,107,.5); position: relative; }
.price.pro .tag { position:absolute; top: 18px; right: 18px; font-family: var(--mono); font-size: 11px; font-weight: 700; color:#fff; background: var(--coral); padding: 3px 9px; border-radius: 999px; }
.price .plan { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.price .amt { font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -.03em; margin: 8px 0 2px; }
.price .amt small { font-size: 15px; font-weight: 600; color: var(--slate); font-family: var(--body); }
.price ul { list-style: none; margin: 18px 0 24px; display: grid; gap: 10px; }
.price li { font-size: 14.5px; color: var(--graphite); display: flex; gap: 10px; align-items: flex-start; }
.price li::before { content: "✓"; color: var(--mint); font-weight: 800; }
.price li.muted { color: var(--mist); } .price li.muted::before { content: "–"; color: var(--mist); }
.price .btn { width: 100%; justify-content: center; }
.setapp { text-align: center; margin-top: 22px; font-size: 14px; color: var(--slate); }

/* footer */
footer { padding: 56px 0 40px; border-top: 1px solid var(--cloud); margin-top: 40px; }
footer .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; flex-wrap: wrap; }
footer .brand { font-size: 18px; }
footer .cols { display: flex; gap: 56px; flex-wrap: wrap; }
footer .col h5 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mist); margin-bottom: 12px; }
footer .col a { display: block; font-size: 14px; color: var(--slate); margin-bottom: 8px; }
footer .col a:hover { color: var(--ink); }
.legal { color: var(--mist); font-size: 12.5px; margin-top: 36px; }
.legal .mono { color: var(--slate); }

@media (prefers-reduced-motion: reduce) {
  .fade, .tile .portrait, .menubar .glyph, .chip [data-live], .chip [data-loop],
  .chip .dot-live, .glitchcard .bars, .glitchcard .scene { animation: none !important; opacity: 1 !important; }
  .fade { transform: none; }
}
