:root {
  --bg: #fff8ee;
  --surface: #f7ecdb;
  --ink: #2a1f14;
  --muted: #6b5a49;
  --accent: #b85c00;
  --accent-ink: #ffffff;
  --green: #2e7d4f;
  --line: #e4d3bb;
  --card-shadow: 0 10px 28px rgba(80, 45, 10, 0.18);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --rail-w: clamp(150px, 15vw, 250px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1724;
    --surface: #182236;
    --ink: #e4e8f2;
    --muted: #a5afc4;
    --accent: #9cb9ff;
    --accent-ink: #0f1724;
    --green: #8fd6a6;
    --line: #2a3650;
    --card-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- side carousels ---------- */
.rail {
  position: fixed;
  top: 0; bottom: 0;
  width: var(--rail-w);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  /* soft fade at the top and bottom edges */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 6%, #000 94%, transparent);
}
.rail-left  { left: 0; }
.rail-right { right: 0; }

.track {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 14px 18px;
  animation: rise 70s linear infinite;
  will-change: transform;
}
.rail-right .track { animation-name: fall; animation-duration: 80s; }

@keyframes rise { from { transform: translateY(0); }    to { transform: translateY(-50%); } }
@keyframes fall { from { transform: translateY(-50%); } to { transform: translateY(0); } }

.card {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: var(--surface);
  transform: rotate(var(--tilt, 2deg));
}
.card:nth-child(3n + 1) { --tilt: -2.5deg; }
.card:nth-child(3n + 2) { --tilt: 1.8deg; }
.card:nth-child(3n)     { --tilt: -1deg; }
.card img { display: block; width: 100%; height: auto; }

/* Rail cards get fixed proportions (photos are cropped to fit) so a full pass
   is taller than the screen and no photo shows twice at once. */
.track .card { aspect-ratio: var(--ar, 4 / 5); }
.track .card img { height: 100%; object-fit: cover; }
.card:nth-child(4n + 1) { --ar: 4 / 5; }
.card:nth-child(4n + 2) { --ar: 1 / 1; }
.card:nth-child(4n + 3) { --ar: 5 / 6; }
.card:nth-child(4n)     { --ar: 1 / 1; }

/* ---------- centre column ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 96px) 24px 32px;
  text-align: center;
}

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

h1 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 3.2vw, 1.8rem);
  color: var(--muted);
}

.lead { margin: 40px 0 0; font-size: 1.1rem; }

.rule {
  width: 64px; height: 1px; border: 0;
  background: var(--line);
  margin: 44px auto;
}

h2 {
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.steps, .flags {
  list-style: none;
  margin: 0; padding: 0;
  text-align: left;
  display: grid;
  gap: 12px;
}

.steps li, .flags li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 14px 56px;
  position: relative;
}
.steps { counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 16px; top: 13px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 0.9rem;
  display: grid; place-items: center;
}
.flags li::before {
  content: "!";
  position: absolute; left: 16px; top: 13px;
  width: 28px; height: 28px; border-radius: 50%;
  background: transparent; border: 2px solid var(--accent); color: var(--accent);
  font-weight: 800;
  display: grid; place-items: center;
}
.steps strong, .flags strong { display: block; }

.safe {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--green);
  color: var(--green);
  font-weight: 600;
}

.mail {
  display: inline-block;
  font-size: clamp(1.15rem, 3.4vw, 1.6rem);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  word-break: break-all;
}

.btn {
  display: inline-block;
  margin-top: 22px;
  padding: 13px 34px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(184, 92, 0, 0.25);
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .mail:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

footer {
  position: relative; z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 56px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
footer a { text-decoration-color: var(--line); text-underline-offset: 3px; }
footer nav { margin-bottom: 14px; }

details.credits { text-align: left; margin-top: 18px; font-size: 0.82rem; }
details.credits summary { cursor: pointer; text-align: center; }
details.credits ul { margin: 12px 0 0; padding-left: 18px; }
details.credits li { margin-bottom: 4px; }

/* ---------- small screens: rails become one strip above the hero ---------- */
.strip { display: none; }

@media (max-width: 900px) {
  .rail { display: none; }
  .strip {
    display: block;
    overflow: hidden;
    padding: 18px 0 6px;
    position: relative; z-index: 1;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  }
  .strip-track {
    display: flex;
    width: max-content;
    padding: 6px 0 14px;
    animation: slide 60s linear infinite;
  }
  .strip .card { width: 132px; flex: none; margin-right: 14px; }
  .strip .card img { height: 176px; object-fit: cover; }
  @keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  main { padding-top: 24px; }
}

/* ---------- privacy policy page ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  text-align: left;
}
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.doc .meta { color: var(--muted); margin: 10px 0 30px; }
.doc h2 {
  margin: 38px 0 10px;
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.doc p, .doc li { font-size: 1.02rem; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 12px;
  padding: 16px 20px;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border: 1px solid var(--line);
}
.doc th { background: var(--surface); }
.back { display: inline-block; margin-bottom: 22px; color: var(--accent); font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track, .strip-track { animation: none; }
  .btn { transition: none; }
  .strip { overflow-x: auto; }
}
