/* Civix: the app's own colours, type and skyline. Dark by default, as the
   app is; light where the reader's device asks for it. */

:root {
  --bg: #002336;
  --surface: #07314a;
  --surface-2: #0d3c57;
  --border: #1c4c68;
  --ink: #eaf4f8;
  --ink-soft: #a3bcca;
  --accent: #3ccbdd;
  --accent-soft: #0b4560;
  --on-accent: #002331;
  --gold: #f5b544;
  --skyline: url("assets/skyline-dark.jpg");
  --skyline-strength: 0.55;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

/* Light: where the device asks for it and the visitor has not chosen dark,
   or where the visitor has chosen light with the switch in the top bar. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f7f9;
    --surface: #ffffff;
    --surface-2: #e8f0f4;
    --border: #dae5eb;
    --ink: #0b2233;
    --ink-soft: #4e6575;
    --accent: #07759a;
    --accent-soft: #ddf0f6;
    --on-accent: #ffffff;
    --gold: #9a5c00;
    --skyline: url("assets/skyline-light.jpg");
    --skyline-strength: 0.7;
    --shadow: 0 24px 60px rgba(11, 34, 51, 0.18);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f3f7f9;
  --surface: #ffffff;
  --surface-2: #e8f0f4;
  --border: #dae5eb;
  --ink: #0b2233;
  --ink-soft: #4e6575;
  --accent: #07759a;
  --accent-soft: #ddf0f6;
  --on-accent: #ffffff;
  --gold: #9a5c00;
  --skyline: url("assets/skyline-light.jpg");
  --skyline-strength: 0.7;
  --shadow: 0 24px 60px rgba(11, 34, 51, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

h1, h2 {
  font-family: Lora, Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
h1 span { color: var(--gold); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.12rem; font-weight: 700; margin: 0 0 6px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 5vw, 48px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.brand img { border-radius: 9px; }

.bar nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.bar nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.bar nav a:hover { color: var(--ink); }
.bar nav .pill {
  padding: 8px 16px;
  border: 1.4px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 600;
}
.bar nav .pill:hover { background: var(--accent); color: var(--on-accent); }

/* The theme switch: Day, Night, or the same as the device. */
.theme {
  display: inline-flex;
  padding: 3px;
  border: 1.4px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.theme button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.theme svg { width: 17px; height: 17px; fill: currentColor; }

@media (max-width: 560px) {
  .bar nav a:not(.pill) { display: none; }
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) clamp(16px, 5vw, 48px) clamp(56px, 9vw, 120px);
  isolation: isolate;
}

/* The app's skyline, on the floor of the hero. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background: var(--skyline) center bottom / cover no-repeat;
  opacity: var(--skyline-strength);
  mask-image: linear-gradient(to bottom, transparent 0, #000 45%, #000 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%, #000 85%, transparent 100%);
}

.lead {
  max-width: 34rem;
  margin: 20px 0 28px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.stores { display: flex; flex-wrap: wrap; gap: 12px; }

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 172px;
  padding: 9px 18px 9px 14px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store small { display: block; font-size: 0.68rem; font-weight: 500; opacity: 0.85; }

.hint { margin: 16px 0 0; color: var(--ink-soft); font-size: 0.92rem; }

.hero-phone { display: flex; justify-content: center; }

.phone {
  width: min(300px, 78vw);
  padding: 9px;
  border-radius: 44px;
  background: linear-gradient(145deg, #1a2b36, #05141d);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.phone img { border-radius: 36px; width: 100%; }

.hero-phone .phone { transform: rotate(2.5deg); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .stores { justify-content: center; }
  .hero-phone .phone { transform: none; }
}

/* ── Sections ────────────────────────────────────────────────────────── */

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) clamp(16px, 5vw, 48px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
  pointer-events: none;
}
.card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--a), var(--b));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--a) 40%, transparent);
}
.icon svg { width: 26px; height: 26px; fill: #fff; }

/* ── Screens ─────────────────────────────────────────────────────────── */

.shots {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  margin: 32px calc(-1 * clamp(16px, 5vw, 48px)) 0;
  padding: 8px clamp(16px, 5vw, 48px) 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.shots figure { flex: none; margin: 0; scroll-snap-align: center; }
.shots .phone { width: min(240px, 62vw); border-radius: 36px; padding: 7px; }
.shots .phone img { border-radius: 30px; }
.shots figcaption {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
}

/* ── Get the app ─────────────────────────────────────────────────────── */

.get-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    var(--surface);
}
.app-icon { border-radius: 18px; margin-bottom: 18px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.get-text p { margin: 10px 0 22px; color: var(--ink-soft); }

.qr {
  position: relative;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}
.qr img { width: min(220px, 60vw); }
.qr-note {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 5px 12px;
  border-radius: 8px;
  background: #d64545;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .get-card { grid-template-columns: 1fr; text-align: center; }
  .app-icon { margin-inline: auto; }
  .get-card .stores { justify-content: center; }
  .qr { justify-self: center; }
}

/* ── Footer ──────────────────────────────────────────────────────────── */

footer {
  padding: 40px clamp(16px, 5vw, 48px) 56px;
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  text-align: center;
}
footer .brand { font-size: 1.05rem; }
footer p { margin: 8px 0 0; }
footer .fine { font-size: 0.86rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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