/* RingReplacer marketing site — no framework, no build step.
   Light/dark via prefers-color-scheme; all colors through custom properties. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f6;
  --surface: #ffffff;
  --text: #1c1d1c;
  --muted: #62655f;
  --border: rgba(20, 25, 20, 0.14);
  --accent: #0e6e56;
  --accent-strong: #0a5240;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3ed;
  --warn: #8a5a10;
  --no: #9a3b32;
  --yes: #0e6e56;
  /* Brand wordmark: "Ring" dark green, "Replacer" dark blue (see .rr-name) */
  --rr-green: #0a5c41;
  --rr-blue: #1d4f93;
  --shadow: 0 1px 2px rgba(15, 20, 15, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111312;
    --bg-alt: #181b19;
    --surface: #1d201e;
    --text: #ecedeb;
    --muted: #a4a8a0;
    --border: rgba(235, 240, 235, 0.16);
    --accent: #36b893;
    --accent-strong: #5eccab;
    --accent-ink: #06251c;
    --accent-soft: #143028;
    --warn: #d9a04c;
    --no: #d4756a;
    --yes: #36b893;
    /* Lightened brand hues — the light-mode darks would vanish on a dark background */
    --rr-green: #4cc9a0;
    --rr-blue: #7fb1f5;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong); }
em { font-style: italic; }
.muted { color: var(--muted); }

/* Brand wordmark — every visible "RingReplacer" wears this so a skimming eye can't confuse it
   with RingCentral: bold, "Ring" in green (the inner <b>), "Replacer" in blue.
   Usage: <span class="rr-name"><b>Ring</b>Replacer</span> */
.rr-name { font-weight: 750; color: var(--rr-blue); white-space: nowrap; }
.rr-name b { color: var(--rr-green); font-weight: inherit; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 0 0 var(--radius-sm) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.3rem; color: var(--text); text-decoration: none;
}
.brand-mark { width: 28px; height: 28px; border-radius: 6px; display: block; }
.site-nav { display: flex; gap: 20px; margin-left: auto; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); }

/* ============ Buttons ============ */
.btn {
  display: inline-block; padding: 12px 22px;
  border-radius: 10px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }

/* ============ Hero ============ */
.hero { padding: 72px 0 60px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 48px; align-items: center;
}
.hero-brand {
  font-size: clamp(1.6rem, 3.2vw, 2rem); letter-spacing: -0.01em;
  margin: 0 0 0.4rem; line-height: 1.1;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: 1.15rem; color: var(--muted); }
.hero-ctas { display: flex; gap: 12px; margin: 1.5rem 0; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.hero-points li {
  font-size: 0.92rem; color: var(--muted); position: relative; padding-left: 20px;
}
.hero-points li::before {
  content: "✓"; position: absolute; left: 0; color: var(--yes); font-weight: 700;
}

/* Hero device visual */
.hero-visual { display: flex; justify-content: center; }
.device {
  width: 250px; border: 1px solid var(--border); border-radius: 34px;
  padding: 12px; background: var(--surface); box-shadow: var(--shadow);
}
.device-notch {
  width: 90px; height: 8px; border-radius: 6px;
  background: var(--border); margin: 2px auto 12px;
}
.device-screen {
  border-radius: 22px; background: var(--bg-alt);
  padding: 14px 12px 16px; min-height: 320px;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; font-size: 0.78rem; line-height: 1.35;
  margin-bottom: 6px;
}
.toast-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #1d9e75;
  flex-shrink: 0; margin-top: 4px;
}
.toast-text strong { font-size: 0.8rem; }
.linechip {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--chip);
  border-radius: 10px; padding: 11px 12px;
  font-size: 0.85rem; font-weight: 600;
}
.chip-swatch {
  width: 10px; height: 10px; border-radius: 50%; background: var(--chip);
}
.screen-foot {
  margin-top: auto; text-align: center;
  font-size: 0.72rem; color: var(--muted); padding-top: 8px;
}

/* ============ Sections ============ */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-lede { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }

/* ============ Persona selector ============ */
.persona-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; margin-bottom: 2rem;
}
.persona-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 18px 18px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  font: inherit; color: inherit; text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.persona-btn:hover { border-color: var(--muted); }
.persona-btn[aria-pressed="true"] {
  border: 2px solid var(--accent); background: var(--accent-soft);
  padding: 17px 17px 15px;
}
.persona-btn svg { width: 26px; height: 26px; fill: var(--muted); margin-bottom: 4px; }
.persona-btn[aria-pressed="true"] svg { fill: var(--accent); }
.persona-name { font-weight: 700; font-size: 1.02rem; }
.persona-sub { font-size: 0.85rem; color: var(--muted); }

.persona-panel[hidden] { display: none; }
.panel-pitch { font-size: 1.45rem; margin-top: 0.5rem; }
.panel-intro { color: var(--muted); margin-bottom: 1.5rem; }

.two-col {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px; margin-bottom: 1.5rem;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative; padding-left: 24px; margin: 9px 0;
  font-size: 0.95rem; line-height: 1.5;
}
.checklist li::before {
  content: "•"; position: absolute; left: 6px; color: var(--muted);
}
.checklist.check li::before {
  content: "✓"; left: 0; color: var(--yes); font-weight: 700;
}

.price-strip {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 16px 20px; margin: 1.25rem 0 2rem;
}
.price-big { font-size: 1.9rem; font-weight: 750; letter-spacing: -0.01em; }
.price-unit { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-note { color: var(--muted); font-size: 0.95rem; }

/* ============ Tables ============ */
.table-title { margin-top: 1.5rem; }
.table-wrap { overflow-x: auto; margin-bottom: 0.75rem; }
table {
  width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 540px;
}
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
thead th { font-size: 0.85rem; color: var(--muted); font-weight: 650; }
tbody th { font-weight: 500; }
td { white-space: nowrap; text-align: center; }
thead th:not(:first-child) { text-align: center; }
.rr-col { background: var(--accent-soft); font-weight: 650; }
thead .rr-col { color: var(--accent-strong); }
.yes { color: var(--yes); font-weight: 700; }
.no { color: var(--no); font-weight: 800; font-size: 1.05em; }
.table-foot { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.5rem; }
.honesty {
  border-left: 3px solid var(--warn);
  padding: 4px 0 4px 16px; margin: 1.25rem 0 1.75rem;
  color: var(--muted);
}
.honesty strong { color: var(--text); }

/* ============ Versus callout ============ */
.versus { margin: 0 0 1.75rem; }
.versus-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px 28px; margin-top: 4px;
}
.versus-head {
  font-size: 0.85rem; font-weight: 700; color: var(--muted);
  text-transform: none; margin: 0 0 2px;
}

/* ============ How it works ============ */
.steps {
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; padding: 0; margin: 0 0 1.5rem;
}
.step { position: relative; padding-top: 26px; }
.step-num {
  position: absolute; top: -16px; left: 20px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 750; font-size: 1rem;
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.94rem; color: var(--muted); margin: 0; }
.how-note {
  color: var(--muted); font-size: 0.95rem;
  border-left: 3px solid var(--accent); padding-left: 16px;
}

/* ============ Ownership ============ */
.own-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px 40px;
}
.own-item h3 { font-size: 1.05rem; }
.own-item p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ============ Calculator ============ */
.calc { margin-bottom: 1.5rem; }
.calc-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.calc-row label { font-size: 0.9rem; color: var(--muted); }
.calc-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.calc-row output { font-weight: 750; font-size: 1.1rem; min-width: 2ch; text-align: right; }
.calc-results {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px;
}
.calc-cell {
  background: var(--bg-alt); border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.calc-label { font-size: 0.8rem; color: var(--muted); }
.calc-value { font-size: 1.15rem; font-weight: 700; }
.calc-value.save { color: var(--yes); }

/* ============ Pricing ============ */
.pricing-card { max-width: 720px; margin: 0 auto; padding: 28px 30px; }
.pricing-main {
  display: flex; gap: 36px; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.pricing-figure { display: flex; flex-direction: column; }
.pricing-sub { color: var(--muted); font-size: 0.9rem; }
.pricing-list { margin-bottom: 1.25rem; }
.price-lock {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px; margin: 0 0 1.25rem;
  font-size: 0.98rem;
}
.price-lock em { font-weight: 750; }
.pricing-foot { font-size: 0.88rem; color: var(--muted); }

/* ============ FAQ ============ */
details {
  border-bottom: 1px solid var(--border); padding: 4px 0;
}
summary {
  cursor: pointer; font-weight: 650; font-size: 1.02rem;
  padding: 14px 0; list-style: none; position: relative; padding-right: 28px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 1.3rem; font-weight: 400;
}
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 0 0 16px; }
details a { color: var(--accent); }

/* ============ CTA + footer ============ */
.section-cta { padding: 80px 0; }
.site-footer {
  border-top: 1px solid var(--border); padding: 28px 0; font-size: 0.88rem;
  color: var(--muted);
}
.footer-row {
  display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap;
}
.footer-row nav { display: flex; gap: 18px; }
.footer-row a { color: var(--muted); text-decoration: none; }
.footer-row a:hover { color: var(--text); }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .hero { padding: 44px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; }
  .device { width: 220px; }
  .device-screen { min-height: 260px; }
  .site-nav { display: none; }
  .persona-grid { grid-template-columns: 1fr; }
  .persona-btn { flex-direction: row; align-items: center; gap: 12px; }
  .persona-btn svg { margin-bottom: 0; }
  .persona-name { margin-right: 6px; }
  .section { padding: 48px 0; }
  .pricing-main { gap: 22px; }
}

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