/* ============================================================
   Candor website design system
   Tokens mirror src/lib/ui.ts in the app: light UI, emerald brand.
   ============================================================ */

:root {
  --bg: #f4f4f6;
  --card: #ffffff;
  --text: #17181c;
  --sub: #62666f;
  --body: #4e5158;
  --accent: #087a4d;
  --accent-dark: #0b7a4e;
  --accent-soft: #e7f7f0;
  --pass: #b9233e;
  --border: #ececef;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-card: 0 1px 2px rgba(23, 24, 28, 0.04), 0 12px 32px rgba(23, 24, 28, 0.07);
  --shadow-lift: 0 2px 4px rgba(23, 24, 28, 0.05), 0 20px 48px rgba(23, 24, 28, 0.11);

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 700; }

p { color: var(--body); margin: 0 0 16px; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { color: var(--text); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 244, 246, 0.86);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: auto; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a:not(.btn) {
  color: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
  content: "";
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(16, 169, 108, 0.32);
}
.btn-primary:hover { background: #0e9a62; }

.btn-ghost {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(23, 24, 28, 0.05);
}
.btn-ghost:hover { border-color: #d9dadd; }

.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-radius: 14px;
  background: var(--text);
  color: #fff;
  min-width: 172px;
  text-align: left;
}
.btn-store:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-store svg { flex-shrink: 0; }
.btn-store .store-line1 { display: block; font-size: 0.66rem; opacity: 0.75; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.btn-store .store-line2 { display: block; font-size: 1.02rem; font-weight: 700; }
.btn-store.is-soon {
  background: transparent;
  color: var(--sub);
  border: 1.5px dashed var(--border);
  cursor: default;
}
.btn-store.is-soon:hover { transform: none; box-shadow: none; }

/* ---------- Sections ---------- */

section { padding: 88px 0; }
.section-tight { padding: 56px 0; }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { font-size: 1.08rem; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 76px 0 92px;
  overflow: hidden;
  background:
    radial-gradient(52rem 30rem at 85% -8%, rgba(16, 169, 108, 0.13), transparent 62%),
    radial-gradient(40rem 26rem at -10% 30%, rgba(16, 169, 108, 0.07), transparent 60%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .lead {
  font-size: 1.22rem;
  color: var(--body);
  max-width: 34em;
  margin: 20px 0 30px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero-proof {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  color: var(--sub);
  font-size: 0.9rem;
  font-weight: 600;
}
.hero-proof li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-proof ul { display: contents; }
.check-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.check-dot::after {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent);
  clip-path: polygon(14% 46%, 0 60%, 40% 100%, 100% 16%, 86% 2%, 39% 71%);
}

/* ---------- Phone mockup ---------- */

.phone-stage {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.phone {
  width: 300px;
  border-radius: 42px;
  background: #17181c;
  padding: 10px;
  box-shadow: var(--shadow-lift), 0 40px 90px rgba(16, 169, 108, 0.14);
  transform: rotate(-2deg);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.phone:hover { transform: rotate(0deg) translateY(-4px); }
.phone-screen {
  border-radius: 33px;
  background: var(--bg);
  overflow: hidden;
  height: 596px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 22px;
  border-radius: 999px;
  background: #17181c;
  z-index: 3;
}

.screen-bar {
  padding: 40px 18px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.screen-title { font-weight: 800; font-size: 1.05rem; }
.screen-chip {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 5px 10px;
  border-radius: 999px;
}

.deck {
  flex: 1;
  position: relative;
  margin: 8px 16px;
}
.deck-card {
  position: absolute;
  inset: 0;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.deck-card.under-1 { transform: translate(10px, 12px) rotate(3deg) scale(0.97); opacity: 0.75; z-index: 0; }
.deck-card.top { z-index: 1; }

.deck-photo {
  flex: 1;
  border-radius: 16px;
  background:
    radial-gradient(14rem 12rem at 30% 20%, #d9efe4, transparent),
    linear-gradient(160deg, #cfe9dc 0%, #b7dcc9 55%, #9fcfb6 100%);
  position: relative;
  overflow: hidden;
}
.deck-photo::before,
.deck-photo::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.deck-photo::before {
  width: 74px; height: 74px; left: 50%; top: 34%;
  transform: translate(-50%, 0);
  background: #a8d4bd;
}
.deck-photo::after {
  width: 130px; height: 130px; left: 50%; top: calc(34% + 58px);
  transform: translate(-50%, 0);
  background: #a8d4bd;
  border-radius: 48% 48% 42% 42%;
}
.deck-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 5px 11px;
  color: var(--accent-dark);
  display: flex; align-items: center; gap: 5px;
}
.deck-badge .vdot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.deck-meta { padding: 12px 4px 4px; }
.deck-name { font-weight: 800; font-size: 1rem; }
.deck-sub { color: var(--sub); font-size: 0.82rem; font-weight: 600; }
.deck-intent { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; color: var(--text); background: var(--bg); border-radius: 999px; padding: 5px 11px; }

.deck-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 0 0 16px;
}
.action-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(23, 24, 28, 0.09);
}
.action-btn svg { width: 21px; height: 21px; }
.action-btn.like { color: var(--accent); }
.action-btn.pass { color: var(--pass); }
.action-btn.reply { color: #3d7bf5; }

.composer-note {
  margin: 0 16px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 0.76rem;
  color: var(--body);
  line-height: 1.45;
}
.composer-note b { color: var(--text); }
.composer-count { float: right; color: var(--sub); font-variant-numeric: tabular-nums; }

/* ---------- Feature grid / cards ---------- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.icon-tile {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.icon-tile svg { width: 22px; height: 22px; }
.icon-tile.red { background: #feeef1; color: var(--pass); }
.icon-tile.blue { background: #ebf1fe; color: #3d7bf5; }

.card p:last-child { margin-bottom: 0; }

/* ---------- Steps / timeline ---------- */

.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
}
.step:first-child { border-top: none; }
.step-num {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent-dark);
  position: relative;
}
.step-num::after {
  content: "";
  position: absolute;
  top: 100%; left: 50%;
  width: 2px; height: 30px;
  background: var(--border);
  margin-top: 4px;
}
.step:last-child .step-num::after { display: none; }
.step h3 { margin-bottom: 6px; }
.step p:last-child { margin-bottom: 0; }
.step aside {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--sub);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.step aside b { color: var(--accent-dark); }

/* ---------- Comparison table ---------- */

.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.compare th, .compare td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  vertical-align: top;
}
.compare tr:last-child td { border-bottom: none; }
.compare thead th {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sub);
  background: var(--bg);
}
.compare th[scope="row"] { font-weight: 700; color: var(--text); white-space: normal; width: 30%; }
.compare td.no { color: var(--pass); font-weight: 600; }
.compare td.yes { color: var(--accent-dark); font-weight: 600; }
.compare thead th.col-candor { color: var(--accent-dark); }

/* ---------- Commitments ---------- */

.commit-band {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 52px 48px;
  position: relative;
  overflow: hidden;
}
.commit-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(38rem 22rem at 110% -20%, rgba(16, 169, 108, 0.35), transparent 65%);
  pointer-events: none;
}
.commit-band h2 { color: #fff; }
.commit-band > p { color: rgba(255, 255, 255, 0.72); max-width: 46em; }
.commit-list {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 36px;
  position: relative;
}
.commit-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.98rem;
  line-height: 1.5;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.commit-list li:last-child, .commit-list li:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.commit-list .check-dot { background: rgba(16, 169, 108, 0.25); margin-top: 3px; }
.commit-list .check-dot::after { background: #fff; }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 24, 28, 0.03);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  text-align: left;
  padding: 19px 22px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--text);
}
.faq-q .faq-caret {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease;
}
.faq-q .faq-caret svg { width: 12px; height: 12px; color: var(--accent-dark); }
.faq-a-inner { padding: 0 22px 20px; color: var(--body); }
.faq-a-inner p:last-child { margin-bottom: 0; }
.faq-item[open] .faq-caret { transform: rotate(180deg); }

/* ---------- Split feature rows ---------- */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 46px 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--border); }
.feature-row.flip .feature-media { order: 2; }

.feature-media {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 34px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.stat-row { display: flex; gap: 34px; flex-wrap: wrap; }
.stat .stat-n { font-size: 2rem; font-weight: 800; color: var(--accent-dark); letter-spacing: -0.03em; }
.stat .stat-l { font-size: 0.85rem; color: var(--sub); font-weight: 600; }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--body);
}
.pill.on { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; }

.mini-chat { display: grid; gap: 10px; }
.bubble {
  max-width: 78%;
  border-radius: 16px;
  padding: 11px 15px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.bubble.them { background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 5px; justify-self: start; }
.bubble.me { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; justify-self: end; }
.chat-meta { font-size: 0.72rem; color: var(--sub); font-weight: 600; }

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding: 84px 0;
  background:
    radial-gradient(46rem 26rem at 50% -30%, rgba(16, 169, 108, 0.14), transparent 70%),
    var(--bg);
}
.cta-band h2 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.cta-band p { max-width: 46em; margin-left: auto; margin-right: auto; }
.store-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.store-note { margin-top: 16px !important; font-size: 0.86rem !important; color: var(--sub) !important; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-brand p { font-size: 0.92rem; color: var(--sub); margin-top: 12px; max-width: 30em; }
.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sub);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--body);
  font-size: 0.94rem;
  padding: 4px 0;
}
.footer-col a:hover { color: var(--accent-dark); }
.footer-base {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--sub);
  font-size: 0.85rem;
}

/* ---------- Legal pages ---------- */

.page-hero {
  padding: 64px 0 40px;
}
.page-hero p.meta { color: var(--sub); font-size: 0.92rem; }
.legal-body { max-width: 760px; padding-bottom: 80px; }
.legal-body h2 {
  font-size: 1.12rem;
  margin: 34px 0 10px;
  letter-spacing: -0.01em;
}
.legal-body p { font-size: 0.97rem; }
.notice {
  background: #fdf6e3;
  border: 1px solid #f0e0b0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.92rem;
  color: #6b5b23;
  margin: 26px 0;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 1;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-ctas, .hero-proof { justify-content: center; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .commit-list { grid-template-columns: 1fr; }
  .commit-list li:last-child { border-bottom: none; }
  .commit-list li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid rgba(255,255,255,0.1); }
}

@media (max-width: 760px) {
  section { padding: 64px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 28px; padding: 34px 0; }
  .feature-row.flip .feature-media { order: 0; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px 24px;
    gap: 4px;
    display: none;
    box-shadow: var(--shadow-lift);
  }
  .main-nav.open { display: flex; }
  .main-nav a:not(.btn) { padding: 10px 4px; font-size: 1.02rem; }
  .main-nav .btn { margin-top: 10px; justify-content: center; }

  .compare { font-size: 0.88rem; }
  .compare th, .compare td { padding: 12px 12px; }
  .commit-band { padding: 36px 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .phone { width: 270px; }
  .phone-screen { height: 550px; }
}

.faq-q { list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 4px; }
