:root {
  --bg: #ebe5e3; --surface: #e1dad7; --ink: #2b2622; --muted: #615954;
  --accent: #0f7d45; --accent-ink: #ffffff;
  --face: "Clash Grotesk", "Helvetica Neue", Arial, sans-serif;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3rem, 1.6rem + 5.4vw, 6.5rem);
  --gap: 12px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
/* City worlds: the ground, the surface and the accent follow the place on screen */
body[data-world="chefchaouen"] { --bg: #e4e7ee; --surface: #d6dbe7; --accent: #2a58a8; }
body[data-world="marrakech"]   { --bg: #eee2dc; --surface: #e4d2c9; --accent: #9c3b24; }
body[data-world="fes"]         { --bg: #e2e8e6; --surface: #d3dcd9; --accent: #1c5e86; }
body[data-world="merzouga"]    { --bg: #efe6d8; --surface: #e6d8c2; --accent: #9a5a12; }
body[data-world="taghazout"]   { --bg: #e0eae9; --surface: #cfdedc; --accent: #116a73; }
body[data-world="tea"]         { --bg: #e7e8e1; --surface: #d9dccf; --accent: #0f7d45; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.45 var(--face);
  transition: background-color 1.2s var(--ease); }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.03em; line-height: 0.95; margin: 0; }
p { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* The stage: reading column on the left, the city window fixed on the right */
.stage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: var(--gap); }
.window { position: sticky; top: var(--gap); height: calc(100svh - 2 * var(--gap)); background: var(--surface);
  display: grid; grid-template-rows: 1fr 56px; transition: background-color 1.2s var(--ease); order: 2; }
.arch { position: relative; margin: 6% 10% 0; overflow: hidden; clip-path: url(#arch); }
.arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transform: scale(1.08); transition: opacity 1.4s var(--ease), transform 9s linear; }
.arch img.on { opacity: 1; transform: scale(1); }
.bar { display: flex; justify-content: space-between; align-items: center; padding: 0 24px; background: var(--bg);
  font-size: 15px; transition: background-color 1.2s var(--ease); }
.bar b { font-weight: 500; }
.bar span { color: var(--muted); }
.read { order: 1; min-width: 0; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(20px, 4vw, 64px); }
.mark { font-size: 28px; letter-spacing: -0.04em; text-decoration: none; font-weight: 500; }
.top nav { display: flex; gap: 22px; font-size: 16px; }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--accent); }

.sheet { padding: 0 clamp(20px, 4vw, 64px); }
section { padding: clamp(96px, 12vw, 180px) 0 0; }

/* Hero */
.hero { min-height: calc(100svh - 92px); display: flex; flex-direction: column; justify-content: center; padding-top: 0; }
.hero h1 { font-size: var(--step-display); max-width: 9ch; }
.hero p { font-size: var(--step-lead); line-height: 1.3; max-width: 26ch; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; height: 52px; padding: 0 26px; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 500; border: 0; cursor: pointer; transition: background-color 1.2s var(--ease), transform .2s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.hero .btn { margin-top: 40px; align-self: flex-start; }

/* Ways in: the live picker and the map */
.ways h2, .intro h2, .match h2, .prices h2, .slip-wrap h2, .moment h2, .faq h2, .close h2 { font-size: var(--step-head); max-width: 14ch; }
.ways > p { margin-top: 24px; max-width: 42ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.chip { border: 0; background: var(--surface); padding: 12px 18px; font-size: 17px; cursor: pointer; transition: background-color .4s var(--ease), color .4s var(--ease), transform .2s var(--ease); }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.mapbox { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 28px; align-items: start; }
.map { width: 100%; height: auto; aspect-ratio: 1 / 1; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); transition: background-color 1.2s var(--ease); }
.map .land { fill: var(--bg); transition: fill 1.2s var(--ease); }
.map .city { fill: var(--muted); transition: r .5s var(--ease), fill .5s var(--ease); }
.map .city.lit { fill: var(--accent); }
.map .label { font-family: var(--face); font-weight: 500; fill: var(--ink); opacity: 0; transition: opacity .6s var(--ease); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.map .label.lit { opacity: 1; }
.map .route { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; transition: stroke 1.2s var(--ease); }
.plan h3 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; font-weight: 500; }
.plan .route-line { margin-top: 14px; font-weight: 500; }
.plan .why { margin-top: 14px; }
.plan .facts { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); font-size: 16px; }
.plan .facts b { color: var(--ink); font-weight: 500; }
.plan a { display: inline-block; margin-top: 20px; color: var(--accent); }

/* Intro: the philosophy */
.intro .col { max-width: 40ch; margin-top: 32px; display: grid; gap: 18px; }
.intro .col p:first-child { font-weight: 500; font-size: var(--step-lead); line-height: 1.3; }

/* Match-up */
.match .split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 36px; }
.match .square { aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; align-self: start; }
.match .side { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.tabs { display: flex; gap: 18px; font-size: 18px; }
.tab { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 6px; }
.score { display: grid; gap: 10px; }
.score .row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; }
.score .who { font-size: 15px; color: var(--muted); }
.score .meter { grid-column: 1 / -1; height: 10px; background: var(--surface); position: relative; }
.score .meter i { position: absolute; inset: 0 auto 0 0; background: var(--accent); width: 0; transition: width 1s var(--ease), background-color 1.2s var(--ease); }
.match .verdict { font-size: var(--step-lead); line-height: 1.25; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cell { display: flex; align-items: center; height: 64px; padding: 0 18px; text-decoration: none; font-weight: 500; transition: transform .2s var(--ease); }
.cell:hover { transform: translateY(-2px); }
.cell.ink { background: var(--ink); color: var(--bg); }
.cell.tone { background: var(--surface); }

/* Prices */
.prices .word { font-size: clamp(4.5rem, 15vw, 15rem); letter-spacing: -0.05em; line-height: 0.8; text-transform: uppercase; margin-top: 12px; }
.prices .sub { margin-top: 20px; max-width: 44ch; }
.bars { display: grid; gap: 6px; margin-top: 28px; }
.bars details { background: var(--surface); transition: background-color 1.2s var(--ease); }
.bars summary { list-style: none; display: flex; justify-content: space-between; align-items: center; height: 58px; padding: 0 18px; cursor: pointer; font-weight: 500; }
.bars summary::-webkit-details-marker { display: none; }
.bars summary::after { content: "+"; font-size: 22px; transition: transform .3s var(--ease); }
.bars details[open] summary::after { transform: rotate(45deg); }
.bars ul { list-style: none; margin: 0; padding: 4px 18px 20px; display: grid; gap: 14px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.bars li .p { font-variant-numeric: tabular-nums; font-weight: 500; }
.bars li .range { grid-column: 1 / -1; height: 6px; background: var(--bg); position: relative; }
.bars li .range i { position: absolute; top: 0; bottom: 0; background: var(--accent); }
.bars li .range s { position: absolute; top: -3px; width: 3px; height: 12px; background: var(--ink); text-decoration: none; }
.bars .key { font-size: 15px; color: var(--muted); }
.prices .more { display: inline-block; margin-top: 22px; }

/* Arrival slip */
.slip-wrap { display: grid; grid-template-columns: 1fr; gap: 28px; }
.slip-wrap > p { max-width: 36ch; margin-top: 20px; }
.slipfield { background: var(--ink); padding: clamp(24px, 4vw, 56px); transition: background-color 1.2s var(--ease); }
.slip { background: var(--bg); max-width: 480px; margin: 0 auto; padding: 28px 26px 44px; font-variant-numeric: tabular-nums;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 95% 100%, 90% calc(100% - 14px), 85% 100%, 80% calc(100% - 14px), 75% 100%, 70% calc(100% - 14px), 65% 100%, 60% calc(100% - 14px), 55% 100%, 50% calc(100% - 14px), 45% 100%, 40% calc(100% - 14px), 35% 100%, 30% calc(100% - 14px), 25% 100%, 20% calc(100% - 14px), 15% 100%, 10% calc(100% - 14px), 5% 100%, 0 calc(100% - 14px)); }
.slip h3 { font-size: 17px; font-weight: 500; letter-spacing: 0; margin-top: 26px; line-height: 1.2; }
.slip h3:first-child { margin-top: 0; }
.slip .r { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; font-size: 16px; }
.slip .r .dots { flex: 1; border-bottom: 4px dotted var(--muted); transform: translateY(-4px); opacity: .5; }
.slip .total { margin-top: 26px; background: var(--ink); color: var(--bg); display: flex; justify-content: space-between; align-items: center; padding: 0 14px; min-height: 44px; font-weight: 500; }

/* Moment: photo with two figure tiles */
.mosaic { display: grid; grid-template-columns: 2fr 1fr; margin-top: 36px; }
.mosaic img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.tiles { display: grid; grid-template-rows: 1fr 1fr; }
.tile { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.tile b { font-size: clamp(2.5rem, 1.2rem + 3.4vw, 4.75rem); font-weight: 400; letter-spacing: -0.04em; line-height: 0.9; }
.tile:first-child { background: var(--accent); color: var(--accent-ink); transition: background-color 1.2s var(--ease); }
.tile:last-child { background: var(--ink); color: var(--bg); }
.src { margin-top: 14px; font-size: var(--step-small); color: var(--muted); }
.src summary { cursor: pointer; width: fit-content; }
.src a { display: block; margin-top: 6px; overflow-wrap: anywhere; }

/* FAQ as reading text */
.faq .text { margin-top: 32px; columns: 2 300px; column-gap: 48px; }
.faq .text p { break-inside: avoid; margin-bottom: 20px; line-height: 1.5; font-size: 17px; }
.faq .text b { font-weight: 500; }

/* Close */
.close { padding-bottom: 30svh; }
.close p { max-width: 34ch; font-size: var(--step-lead); line-height: 1.3; margin-top: 24px; }
.close .btn { margin-top: 28px; }
.foot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: end; padding: 0 0 28px; font-size: 15px; color: var(--muted); }
.foot nav { display: flex; gap: 24px; }
.foot nav a { color: var(--ink); text-decoration: none; }
.foot .r { text-align: right; }
.credits { font-size: var(--step-small); color: var(--muted); padding-bottom: 28px; }
.credits summary { cursor: pointer; width: fit-content; }
.credits li { margin-top: 4px; }

/* Entrances */
[data-rise] > * { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-rise].in > * { opacity: 1; transform: none; }
[data-rise].in > *:nth-child(2) { transition-delay: .08s; }
[data-rise].in > *:nth-child(3) { transition-delay: .16s; }
[data-rise].in > *:nth-child(4) { transition-delay: .24s; }
[data-rise].in > *:nth-child(n+5) { transition-delay: .32s; }
.no-js [data-rise] > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  [data-rise] > * { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Phone: the window comes first and stays behind the first section */
@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .window { order: 0; position: sticky; top: 0; height: 58svh; z-index: 0; }
  body.inner .window { height: 34svh; }
  body.inner .arch { margin: 10px 22% 0; }
  .arch { margin: 16px 12% 0; }
  .read { position: relative; z-index: 1; background: var(--bg); transition: background-color 1.2s var(--ease); }
  .top { padding: 18px 20px; }
  .top nav { gap: 14px; font-size: 15px; }
  .top nav .hide-s { display: none; }
  .sheet { padding: 0 20px; }
  .hero { min-height: auto; padding: 40px 0 0; }
  .mapbox { grid-template-columns: 1fr; }
  .match .split { grid-template-columns: 1fr; }
  .cells { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr; }
  .mosaic img { aspect-ratio: 4 / 3; }
  .tiles { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .tile { aspect-ratio: 1; }
  .faq .text { columns: 1; }
  .foot { grid-template-columns: 1fr; gap: 8px; }
  .foot .r { text-align: left; }
}

/* Inner pages */
.crumb { font-size: 15px; color: var(--muted); }
.crumb a { text-decoration: none; }
.pricepage, .waypage { padding-top: clamp(24px, 5vw, 72px); }
.pricepage h1, .waypage h1, .prose h1 { font-size: var(--step-head); max-width: 16ch; margin-top: 10px; }
.lead { font-size: var(--step-lead); line-height: 1.3; max-width: 34ch; margin-top: 24px; }
.stamp { margin-top: 18px; font-size: 15px; color: var(--muted); }
.plist { margin-top: 40px; display: grid; gap: 6px; }
.price { background: var(--surface); padding: 22px 20px; transition: background-color 1.2s var(--ease); }
.price h3 { font-size: 18px; font-weight: 500; letter-spacing: 0; line-height: 1.25; }
.price .amount { font-size: var(--step-lead); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.price .eur { font-size: 15px; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.price .range { display: block; height: 6px; background: var(--bg); position: relative; margin: 12px 0 4px; }
.price .range i { position: absolute; top: 0; bottom: 0; background: var(--accent); transition: background-color 1.2s var(--ease); }
.price .range s { position: absolute; top: -3px; width: 3px; height: 12px; background: var(--ink); }
.price .asked { font-size: 15px; color: var(--muted); }
.price .tip { margin-top: 10px; max-width: 52ch; }
.price .meta { margin-top: 10px; font-size: 14px; color: var(--muted); }
.report { margin-top: 10px; font-size: 15px; }
.report summary { cursor: pointer; width: fit-content; color: var(--muted); }
.report form { display: grid; gap: 10px; margin-top: 12px; max-width: 420px; }
label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
input { font: inherit; color: var(--ink); background: var(--bg); border: 0; padding: 12px 14px; width: 100%; }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn.small { height: 44px; padding: 0 20px; width: fit-content; }
.msg { font-size: 15px; min-height: 1em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.watch .text, .next .links { margin-top: 28px; }
.watch .text p { margin-bottom: 16px; max-width: 56ch; }
.watch b { font-weight: 500; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.links a { background: var(--surface); padding: 18px; text-decoration: none; display: grid; gap: 4px; transition: transform .2s var(--ease), background-color 1.2s var(--ease); }
.links a:hover { transform: translateY(-2px); }
.links a b { font-weight: 500; font-size: 18px; }
.links a span { color: var(--muted); font-size: 15px; }
.links.big { margin-top: 36px; }
.src { margin-top: 48px; }
.src ol { padding-left: 20px; columns: 2 220px; }
.waypage .map { margin-top: 32px; max-width: 520px; }
.waypage .route-line { margin-top: 18px; font-weight: 500; font-size: var(--step-lead); letter-spacing: -0.02em; }
.waypage .facts { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.waypage .facts b { font-weight: 500; }
.others .chips a { text-decoration: none; }
.prose { padding-top: clamp(24px, 5vw, 72px); max-width: 60ch; }
.prose h2 { font-size: var(--step-lead); letter-spacing: -0.02em; margin-top: 40px; }
.prose p, .prose li { margin-top: 12px; }
.signup { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; max-width: 480px; }
.signup input[type=email] { flex: 1 1 220px; background: var(--surface); }
.signup .btn { margin-top: 0; }
.signup .msg { flex-basis: 100%; }
.bars li.go { display: block; }
.bars li.go a { color: var(--accent); }
.close { padding-bottom: 20svh; }
