/* Landing page (/landingpage). Same palette and type as the app (style.css), light only. */
:root {
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bg: #fafafa;
  --panel: #ffffff;
  --subtle: #f4f4f5;
  --line: #e7e7ea;
  --line-2: #d9d9de;
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #8a8a93;
  --accent: #d81e26;
  --accent-hover: #bf161e;
  --accent-soft: #fdeeee;
  --accent-line: #f6c6c8;
  --pos: #0b7a53;
  --badge-bg: #eef0ff;  --badge-ink: #4338ca;
  --shadow-sm: 0 1px 2px rgba(16, 16, 20, .06), 0 1px 1px rgba(16, 16, 20, .03);
  --shadow-lg: 0 24px 60px -20px rgba(16, 16, 20, .28), 0 4px 12px rgba(16, 16, 20, .06);
  --ring: 0 0 0 2px var(--panel), 0 0 0 4px rgba(216, 30, 38, .45);
  --r: 8px; --r-lg: 12px; --r-xl: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r); }

/* ---- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text); font: 500 14px/1 var(--font); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .15s var(--ease); white-space: nowrap; }
.btn:hover { background: var(--subtle); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(24, 24, 27, .05); }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(250, 250, 250, .82); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(16, 16, 20, .35); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 15px; font-weight: 600; }
.brand small { font-size: 12px; color: var(--text-3); }
.brand.sm { gap: 8px; font-size: 13px; color: var(--text-2); }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { padding: 6px 10px; border-radius: var(--r); font-size: 14px; color: var(--text-2); text-decoration: none; }
.nav-links a:hover { color: var(--text); background: rgba(24, 24, 27, .05); }
.nav-links a.on { color: var(--accent); background: var(--accent-soft); }
.nav-cta { margin-left: auto; display: flex; gap: 8px; }

/* ---- hero */
.hero { position: relative; padding: 72px 0 40px; text-align: center; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -10% auto; height: 640px; z-index: -1;
  background: radial-gradient(ellipse at 50% 40%, rgba(216, 30, 38, .10), transparent 60%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--accent-line); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(216, 30, 38, .18); }
.hero h1 { margin: 22px auto 0; max-width: 980px; font-size: clamp(32px, 4.8vw, 54px); text-wrap: balance; line-height: 1.08; font-weight: 800; letter-spacing: -.035em; }
.accent { color: var(--accent); }
.lead { margin: 20px auto 0; max-width: 680px; font-size: 18px; color: var(--text-2); text-wrap: pretty; }
.hero-cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.trust { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 8px 20px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: #e6f4ee
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b7a53' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* ---- live demo frame */
.demo { padding: 8px 0 56px; }
.frame { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); box-shadow: var(--shadow-lg); overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #f7f7f8; }
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #e2e2e6; }
.lights i:first-child { background: #ff5f57; } .lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.frame-url { flex: 1; max-width: 420px; margin: 0 auto; padding: 4px 12px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-3); text-align: center; }
.frame-open { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); text-decoration: none; }
.frame-open:hover { color: var(--accent); }
.frame-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.frame-body { height: min(760px, 78vh); background: var(--bg); }
.frame-body iframe { display: block; width: 100%; height: 100%; border: 0; }
.demo-caption { margin: 16px auto 0; max-width: 720px; text-align: center; font-size: 14px; color: var(--text-2); }

/* ---- stats */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.stats-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-in > div { padding: 28px 20px; display: flex; flex-direction: column; gap: 4px; }
.stats-in > div + div { border-left: 1px solid var(--line); }
.stats b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.stats span { font-size: 14px; color: var(--text-2); }

/* ---- sections */
.features, .how, .security, .faq, .final, .showcase { padding: 88px 0; }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; font-weight: 700; }
.sub { margin-top: 10px; font-size: 16px; color: var(--text-2); max-width: 620px; }
.features h2, .features .sub, .how h2 { text-align: center; margin-left: auto; margin-right: auto; }

.grid { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 10px 24px -12px rgba(16, 16, 20, .18); }
.card h3 { margin-top: 16px; font-size: 17px; font-weight: 600; }
.card p { margin-top: 8px; font-size: 14.5px; color: var(--text-2); }
.ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tag { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--badge-bg); color: var(--badge-ink); font-size: 11px; font-weight: 700; line-height: 18px; }

.how { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; }
.steps li { position: relative; }
.steps .n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.steps h3 { margin-top: 14px; font-size: 18px; font-weight: 600; }
.steps p { margin-top: 8px; color: var(--text-2); font-size: 14.5px; }

.sec-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding: 14px 16px 14px 46px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--text-2); font-size: 14.5px; }
.checks li b { color: var(--text); }
.checks li::before { content: ''; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; background: #e6f4ee
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b7a53' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

.final-in { padding: 56px 24px; border-radius: 24px; text-align: center; color: #fff;
  background: radial-gradient(ellipse at 20% 0%, #ef3b42, transparent 55%), linear-gradient(135deg, #d81e26, #9f1219); }
.final-in p { margin-top: 10px; opacity: .9; }
.final .btn { box-shadow: none; }
.final .btn.primary { background: #fff; border-color: #fff; color: var(--accent); }
.final .btn.primary:hover { background: #fdeeee; }
.final .btn:not(.primary) { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.final .btn:not(.primary):hover { background: rgba(255, 255, 255, .1); }

.foot { border-top: 1px solid var(--line); }
.foot-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.foot nav { display: flex; gap: 18px; font-size: 13px; }
.foot nav a { color: var(--text-2); text-decoration: none; }
.foot nav a:hover { color: var(--text); }

/* ---- one night, up close */
.kicker { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.show-in { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.show-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; color: var(--text-2); font-size: 14.5px; }
.show-points li { padding-left: 18px; position: relative; }
.show-points li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.show-points b { color: var(--text); }
.night { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); box-shadow: var(--shadow-lg); }
.night-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.night-head b { display: block; font-size: 15px; }
.night-head span { font-size: 12.5px; color: var(--text-3); }
.pill { flex: none; padding: 2px 9px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--line); font-size: 11.5px !important; color: var(--text-2) !important; }
.bars { position: relative; list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 6px; }
/* The average as a dashed line across the bar track (the track starts after the 176px name column). */
.bars::after { content: ''; position: absolute; top: -4px; bottom: -4px; left: calc(176px + (100% - 240px) * var(--avg));
  border-left: 1.5px dashed #71717a; pointer-events: none; }
.bars li { display: grid; grid-template-columns: 176px 1fr 64px; align-items: center; gap: 0; font-size: 13px; }
.bars span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); padding-right: 10px; }
.bars em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--accent); margin-left: 4px; }
.bars i { height: 16px; border-radius: 4px; background: linear-gradient(90deg, #e4e4e8 var(--w), transparent 0); }
.bars b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.bars li.own span { color: var(--text); font-weight: 600; }
.bars li.own i { background: linear-gradient(90deg, var(--accent) var(--w), transparent 0); }
.bars li.own b { color: var(--accent); font-weight: 700; }
.avg-note { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.avg-key { width: 14px; border-top: 1.5px dashed #71717a; }
.night-foot { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.kv { display: flex; flex-direction: column; }
.kv span { font-size: 12px; color: var(--text-3); }
.kv b { font-size: 17px; font-variant-numeric: tabular-nums; }
.kv .neg { font-size: 12px; font-weight: 600; color: #b4460c; }
.save { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--r); background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
.save svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- FAQ */
.faq { background: var(--panel); border-top: 1px solid var(--line); }
.faq-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.qa { display: grid; gap: 10px; }
.qa details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); transition: background .15s, border-color .15s; }
.qa details[open] { background: var(--panel); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.qa summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 18px; position: relative; font-weight: 600; font-size: 15px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ''; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border: solid var(--text-3); border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg); transition: transform .2s var(--ease); }
.qa details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.qa details p { padding: 0 18px 16px; color: var(--text-2); font-size: 14.5px; }
.final { padding-top: 88px; }

/* ---- reveal (only with landing.js; reduced motion skips it) */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-on [data-reveal].in { opacity: 1; transform: none; }

/* ---- small screens: the embedded app is too cramped; offer the full-screen demo instead */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .sec-in, .show-in, .faq-in { grid-template-columns: 1fr; gap: 28px; }
  .stats-in { grid-template-columns: repeat(2, 1fr); }
  .stats-in > div:nth-child(3) { border-left: 0; }
  .stats-in > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .nav-cta .ghost { display: none; }
  .hero { padding-top: 48px; }
  .lead { font-size: 16px; }
  /* The embedded app is too cramped here; the hero's button opens the full-screen demo. */
  .demo { display: none; }
  .grid { grid-template-columns: 1fr; }
  .features, .how, .security, .faq, .final, .showcase { padding: 56px 0; }
  .bars li { grid-template-columns: 108px 1fr 56px; font-size: 12.5px; }
  .bars em { display: none; }
  .bars::after { left: calc(108px + (100% - 164px) * var(--avg)); }
  .save { margin-left: 0; width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .nav, .qa details { transition: none; }
}
