/* UptimePilot landing page. Colours mirror the app's "Modern Light" tokens
   (website_monitor/apps/web/app/globals.css); values are HSL triplets so rules can add alpha. */
:root {
  --bg: 228 38% 97%;
  --surface: 0 0% 100%;
  --border: 231 23% 94%;
  --border-strong: 233 19% 91%;
  --fg: 232 22% 14%;
  --muted: 228 12% 42%;
  --subtle: 229 11% 47%;
  --primary: 254 85% 60%;
  --primary-hover: 254 77% 55%;
  --primary-soft: 256 100% 96%;
  --on-primary: 0 0% 100%;
  --link: 254 80% 56%;
  --hover: 240 25% 97%;
  --shadow: 230 40% 15%;

  --up: 142 71% 45%;
  --up-text: 142 72% 29%;
  --up-wash: 140 60% 96%;
  --up-line: 142 55% 87%;
  --down-text: 0 74% 45%;
  --down-wash: 0 86% 97%;
  --down-line: 0 85% 91%;
  --warn: 38 92% 50%;
  --warn-text: 26 90% 37%;
  --warn-wash: 33 100% 96%;
  --warn-line: 34 94% 88%;
  --info-text: 224 76% 48%;
  --info-wash: 220 100% 97%;
  --info-line: 220 100% 92%;
  --iris-text: 263 70% 50%;
  --iris-wash: 255 100% 97%;
  --iris-line: 254 100% 92%;

  --radius-card: 16px;
  --card-shadow: 0 1px 2px hsl(var(--shadow) / 0.04), 0 8px 24px -14px hsl(var(--shadow) / 0.12);
  --pop-shadow: 0 12px 32px -12px hsl(var(--shadow) / 0.3), 0 2px 6px -2px hsl(var(--shadow) / 0.1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: 225 21% 8%;
    --surface: 228 26% 12%;
    --border: 228 21% 19%;
    --border-strong: 228 20% 24%;
    --fg: 234 30% 94%;
    --muted: 229 15% 69%;
    --subtle: 228 14% 60%;
    --primary: 252 100% 71%;
    --primary-hover: 252 100% 77%;
    --primary-soft: 250 42% 19%;
    --on-primary: 225 21% 8%;
    --link: 253 100% 77%;
    --hover: 228 24% 16%;
    --shadow: 0 0% 0%;

    --up-text: 142 69% 58%;
    --up-wash: 146 45% 11%;
    --up-line: 145 45% 20%;
    --down-text: 0 94% 82%;
    --down-wash: 355 38% 13%;
    --down-line: 355 45% 25%;
    --warn: 43 96% 56%;
    --warn-text: 45 97% 64%;
    --warn-wash: 36 41% 12%;
    --warn-line: 36 60% 22%;
    --info-text: 212 96% 78%;
    --info-wash: 218 51% 15%;
    --info-line: 218 56% 27%;
    --iris-text: 251 91% 85%;
    --iris-wash: 249 38% 16%;
    --iris-line: 252 40% 31%;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: hsl(var(--surface));
  color: hsl(var(--fg));
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p { margin: 0; }
a { color: hsl(var(--link)); }
img, svg { display: block; }
:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 8px 14px; border-radius: 10px; background: hsl(var(--primary)); color: hsl(var(--on-primary)); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }
.muted { color: hsl(var(--muted)); }
.subtle { color: hsl(var(--subtle)); }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; height: 44px; margin-top: auto; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--on-primary)); box-shadow: 0 10px 24px -12px hsl(var(--primary)); }
.btn-primary:hover { background: hsl(var(--primary-hover)); }
.btn-secondary { background: hsl(var(--surface)); color: hsl(var(--fg)); border-color: hsl(var(--border-strong)); }
.btn-secondary:hover { background: hsl(var(--hover)); }
.btn-ghost { background: transparent; color: hsl(var(--fg)); }
.btn-ghost:hover { background: hsl(var(--hover)); }
.btn-white { background: #fff; color: hsl(254 70% 45%); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35); }
.btn-white:hover { background: rgba(255, 255, 255, 0.9); }
.btn-lg:hover { transform: translateY(-1px); }
.linkbtn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.linkbtn:hover { color: hsl(var(--fg)); }

/* Header */
.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--surface) / 0.9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.topbar-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: hsl(var(--fg)); font-weight: 800; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; }
.brand .mark { width: 32px; height: 32px; flex: none; }
.nav { display: none; gap: 28px; font-size: 15px; font-weight: 600; }
.nav a { color: hsl(var(--muted)); text-decoration: none; transition: color 0.15s ease; }
.nav a:hover { color: hsl(var(--fg)); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.menu { position: relative; }
.menu summary { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: hsl(var(--fg)); list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: hsl(var(--hover)); }
.menu nav { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; display: grid; width: 192px; padding: 6px; border: 1px solid hsl(var(--border)); border-radius: 14px; background: hsl(var(--surface)); box-shadow: var(--pop-shadow); }
.menu nav a { padding: 10px 12px; border-radius: 10px; color: hsl(var(--fg)); font-weight: 600; text-decoration: none; }
.menu nav a:hover { background: hsl(var(--hover)); }
.hide-xs { display: none; }
@media (min-width: 420px) { .hide-xs { display: inline-flex; } .topbar-actions { gap: 8px; } }
@media (min-width: 900px) { .nav { display: flex; } .menu { display: none; } }

/* Hero */
.hero { background: linear-gradient(180deg, hsl(var(--primary-soft)) 0%, hsl(var(--surface)) 78%); }
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-top: 56px; padding-bottom: 80px; text-align: center; }
@media (min-width: 640px) { .hero-inner { padding-top: 80px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; background: hsl(var(--primary-soft)); color: hsl(var(--link)); font-size: 13px; font-weight: 700; box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.15); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--up)); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 hsl(var(--up) / 0.5); } 70%, 100% { box-shadow: 0 0 0 7px hsl(var(--up) / 0); } }
h1 { max-width: 920px; font-size: 40px; line-height: 1.06; font-weight: 800; letter-spacing: -0.035em; text-wrap: balance; }
@media (min-width: 640px) { h1 { font-size: 60px; } }
.accent { color: hsl(var(--primary)); }
.lead { max-width: 640px; font-size: 17px; line-height: 1.65; color: hsl(var(--muted)); text-wrap: pretty; }
@media (min-width: 640px) { .lead { font-size: 18px; } }
.cta-row { display: flex; flex-direction: column; gap: 12px; width: 100%; }
@media (min-width: 640px) { .cta-row { flex-direction: row; justify-content: center; width: auto; } }
.fine { font-size: 13px; color: hsl(var(--subtle)); }

/* Product preview (sample data, drawn in markup) */
.preview { margin: 24px 0 0; width: 100%; max-width: 1040px; padding: 12px; border: 1px solid hsl(var(--border)); border-radius: 22px; background: hsl(var(--bg)); text-align: left; box-shadow: 0 30px 80px -30px hsl(var(--primary) / 0.35); }
@media (min-width: 640px) { .preview { padding: 14px; } }
.preview-inner { display: flex; gap: 14px; }
.preview-rail { display: none; flex: none; flex-direction: column; gap: 6px; width: 170px; padding: 14px; border-radius: 14px; background: hsl(var(--surface)); font-size: 12px; }
@media (min-width: 768px) { .preview-rail { display: flex; } }
.rail-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; font-weight: 800; }
.rail-brand svg { width: 24px; height: 24px; }
.rail-item { padding: 4px 10px; color: hsl(var(--muted)); }
.rail-item.active { padding: 6px 10px; border-radius: 10px; background: hsl(var(--primary-soft)); color: hsl(var(--link)); font-weight: 700; }
.preview-main { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 12px; }
.greet { padding: 4px 4px 0; font-size: 15px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 12px; border: 1px solid; border-radius: 14px; }
.stat b { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .stat b { font-size: 20px; } }
.stat span { font-size: 12px; font-weight: 700; }
.tone-up { background: hsl(var(--up-wash)); color: hsl(var(--up-text)); border-color: hsl(var(--up-line)); }
.tone-info { background: hsl(var(--info-wash)); color: hsl(var(--info-text)); border-color: hsl(var(--info-line)); }
.tone-warn { background: hsl(var(--warn-wash)); color: hsl(var(--warn-text)); border-color: hsl(var(--warn-line)); }
.tone-iris { background: hsl(var(--iris-wash)); color: hsl(var(--iris-text)); border-color: hsl(var(--iris-line)); }
.tone-down { background: hsl(var(--down-wash)); color: hsl(var(--down-text)); border-color: hsl(var(--down-line)); }
.rows { display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: hsl(var(--surface)); }
.row { display: grid; grid-template-columns: 48px minmax(0, 104px) minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 12px; }
@media (min-width: 640px) { .row { grid-template-columns: 60px 150px minmax(0, 1fr) 60px; gap: 12px; } }
.row .up { color: hsl(var(--up-text)); font-weight: 800; }
.row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.row .pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bars { display: flex; gap: 2px; height: 14px; }
.bars i { flex: 1; border-radius: 2px; background: hsl(var(--up)); }
.bars i.blip { background: hsl(var(--warn)); }
@media (max-width: 639px) { .bars i:nth-child(-n+12) { display: none; } }

/* Sections */
.section { padding: 80px 0; scroll-margin-top: 64px; }
.section-alt { background: hsl(var(--bg)); }
.section-head { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 672px; margin: 0 auto; text-align: center; }
.section-head p { color: hsl(var(--muted)); }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: hsl(var(--primary-soft)); color: hsl(var(--link)); font-size: 13px; font-weight: 700; }
h2 { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; }
@media (min-width: 640px) { h2 { font-size: 38px; } }
h3 { font-size: 17px; font-weight: 800; }

.grid { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 640px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps { padding: 0; list-style: none; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { padding: 24px; border: 1px solid hsl(var(--border)); border-radius: var(--radius-card); background: hsl(var(--surface)); box-shadow: var(--card-shadow); }
.card h3 { margin-top: 16px; }
.card p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: hsl(var(--muted)); }
.tile { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 0; }
.tile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile-sm { width: 36px; height: 36px; flex: none; }
.tile-sm svg { width: 16px; height: 16px; }
.step { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: hsl(var(--primary)); color: hsl(var(--on-primary)); font-weight: 800; font-variant-numeric: tabular-nums; }
.note-card { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 16px 20px; }
.note-card p { margin: 0; font-size: 14px; }
.note-card strong { color: hsl(var(--fg)); }

.checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin: 32px 0 0; padding: 0; list-style: none; font-size: 14px; color: hsl(var(--muted)); }
.checks li { display: inline-flex; align-items: center; gap: 6px; }
.checks li:not(.checks-label)::before { content: ""; width: 14px; height: 14px; background: hsl(var(--up)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.checks-label { font-weight: 600; color: hsl(var(--fg)); }

/* Pricing */
.cycle { display: flex; width: max-content; max-width: 100%; margin: 32px auto 0; padding: 4px; gap: 2px; border-radius: 14px; background: hsl(var(--hover)); box-shadow: inset 0 0 0 1px hsl(var(--border)); }
.cycle button { padding: 8px 16px; border: 0; border-radius: 10px; background: transparent; color: hsl(var(--muted)); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.cycle button:hover { color: hsl(var(--fg)); }
.cycle button[aria-pressed="true"] { background: hsl(var(--surface)); color: hsl(var(--link)); box-shadow: 0 1px 2px hsl(var(--shadow) / 0.08); }
.cycle small { margin-left: 6px; font-size: 12px; color: hsl(var(--up-text)); }
.plans { margin-top: 32px; }
.plan { display: flex; flex-direction: column; }
.plan h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; }
.badge { padding: 2px 10px; border-radius: 999px; background: hsl(var(--primary-soft)); color: hsl(var(--link)); font-size: 12px; font-weight: 700; }
.plan .price { display: flex; align-items: baseline; gap: 6px; margin-top: 16px; color: hsl(var(--fg)); }
.price b { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price span { font-size: 14px; color: hsl(var(--subtle)); }
.plan .price-note { min-height: 20px; margin-top: 4px; font-size: 12px; color: hsl(var(--subtle)); font-variant-numeric: tabular-nums; }
.ticks { display: grid; gap: 10px; margin: 20px 0 24px; padding: 20px 0 0; border-top: 1px solid hsl(var(--border)); list-style: none; font-size: 14px; color: hsl(var(--muted)); }
.ticks li { display: flex; align-items: flex-start; gap: 8px; }
.ticks li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; background: hsl(var(--up)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.popular { border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15), 0 20px 40px -20px hsl(var(--primary) / 0.45); }
#pricing .fine { margin-top: 24px; font-size: 12px; }

/* FAQ */
.faq { display: grid; gap: 40px; }
@media (min-width: 1024px) { .faq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 64px; } }
.faq h2 { margin-top: 16px; }
.faq .muted { margin-top: 12px; font-size: 14px; }
.faq .muted a, .faq-list a { font-weight: 600; text-decoration: none; }
.faq .muted a:hover, .faq-list a:hover { text-decoration: underline; }
.faq-list { display: grid; gap: 12px; align-content: start; }
.faq-list details { padding: 0 20px; border: 1px solid hsl(var(--border)); border-radius: var(--radius-card); background: hsl(var(--surface)); box-shadow: var(--card-shadow); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; font-weight: 700; list-style: none; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary i { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: hsl(var(--primary-soft)); color: hsl(var(--link)); transition: transform 0.2s ease; }
.faq-list summary i::before, .faq-list summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); }
.faq-list summary i::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-list details[open] summary i { transform: rotate(45deg); }
.faq-list details p { margin-top: -4px; padding: 0 32px 20px 0; font-size: 15px; line-height: 1.6; color: hsl(var(--muted)); }

/* Final CTA */
.final { padding: 64px 0; }
@media (min-width: 640px) { .final { padding: 80px 0; } }
.final-card { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 24px; border-radius: 22px; background: linear-gradient(135deg, hsl(254 85% 58%) 0%, hsl(258 90% 66%) 100%); color: #fff; text-align: center; }
@media (min-width: 640px) { .final-card { padding: 64px 24px; } }
.final-card p { max-width: 448px; color: rgba(255, 255, 255, 0.85); }
.final-card .btn { margin-top: 8px; }
.final-card small { font-size: 12px; color: rgba(255, 255, 255, 0.72); }

/* Footer */
.footer { border-top: 1px solid hsl(var(--border)); }
.footer-inner { display: flex; flex-direction: column; gap: 24px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; color: hsl(var(--muted)); }
@media (min-width: 900px) { .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.footer-brand .brand { font-size: 16px; }
.footer-brand .mark { width: 28px; height: 28px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: inherit; text-decoration: none; }
.footer-nav a:hover { color: hsl(var(--fg)); }

/* Cookie consent */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; max-width: 480px; margin: 0 auto; padding: 14px 16px; border: 1px solid hsl(var(--border)); border-radius: 16px; background: hsl(var(--surface)); box-shadow: var(--pop-shadow); font-size: 14px; }
.consent[hidden] { display: none; }
.consent p { margin-bottom: 12px; color: hsl(var(--muted)); }
.consent-actions { display: flex; gap: 8px; }
@media (min-width: 640px) { .consent { left: 16px; right: auto; bottom: 16px; margin: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.notfound { min-height: 100vh; }
