/* CulvertVPN — culvertvpn.com
   Tokens mirror contracts/design-tokens.json so the site and the app are one brand.
   Two typefaces: Bricolage Grotesque (display) and Instrument Sans (text). The Arabic
   page swaps both for IBM Plex Sans Arabic via [lang=ar]. */

:root {
  color-scheme: light dark;
  --bg: #EDF0EF;
  --surface: #F9FBFA;
  --surface2: #F1F5F4;
  --ink: #111917;
  --ink-soft: #2C3836;
  --muted: #5C6A66;
  --rule: #D2DAD7;
  --accent: #0E7C7B;
  --accent-deep: #0A5C5B;
  --accent-wash: #DFEEED;
  --on-accent: #F4FBFA;
  --warn: #B0781C;
  --ring-track: #CFE3E1;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --measure: 62ch;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1413;
    --surface: #141D1C;
    --surface2: #1A2524;
    --ink: #E5ECEA;
    --ink-soft: #C4CFCC;
    --muted: #8A9895;
    --rule: #243331;
    --accent: #4FB3AE;
    --accent-deep: #6FCBC6;
    --accent-wash: #12302F;
    --on-accent: #06201F;
    --warn: #D8A63F;
    --ring-track: #1E3331;
  }
}
[lang="ar"] {
  --display: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --text: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --measure: 58ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.015em; margin: 0; font-weight: 640; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { letter-spacing: 0; line-height: 1.3; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); max-width: 14ch; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); max-width: 22ch; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: 1.2rem; color: var(--ink-soft); }
.muted { color: var(--muted); }

.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
section { padding-block: clamp(3rem, 7vw, 6rem); }
section + section { border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: 0.9rem; margin-bottom: 2.2rem; }

/* ---- header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
header.site .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 640; font-size: 1.15rem; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
nav.primary { margin-inline-start: auto; display: flex; gap: 1.4rem; font-size: 0.95rem; }
nav.primary a { color: var(--ink-soft); text-decoration: none; }
nav.primary a:hover { color: var(--accent-deep); text-decoration: underline; }
.lang { border: 1px solid var(--rule); border-radius: 999px; padding: 0.3rem 0.8rem; text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; }
@media (max-width: 720px) { nav.primary a:not(.lang) { display: none; } }

/* ---- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--text); font-weight: 600; font-size: 1.05rem;
  padding: 0.95rem 1.4rem; border-radius: 14px; text-decoration: none;
  border: 1px solid transparent;
}
.btn:hover { background: var(--accent-deep); color: var(--on-accent); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.secondary { background: transparent; color: var(--accent-deep); border-color: var(--accent); }
.btn.secondary:hover { background: var(--accent-wash); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; align-items: center; margin-top: 2rem; }
.cta-note { font-size: 0.95rem; color: var(--muted); }

/* ---- hero: the one bold element is the connect ring around a real screenshot */
.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero .copy { display: grid; gap: 1.4rem; }
.ring-stage { position: relative; aspect-ratio: 1; width: min(100%, 30rem); margin-inline: auto; display: grid; place-items: center; }
.ring-stage svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-stage .phone {
  width: 52%; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(6, 36, 35, 0.55);
  border: 1px solid var(--rule);
  background: var(--surface);
}
.ring-stage .tag {
  position: absolute; inset-inline-end: 4%; bottom: 8%;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  padding: 0.55rem 0.8rem; font-size: 0.9rem; line-height: 1.35;
  box-shadow: 0 12px 30px -18px rgba(6, 36, 35, 0.5);
}
.ring-stage .tag b { display: block; font-family: var(--display); font-size: 1.05rem; color: var(--accent-deep); }
@media (prefers-reduced-motion: no-preference) {
  .ring-stage svg.ring .arc { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.2,.7,.2,1) 0.2s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .ring-stage { width: min(100%, 22rem); }
}

/* ---- facts under the hero */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.6rem 2.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.facts h3 { font-family: var(--text); font-size: 1.02rem; margin-bottom: 0.3rem; }
.facts p { font-size: 0.98rem; color: var(--muted); }

/* ---- locations table: information, not cards */
table.locations { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 1rem; }
table.locations th, table.locations td { text-align: start; padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.locations th { font-weight: 600; color: var(--muted); font-size: 0.9rem; }
table.locations td.plan { white-space: nowrap; }
.pill { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
.pill.free { background: var(--accent-wash); color: var(--accent-deep); }
.pill.premium { background: var(--surface2); color: var(--ink-soft); border: 1px solid var(--rule); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 0 3rem; }
@media (max-width: 640px) { table.locations { font-size: 0.92rem; } table.locations th, table.locations td { padding: 0.6rem 0.35rem; } .pill { font-size: 0.78rem; padding: 0.1rem 0.5rem; } }

/* ---- how it works: a real sequence, so numbers are information */
ol.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; counter-reset: step; }
ol.steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
ol.steps li::before { content: counter(step); font-family: var(--display); font-weight: 640; font-size: 1.6rem; line-height: 1; color: var(--accent); border: 2px solid var(--accent); border-radius: 50%; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; }
ol.steps h3 { margin-bottom: 0.3rem; }
ol.steps p { color: var(--muted); }

/* ---- honesty */
.plain { display: grid; gap: 1.3rem; max-width: var(--measure); }
.plain dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 1.4rem; margin: 0; }
.plain dt { font-weight: 600; }
.plain dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 560px) { .plain dl { grid-template-columns: 1fr; gap: 0.2rem 0; } .plain dd { margin-bottom: 0.6rem; } }

/* ---- faq */
.faq details { border-top: 1px solid var(--rule); padding: 1rem 0; max-width: 70ch; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--display); font-size: 1.4rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 0.7rem; color: var(--ink-soft); }

/* ---- final cta */
.closing { background: var(--accent-wash); }
.closing .wrap { display: grid; gap: 1.2rem; }

/* ---- footer */
footer.site { border-top: 1px solid var(--rule); padding-block: 2.5rem; font-size: 0.92rem; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-inline-start: auto; }
footer.site a { color: var(--ink-soft); }
