/* Rivano website v3. Built on Beki's design system (Beki's work/02-design-system): tokens and rv- components.
   Layout: mobile first at 390px, single column that widens to 2 and 3 column grids; content max 1180px. */
@import url("https://fonts.googleapis.com/css2?family=Jost:wght@500;600;700;800&family=Figtree:wght@400;500;600;700&display=swap");

:root {
  --navy: #0F206C; --orange: #FF9015; --blue: #425CC7; --red: #F93549; --shape-shadow: #070F3A;
  --paper: #FFF6EA; --surface: #FFFFFF; --surface-deep: #0F206C;
  --ink: #0A1030; --ink-muted: #4A5170; --ink-on-deep: #FFFFFF; --ink-on-deep-muted: #B9C0E0;
  --on-orange: #0F206C; --line: #E9DFD0; --line-strong: #8A8FA8; --link: #3A51B8; --focus: #425CC7;
  --success: #13795B; --danger: #C21F33;
  --font-display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;
  --radius-sm: 10px; --radius-md: 16px; --radius-lg: 24px; --radius-pill: 999px;
  --shadow-offset: -8px 8px 0 #070F3A; --shadow-lift: 0 10px 30px rgba(10, 16, 48, .12);
  --tap-min: 48px; --measure: 64ch; --container: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --shape-shadow: #040925; --paper: #081037; --surface: #0F1B5C; --surface-deep: #172A7A;
    --ink: #FFF6EA; --ink-muted: #B9C0E0; --ink-on-deep: #FFF6EA; --line: #25347F; --line-strong: #7C88C4;
    --link: #9DB0FF; --focus: #FFB45C; --success: #5FD3A5; --danger: #FF7A88;
    --shadow-offset: -8px 8px 0 #040925; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --shape-shadow: #040925; --paper: #081037; --surface: #0F1B5C; --surface-deep: #172A7A;
  --ink: #FFF6EA; --ink-muted: #B9C0E0; --ink-on-deep: #FFF6EA; --line: #25347F; --line-strong: #7C88C4;
  --link: #9DB0FF; --focus: #FFB45C; --success: #5FD3A5; --danger: #FF7A88;
  --shadow-offset: -8px 8px 0 #040925; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--container); margin: 0 auto; padding-inline: var(--space-4); }
@media (min-width: 760px) { .wrap { padding-inline: var(--space-6); } }
.section { padding-block: var(--space-7); }
@media (min-width: 760px) { .section { padding-block: var(--space-8); } }
.section--deep { background: var(--surface-deep); color: var(--ink-on-deep); }
.section--deep .rv-heading p, .section--deep .muted { color: var(--ink-on-deep-muted); }
.section--deep .rv-eyebrow { color: var(--ink-on-deep-muted); }
.stack { display: grid; gap: var(--space-6); }
.muted { color: var(--ink-muted); }
.small { font-size: 15px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Components (from Beki's bundle.css) ---- */
.rv-wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: .9; color: var(--ink); font-size: 30px; text-decoration: none; }
.rv-wordmark::after { content: "."; color: var(--orange); }
.rv-wordmark--on-deep { color: var(--ink-on-deep); }
.rv-eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); display: inline-flex; align-items: center; gap: var(--space-2); }
.rv-eyebrow::before { content: ""; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--orange); flex: none; }
.rv-heading { display: grid; gap: var(--space-3); max-width: 760px; }
.rv-heading h2 { font-weight: 700; font-size: clamp(30px, 5vw, 46px); line-height: 1.05; letter-spacing: -0.01em; }
.rv-heading p { color: var(--ink-muted); font-size: 19px; max-width: var(--measure); }
.rv-heading--center { margin-inline: auto; text-align: center; justify-items: center; }

.rv-btn { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap-min); padding: 12px 26px; border-radius: var(--radius-pill); border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease; }
.rv-btn:hover { transform: translateY(-2px); }
.rv-btn--primary { background: var(--orange); color: var(--on-orange); }
.rv-btn--primary:hover { background: #FFA23F; }
.rv-btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.rv-btn--secondary:hover { background: var(--ink); color: var(--paper); }
.rv-btn--on-deep { background: transparent; color: var(--ink-on-deep); border-color: var(--ink-on-deep); }
.rv-btn--on-deep:hover { background: var(--ink-on-deep); color: var(--navy); }
.rv-btn--lg { font-size: 19px; min-height: 58px; padding: 14px 30px; }
.rv-btn--block { width: 100%; }
.rv-btn svg { width: 20px; height: 20px; flex: none; }

.rv-chip { font-size: 12px; font-weight: 600; line-height: 1.4; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.rv-chip--example { background: #FFFFFF; color: #0F206C; border-color: transparent; }
.rv-chip--dark { background: rgba(10, 16, 48, .82); color: #FFFFFF; border-color: transparent; }
.rv-chip--orange { background: var(--orange); color: var(--on-orange); border-color: transparent; }
.rv-dot { display: inline-block; width: 12px; height: 12px; border-radius: var(--radius-pill); background: var(--orange); flex: none; }

.rv-card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.rv-card h3 { font-weight: 700; font-size: 22px; line-height: 1.25; }
.rv-card p { color: var(--ink-muted); }
.rv-card__shape { width: 52px; height: 52px; }

.rv-photo { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--line); min-width: 0; }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; }
.rv-photo--offset { box-shadow: var(--shadow-offset); }
.rv-photo figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; }

.rv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); counter-reset: rvstep; }
.rv-steps li { counter-increment: rvstep; display: grid; grid-template-columns: 52px 1fr; gap: var(--space-4); align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5) var(--space-4) var(--space-4); }
.rv-steps li::before { content: counter(rvstep); width: 52px; height: 52px; border-radius: var(--radius-pill); background: var(--navy); color: #FFFFFF; font-family: var(--font-display); font-weight: 800; font-size: 22px; display: grid; place-items: center; }
.rv-steps li:nth-child(2)::before { background: var(--blue); }
.rv-steps li:nth-child(3)::before { background: var(--orange); color: var(--on-orange); }
.rv-steps li:nth-child(4)::before { background: var(--red); color: var(--navy); }
.rv-steps b { display: block; font-family: var(--font-display); font-size: 20px; line-height: 1.3; margin-bottom: 2px; }
.rv-steps span { color: var(--ink-muted); }
@media (min-width: 900px) { .rv-steps { grid-template-columns: repeat(4, 1fr); } .rv-steps li { grid-template-columns: 1fr; } }

/* ---- Header ---- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: var(--space-4); min-height: 68px; }
.site-nav { display: none; gap: var(--space-5); margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
.site-nav a:hover { color: var(--blue); }
.header-cta { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; }
.header-cta .rv-btn { min-height: 44px; padding: 8px 18px; font-size: 16px; }
.header-call { display: none; }
@media (min-width: 980px) { .site-nav { display: flex; } .header-cta { margin-left: var(--space-5); } .header-call { display: inline-flex; } }

/* Sticky call bar on phones */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: var(--space-2); padding: 10px var(--space-4) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface); box-shadow: var(--shadow-lift); border-top: 1px solid var(--line); }
.callbar .rv-btn { flex: 1; min-height: 48px; padding: 8px 12px; font-size: 16px; }
@media (min-width: 760px) { .callbar { display: none; } }
@media (max-width: 759px) { body { padding-bottom: 76px; } }

/* ---- Hero ---- */
.hero { padding-block: var(--space-6) var(--space-7); }
.hero .wrap { display: grid; gap: var(--space-6); align-items: center; }
.hero h1 { font-weight: 800; font-size: clamp(42px, 8.5vw, 76px); line-height: .95; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero .lead { font-size: 20px; line-height: 1.5; color: var(--ink-muted); max-width: 34ch; margin-top: var(--space-4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hero-promise { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-5); font-weight: 600; font-size: 15px; }
.hero-promise span { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-photo { aspect-ratio: 4 / 3; }
.hero-photo img { object-position: 60% 50%; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; } .hero-photo { aspect-ratio: 5 / 6; } .hero { padding-block: var(--space-7) var(--space-8); } }

/* Supergraphic strip (drawn by js/site.js) */
.supergraphic { background: var(--navy); overflow: hidden; }
.supergraphic svg { display: block; height: 108px; width: auto; min-width: 100%; }
@media (min-width: 760px) { .supergraphic svg { height: 140px; } }

/* ---- Problems ---- */
.problem-grid { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .problem-grid { grid-template-columns: 1fr 1fr; } }
.problem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: grid; min-width: 0; }
.problem .rv-photo { border-radius: 0; aspect-ratio: 16 / 10; }
.problem-body { padding: var(--space-5); display: grid; gap: var(--space-3); }
.problem-body h3 { font-size: 24px; line-height: 1.2; }
.problem-fix { display: flex; gap: var(--space-3); align-items: flex-start; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.problem-fix b { color: var(--ink); }
.fix-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .fix-list { grid-template-columns: 1fr 1fr; } }
.fix-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); }
.fix-list .from { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.fix-list .to { display: block; font-weight: 700; font-family: var(--font-display); font-size: 19px; line-height: 1.3; }
.fix-list .rv-dot { margin-top: 7px; }

/* ---- Services ---- */
.service-grid { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service-grid .rv-card h3 { font-size: 21px; }
.tag-soon { justify-self: start; }

/* ---- Pricing ---- */
.price-block { display: grid; gap: var(--space-5); }
.price-grid { display: grid; gap: var(--space-4); }
@media (min-width: 900px) { .price-grid--3 { grid-template-columns: repeat(3, 1fr); } .price-grid--2 { grid-template-columns: 1.4fr 1fr; } }
.rv-price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: grid; gap: var(--space-4); align-content: start; min-width: 0; position: relative; }
.rv-price h3 { font-size: 24px; }
.rv-price .what { color: var(--ink-muted); font-size: 15px; margin-top: -8px; }
.rv-price__amount { font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.rv-price__amount small { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--ink-muted); }
.rv-price__amount s { font-size: 20px; font-weight: 600; color: var(--ink-muted); text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.rv-price ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-2); }
.rv-price li { display: flex; gap: var(--space-2); align-items: baseline; }
.rv-price li::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--blue); flex: none; transform: translateY(-2px); }
.rv-price__note { font-size: 15px; color: var(--ink-muted); }
.rv-price--featured { border: 3px solid var(--orange); }
.rv-price .badge { position: absolute; top: -14px; left: var(--space-5); }
.price-group-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.price-group-title h3 { font-size: 24px; }
.founding { display: flex; gap: var(--space-3); align-items: center; background: var(--orange); color: var(--on-orange); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); font-weight: 600; }
.founding b { font-family: var(--font-display); font-size: 20px; }
.founding .rings { display: flex; gap: 6px; flex: none; }
.founding .rings i { width: 22px; height: 22px; border-radius: 50%; border: 6px solid var(--navy); }
.extras { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.extras .rv-chip { font-size: 14px; padding: 6px 12px; }

/* ---- Categories ---- */
.cat-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat { display: grid; gap: var(--space-2); align-content: start; text-decoration: none; color: var(--ink-on-deep); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-lg); padding: var(--space-4); min-height: 120px; transition: background-color .15s ease, transform .15s ease; }
.cat:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.cat b { font-family: var(--font-display); font-size: 19px; line-height: 1.2; }
.cat span { font-size: 14px; color: var(--ink-on-deep-muted); }
.cat svg { width: 30px; height: 30px; }
.cat--ask { border-style: dashed; }

/* ---- FAQ ---- */
.faq { display: grid; gap: var(--space-2); max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 var(--space-5); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; min-height: 60px; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); flex: none; transition: transform .2s ease; }
.faq details[open] summary::after { transform: scale(1.4); background: var(--blue); }
.faq details p { padding-bottom: var(--space-4); color: var(--ink-muted); max-width: var(--measure); }

/* ---- Contact ---- */
.contact-grid { display: grid; gap: var(--space-6); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.call-card { background: var(--surface-deep); color: var(--ink-on-deep); border-radius: var(--radius-lg); padding: var(--space-5); display: grid; gap: var(--space-3); }
.call-card .number { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.call-card p { color: var(--ink-on-deep-muted); }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: grid; gap: var(--space-4); }
.form-row { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.rv-field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.rv-field label, .rv-field legend { font-weight: 600; font-size: 16px; padding: 0; }
.rv-field .rv-help { font-size: 15px; color: var(--ink-muted); font-weight: 400; }
.rv-input, .rv-textarea { font: inherit; font-size: 17px; color: var(--ink); background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius-sm); min-height: var(--tap-min); padding: 10px 14px; width: 100%; }
.rv-textarea { min-height: 110px; resize: vertical; }
.rv-field--error .rv-input { border-color: var(--danger); }
.rv-error { font-size: 15px; font-weight: 600; color: var(--danger); }
.rv-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.rv-choice { position: relative; }
.rv-choice input { position: absolute; opacity: 0; inset: 0; }
.rv-choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: var(--radius-pill); border: 2px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 15px; cursor: pointer; }
.rv-choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.rv-choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-done { background: var(--surface); border: 3px solid var(--orange); border-radius: var(--radius-lg); padding: var(--space-5); display: grid; gap: var(--space-2); }
.form-done h3 { font-size: 24px; }

/* ---- About ---- */
.about { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1.1fr; } }
.about-photo { aspect-ratio: 1; border-radius: var(--radius-pill); background: var(--blue); display: grid; place-items: center; text-align: center; color: #FFFFFF; position: relative; overflow: hidden; box-shadow: var(--shadow-offset); max-width: 460px; width: 100%; justify-self: center; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo .placeholder { display: grid; gap: var(--space-2); padding: var(--space-6); font-weight: 600; }
.about-photo .placeholder b { font-family: var(--font-display); font-size: 28px; }
.about-text { display: grid; gap: var(--space-4); max-width: 60ch; }
.about-text h2 { font-size: clamp(30px, 5vw, 44px); line-height: 1.05; }
.sign { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.draft-flag { border: 2px dashed var(--orange); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); font-size: 14px; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--orange) 12%, transparent); }

/* ---- CTA band + footer ---- */
.cta-band { background: var(--orange); color: var(--on-orange); }
.cta-band .wrap { display: grid; gap: var(--space-4); justify-items: start; }
.cta-band h2 { font-size: clamp(32px, 6vw, 54px); line-height: 1; font-weight: 800; letter-spacing: -0.02em; max-width: 18ch; }
.cta-band .rv-btn--navy { background: var(--navy); color: #FFFFFF; }
.site-footer { background: var(--surface-deep); color: var(--ink-on-deep-muted); padding-block: var(--space-7); font-size: 15px; }
.site-footer .wrap { display: grid; gap: var(--space-5); }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer a { color: var(--ink-on-deep); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer h3 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-on-deep); margin-bottom: var(--space-2); }

/* ---- Category page ---- */
.crumbs { font-size: 15px; color: var(--ink-muted); }
.crumbs a { color: var(--ink-muted); }
.cat-hero .wrap { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .cat-hero .wrap { grid-template-columns: 1.1fr 1fr; } }
.cat-hero h1 { font-weight: 800; font-size: clamp(38px, 7vw, 64px); line-height: .98; letter-spacing: -0.025em; }
.cat-hero .lead { font-size: 20px; color: var(--ink-muted); margin-top: var(--space-4); max-width: 36ch; }
.cat-hero .rv-photo { aspect-ratio: 4 / 3; }
.cat-art { background: var(--navy); border-radius: var(--radius-lg); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow-offset); }
.cat-art svg { width: 86%; height: auto; }
.pain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
@media (min-width: 900px) { .pain-list { grid-template-columns: repeat(3, 1fr); } }
.pain-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: grid; gap: var(--space-2); align-content: start; }
.pain-list .q { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.25; }
.pain-list .a { color: var(--ink-muted); }
.pain-list .a b { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .rv-btn, .cat, .faq summary::after { transition: none; } .rv-btn:hover, .cat:hover { transform: none; } }
