/* La Mansarda del Corso — tema "candlelit architectural archive" */
@font-face {
  font-family: "ModernEra";
  src: url("../fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --color-warm-parchment: #ffebd0;
  --color-candlelight: #fff8e9;
  --color-obsidian: #000000;
  --color-walnut-shell: #2f2116;
  --color-aged-bronze: #4f3622;
  --color-amber-glow: #fee197;
  --color-muted-gold: #987f61;

  --font-modernera: "ModernEra", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --text-caption: 16px;
  --text-body: 18px;
  --text-subheading: 20px;
  --text-heading-sm: 24px;
  --text-heading: 28px;
  --text-display: 40px;

  --gutter: 40px;
  --section-gap: 100px;
  --radius: 8px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --ink: var(--color-obsidian);
  --paper: var(--color-warm-parchment);
  --line: var(--color-obsidian);
  --header-h: 72px;
}

html[data-tone="dark"],
.tone-dark {
  --ink: var(--color-warm-parchment);
  --paper: var(--color-walnut-shell);
  --line: var(--color-muted-gold);
}

.tone-light {
  --ink: var(--color-obsidian);
  --paper: var(--color-warm-parchment);
  --line: var(--color-obsidian);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-modernera);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  transition: background-color .8s var(--ease), color .8s var(--ease);
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

h1, h2 { font-weight: 400; font-size: clamp(var(--text-heading), 3.4vw, var(--text-display)); line-height: 1.17; text-wrap: balance; }
h3 { font-weight: 500; font-size: var(--text-heading-sm); line-height: 1.2; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: 12px 16px; background: var(--color-walnut-shell); color: var(--color-warm-parchment);
  border-radius: var(--radius); transition: top .2s;
}
.skip:focus { top: 16px; }

/* layout */
.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-gap); }
.tone-dark { background: var(--color-walnut-shell); color: var(--color-warm-parchment); }
.tone-light { background: var(--color-warm-parchment); color: var(--color-obsidian); }
/* with motion the body itself fades between cream and walnut */
.js-motion .tone-dark,
.js-motion .tone-light { background: transparent; color: inherit; }

.eyebrow { font-size: var(--text-caption); line-height: 1.4; margin-bottom: 20px; }
.lead { max-width: 34em; margin-top: 24px; line-height: 1.4; }
.body + .body { margin-top: 16px; }
.body { max-width: 34em; }
.caption { font-size: var(--text-caption); line-height: 1.4; margin-top: 16px; }

/* links and buttons: the line is the affordance */
.link {
  display: inline-block; text-decoration: none; border-bottom: 1px solid var(--line);
  padding-bottom: 8px; transition: border-color .25s var(--ease), opacity .25s var(--ease);
}
.link:hover { border-color: var(--color-amber-glow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 18px; background: transparent; color: inherit; border: 1px solid currentColor;
  border-radius: var(--radius); text-decoration: none; font-size: var(--text-caption); font-weight: 500;
  line-height: 1.2; cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { opacity: .8; }

/* header */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--header-h); padding-inline: var(--gutter);
  color: var(--color-warm-parchment); transition: transform .4s var(--ease), background-color .4s var(--ease), color .4s var(--ease);
}
.hdr--solid { background: var(--paper); color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--line) 25%, transparent); }
.hdr--hidden { transform: translateY(-100%); }
.hdr:focus-within { transform: none; }
.wordmark { font-size: var(--text-caption); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; }
.nav { display: flex; align-items: center; gap: 20px; font-size: var(--text-caption); }
.nav ul { display: flex; gap: 20px; }
.nav__a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; border-bottom: 1px solid transparent; transition: border-color .25s var(--ease); }
.nav__a:hover, .nav__a[aria-current="true"] { border-color: var(--color-amber-glow); }
.hdr .btn { min-height: 40px; padding: 7px 16px; font-weight: 400; }

/* the road running through the page */
.rail { position: fixed; z-index: 30; left: 20px; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--color-muted-gold) 45%, transparent); pointer-events: none; }
.rail__fill { position: absolute; inset: 0; background: var(--color-muted-gold); transform-origin: 50% 0; transform: scaleY(0); }
.rail__label {
  position: fixed; z-index: 30; left: 26px; bottom: 28px; writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: var(--text-caption); line-height: 1; white-space: nowrap; transition: opacity .3s var(--ease);
}
html:not(.js-motion) .rail { display: none; }

/* hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--color-walnut-shell); color: var(--color-warm-parchment); }
.fill, .fill img, .fill video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fill video { opacity: 0; transition: opacity 1s var(--ease); }
.fill video.is-on { opacity: 1; }
.hero__copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.hero__copy > div { max-width: 22em; }
.hero h1 { font-size: clamp(var(--text-heading), 3.4vw, var(--text-display)); }
.hero__sub { margin-top: 12px; font-size: var(--text-caption); }
.hero__tools { display: flex; align-items: center; gap: 20px; font-size: var(--text-caption); white-space: nowrap; }

/* framed photographs */
.frame { position: relative; overflow: hidden; background: var(--color-aged-bronze); }
.frame img { width: 100%; }

.stack { display: grid; gap: 60px; }
.intro { display: grid; grid-template-columns: 2fr 3fr; gap: 40px; align-items: start; margin-bottom: 64px; }
.intro .lead { margin-top: 0; }

.duo { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; align-items: end; }
.duo--rev { grid-template-columns: 3fr 2fr; }
.room { display: grid; gap: 24px; }
.room__copy { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; }
.room__copy h3 { font-weight: 500; }

.split { display: grid; grid-template-columns: 2fr 3fr; gap: 60px; align-items: start; }
.split--text-first { grid-template-columns: 3fr 2fr; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 40px; border-top: 1px solid var(--line); }
.facts div { padding: 16px 20px 0 0; }
.facts dt { font-size: var(--text-caption); }
.facts dd { font-size: var(--text-heading); line-height: 1.17; margin-top: 4px; }

/* distance list */
.dist { margin-top: 32px; border-top: 1px solid var(--line); }
.dist li { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--text-caption); }
.dist span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* video that opens as you scroll */
.pin__stage { position: relative; height: 100svh; overflow: hidden; }
.costa__media { position: absolute; inset: 0; }
.costa__copy { position: absolute; left: var(--gutter); bottom: 40px; right: var(--gutter); max-width: 18em; color: var(--color-warm-parchment); }
.costa__copy p { margin-top: 16px; font-size: var(--text-body); max-width: 24em; }
.js-motion .pin { height: 200vh; }
.js-motion .pin__stage { position: sticky; top: 0; }
.js-motion .costa__media { transform-origin: 50% 50%; }
.js-motion .costa__copy { opacity: 0; }

/* the walk on the map */
.route__stage { display: grid; grid-template-columns: 2fr 3fr; gap: 60px; align-items: center; padding: var(--section-gap) var(--gutter); width: min(1280px, 100%); margin-inline: auto; }
.route__meter { font-size: var(--text-display); line-height: 1.17; font-variant-numeric: tabular-nums; margin: 32px 0 24px; }
.route__unit { font-size: var(--text-caption); display: block; margin-top: 4px; }
.route__step { padding-top: 16px; border-top: 1px solid var(--line); margin-bottom: 20px; }
.route__step h3 { font-weight: 400; font-size: var(--text-subheading); }
.route__step p { font-size: var(--text-caption); margin-top: 8px; }
.map { position: relative; aspect-ratio: 1; width: 100%; overflow: hidden; }
.map img, .map__route { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__path { fill: none; stroke: var(--color-amber-glow); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.map__start { fill: var(--color-walnut-shell); stroke: var(--color-amber-glow); stroke-width: 4; }
.map__home { fill: var(--color-amber-glow); }
.map__labels li { position: absolute; transform: translate(-50%, -50%); font-size: 16px; line-height: 1.17; color: var(--color-warm-parchment); text-align: center; white-space: nowrap; pointer-events: none; }
.map__labels li.is-home { font-weight: 500; color: var(--color-amber-glow); }
.map__credit { font-size: var(--text-caption); margin-top: 12px; }
.map__home { transform-box: fill-box; transform-origin: center; }
.map__run.is-off, .map__labels .is-off, .route__panel[hidden] { display: none; }
.route__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.route__tab { font: inherit; font-size: var(--text-caption); min-height: 44px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.route__tab[aria-selected="true"] { background: var(--color-amber-glow); border-color: var(--color-amber-glow); color: var(--color-walnut-shell); }
.route__tab:focus-visible { outline: 2px solid var(--color-amber-glow); outline-offset: 2px; }

.js-motion .route { height: 240vh; }
.js-motion .route__sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.js-motion .route__stage { padding-block: 0; }
.js-motion .map { max-height: 84svh; max-width: 84svh; margin-left: auto; }
.js-motion .route__steps { position: relative; display: grid; }
.js-motion .route__step { grid-area: 1 / 1; opacity: 0; transition: opacity .45s var(--ease); margin-bottom: 0; }
.js-motion .route__step.is-on { opacity: 1; }

/* the door */
.porta__stage { position: relative; height: 100svh; overflow: hidden; }
.porta__copy { position: absolute; left: var(--gutter); top: 96px; max-width: 16em; color: var(--color-warm-parchment); }
.porta__copy p { margin-top: 12px; font-size: var(--text-caption); }
.porta__copy .porta__h { margin: 0; font-size: var(--text-heading); line-height: 1.17; }
.porta__media { position: absolute; inset: 0; }
.js-motion .pin--door { height: 180vh; }
.js-motion .porta__stage { position: sticky; top: 0; background: var(--color-walnut-shell); }
.js-motion .porta__media { clip-path: inset(0 49.6% 0 49.6%); }
html:not(.js-motion) .porta__copy { display: none; }

/* services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin-top: 40px; }
.services li { padding: 14px 0; border-top: 1px solid var(--line); font-size: var(--text-caption); }
.surface { background: var(--color-candlelight); color: var(--color-obsidian); padding: 40px; }

/* guests */
.scores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.score { border-top: 1px solid var(--line); padding-top: 16px; }
.score b { display: block; font-weight: 400; font-size: var(--text-display); line-height: 1.17; font-variant-numeric: tabular-nums; }
.score__src { display: block; font-size: var(--text-caption); text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.score small { font-size: var(--text-caption); letter-spacing: 0; opacity: .75; }
.score__facts { list-style: none; margin: 16px 0 0; padding: 0; font-size: var(--text-caption); }
.score__facts li { padding: 8px 0; border-top: 1px solid var(--line); }
.quote { margin: 64px 0 0; font-size: clamp(var(--text-heading-sm), 3vw, var(--text-heading)); line-height: 1.17; max-width: 22em; }
.quote cite { display: block; font-style: normal; font-size: var(--text-caption); margin-top: 12px; }

/* practical info */
.rules { border-top: 1px solid var(--line); margin-top: 40px; }
.rules > div { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: var(--text-caption); }
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 52px; padding: 12px 0; cursor: pointer; list-style: none; font-size: var(--text-caption); font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 11px; height: 11px; background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat, linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding-bottom: 16px; font-size: var(--text-caption); max-width: 40em; }

/* booking */
.book { min-height: 90svh; display: flex; align-items: center; }
.book__form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; max-width: 760px; }
.field label { display: block; font-size: var(--text-caption); margin-bottom: 8px; }
.field input, .field select {
  width: 100%; min-height: 52px; padding: 14px 16px; background: transparent; border: 1px solid currentColor;
  border-radius: var(--radius); font-size: var(--text-caption); color-scheme: dark;
}
.field select option { color: #000; background: #fff; }
.book__err { grid-column: 1 / -1; font-size: var(--text-caption); color: var(--color-amber-glow); min-height: 1.4em; }
.book__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.book__cta .btn { min-height: 52px; padding: 14px 22px; }
.book__note { margin-top: 24px; font-size: var(--text-caption); max-width: 40em; }
.book__note a { display: inline-flex; align-items: center; min-height: 44px; }

/* footer */
.ftr { padding: 60px var(--gutter) 40px; font-size: var(--text-caption); background: var(--color-walnut-shell); color: var(--color-warm-parchment); position: relative; }
.ftr__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; width: min(1120px, 100%); margin-inline: auto; }
.ftr h2 { font-size: var(--text-caption); font-weight: 500; margin-bottom: 12px; }
.ftr li + li { margin-top: 0; }
.ftr li a { display: inline-flex; align-items: center; min-height: 44px; }
.ftr a { text-underline-offset: 4px; text-decoration-color: var(--color-muted-gold); }
.ftr__cta { width: min(1120px, 100%); margin: 0 auto 56px; }
.ftr__lead { font-size: var(--text-subheading); margin-bottom: 24px; }
.ftr__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ftr__btns .btn { min-height: 52px; padding: 14px 22px; }
.hdr .btn { min-height: 44px; }
.ftr__small { width: min(1120px, 100%); margin: 40px auto 0; padding-top: 16px; border-top: 1px solid var(--color-aged-bronze); }

/* mobile booking bar */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); background: var(--color-walnut-shell); color: var(--color-warm-parchment);
  border-top: 1px solid var(--color-aged-bronze); font-size: var(--text-caption); line-height: 1.2;
  transform: translateY(110%); transition: transform .35s var(--ease);
}
.bar.is-on { transform: none; }

/* reveal */
.js-motion [data-reveal] { opacity: 0; transform: translateY(20px); }

html:not(.js-motion) .hdr { position: absolute; }

@media (min-width: 1280px) {
  .hero__copy, .costa__copy, .porta__copy { left: 64px; }
}

@media (max-width: 1279px) {
  .rail { left: 0; right: 0; bottom: auto; width: auto; height: 2px; background: transparent; }
  .rail__fill { transform-origin: 0 50%; transform: scaleX(0); }
  .rail__label { display: none; }
}

@media (max-width: 960px) {
  :root { --gutter: 20px; --section-gap: 64px; --header-h: 60px; }
  .nav ul { display: none; }
  .intro, .split, .split--text-first, .duo, .duo--rev { grid-template-columns: 1fr; gap: 24px; }
  .room__copy { grid-template-columns: 1fr; gap: 8px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
  .scores { gap: 24px; }
  .rules > div { grid-template-columns: 1fr; gap: 2px; }
  .surface { padding: 24px 20px; }
  .hero__copy { flex-direction: column; align-items: flex-start; gap: 20px; bottom: 28px; }
  .hero__tools { width: 100%; max-width: none; justify-content: space-between; white-space: normal; }
  .hero__tools .btn { flex: none; }
  .costa__copy { bottom: 92px; }
  .hdr, .nav { gap: 12px; }
  .ftr__grid { grid-template-columns: 1fr; gap: 28px; }
  .ftr { padding-bottom: 96px; }
  .bar { display: flex; }

  .route__stage { grid-template-columns: 1fr; gap: 20px; }
  .route__intro { order: 2; }
  .js-motion .route__stage { gap: 8px; padding-top: calc(var(--header-h) + 4px); }
  .js-motion .route__sticky { align-items: flex-start; }
  .js-motion .route__intro h2, .js-motion .route__intro .eyebrow, .js-motion .route__intro > .lead { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }
  .js-motion .map { max-height: 54svh; max-width: 54svh; margin-inline: auto; }
  .route__meter { margin: 8px 0 12px; font-size: var(--text-heading); }
  .route__unit { display: inline; margin-left: 8px; }
  .map__labels li { font-size: 13px; }
  .map__credit { font-size: 13px; margin-top: 6px; }

  .book__form { grid-template-columns: 1fr 1fr; }
  .book__form .field:last-of-type { grid-column: 1 / -1; }
  .book__cta .btn { width: 100%; }
}

@media (max-width: 420px) {
  .services { grid-template-columns: 1fr; }
  .book__form { grid-template-columns: 1fr; }
  .wordmark { white-space: normal; max-width: 120px; line-height: 1.15; letter-spacing: .06em; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto !important; }
}

@media print {
  .hdr, .rail, .rail__label, .bar, video { display: none !important; }
}
