/* PrevidaHub — dark theme, rose-gold & gold accents */
:root {
  --bg: #0b0a0b;
  --bg-2: #121012;
  --surface: #17141a;
  --surface-2: #1e1a21;
  --line: #2b2530;
  --text: #f3ece8;
  --muted: #b1a6a8;
  --faint: #7d7275;
  --rose: #e7b3a3;
  --rose-deep: #b76e79;
  --gold: #d9b56b;
  --gold-soft: #f1d9a4;
  --grad: linear-gradient(135deg, #f1d9a4 0%, #e7b3a3 45%, #b76e79 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .55);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--rose); text-decoration: none; }
a:hover { color: var(--gold-soft); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.gold-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
section { padding-block: clamp(56px, 9vw, 104px); }
.eyebrow { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 14px; display: inline-block; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); border: 0; margin: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 11, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); padding: 8px 14px; border-radius: 999px; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 42px; height: 38px; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 14px; border-radius: 10px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem; border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #1a1112; box-shadow: 0 8px 28px rgba(231, 179, 163, .25); }
.btn-primary:hover { color: #1a1112; box-shadow: 0 10px 34px rgba(231, 179, 163, .4); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--rose-deep); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-btn { display: inline-flex; align-items: center; gap: 12px; background: #000; color: #fff; border: 1px solid #3a3338; border-radius: 14px; padding: 9px 18px 9px 14px; min-width: 180px; transition: border-color .2s, transform .15s; }
.store-btn:hover { color: #fff; border-color: var(--rose); transform: translateY(-1px); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; font-size: 1.12rem; font-weight: 600; }
.store-btn small { font-size: .68rem; font-weight: 500; opacity: .8; }
.store-btn.disabled { opacity: .55; pointer-events: none; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 104px); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto 40%; height: 900px;
  background: radial-gradient(closest-side, rgba(183, 110, 121, .28), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 20% auto auto -20%; width: 700px; height: 700px;
  background: radial-gradient(closest-side, rgba(217, 181, 107, .12), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 30px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 38px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--serif); font-size: 1.7rem; }
.hero-stats span { color: var(--faint); font-size: .85rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero .phone { width: min(240px, 62vw); } }

/* Phone mockup with cross-fading screens */
.hero-visual { display: flex; justify-content: center; gap: 20px; }
.phone {
  position: relative; width: min(300px, 70vw); aspect-ratio: 1206 / 2622;
  border-radius: 46px; padding: 11px; background: linear-gradient(160deg, #3a2f33, #141114 40%, #2a2226);
  box-shadow: var(--shadow), 0 0 0 1px rgba(231, 179, 163, .18), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #000; }
.phone .screen img, .phone .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slides img { opacity: 0; animation: fade 24s infinite; }
.slides img:nth-child(1) { animation-delay: 0s; }
.slides img:nth-child(2) { animation-delay: -20s; }
.slides img:nth-child(3) { animation-delay: -16s; }
.slides img:nth-child(4) { animation-delay: -12s; }
.slides img:nth-child(5) { animation-delay: -8s; }
.slides img:nth-child(6) { animation-delay: -4s; }
@keyframes fade { 0% { opacity: 1; transform: none; } 14% { opacity: 1; } 17% { opacity: 0; } 97% { opacity: 0; transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
.phone.sm { width: min(220px, 42vw); border-radius: 36px; padding: 9px; }
.phone.sm .screen { border-radius: 28px; }
.phone.tilt { transform: rotate(-4deg) translateY(30px); }
@media (prefers-reduced-motion: reduce) {
  .slides img { animation: none; }
  .slides img:first-child { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* Cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(231, 179, 163, .35); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }
.icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px; background: rgba(231, 179, 163, .1); border: 1px solid rgba(231, 179, 163, .22); color: var(--rose); }
.icon svg { width: 22px; height: 22px; }

/* App cards on the home page */
.app-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: var(--text); }
.app-card:hover { color: var(--text); transform: translateY(-3px); }
.app-card .shot { position: relative; height: 300px; overflow: hidden; background: radial-gradient(circle at 50% 120%, rgba(183, 110, 121, .35), transparent 60%), var(--bg-2); display: flex; justify-content: center; padding-top: 30px; }
.app-card .shot img { width: 62%; height: 100%; border-radius: 22px 22px 0 0; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .08); border-bottom: 0; object-fit: cover; object-position: top; }
.app-card .body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.app-card .body p { color: var(--muted); }
.app-card .more { margin-top: auto; color: var(--rose); font-weight: 600; font-size: .95rem; }
.tag { display: inline-block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.live { color: #9fe0b6; border-color: rgba(159, 224, 182, .3); background: rgba(159, 224, 182, .06); }
.tag.soon { color: var(--gold-soft); border-color: rgba(217, 181, 107, .35); background: rgba(217, 181, 107, .06); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* Feature rows (app pages) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.rev > :first-child { order: 2; }
.split .visual { display: flex; justify-content: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.rev > :first-child { order: 0; } }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; color: var(--muted); }
.checklist li strong { color: var(--text); font-weight: 600; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: var(--grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.6 6.1-4.2 4.2a.8.8 0 0 1-1.1 0L4.4 8.4a.8.8 0 1 1 1.1-1.1l1.4 1.4 3.6-3.7a.8.8 0 0 1 1.1 1.1Z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.6 6.1-4.2 4.2a.8.8 0 0 1-1.1 0L4.4 8.4a.8.8 0 1 1 1.1-1.1l1.4 1.4 3.6-3.7a.8.8 0 0 1 1.1 1.1Z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* App page hero */
.app-hero { padding-block: clamp(40px, 7vw, 80px); position: relative; overflow: hidden; }
.app-hero::before { content: ""; position: absolute; inset: -40% -20% auto 30%; height: 800px; background: radial-gradient(closest-side, rgba(183, 110, 121, .25), transparent 70%); pointer-events: none; }
.app-hero .split { position: relative; z-index: 1; }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.app-id img { width: 72px; height: 72px; border-radius: 18px; border: 1px solid var(--line); }
.app-id .glyph { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #1a1112; }
.app-id .glyph svg { width: 36px; height: 36px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--faint); font-size: .88rem; margin-top: 22px; }
.meta span::before { content: "• "; color: var(--rose-deep); }
.meta span:first-child::before { content: ""; }

/* Screenshot gallery */
.gallery { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 4px 26px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.gallery figure { margin: 0; flex: 0 0 auto; width: min(240px, 62vw); scroll-snap-align: start; }
.gallery img { width: 100%; border-radius: 26px; border: 1px solid var(--line); cursor: zoom-in; transition: transform .25s, border-color .25s; background: var(--surface); }
.gallery img:hover { transform: translateY(-4px); border-color: rgba(231, 179, 163, .45); }
.gallery figcaption { margin-top: 12px; font-size: .88rem; color: var(--muted); text-align: center; }

/* Video */
.video-frame { position: relative; border-radius: 34px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; width: min(340px, 80vw); margin-inline: auto; }
.video-frame video { width: 100%; height: auto; }

/* Guide steps */
.toc { position: sticky; top: 88px; display: grid; gap: 4px; font-size: .92rem; }
.toc a { color: var(--muted); padding: 7px 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--text); border-left-color: var(--rose); }
.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; } .toc { position: static; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.step { display: grid; grid-template-columns: 1fr 220px; gap: 36px; padding-block: 40px; border-bottom: 1px solid var(--line); align-items: start; scroll-margin-top: 90px; }
.step:last-child { border-bottom: 0; }
.step .num { font-family: var(--serif); font-size: .95rem; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; }
.step ol, .step ul { color: var(--muted); padding-left: 1.2em; margin: 0 0 1em; }
.step li { margin-bottom: 6px; }
.step li strong { color: var(--text); }
.step .shots { display: grid; gap: 14px; }
.step .shots img { border-radius: 20px; border: 1px solid var(--line); cursor: zoom-in; }
@media (max-width: 700px) { .step { grid-template-columns: 1fr; } .step .shots { grid-template-columns: repeat(2, 1fr); max-width: 440px; } }
.tip { background: rgba(217, 181, 107, .06); border: 1px solid rgba(217, 181, 107, .22); border-radius: var(--radius-sm); padding: 14px 18px; color: var(--muted); font-size: .94rem; }
.tip strong { color: var(--gold-soft); }
kbd { font-family: var(--sans); font-size: .85em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--text); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 22px; }
.faq details[open] { border-color: rgba(231, 179, 163, .35); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--rose); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; }

/* Prose (privacy, legal) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }

/* CTA band */
.cta-band { position: relative; border-radius: 28px; padding: clamp(36px, 6vw, 64px); overflow: hidden; background: linear-gradient(135deg, #22181c, #141014); border: 1px solid rgba(231, 179, 163, .22); }
.cta-band::before { content: ""; position: absolute; right: -120px; top: -160px; width: 480px; height: 480px; background: radial-gradient(closest-side, rgba(231, 179, 163, .25), transparent); pointer-events: none; }
.cta-band > * { position: relative; }

/* Disclaimer + footer */
.disclaimer { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 22px; font-size: .86rem; color: var(--faint); }
.disclaimer strong { color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 36px; background: var(--bg-2); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; }
.footer-grid h4 { font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); font-size: .94rem; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: .84rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 4, 5, .92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-height: 92vh; width: auto; border-radius: 26px; box-shadow: var(--shadow); }
.lightbox button { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

.qr-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; }
.qr { text-align: center; font-size: .84rem; color: var(--muted); }
.qr img { width: 118px; height: 118px; border-radius: 14px; background: #fff; padding: 6px; margin-bottom: 8px; }
@media (max-width: 600px) { .qr-row { display: none; } }

/* "Under construction" watermark — toggled by UNDER_CONSTRUCTION in build.py */
.watermark {
  position: fixed; inset: 0; z-index: 150; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='860' height='440'%3E%3Ctext x='430' y='220' text-anchor='middle' dominant-baseline='middle' transform='rotate(-20 430 220)' font-family='-apple-system,Segoe UI,Helvetica,Arial,sans-serif' font-size='16' font-weight='600' letter-spacing='3' fill='%23e7b3a3' fill-opacity='0.09'%3EWEBSITE UNDER CONSTRUCTION %C2%B7 NOT YET FINALISED%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}
@media print { .watermark { display: none; } }

/* Wide (landscape) video */
.video-frame.wide { width: 100%; max-width: 960px; border-radius: 22px; }
@media (max-width: 700px) { .video-frame.wide { max-width: 340px; border-radius: 30px; } }

/* Benefit cards with big numerals */
.benefit .n { font-family: var(--serif); font-size: 2.1rem; line-height: 1; margin-bottom: 14px; display: block; }

/* Before / after comparison */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.compare { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare th, .compare td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; background: var(--surface); }
.compare thead th:last-child { color: var(--gold); }
.compare td:first-child { color: var(--text); font-weight: 600; width: 22%; }
.compare td:nth-child(2) { color: var(--faint); }
.compare td:last-child { color: var(--text); }
.compare td:last-child::before { content: "✓ "; color: var(--rose); font-weight: 700; }

/* Uniqueness list */
.unique { display: grid; gap: 18px; counter-reset: u; }
.unique li { list-style: none; position: relative; padding: 22px 24px 22px 76px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); }
.unique li::before { counter-increment: u; content: counter(u, decimal-leading-zero); position: absolute; left: 22px; top: 20px; font-family: var(--serif); font-size: 1.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.unique li strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }
.unique { padding: 0; margin: 0; }
