/* ============================================================
   Topos Life  |  design system
   ------------------------------------------------------------
   Mediterranean and bright: sand to read on, the sea for the
   voices, saffron for the app, terracotta for Italy and for
   everything that is Cagliari's own. Calistoga for headings,
   Newsreader for the stories, Public Sans for the interface.
   ============================================================ */

:root {
  /* Mediterranean: the sea off Poetto, saffron, terracotta roofs, olive
     groves, and sand. The dark ink is the deep sea, never black. */
  --sea:         #0E6FAE;
  --sea-deep:    #0A4C7A;
  --sea-ink:     #0B2E4A;
  --turquoise:   #17A9C4;
  --sky:         #DDF1FB;
  --saffron:     #F4B23C;
  --saffron-lt:  #FFE3A6;
  --terracotta:  #C2410C;
  --coral:       #E4572E;
  --olive:       #5E8A2F;
  --rose:        #F7C9B6;

  /* legacy names, remapped so every component follows the new palette */
  --navy:        var(--sea-ink);
  --navy-deep:   #082339;
  --navy-soft:   #164A70;
  --night:       #082339;
  --brass:       var(--saffron);
  --brass-light: var(--saffron-lt);
  --coral-deep:  var(--terracotta);

  --parchment:   #FFF8EC;
  --parchment-2: #FCEAD0;
  --cream:       #FFFFFF;
  --ink:         #13293D;
  --ink-soft:    #44566A;
  --ink-faint:   #66788A;
  --line:        #EADBC4;

  --maxw: 1200px;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --radius: 14px;
  --radius-lg: 22px;

  --font-display: "Calistoga", Georgia, serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans:  "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --shadow-sm: 0 2px 10px rgba(11, 46, 74, 0.07);
  --shadow-md: 0 14px 40px rgba(11, 46, 74, 0.13);
  --shadow-lg: 0 30px 70px rgba(11, 46, 74, 0.22);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.08; margin: 0; font-weight: 400; font-family: var(--font-display); letter-spacing: -0.005em; }
body.has-dialog, body.nav-open { overflow: hidden; }

/* ---- One language at a time ----
   Every bilingual string is a pair of siblings; the root says which shows. */
html[data-lang="it"] [data-l="en"],
html[data-lang="en"] [data-l="it"] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -100px; z-index: 300;
  background: var(--navy); color: #fff; padding: 0.65rem 1rem;
  border-radius: 8px; font-family: var(--font-sans); font-size: 0.9rem;
  text-decoration: none; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 160; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--coral), var(--brass)); }

/* ============================================================
   PRELOADER: Italy draws itself, a pin lands on Cagliari
   ------------------------------------------------------------
   Timings hang off --pl (1 on a first visit, ~0.45 when the
   visitor has already seen it this session) so the quick
   version is the same choreography, faster.
   ============================================================ */
.preloader {
  --pl: 1;
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 45%, rgba(255,255,255,0.22), transparent 70%),
    linear-gradient(160deg, #1597C2 0%, var(--sea) 55%, var(--sea-deep) 100%);
  color: #fff;
  transition: transform 0.9s cubic-bezier(0.7, 0, 0.2, 1), border-radius 0.9s cubic-bezier(0.7, 0, 0.2, 1);
  animation: preloader-failsafe 0.01s 8s forwards;
}
.preloader.is-quick { --pl: 0.45; }
/* Lifts away like a curtain, onto the flight. */
.preloader.is-done { transform: translateY(-104%); border-radius: 0 0 50% 50% / 0 0 12vh 12vh; pointer-events: none; }
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; } }

.pl-stage { position: relative; display: grid; justify-items: center; gap: 1.2rem; width: min(92vw, 420px); }
.pl-map { width: min(66vw, 380px, 52vh); height: auto; overflow: visible; filter: drop-shadow(0 18px 30px rgba(5, 40, 70, 0.35)); }
.pl-coast {
  fill: #FFF4E2; fill-opacity: 0; stroke: var(--saffron-lt); stroke-width: 2.2; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation:
    pl-draw calc(1.5s * var(--pl)) var(--ease) calc((0.15s + var(--i) * 0.35s) * var(--pl)) forwards,
    pl-fill calc(0.7s * var(--pl)) ease calc((1.35s + var(--i) * 0.2s) * var(--pl)) forwards;
}
@keyframes pl-draw { to { stroke-dashoffset: 0; } }
@keyframes pl-fill { to { fill-opacity: 1; stroke: #FFE3A6; } }

.pl-pin-drop { fill: var(--terracotta); stroke: #fff; stroke-width: 2.5; opacity: 0; transform: translateY(-90px);
  animation: pl-drop calc(0.7s * var(--pl)) cubic-bezier(0.3, 1.6, 0.5, 1) calc(2s * var(--pl)) forwards; }
.pl-pin-drop circle { fill: #fff; stroke: none; }
@keyframes pl-drop { to { opacity: 1; transform: none; } }
.pl-ripple { fill: none; stroke: var(--saffron); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: pl-ripple 1.8s ease-out calc(2.5s * var(--pl)) infinite; }
.pl-ripple--2 { animation-delay: calc(2.5s * var(--pl) + 0.9s); }
@keyframes pl-ripple { 0% { opacity: 0.9; transform: scale(0.4); } 100% { opacity: 0; transform: scale(3.4); } }

.pl-words { display: grid; justify-items: center; gap: 0.5rem; text-align: center;
  opacity: 0; transform: translateY(10px); animation: pl-up calc(0.7s * var(--pl)) var(--ease) calc(1.7s * var(--pl)) forwards; }
@keyframes pl-up { to { opacity: 1; transform: none; } }
.pl-brand { margin: 0; font-family: var(--font-display); font-size: clamp(2.2rem, 8vw, 3rem); line-height: 1; }
.pl-brand i { font-style: normal; color: var(--saffron); }
.pl-note { margin: 0; font-family: var(--font-sans); font-size: 0.92rem; font-weight: 500; color: rgba(255,255,255,0.88); }
.pl-bar { width: 180px; height: 4px; margin-top: 0.4rem; border-radius: 4px; background: rgba(255,255,255,0.22); overflow: hidden; }
.pl-bar span { display: block; height: 100%; width: 8%; border-radius: 4px; background: var(--saffron); transition: width 0.5s var(--ease); }
.pl-skip {
  position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
  border: 0; border-radius: 999px; padding: 0.6rem 1rem; min-height: 44px; cursor: pointer;
  background: rgba(255,255,255,0.16); color: #fff; font-family: var(--font-sans); font-size: 0.85rem; font-weight: 600;
}
.pl-skip:hover { background: rgba(255,255,255,0.28); }
@media (prefers-reduced-motion: reduce) {
  .pl-coast { stroke-dashoffset: 0; fill-opacity: 1; }
  .pl-pin-drop, .pl-words { opacity: 1; transform: none; }
  .pl-ripple { display: none; }
  .preloader.is-done { transform: none; opacity: 0; transition: opacity 0.3s; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  display: flex; align-items: center; gap: clamp(0.75rem, 2.5vw, 2rem);
  padding: 1rem var(--gutter);
  padding-top: max(1rem, env(safe-area-inset-top));
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 180%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,248,236,0.92) 0%, rgba(255,248,236,0.6) 55%, transparent 100%);
  transition: opacity 0.4s var(--ease);
}
.site-header.scrolled, body.solid-header .site-header {
  background: rgba(255, 248, 236, 0.95);
  backdrop-filter: saturate(1.3) blur(14px); -webkit-backdrop-filter: saturate(1.3) blur(14px);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
  padding-top: 0.6rem; padding-bottom: 0.6rem;
}
.site-header.scrolled::before, body.solid-header .site-header::before { opacity: 0; }

.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--sea-ink); min-width: 0; }
.site-header.scrolled .brand, body.solid-header .brand { color: var(--navy); }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  color: #fff;
  background: linear-gradient(155deg, var(--coral), var(--terracotta));
  box-shadow: 0 6px 16px rgba(194,65,12,0.3);
}
.site-header.scrolled .brand-mark, body.solid-header .brand-mark { background: linear-gradient(155deg, var(--coral), var(--terracotta)); color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; white-space: nowrap; }
.brand-text strong i { color: var(--terracotta); font-style: normal; }
.site-header.scrolled .brand-text strong i, body.solid-header .brand-text strong i { color: var(--coral-deep); }
.brand-text em { font-style: normal; font-family: var(--font-sans); font-size: 0.72rem; font-weight: 500; color: var(--ink-faint); white-space: nowrap; }

.site-nav { display: flex; gap: clamp(0.6rem, 1.6vw, 1.5rem); margin-left: auto; font-family: var(--font-sans); font-size: 0.86rem; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--sea-ink); padding: 0.4rem 0; position: relative; white-space: nowrap; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--coral); transition: right 0.3s var(--ease); }
.site-nav a:hover::after { right: 0; }
.site-header.scrolled .site-nav a, body.solid-header .site-nav a { color: var(--navy); }

.lang-switch {
  display: inline-flex; padding: 3px; border-radius: 999px; flex-shrink: 0;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.lang-switch button {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  font-family: var(--font-sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 0.38rem 0.7rem; color: var(--sea-ink); min-width: 40px; min-height: 32px;
}
.lang-switch button[aria-pressed="true"] { background: var(--sea); color: #fff; }
.site-header.scrolled .lang-switch, body.solid-header .lang-switch { background: #fff; border-color: var(--line); }
.site-header.scrolled .lang-switch button, body.solid-header .lang-switch button { color: var(--navy); }
.site-header.scrolled .lang-switch button[aria-pressed="true"], body.solid-header .lang-switch button[aria-pressed="true"] { background: var(--sea); color: #fff; }

.nav-toggle { display: none; background: transparent; border: 0; cursor: pointer; width: 44px; height: 44px; padding: 0; border-radius: 10px; color: var(--sea-ink); }
.site-header.scrolled .nav-toggle, body.solid-header .nav-toggle { color: var(--navy); }
.nav-toggle-bars { display: grid; gap: 5px; width: 22px; margin: auto; }
.nav-toggle-bars span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-toggle { display: block; order: 3; }
  .lang-switch { margin-left: auto; order: 2; }
  .site-nav {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: 1.2rem;
    margin: 0; background: linear-gradient(160deg, var(--sea-deep), var(--sea)); font-size: 1.6rem; font-family: var(--font-display);
    opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s;
  }
  .site-nav a, .site-header.scrolled .site-nav a, body.solid-header .site-nav a { color: var(--cream); }
  body.nav-open .site-nav { opacity: 1; visibility: visible; }
  body.nav-open .nav-toggle { color: var(--cream); }
}
@media (max-width: 420px) {
  .brand-text em { display: none; }
  .brand-mark { width: 36px; height: 36px; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.85rem 1.35rem; min-height: 48px; border-radius: 999px; text-decoration: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-brass { background: var(--terracotta); color: #fff; box-shadow: 0 10px 26px rgba(194,65,12,0.28); }
.btn-brass:hover { background: #A8380A; }
.btn-outline { border-color: var(--sea); color: var(--sea); background: #fff; }
.btn-outline:hover { background: var(--sky); }
.btn-ink { background: var(--sea); color: #fff; }

/* ============================================================
   HERO: THE FLIGHT
   ============================================================ */
.flight {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  background: #BFE6F5; color: var(--ink); isolation: isolate;
  display: flex; align-items: flex-end;
}
.flight-map { position: absolute; inset: 0; z-index: 0; }
.flight-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(40% 55% at 68% 50%, #FFF1D6, transparent 70%),
    linear-gradient(180deg, #CDEBF7, #9ED8EE);
}
.flight-map.is-live .flight-fallback { opacity: 0; transition: opacity 1.2s; }
.flight-map .maplibregl-canvas { outline: none; }
.flight-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,248,236,0.95) 0%, rgba(255,248,236,0.72) 30%, rgba(255,248,236,0) 52%),
    linear-gradient(0deg, rgba(255,248,236,0.7) 0%, rgba(255,248,236,0) 22%);
}
.flight-inner {
  position: relative; z-index: 2; width: 100%; margin: 0;
  /* Hugs the left edge on wide screens so the flight has the rest. */
  padding: calc(var(--header-h) + 3rem) var(--gutter) 7.5rem clamp(1rem, 3.2vw, 3.5rem);
}
.flight-inner > * { max-width: 600px; }
.stage-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 1.2rem;
  font-family: var(--font-sans); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; color: var(--terracotta);
}
.stage-kicker i { font-style: normal; opacity: 0.6; }
.stage-title { font-size: clamp(2.6rem, 6.6vw, 5.2rem); letter-spacing: -0.01em; line-height: 1; margin-bottom: 1.4rem; color: var(--sea-ink); }
.stage-title em { font-style: normal; color: var(--sea); background: linear-gradient(transparent 64%, var(--saffron-lt) 64%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.stage-lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); margin: 0 0 2rem; max-width: 520px; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.4rem; }
.stage-facts { display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; margin: 0; }
.stage-facts div { display: flex; flex-direction: column; }
.stage-facts dt { font-family: var(--font-display); font-size: 2.2rem; color: var(--sea); line-height: 1; }
.stage-facts div:nth-child(2) dt { color: var(--terracotta); }
.stage-facts div:nth-child(3) dt { color: var(--olive); }
.stage-facts dd { margin: 0.3rem 0 0; font-family: var(--font-sans); font-size: 0.78rem; color: var(--ink-soft); font-weight: 500; }

/* The card for the city the camera is over. */
.flight-card {
  position: absolute; z-index: 3; right: var(--gutter); top: calc(var(--header-h) + 2.2rem);
  width: min(360px, 34vw); padding: 1.3rem 1.3rem 1.1rem; border-radius: var(--radius-lg);
  background: #fff; border: 0; border-top: 6px solid var(--sea);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.flight-card.is-in { opacity: 1; transform: none; }
.flight-card.is-final { border-top-color: var(--terracotta); }
.fc-kicker { margin: 0; font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; color: var(--sea); }
.fc-title { font-size: 2.1rem; margin: 0.1rem 0 0.4rem; color: var(--sea-ink); }
.flight-card.is-final .fc-title, .flight-card.is-final .fc-kicker { color: var(--terracotta); }
.fc-blurb { margin: 0 0 0.9rem; font-size: 0.98rem; line-height: 1.45; color: var(--ink-soft); }
.fc-places { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.fc-places li { display: grid; gap: 0.3rem; }
.fc-places img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.fc-places span { font-family: var(--font-sans); font-size: 0.7rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.fc-voices { margin: 0 0 0.8rem; font-family: var(--font-sans); font-size: 0.78rem; color: var(--ink-soft); }
.fc-voices b { color: var(--sea-ink); font-weight: 700; }
.fc-cta { display: inline-flex; font-family: var(--font-sans); font-size: 0.85rem; font-weight: 700; color: #fff; background: var(--sea); padding: 0.55rem 1rem; border-radius: 999px; text-decoration: none; }
.fc-cta--ghost { background: var(--sky); color: var(--sea-deep); }
.flight-card.is-final .fc-cta { background: var(--terracotta); color: #fff; }

.flight-controls {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 1.4rem; margin: 0 auto; width: max-content; max-width: calc(100% - 2 * var(--gutter));
  display: flex; align-items: center; gap: 0.8rem; padding: 0.4rem 0.5rem; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-md);
}
.flight-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; border: 0; cursor: pointer; border-radius: 999px;
  background: var(--sky); color: var(--sea-deep); min-width: 36px; height: 36px; padding: 0 0.7rem; justify-content: center;
  font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600;
}
.flight-btn:hover { background: #C6E7F7; }
.flight-btn .i-play { display: none; }
.flight.is-paused .flight-btn .i-play { display: block; }
.flight.is-paused .flight-btn .i-pause { display: none; }
.flight-skip { white-space: nowrap; }
.flight-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.flight-dot { width: 22px; height: 28px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.flight-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(14,111,174,0.3); transition: transform 0.3s, background 0.3s; }
.flight-dot--home::before { background: var(--coral); }
.flight-dot[aria-current="step"]::before { background: var(--sea); transform: scale(1.6); }
.flight-dot--home[aria-current="step"]::before { background: var(--terracotta); }
.flight .maplibregl-ctrl-attrib { font-family: var(--font-sans); font-size: 10px; }
.flight .maplibregl-ctrl-bottom-right { bottom: 4.8rem; }

@media (max-width: 900px) {
  .flight { align-items: flex-end; }
  .flight-veil { background: linear-gradient(0deg, rgba(255,248,236,1) 0%, rgba(255,248,236,0.95) 40%, rgba(255,248,236,0) 56%); }
  .flight-inner { padding-top: 54vh; padding-top: 54svh; padding-bottom: 6.5rem; }
  .stage-title { font-size: clamp(2.3rem, 10vw, 3.2rem); }
  .flight-card {
    left: var(--gutter); right: var(--gutter); width: auto; top: calc(var(--header-h) + 0.6rem);
    padding: 0.85rem 0.95rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.8rem; align-items: center;
  }
  .fc-title { font-size: 1.45rem; margin: 0; }
  .fc-blurb, .fc-voices { display: none; }
  .fc-places { grid-column: 1 / -1; margin: 0.6rem 0 0; }
  .fc-places img { aspect-ratio: 4 / 3; }
  .fc-cta { grid-row: 1 / span 2; grid-column: 2; font-size: 0.78rem; padding: 0.5rem 0.8rem; }
  .stage-actions .btn { flex: 1 1 auto; }
  .stage-facts dt { font-size: 1.6rem; }
  .flight .maplibregl-ctrl-bottom-right { bottom: auto; top: calc(var(--header-h) + 13.2rem); }
}
@media (max-width: 520px) {
  .flight-skip span { font-size: 0.72rem; }
  .flight-dot { width: 15px; }
  .flight-dot::before { width: 6px; height: 6px; }
  .stage-facts { gap: 1rem 1.6rem; }
  .flight-controls { gap: 0.3rem; }
}

/* ============================================================
   SECTION SCAFFOLDING
   ============================================================ */
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 1rem; padding: 0.35rem 0.85rem; border-radius: 999px;
  font-family: var(--font-sans); font-size: 0.82rem; font-weight: 700; color: var(--terracotta); background: #FDE3D6;
  transform: rotate(-1.5deg);
}
.section-eyebrow--light { color: var(--sea-ink); background: var(--saffron-lt); }
.eyebrow-line { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.section-title { font-size: clamp(2.1rem, 4.6vw, 3.6rem); color: var(--sea-ink); margin-bottom: 1rem; }
.section-title--light { color: #fff; }
.section-sub { font-size: 1.1rem; color: var(--ink-soft); max-width: 640px; margin: 0; }
.section-sub--light { color: rgba(255,255,255,0.9); }

/* A strip of Sardinian weave between colour blocks: terracotta and
   saffron triangles on the sea, the way the pibiones rugs border a field. */
.weave { position: relative; }
.weave::before {
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 24px; z-index: 2; pointer-events: none;
  background:
    linear-gradient(135deg, var(--terracotta) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(225deg, var(--terracotta) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(315deg, var(--saffron) 25%, transparent 25%) 12px 12px / 24px 24px,
    linear-gradient(45deg, var(--saffron) 25%, transparent 25%) 12px 12px / 24px 24px,
    var(--sea);
}
.story-head { max-width: var(--maxw); margin: 0 auto clamp(2.5rem, 5vw, 4rem); padding: 0 var(--gutter); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   THESIS
   ============================================================ */
.thesis { max-width: 900px; margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter) clamp(2rem, 5vw, 4rem); text-align: center; }
.thesis-eyebrow { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--terracotta); margin: 0 0 1.2rem; }
.thesis-text { font-family: var(--font-serif); font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.55; color: var(--sea-ink); margin: 0; }

/* ============================================================
   STORY TIMELINE
   ============================================================ */
.story { padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.timeline { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--maxw); position: relative; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) + 7px); width: 3px; border-radius: 3px; background: linear-gradient(var(--sea), var(--turquoise), var(--saffron), var(--terracotta), var(--olive)); }
.chapter {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding: 0 0 clamp(3rem, 6vw, 5rem) 3rem;
}
.chapter::before {
  content: attr(data-year-it); position: absolute; left: 0; top: 0.2rem;
  font-family: var(--font-sans); font-size: 0.8rem; font-weight: 800; color: var(--chap, var(--sea));
  padding-left: 1.7rem; white-space: nowrap;
}
html[data-lang="en"] .chapter::before { content: attr(data-year-en); }
.chapter::after { content: ""; position: absolute; left: 0; top: 0.3rem; width: 17px; height: 17px; border-radius: 50%; background: var(--chap, var(--sea)); border: 3px solid var(--parchment); box-shadow: 0 0 0 2px var(--chap, var(--sea)); }
.chapter:nth-child(5n+1) { --chap: var(--sea); }
.chapter:nth-child(5n+2) { --chap: var(--terracotta); }
.chapter:nth-child(5n+3) { --chap: #B07A12; }
.chapter:nth-child(5n+4) { --chap: var(--olive); }
.chapter:nth-child(5n+5) { --chap: var(--turquoise); }
.chapter-media {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); cursor: zoom-in;
  aspect-ratio: 4 / 3; background: var(--parchment-2); margin-top: 1.8rem;
}
.chapter-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.chapter-media:hover img { transform: scale(1.04); }
.media-tag {
  position: absolute; left: 1rem; bottom: 1rem; padding: 0.35rem 0.75rem; border-radius: 999px;
  background: #fff; color: var(--chap, var(--sea)); font-family: var(--font-sans); font-size: 0.78rem; font-weight: 700; box-shadow: var(--shadow-sm);
}
.chapter-body { padding-top: 1.8rem; }
.chapter-body--wide { grid-column: 1 / -1; max-width: 760px; }
.chapter-num { margin: 0 0 0.4rem; font-family: var(--font-sans); font-size: 0.8rem; color: var(--chap, var(--sea)); font-weight: 700; }
.chapter-body h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); color: var(--sea-ink); margin-bottom: 0.8rem; }
.chapter-body p { margin: 0; color: var(--ink-soft); font-family: var(--font-serif); font-size: 1.12rem; }
.chapter-link { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1.2rem; font-family: var(--font-sans); font-weight: 700; font-size: 0.9rem; color: var(--coral-deep); text-decoration: none; }
.chapter:nth-child(even) .chapter-media { order: 2; }
@media (max-width: 820px) {
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 2.1rem; }
  .chapter:nth-child(even) .chapter-media { order: 0; }
  .chapter-media { margin-top: 1.9rem; }
  .chapter-body { padding-top: 1.2rem; }
  .chapter-media + .chapter-body { padding-top: 1.2rem; }
  .chapter-body--wide { padding-top: 1.9rem; }
}

/* ============================================================
   SPEAK
   ============================================================ */
.speak {
  position: relative; padding: clamp(4.5rem, 8vw, 6.5rem) 0; color: #fff;
  background: radial-gradient(70% 60% at 85% 0%, rgba(23,169,196,0.55), transparent 60%), linear-gradient(165deg, var(--sea-deep), var(--sea) 60%, #1494B8);
}
.speak-head { max-width: var(--maxw); margin: 0 auto 2rem; padding: 0 var(--gutter); }
.voice-tabs {
  display: flex; gap: 0.7rem; max-width: var(--maxw); margin: 0 auto 1.6rem; padding: 0 var(--gutter) 0.4rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.voice-tabs::-webkit-scrollbar { display: none; }
.voice-tab {
  display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; cursor: pointer; text-align: left;
  padding: 0.45rem 1rem 0.45rem 0.45rem; border-radius: 999px; border: 0; background: rgba(255,255,255,0.14); color: #fff;
  transition: background 0.25s, border-color 0.25s;
}
.voice-tab img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; filter: sepia(0.25); }
.voice-tab span { display: flex; flex-direction: column; line-height: 1.2; }
.voice-tab strong { font-family: var(--font-sans); font-size: 0.86rem; font-weight: 600; }
.voice-tab em { font-style: normal; font-family: var(--font-sans); font-size: 0.72rem; opacity: 0.65; }
.voice-tab:hover { background: rgba(255,255,255,0.24); }
.voice-tab[aria-selected="true"] { background: var(--saffron); color: var(--sea-ink); }
.voice-tab[aria-selected="true"] img { filter: none; }

.speak-body {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start;
}
.portrait-stage { margin: 0; text-align: center; position: sticky; top: 6rem; }
.portrait-frame {
  position: relative; width: min(100%, 340px); margin: 0 auto; aspect-ratio: 4 / 5; border-radius: 180px 180px 22px 22px; overflow: hidden;
  border: 6px solid #fff; box-shadow: 0 30px 70px rgba(5,40,70,0.45); background: var(--navy-soft);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: sepia(0.2) contrast(1.02); animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.025); } }
.portrait-halo { position: absolute; inset: 0; box-shadow: inset 0 0 0 0 rgba(226,200,140,0); transition: box-shadow 0.4s; pointer-events: none; }
.portrait-stage.is-speaking .portrait-halo { box-shadow: inset 0 0 60px 8px rgba(244,178,60,0.5); }
.portrait-wave { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; gap: 4px; align-items: flex-end; height: 26px; opacity: 0; transition: opacity 0.3s; }
.portrait-wave i { width: 4px; height: 30%; border-radius: 2px; background: var(--saffron); }
.portrait-stage.is-speaking .portrait-wave { opacity: 1; }
.portrait-stage.is-speaking .portrait-wave i { animation: eq 0.9s ease-in-out infinite; }
.portrait-wave i:nth-child(2) { animation-delay: 0.15s !important; }
.portrait-wave i:nth-child(3) { animation-delay: 0.3s !important; }
.portrait-wave i:nth-child(4) { animation-delay: 0.45s !important; }
.portrait-wave i:nth-child(5) { animation-delay: 0.6s !important; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.portrait-stage figcaption { margin-top: 1rem; display: grid; gap: 0.2rem; }
.portrait-stage figcaption strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; }
.portrait-stage figcaption span { font-family: var(--font-sans); font-size: 0.86rem; color: rgba(255,255,255,0.85); }
.portrait-credit { margin: 0.5rem 0 0; font-family: var(--font-sans); font-size: 0.7rem; color: rgba(255,255,255,0.7); }
.speak-note { max-width: var(--maxw); margin: 2rem auto 0; padding: 0 var(--gutter); font-family: var(--font-sans); font-size: 0.82rem; color: rgba(255,255,255,0.78); }
@media (max-width: 860px) {
  .speak-body { grid-template-columns: minmax(0, 1fr); }
  .portrait-stage { position: static; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; align-items: center; text-align: left; }
  .portrait-frame { width: 96px; border-radius: 50%; aspect-ratio: 1; }
  .portrait-stage figcaption { margin: 0; }
  .portrait-stage figcaption strong { font-size: 1.25rem; }
  .portrait-credit { grid-column: 1 / -1; margin: 0; }
  .portrait-wave { bottom: 0.4rem; height: 16px; gap: 2px; }
  .portrait-wave i { width: 3px; }
}

/* ============================================================
   CHAT
   ============================================================ */
.chat {
  display: flex; flex-direction: column; min-height: 540px; max-height: 76vh; border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; color: var(--ink); box-shadow: var(--shadow-lg); border: 0;
}
.chat-topbar { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem; background: var(--parchment); color: var(--sea-ink); flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--saffron); background: var(--sky); }
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.chat-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1 1 140px; }
.chat-who strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; }
.chat-who > span { font-family: var(--font-sans); font-size: 0.74rem; color: var(--ink-faint); display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.chat-role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-who .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--olive); flex-shrink: 0; }
.chat-mode { font-family: var(--font-sans); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.25rem 0.55rem; border-radius: 999px; }
.chat-mode--live { background: #E1F0D2; color: #3E6419; }
.chat-mode--offline { background: var(--saffron-lt); color: #7A5205; }
.chat-voice, .chat-reset {
  display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; border-radius: 999px; min-height: 34px;
  padding: 0.35rem 0.7rem; border: 1px solid var(--line); background: #fff; color: var(--sea-ink);
  font-family: var(--font-sans); font-size: 0.74rem; font-weight: 600;
}
.chat-voice[aria-pressed="true"] { background: var(--sky); border-color: #B7DDF0; }
.chat-voice[aria-pressed="false"] .wave-1, .chat-voice[aria-pressed="false"] .wave-2 { opacity: 0.2; }
.chat.is-speaking .chat-voice .wave-1 { animation: pulse 0.9s infinite; }
.chat.is-speaking .chat-voice .wave-2 { animation: pulse 0.9s 0.3s infinite; }
@keyframes pulse { 50% { opacity: 0.2; } }
.chat-log { flex: 1; overflow-y: auto; padding: 1.1rem 1rem; display: flex; flex-direction: column; gap: 0.8rem; scroll-behavior: smooth; }
.msg { display: flex; gap: 0.6rem; align-items: flex-end; max-width: 92%; }
.msg--me { align-self: flex-end; }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--parchment-2); }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.msg-bubble { margin: 0; padding: 0.7rem 0.95rem; border-radius: 18px; font-size: 1rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--them .msg-bubble { background: var(--parchment); border: 0; border-bottom-left-radius: 6px; font-family: var(--font-serif); font-size: 1.06rem; }
.msg--me .msg-bubble { background: var(--sea); color: #fff; border-bottom-right-radius: 6px; font-family: var(--font-sans); font-size: 0.92rem; }
.typing { display: inline-flex; gap: 4px; padding: 0.3rem 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; } .typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.chat-suggests { display: flex; gap: 0.5rem; padding: 0 1rem 0.7rem; overflow-x: auto; scrollbar-width: none; }
.chat-suggests::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; cursor: pointer; border-radius: 999px; padding: 0.5rem 0.85rem; min-height: 38px;
  border: 0; background: var(--saffron-lt); color: var(--sea-ink);
  font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; white-space: nowrap;
}
.chip:hover { background: var(--saffron); }
.chat-input { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--line); background: #fff; }
.chat-input input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 0.75rem 1rem; font-family: var(--font-sans); font-size: 16px;
  background: var(--cream); color: var(--ink);
}
.chat-input input:focus { outline: 2px solid var(--sea); outline-offset: 0; }
.chat-mic, .chat-send { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; }
.chat-mic { background: var(--sky); color: var(--sea-deep); }
.chat-mic[aria-pressed="true"] { background: var(--coral); color: #fff; animation: ping 1.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(217,96,63,0.5); } 100% { box-shadow: 0 0 0 14px rgba(217,96,63,0); } }
.chat-send { background: var(--terracotta); color: #fff; }
.chat.is-busy .chat-send { opacity: 0.5; }
@media (max-width: 860px) {
  .chat { min-height: 480px; max-height: 70vh; }
  .chat-reset-label, .chat-voice-label { display: none; }
  .chat-voice, .chat-reset { padding: 0.35rem; width: 36px; justify-content: center; }
}

/* ============================================================
   PLACES
   ============================================================ */
.places { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.place-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1.4rem; }
.place-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 0; box-shadow: var(--shadow-sm); transition: box-shadow 0.3s, transform 0.3s var(--ease); }
.place-card:hover { box-shadow: var(--shadow-md); }
.place-photo { display: block; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 16 / 10; overflow: hidden; background: var(--parchment-2); width: 100%; }
.place-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.place-card:hover .place-photo img { transform: scale(1.04); }
.place-body { padding: 1.15rem 1.2rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.place-body h3 { font-size: 1.5rem; color: var(--sea-ink); margin-bottom: 0.3rem; }
.place-tag { margin: 0 0 0.6rem; font-family: var(--font-serif); font-style: italic; color: var(--terracotta); font-size: 1.08rem; line-height: 1.4; }
.place-extract { margin: 0 0 1rem; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.place-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 38px; padding: 0.45rem 0.8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--navy); text-decoration: none;
  font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600;
}
.pill:hover { border-color: var(--sea); }
.pill--listen { background: var(--sea); color: #fff; border-color: var(--sea); }
.pill--listen.is-on { background: var(--terracotta); border-color: var(--terracotta); color: #fff; }
.pill--ghost { border-color: transparent; background: transparent; color: var(--coral-deep); }
.place-credit { margin: 0.8rem 0 0; font-family: var(--font-sans); font-size: 0.66rem; color: var(--ink-faint); overflow-wrap: anywhere; }
.place-card--compact .place-body h3 { font-size: 1.2rem; }

/* ============================================================
   ITALIA: CITY GRID
   ============================================================ */
.italia {
  padding: clamp(4.5rem, 8vw, 6.5rem) 0; color: var(--ink);
  background: linear-gradient(180deg, #FDE3D2, #FBD3BD);
}
.city-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.2rem; }
.city-card {
  display: flex; flex-direction: column; text-align: left; cursor: pointer; padding: 0; overflow: hidden;
  border-radius: var(--radius-lg); border: 0; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.city-card:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: var(--shadow-md); }
.city-collage { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; aspect-ratio: 16 / 9; }
.city-collage img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.city-collage img:first-child { grid-row: 1 / span 2; }
.city-body { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 1.15rem 1.15rem; }
.city-region { font-family: var(--font-sans); font-size: 0.8rem; color: var(--terracotta); font-weight: 700; }
.city-name { font-family: var(--font-display); font-size: 1.9rem; font-weight: 400; line-height: 1.1; color: var(--sea-ink); }
.city-blurb { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.45; }
.city-voices { display: flex; align-items: center; gap: 0; margin-top: 0.6rem; }
.city-voices img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 2px solid #fff; margin-right: -8px; }
.city-voices em { font-style: normal; margin-left: 16px; font-family: var(--font-sans); font-size: 0.78rem; font-weight: 600; color: var(--sea); }

/* ============================================================
   SHEET + DRAWER
   ============================================================ */
.sheet, .drawer { position: fixed; inset: 0; z-index: 250; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(11,46,74,0.45); opacity: 0; transition: opacity 0.26s; backdrop-filter: blur(3px); }
.is-open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 100%); overflow-y: auto; overscroll-behavior: contain;
  background: var(--parchment); box-shadow: var(--shadow-lg); padding: clamp(1.4rem, 4vw, 2.6rem); padding-top: 3.6rem;
  transform: translateX(30px); opacity: 0; transition: transform 0.3s var(--ease), opacity 0.26s;
}
.is-open .sheet-panel, .is-open .drawer-panel { transform: none; opacity: 1; }
.sheet-close {
  position: absolute; top: 0.8rem; right: 0.8rem; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--navy); cursor: pointer; display: grid; place-items: center;
}
.sheet-title { font-size: clamp(2.3rem, 5vw, 3.3rem); color: var(--sea-ink); margin-bottom: 0.6rem; }
.sheet-lede { margin: 0 0 1.6rem; font-size: 1.1rem; color: var(--ink-soft); }
.sheet-h { font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin: 1.6rem 0 0.8rem; }
.sheet-voices { display: grid; gap: 0.6rem; }
.voice-row {
  display: flex; align-items: center; gap: 0.85rem; width: 100%; text-align: left; cursor: pointer; padding: 0.6rem 0.8rem 0.6rem 0.6rem;
  border-radius: 16px; border: 1px solid var(--line); background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
}
.voice-row:hover { border-color: var(--sea); box-shadow: var(--shadow-sm); }
.voice-row img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; flex-shrink: 0; }
.voice-row span { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.voice-row strong { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--sea-ink); }
.voice-row em { font-style: normal; font-family: var(--font-sans); font-size: 0.78rem; color: var(--ink-faint); }
.voice-row-cta { display: inline-flex; align-items: center; gap: 0.35rem; flex-shrink: 0; font-family: var(--font-sans); font-size: 0.76rem; font-weight: 700; color: var(--coral-deep); }
.sheet-places { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.drawer-panel {
  position: absolute; right: 0; bottom: 0; top: 0; width: min(560px, 100%); display: flex; padding: 3.6rem 0.8rem 0.8rem;
  background: linear-gradient(165deg, var(--sea-deep), var(--sea)); transform: translateX(30px); opacity: 0; transition: transform 0.3s var(--ease), opacity 0.26s;
}
.drawer-panel .sheet-close { background: #fff; color: var(--sea-ink); border-color: transparent; }
.chat--drawer { flex: 1; max-height: none; min-height: 0; }
@media (max-width: 600px) {
  .voice-row-cta { display: none; }
  .sheet-panel { padding-top: 3.8rem; }
  .drawer-panel { padding: 3.6rem 0 0; }
  .chat--drawer { border-radius: 18px 18px 0 0; }
}

/* ============================================================
   ON SITE (QR PLATES)
   ============================================================ */
.street { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.street-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.street-head { max-width: 760px; margin-bottom: 3rem; }
.street-lede { font-size: 1.12rem; color: var(--ink-soft); margin: 0; }
.street-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; margin-bottom: 2rem; }
.street-option { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1.4rem; padding: 1.4rem; border-radius: var(--radius-lg); background: #fff; border: 0; box-shadow: var(--shadow-sm); }
.street-mock { position: relative; height: 230px; display: flex; flex-direction: column; align-items: center; }
.mock-plaque {
  position: relative; width: 150px; height: 120px; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: center;
  background: linear-gradient(160deg, #EAD9A9, #C39A50 55%, #9A7535); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 8px 18px rgba(0,0,0,0.18);
}
.mock-crest { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(60,40,10,0.55); }
.mock-title { width: 70%; height: 7px; border-radius: 3px; background: rgba(60,40,10,0.55); }
.mock-line { width: 86%; height: 4px; border-radius: 2px; background: rgba(60,40,10,0.35); }
.mock-line.short { width: 55%; }
.mock-post { width: 12px; flex: 1; background: linear-gradient(90deg, #3a3f48, #5a616d, #3a3f48); }
.mock-plate { position: absolute; top: 140px; width: 64px; height: 64px; padding: 5px; border-radius: 6px; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.25); }
.mock-inset { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; padding: 3px; border-radius: 4px; background: rgba(255,255,255,0.9); }
.street-tag { margin: 0 0 0.3rem; font-family: var(--font-sans); font-size: 0.8rem; font-weight: 700; color: var(--terracotta); }
.street-option-body h3 { font-size: 1.5rem; color: var(--sea-ink); margin-bottom: 0.5rem; }
.street-option-body p { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }
.street-demo {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; align-items: center; padding: 1.8rem; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--sea-deep), var(--sea) 70%, var(--turquoise)); color: #fff;
}
.street-demo-code { background: #fff; padding: 10px; border-radius: 14px; }
.street-demo-code img { width: 100%; height: auto; }
.street-demo-body h3 { font-size: 1.7rem; margin-bottom: 0.6rem; }
.street-demo-body p { margin: 0 0 0.8rem; color: rgba(255,255,255,0.9); }
.street-demo-note { font-family: var(--font-sans); font-size: 0.8rem; color: rgba(255,255,255,0.75) !important; }
.street-demo .btn-ink { background: var(--saffron); color: var(--sea-ink); margin-top: 0.4rem; }
@media (max-width: 900px) {
  .street-options { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .street-option { grid-template-columns: minmax(0, 1fr); }
  .street-mock { height: 220px; }
  .street-demo { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .street-demo-code { width: 200px; }
}

/* ============================================================
   THE APP (PHONE DEMO)
   ============================================================ */
.app {
  padding: clamp(4.5rem, 8vw, 6.5rem) 0; color: var(--ink); overflow: hidden;
  background: radial-gradient(55% 70% at 85% 50%, rgba(255,255,255,0.55), transparent 65%), linear-gradient(160deg, #FFD36E, var(--saffron));
}
.app-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.app-steps { list-style: none; margin: 1.6rem 0 2rem; padding: 0; display: grid; gap: 0.6rem; }
.app-steps li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.8rem 1rem; border-radius: 16px; border: 1px solid transparent; transition: background 0.4s, border-color 0.4s; }
.app-steps li.is-on { background: #fff; box-shadow: var(--shadow-md); }
.app-steps b { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-sans); font-weight: 800; font-size: 0.9rem; background: rgba(255,255,255,0.6); color: var(--sea-ink); transition: background 0.4s, color 0.4s; }
.app-steps li.is-on b { background: var(--terracotta); color: #fff; }
.app-steps li > span { display: flex; flex-direction: column; font-size: 1rem; color: var(--ink-soft); line-height: 1.4; }
.app-steps strong { color: var(--sea-ink); font-size: 1.1rem; }
.app-get { display: flex; gap: 1.2rem; align-items: center; padding: 1.2rem; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-md); }
.app-qr { flex-shrink: 0; width: 132px; padding: 8px; background: #fff; border-radius: 12px; }
.app-get-title { margin: 0 0 0.3rem !important; font-family: var(--font-display); font-size: 1.4rem; color: var(--sea-ink) !important; }
.app-get-body p { margin: 0 0 0.8rem; font-size: 0.95rem; color: var(--ink-soft); }
.store-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.store-badge { display: inline-flex; align-items: center; padding: 0.45rem 0.85rem; border-radius: 10px; border: 1px solid var(--line); font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); }
@media (max-width: 900px) {
  .app-inner { grid-template-columns: minmax(0, 1fr); }
  .phone-wrap { order: -1; }
}
@media (max-width: 480px) {
  .app-get { flex-direction: column; align-items: flex-start; }
}

.phone-wrap { display: grid; place-items: center; }
.phone {
  position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 19; border-radius: 46px; padding: 11px;
  background: linear-gradient(160deg, #1d3a55, #0b2236); box-shadow: 0 40px 90px rgba(120,70,0,0.35), inset 0 0 0 1.5px rgba(255,255,255,0.15);
}
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; border-radius: 14px; background: #05070c; z-index: 5; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--cream); color: var(--ink); }
.ph-scene { position: absolute; inset: 0; opacity: 0; transform: scale(1.03); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.ph-scene.is-on { opacity: 1; transform: none; }

/* scene 1: the camera */
.ph-scan { background: #000; }
.ph-scan-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6) saturate(0.9); }
.ph-plate { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-4deg); width: 38%; padding: 7px; background: #fff; border-radius: 8px; box-shadow: 0 10px 24px rgba(0,0,0,0.5); }
.ph-finder { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: 58%; aspect-ratio: 1; }
.ph-finder span { position: absolute; width: 26px; height: 26px; border: 3px solid #fff; }
.ph-finder span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.ph-finder span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.ph-finder span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.ph-finder span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.ph-laser { position: absolute; left: 6%; right: 6%; height: 2px; background: var(--coral); box-shadow: 0 0 12px var(--coral); animation: laser 1.6s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 8%; } 50% { top: 90%; } }
.ph-hint { position: absolute; left: 0; right: 0; bottom: 14%; margin: 0; text-align: center; color: #fff; font-family: var(--font-sans); font-size: 0.8rem; font-weight: 600; }

/* scene 2: the place */
.ph-hero { height: 46%; background-size: cover; background-position: center; }
.ph-sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 40%; background: var(--cream); border-radius: 22px 22px 0 0; padding: 16px 16px 12px; }
.ph-kicker { margin: 0; font-family: var(--font-sans); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral-deep); font-weight: 700; }
.ph-title { margin: 0.15rem 0 0.35rem; font-size: 1.2rem; font-weight: 600; color: var(--navy); line-height: 1.1; }
.ph-text { margin: 0 0 0.7rem; font-size: 0.78rem; line-height: 1.4; color: var(--ink-soft); }
.ph-play { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--sea); color: #fff; }
.ph-play b { width: 28px; height: 28px; border-radius: 50%; background: var(--brass-light); color: var(--navy); display: grid; place-items: center; font-size: 0.7rem; flex-shrink: 0; }
.ph-bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 22px; }
.ph-bars i { flex: 1; height: 30%; background: rgba(226,200,140,0.45); border-radius: 2px; }
.ph-play em { font-style: normal; font-family: var(--font-sans); font-size: 0.65rem; }
.phone.is-playing .ph-bars i { background: var(--brass-light); animation: eq 0.8s ease-in-out infinite; }
.phone.is-playing .ph-bars i:nth-child(3n) { animation-delay: 0.2s; }
.phone.is-playing .ph-bars i:nth-child(3n+1) { animation-delay: 0.4s; }
.phone.is-playing .ph-play b { background: var(--coral); color: #fff; }
.ph-chips { display: flex; gap: 6px; margin-top: 0.7rem; flex-wrap: wrap; }
.ph-chips > span { font-family: var(--font-sans); font-size: 0.62rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--navy); }

/* scene 3: the voice */
.ph-voice { background: linear-gradient(170deg, var(--sea-deep), var(--sea)); color: #fff; }
.ph-voice-top { padding: 50px 16px 10px; text-align: center; display: grid; justify-items: center; }
.ph-voice-top img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 2px solid var(--brass); }
.ph-voice .ph-title { color: var(--cream); margin-top: 0.5rem; }
.ph-voice .ph-kicker { color: var(--brass-light); }
.ph-wave { display: flex; gap: 3px; align-items: center; height: 20px; margin-top: 8px; }
.ph-wave i { width: 3px; height: 30%; background: var(--brass-light); border-radius: 2px; }
.phone.is-talking .ph-wave i { animation: eq 0.85s ease-in-out infinite; }
.phone.is-talking .ph-wave i:nth-child(2n) { animation-delay: 0.25s; }
.ph-bubbles { padding: 0 12px; display: grid; gap: 8px; }
.ph-bubbles p { margin: 0; font-size: 0.74rem; line-height: 1.4; padding: 8px 11px; border-radius: 14px; }
.ph-q { justify-self: end; background: var(--brass-light); color: var(--navy-deep); font-family: var(--font-sans); border-bottom-right-radius: 4px; max-width: 85%; }
.ph-a { background: rgba(255,255,255,0.1); border-bottom-left-radius: 4px; max-width: 92%; }
.phone.is-talking .ph-a { animation: type-in 4s steps(40) both; }
@keyframes type-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.ph-mic { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); width: 50px; height: 50px; border-radius: 50%; background: var(--coral); display: grid; place-items: center; box-shadow: 0 0 0 8px rgba(217,96,63,0.2); }
.ph-mic i { width: 12px; height: 18px; border-radius: 6px; border: 2.5px solid #fff; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-demo { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.about-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.about-lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 760px; margin: 0 0 2.4rem; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.2rem; }
.about-card { padding: 1.5rem; border-radius: var(--radius-lg); background: #fff; border-top: 6px solid var(--sea); box-shadow: var(--shadow-sm); }
.about-card:nth-child(2) { border-top-color: var(--terracotta); }
.about-card:nth-child(3) { border-top-color: var(--olive); }
.about-card h3 { font-size: 1.45rem; color: var(--sea-ink); margin-bottom: 0.6rem; }
.about-card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.about-note { margin: 2rem 0 0; font-family: var(--font-serif); font-size: 1.25rem; font-style: italic; color: var(--terracotta); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 280; background: rgba(8,35,57,0.95); display: grid; place-items: center; padding: 1rem; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 12px; }
.lightbox figcaption { margin-top: 0.8rem; text-align: center; color: rgba(252,248,239,0.75); font-family: var(--font-sans); font-size: 0.82rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(226,200,140,0.4); background: transparent; color: var(--cream); cursor: pointer; display: grid; place-items: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--sea-ink); color: rgba(255,255,255,0.85); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 2.4rem; }
.footer-name { font-family: var(--font-display); font-size: 2rem; margin: 0; color: #fff; }
.footer-name i { color: var(--saffron); font-style: normal; }
.footer-dates { margin: 0.2rem 0 0.8rem; font-family: var(--font-sans); font-size: 0.8rem; color: var(--brass-light); }
.footer-tribute { margin: 0; font-size: 1rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-col h4 { font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-light); margin-bottom: 0.4rem; }
.footer-col a { text-decoration: none; font-family: var(--font-sans); font-size: 0.88rem; }
.footer-col a:hover { color: var(--brass-light); }
.footer-credit { margin: 0.6rem 0 0; font-family: var(--font-sans); font-size: 0.74rem; color: rgba(252,248,239,0.55); }
.footer-base { max-width: var(--maxw); margin: 2.6rem auto 0; padding: 1.4rem var(--gutter) 0; border-top: 1px solid rgba(226,200,140,0.18); font-family: var(--font-sans); font-size: 0.76rem; color: rgba(252,248,239,0.5); display: grid; gap: 0.4rem; }
.footer-base p { margin: 0; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
