/* CacheFlo website — matches the app: deep green-black, one electric mint, system fonts only (nothing downloaded). */

:root {
  --void: #06110c;
  --panel: #0c1c15;
  --panel-2: #10251b;
  --line: #1c3a2b;
  --mint: #4cf7a2;
  --mint-soft: rgba(76, 247, 162, 0.14);
  --green: #17a463;
  --text: #e7f5ed;
  --muted: #93b5a3;
  --review: #f5c451;
  --careful: #ff7d6b;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: 20px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint measurement grid behind everything, like the app's Space Map */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(76, 247, 162, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 247, 162, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
  pointer-events: none;
}

a { color: var(--mint); text-underline-offset: 3px; }
a:hover { color: #8dffc8; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }

img, svg { display: block; max-width: 100%; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--mint); color: var(--void); padding: 8px 14px; border-radius: 8px; font-weight: 600;
}
.skip:focus { left: 8px; z-index: 100; }

/* ---------- type ---------- */

h1, h2, h3 { line-height: 1.08; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); letter-spacing: -0.045em; font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); letter-spacing: -0.035em; }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
.prose { max-width: 44rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.35em; }

/* placeholder text the owner must fill in before launch */
mark.todo {
  background: rgba(245, 196, 81, 0.18);
  color: var(--review);
  border: 1px dashed rgba(245, 196, 81, 0.6);
  border-radius: 4px;
  padding: 0 4px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 17, 12, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(28, 58, 43, 0.7);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 1.15rem; }
.brand img { width: 30px; height: 30px; display: block; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 0.9rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--void); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(28, 58, 43, 0.6); }
  .nav .btn { margin-top: 12px; text-align: center; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn-primary { background: var(--mint); color: #03130b; box-shadow: 0 0 0 0 rgba(76, 247, 162, 0); }
.btn-primary:hover { color: #03130b; background: #7bffbf; box-shadow: 0 0 28px rgba(76, 247, 162, 0.45); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(12, 28, 21, 0.6); }
.btn-ghost:hover { color: var(--text); border-color: var(--green); }
.nav .btn { padding: 8px 16px; font-size: 0.92rem; color: #03130b; }

/* ---------- sections ---------- */

section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 40rem; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.divider { border-top: 1px solid var(--line); }

/* ---------- hero ---------- */

.hero { padding-top: clamp(48px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { max-width: 11em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-note { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .scan { max-width: 420px; margin-inline: auto; } }

/* the scan ring: the app's Smart Scan result in miniature */
.scan { position: relative; }
.scan svg { width: 100%; height: auto; overflow: visible; }
.ring-track { fill: none; stroke: var(--line); }
.ring-seg { fill: none; stroke-linecap: round; }
.ring-sweep { fill: none; stroke: var(--mint); stroke-linecap: round; opacity: 0; }
.streak { stroke-linecap: round; }
.scan-value { fill: var(--text); font: 800 46px var(--sans); letter-spacing: -0.04em; }
.scan-label { fill: var(--muted); font: 500 15px var(--sans); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.c1 { background: #4cf7a2; } .c2 { background: #2bcf86; } .c3 { background: #1c9c62; } .c4 { background: #a9ffd5; }

@media (prefers-reduced-motion: no-preference) {
  .ring-seg { stroke-dasharray: 0 100; animation: fill-seg 1.1s cubic-bezier(.2,.7,.2,1) forwards; }
  .ring-seg.s1 { animation-delay: 0.9s; } .ring-seg.s2 { animation-delay: 1.1s; }
  .ring-seg.s3 { animation-delay: 1.3s; } .ring-seg.s4 { animation-delay: 1.5s; }
  .ring-sweep { animation: sweep 1.1s ease-in-out 0.1s 1 forwards; transform-origin: 200px 200px; }
  .scan-value, .scan-label { opacity: 0; animation: fade 0.6s ease 1.8s forwards; }
  .streak { stroke-dasharray: 120; stroke-dashoffset: 120; animation: streak 0.9s ease-out forwards; }
  .streak.t2 { animation-delay: 0.12s; } .streak.t3 { animation-delay: 0.24s; }
}
.ring-seg.s1 { --len: 38; } .ring-seg.s2 { --len: 21; } .ring-seg.s3 { --len: 15; } .ring-seg.s4 { --len: 9; }
@media (prefers-reduced-motion: reduce) {
  .ring-seg.s1 { stroke-dasharray: 38 100; } .ring-seg.s2 { stroke-dasharray: 21 100; }
  .ring-seg.s3 { stroke-dasharray: 15 100; } .ring-seg.s4 { stroke-dasharray: 9 100; }
}
@keyframes fill-seg { to { stroke-dasharray: var(--len) 100; } }
@keyframes sweep { 0% { opacity: 0.9; transform: rotate(0deg); } 85% { opacity: 0.9; } 100% { opacity: 0; transform: rotate(360deg); } }
@keyframes fade { to { opacity: 1; } }
@keyframes streak { to { stroke-dashoffset: 0; } }

/* ---------- privacy promise strip ---------- */

.promise { padding: 0; }
.promise .wrap {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(16, 37, 27, 0.7), rgba(12, 28, 21, 0.4));
}
.promise .wrap > div { padding: 22px 24px; border-right: 1px solid var(--line); }
.promise .wrap > div:last-child { border-right: 0; }
.promise .wrap > div strong { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.promise .wrap > div span { color: var(--muted); font-size: 0.93rem; line-height: 1.45; display: block; }
@media (max-width: 860px) {
  .promise .wrap { grid-template-columns: 1fr 1fr; }
  .promise .wrap > div:nth-child(2) { border-right: 0; }
  .promise .wrap > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .promise .wrap { grid-template-columns: 1fr; }
  .promise .wrap > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .promise .wrap > div:last-child { border-bottom: 0; }
}

/* ---------- features: a sidebar-like index, like the app ---------- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.feature { background: var(--void); padding: 28px 26px 26px; }
.feature h3 { display: flex; align-items: center; gap: 10px; }
.feature h3 svg { width: 22px; height: 22px; flex: none; color: var(--mint); }
.feature p { color: var(--muted); font-size: 0.97rem; margin: 0; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ---------- how it works (a real sequence) ---------- */

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { position: relative; padding-top: 52px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 0.95rem;
  border: 1.5px solid var(--mint); color: var(--mint); box-shadow: 0 0 18px rgba(76, 247, 162, 0.25);
}
.steps li::after { content: ""; position: absolute; top: 17px; left: 46px; right: -16px; height: 1px; background: linear-gradient(90deg, var(--green), transparent); }
.steps li:last-child::after { display: none; }
.steps p { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } .steps li::after { display: none; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.scale { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid; }
.tag.safe { color: var(--mint); border-color: rgba(76, 247, 162, 0.45); background: var(--mint-soft); }
.tag.review { color: var(--review); border-color: rgba(245, 196, 81, 0.45); background: rgba(245, 196, 81, 0.1); }
.tag.careful { color: var(--careful); border-color: rgba(255, 125, 107, 0.45); background: rgba(255, 125, 107, 0.1); }

/* ---------- stays / leaves ledger ---------- */

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ledger-col { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; background: rgba(12, 28, 21, 0.55); }
.ledger-col.stays { border-color: rgba(76, 247, 162, 0.4); box-shadow: inset 0 0 60px rgba(76, 247, 162, 0.05); }
.ledger-col ul { list-style: none; padding: 0; margin: 0; }
.ledger-col li { padding: 10px 0; border-top: 1px solid rgba(28, 58, 43, 0.7); font-size: 0.97rem; }
.ledger-col li:first-child { border-top: 0; }
.ledger-col li small { display: block; color: var(--muted); font-size: 0.86rem; }
#privacy .ledger + p { margin-top: 22px; }
@media (max-width: 760px) { .ledger { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 820px; }
.plan { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; background: var(--panel); display: flex; flex-direction: column; }
.plan.pick { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint), 0 0 48px rgba(76, 247, 162, 0.16); }
.plan h3 { font-size: 1.15rem; margin-bottom: 2px; }
.plan .price { font-size: 3rem; font-weight: 800; letter-spacing: -0.045em; line-height: 1.1; margin: 14px 0 2px; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 26px; color: var(--muted); font-size: 0.97rem; }
.plan li { padding: 5px 0 5px 24px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 10px; height: 5px; border-left: 2px solid var(--mint); border-bottom: 2px solid var(--mint); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; }
.plan-badge { position: absolute; top: 28px; right: 28px; font-size: 0.8rem; font-weight: 650; color: var(--mint); background: var(--mint-soft); border-radius: 999px; padding: 2px 10px; margin-bottom: 10px; }
.pricing-notes { color: var(--muted); font-size: 0.93rem; margin-top: 22px; max-width: 46rem; }
@media (max-width: 680px) { .plans { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { max-width: 46rem; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 620; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; color: var(--mint); font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-right: 24px; }

/* ---------- tables (privacy & security page) ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 18px 0 30px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 620px; }
th, td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; background: var(--panel); font-size: 0.88rem; }
tr:last-child td { border-bottom: 0; }
td .mono { color: var(--mint); }

/* ---------- page header (inner pages) ---------- */

.page-head { padding: clamp(48px, 7vw, 88px) 0 24px; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.page-body { padding-top: 16px; }
.updated { color: var(--muted); font-size: 0.9rem; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--mint); border-radius: var(--radius-sm); padding: 16px 20px; background: var(--panel); margin: 22px 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- final call ---------- */

.final { text-align: center; }
.final h2 { max-width: 16em; margin-inline: auto; }
.final p { color: var(--muted); }
.final .hero-actions { justify-content: center; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .brand { margin-bottom: 10px; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .wrap > div:first-child { grid-column: 1 / -1; } }

/* coming-soon mode */
.btn-soon { border-color: var(--line); color: var(--muted); background: rgba(12, 28, 21, 0.6); cursor: default; }
.nav .btn-soon { color: var(--muted); }
.soon-pill { display: inline-block; font-size: 0.8rem; font-weight: 650; color: var(--mint); background: var(--mint-soft); border-radius: 999px; padding: 1px 10px; margin-right: 6px; }

/* Test site only (public-dev): a banner on every page */
.test-banner { position: relative; z-index: 60; padding: 8px 16px; text-align: center; font-size: 0.85rem; font-weight: 650; color: #1a1300; background: #ffc24d; }
.test-banner a { color: inherit; text-decoration: underline; }
