/* Roamance website. Colours, radii and type follow the app (src/theme/tokens.ts). Light and dark
   follow the system setting (no toggle: the CSP allows no scripts). Each colour is the app role
   it is named after (src/theme/colors.ts, lightColors and darkColors; palette names in the
   comments). src/__tests__/theme.test.ts checks the values against the app and the contrast
   pairs. Rules below use only these variables, never a raw colour. */
:root {
  color-scheme: light dark;
  --bg: #ffffff; /* white */
  --surface: #f6f5f8; /* gray50 */
  --card: #ffffff; /* white */
  --text: #1c1b22; /* gray920 */
  --text-secondary: #3d3c45; /* gray800 */
  --text-muted: #55545e; /* gray700 */
  --border: #ecebef; /* gray150 */
  --focus-ring: #c2384f; /* rose600 */
  --primary: #c2384f; /* rose600 */
  --primary-pressed: #9e2a3e; /* rose750 */
  --on-primary: #ffffff; /* white */
  --accent: #c2384f; /* rose600 */
  --accent-strong: #9e2a3e; /* rose750 */
  --accent-tint: #f7e3e7; /* rose100 */
  --accent-wash: #fdf5f6; /* rose50 */
  --accent-line: #e9c3ca; /* rose200 */
  --inverse: #1c1b22; /* gray920 */
  --on-inverse: #ffffff; /* white */
  --success: #1f7a4d; /* green700 */
  --map-water: #eef2f4; /* slate50 */
  /* Site-only pieces, from the same palette. */
  --header-bg: rgba(255, 255, 255, 0.92); /* bg, translucent */
  --phone-frame: #1c1b22; /* inverse */
  --phone-shadow: rgba(28, 27, 34, 0.35); /* gray920 */
  --band-bg: #1c1b22; /* inverse */
  --band-border: #1c1b22; /* inverse */
  --band-text: #ffffff; /* onInverse */
  --band-text-soft: #d9d7de; /* gray310 */
  --radius-md: 12px;
  --radius-xl: 18px;
  --radius-xxl: 22px;
  --max: 1120px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111015; /* gray960 */
    --surface: #1c1b22; /* gray920 */
    --card: #1c1b22; /* gray920 */
    --text: #f4f2f6; /* gray75 */
    --text-secondary: #d9d7de; /* gray310 */
    --text-muted: #b4b2bc; /* gray410 */
    --border: #2a2930; /* gray870 */
    --focus-ring: #f6b3bf; /* rose300 */
    --primary: #c2384f; /* rose600 */
    --primary-pressed: #9e2a3e; /* rose750 */
    --on-primary: #ffffff; /* white */
    --accent: #f07a8e; /* rose400 */
    --accent-strong: #f6b3bf; /* rose300 */
    --accent-tint: #3a1e26; /* rose850 */
    --accent-wash: #26171b; /* rose900 */
    --accent-line: #5a2c36; /* rose800 */
    --inverse: #f4f2f6; /* gray75 */
    --on-inverse: #1c1b22; /* gray920 */
    --success: #5cc791; /* green300 */
    --map-water: #1a2327; /* slate900 */
    --header-bg: rgba(17, 16, 21, 0.92); /* bg, translucent */
    --phone-frame: #2e2d35; /* gray850 */
    --phone-shadow: rgba(0, 0, 0, 0.6); /* black60 */
    /* The band is a card here: an inverted (light) band would glare on a dark page. */
    --band-bg: #1c1b22; /* card */
    --band-border: #2a2930; /* border */
    --band-text: #f4f2f6; /* text */
    --band-text-soft: #d9d7de; /* textSecondary */
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.3px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 20px; font-size: 15px; font-weight: 600; }
.nav a { color: var(--text-secondary); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang a, .lang span { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--text-muted); }
.lang span { background: var(--accent-tint); color: var(--accent-strong); }
@media (max-width: 760px) { .nav .nav-link { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; transition: background 0.15s ease; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-pressed); color: var(--on-primary); }
.btn-ghost { color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--text); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--accent-wash) 0%, var(--bg) 100%); padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
/* Grid items may shrink below their content's width (otherwise long words widen the page on phones). */
.hero .wrap > *, .features > *, .steps > *, .privacy > * { min-width: 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--accent-strong); background: var(--accent-tint); padding: 4px 12px; border-radius: 999px; }
h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.08; letter-spacing: -1.2px; font-weight: 800; margin: 18px 0 18px; }
h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; color: var(--text-secondary); max-width: 34em; margin: 0 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: 14px; color: var(--text-muted); margin-top: 14px; }
@media (max-width: 900px) {
  .hero { padding: 48px 0 40px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* Phone mock-up of the Home screen */
.phone { width: min(330px, 100%); margin: 0 auto; background: var(--phone-frame); border-radius: 44px; padding: 12px; box-shadow: 0 30px 60px -20px var(--phone-shadow); }
.screen { background: var(--bg); border-radius: 34px; padding: 22px 18px 20px; overflow: hidden; }
.screen-top { display: flex; align-items: center; justify-content: space-between; }
.screen-title { font-weight: 800; font-size: 19px; letter-spacing: -0.3px; line-height: 1.2; }
.avatars { display: flex; }
.avatars span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--on-primary); border: 2px solid var(--bg); }
.avatars span:first-child { background: var(--primary); }
.avatars span:last-child { background: var(--inverse); color: var(--on-inverse); margin-left: -10px; }
.screen-sub { font-size: 13px; color: var(--text-muted); margin: 2px 0 14px; }
.map { background: var(--map-water); border-radius: var(--radius-xxl); padding: 14px 8px; }
.map picture { display: block; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.stat { background: var(--surface); border-radius: var(--radius-md); padding: 10px 8px; text-align: center; }
.stat b { display: block; font-size: 20px; font-weight: 800; }
.stat small { font-size: 11.5px; color: var(--text-muted); }
.checkin { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.checkin .pin { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-tint); display: grid; place-items: center; color: var(--accent); flex: none; }
.checkin b { display: block; font-size: 14px; }
.checkin small { font-size: 12px; color: var(--success); font-weight: 700; }

/* Sections */
section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -0.6px; font-weight: 800; margin: 12px 0 12px; }
.section-head p { color: var(--text-secondary); margin: 0; font-size: 18px; }
h3 { font-size: 19px; font-weight: 800; margin: 14px 0 6px; letter-spacing: -0.2px; }
.alt { background: var(--surface); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xxl); padding: 26px; }
.feature p { margin: 0; color: var(--text-secondary); font-size: 16px; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-tint); display: grid; place-items: center; color: var(--accent); }
.icon svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } section { padding: 56px 0; } }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding-top: 52px; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; display: grid; place-items: center; }
.steps p { margin: 0; color: var(--text-secondary); font-size: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.privacy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 16px 18px; }
.checks li svg { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.checks b { display: block; }
.checks span { color: var(--text-secondary); font-size: 15.5px; }
@media (max-width: 900px) { .privacy { grid-template-columns: minmax(0, 1fr); } }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
/* The markers are decoration: the empty alt text keeps screen readers from announcing them. */
.faq summary::after { content: '+' / ''; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: '–' / ''; }
.faq details p { margin: 10px 0 0; color: var(--text-secondary); }

.cta-band { background: var(--band-bg); color: var(--band-text); border: 1px solid var(--band-border); border-radius: 28px; padding: 48px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: var(--band-text); margin: 0 0 8px; }
.cta-band p { margin: 0; color: var(--band-text-soft); max-width: 34em; }
@media (max-width: 600px) { .cta-band { padding: 32px 24px; } }

/* Privacy policy and terms */
.legal .wrap { max-width: 760px; padding-top: 48px; padding-bottom: 32px; }
.legal h1 { font-size: clamp(32px, 4.4vw, 44px); margin: 0 0 8px; }
.legal h2 { font-size: 22px; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--text-secondary); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal-meta { font-size: 14px; color: var(--text-muted); margin: 0 0 20px; }

/* Footer */
.site-footer { padding: 40px 0 48px; color: var(--text-muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }

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