/* ============================================================
   CERVOPS — Landing Page Styles
   ============================================================ */

/* --- Reset & base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light dark;

  /* Semantic tokens — light theme (default) */
  --bg:             #ffffff;
  --bg-alt:         #f7f7f5;
  --surface:        #ffffff;
  --border:         #eeede9;
  --border-strong:  #c4c3bc;
  --text:           #0f0f0f;
  --text-secondary: #4a4a46;
  --text-muted:     #88877f;
  --text-faint:     #c4c3bc;

  --accent:     #1a6aff;
  --accent-dk:  #0051d4;
  --accent-lt:  #e8f0ff;
  --on-accent:  #ffffff;
  --success:    #16a34a;
  --success-bg: #f0fdf4;
  --danger:     #dc2626;

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Dark theme — follows the OS/browser preference automatically,
   unless overridden by the manual toggle (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:             #0f0f0f;
    --bg-alt:         #1a1a1a;
    --surface:        #1e1e20;
    --border:         #2a2a28;
    --border-strong:  #4a4a46;
    --text:           #f5f5f3;
    --text-secondary: #c4c3bc;
    --text-muted:     #93928a;
    --text-faint:     #55544e;

    --accent-dk:  #4c8dff;
    --accent-lt:  #16233d;
    --success:    #4ade80;
    --success-bg: #0f2e1a;
    --danger:     #f87171;
  }
}

/* Manual override wins regardless of system preference */
:root[data-theme="dark"] {
  --bg:             #0f0f0f;
  --bg-alt:         #1a1a1a;
  --surface:        #1e1e20;
  --border:         #2a2a28;
  --border-strong:  #4a4a46;
  --text:           #f5f5f3;
  --text-secondary: #c4c3bc;
  --text-muted:     #93928a;
  --text-faint:     #55544e;

  --accent-dk:  #4c8dff;
  --accent-lt:  #16233d;
  --success:    #4ade80;
  --success-bg: #0f2e1a;
  --danger:     #f87171;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s, color 0.2s;
}

/* --- Utilities --------------------------------------------- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* --- Buttons ----------------------------------------------- */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-dk); }

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--text-secondary); color: var(--text); }

.btn-full { width: 100%; text-align: center; }

/* --- Nav --------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

/* So a same-page anchor link (#features, #waitlist) doesn't land
   with its heading tucked under the sticky header. */
#problems, #features, #pricing, #waitlist {
  scroll-margin-top: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-full,
.logo-compact {
  display: inline-flex;
  align-items: center;
}
.logo-compact { display: none; }

/* Each logo asset has a light and dark version; swap follows the
   same effective theme as the rest of the page (system preference,
   or the manual override below). Kept separate from the full/compact
   size-swap above so the two axes don't collide on a shared class. */
.theme-dark-only { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-light-only { display: none; }
  :root:not([data-theme="light"]) .theme-dark-only { display: inline-block; }
}
:root[data-theme="dark"] .theme-light-only { display: none; }
:root[data-theme="dark"] .theme-dark-only { display: inline-block; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
.theme-toggle:hover { color: var(--text); background: var(--bg-alt); }
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle.is-dark .icon-moon { display: none; }
.theme-toggle.is-dark .icon-sun { display: block; }

.nav-cta {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.nav-cta:hover { text-decoration: underline; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.lang-switch a:hover { color: var(--text); }

.lang-switch a.lang-current {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Hero -------------------------------------------------- */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  max-width: 600px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: var(--accent-lt);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Problems ---------------------------------------------- */
.problems {
  background: var(--bg-alt);
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problems h2 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  line-height: 1.25;
}

.prob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.prob-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.prob-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 0.75rem;
}

.prob-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.prob-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Features ---------------------------------------------- */
.features {
  padding: 5rem 0;
}

.features h2 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  line-height: 1.25;
}

.feat-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feat-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.feat-item:last-child { border-bottom: none; }

.feat-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  min-width: 28px;
  padding-top: 3px;
}

.feat-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.feat-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Pricing ----------------------------------------------- */
.pricing {
  background: var(--bg-alt);
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pricing h2 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.pricing-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 15px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.price-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.price-amount {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.price-amount span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}

.price-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.price-badge {
  background: var(--accent-lt);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.price-features {
  list-style: none;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.price-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.price-features li:last-child { border-bottom: none; }

.check {
  color: var(--success);
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}

/* --- Waitlist ---------------------------------------------- */
.waitlist {
  padding: 5rem 0;
}

.waitlist-inner {
  max-width: 560px;
}

.waitlist h2 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.waitlist > .waitlist-inner > p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.waitlist-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s;
}
.waitlist-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.waitlist-form input::placeholder { color: var(--text-muted); }

.error-msg {
  font-size: 13px;
  color: var(--danger);
  display: none;
}
.error-msg.visible { display: block; }

.success-msg {
  font-size: 14px;
  color: var(--success);
  font-weight: 500;
  display: none;
  text-align: center;
  padding: 12px;
  background: var(--success-bg);
  border-radius: var(--radius-sm);
}
.success-msg.visible { display: block; }

/* --- Footer ------------------------------------------------ */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
}

.cookie-settings-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: underline;
}
.cookie-settings-link:hover { color: var(--text); }

/* --- Cookie consent banner ----------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.cookie-banner p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-actions .btn-primary,
.cookie-actions .btn-ghost {
  padding: 8px 18px;
  font-size: 14px;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .price-top { flex-direction: column; }
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .nav-right { gap: 0.5rem; }
  .lang-switch { gap: 6px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
  /* The wordmark is ~160px wide (min. brand height 32px, 5:1 aspect) —
     too wide to share a row with the language switcher and CTA on a
     phone. Swap to the square icon mark below 560px instead. */
  .logo-full { display: none; }
  .logo-compact { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { transition: none; }
}
