/* ==========================================================================
   Maison Harmonie
   A single stylesheet for the whole site: tokens, primitives, components.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Warm limestone paper — the colour of the house itself. */
  --bg: #faf7f1;
  --bg-soft: #f1eae0;
  --bg-elevated: #fffdfa;
  --fg: #17140f;
  --fg-muted: #6b6357;
  --fg-subtle: #948b7b;
  --line: #e2d9cb;
  --line-strong: #cabfad;
  --accent: #8a6a3c;
  --accent-hover: #6f5430;
  --on-accent: #fffdfa;
  --shadow-color: 30 24 14;

  --grain-opacity: 0.05;

  /* Type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Garamond, Georgia,
    "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;

  --step--2: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.16vw, 1.08rem);
  --step-1: clamp(1.13rem, 1.06rem + 0.32vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.24rem + 0.78vw, 1.85rem);
  --step-3: clamp(1.8rem, 1.44rem + 1.75vw, 2.9rem);
  --step-4: clamp(2.3rem, 1.66rem + 3.1vw, 4.3rem);
  --step-5: clamp(2.9rem, 1.62rem + 6.2vw, 6.6rem);

  /* Layout */
  --shell: 1320px;
  --shell-narrow: 780px;
  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --section-y: clamp(4.5rem, 9vw, 9rem);
  --header-h: 4.75rem;
  --safe-top: env(safe-area-inset-top, 0px);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.45s;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #100f0d;
  --bg-soft: #191712;
  --bg-elevated: #1e1b16;
  --fg: #f3eee4;
  --fg-muted: #a79e8e;
  --fg-subtle: #857c6d;
  --line: #2c2822;
  --line-strong: #423c32;
  --accent: #c6a469;
  --accent-hover: #d9bc86;
  --on-accent: #14120e;
  --shadow-color: 0 0 0;

  --grain-opacity: 0.07;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--safe-top) + 1rem);
}

/* Opaque strip under the Dynamic Island / status bar (needs viewport-fit=cover). */
html::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top);
  background-color: var(--bg);
  z-index: 110;
  pointer-events: none;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

body.is-locked {
  overflow: hidden;
}

img,
picture,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  background-color: var(--bg-soft);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

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

::selection {
  background-color: var(--accent);
  color: var(--on-accent);
}

/* A whisper of film grain keeps the large flat areas from looking digital. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.display {
  font-size: var(--step-5);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.h1 {
  font-size: var(--step-4);
}

.h2 {
  font-size: var(--step-3);
}

.h3 {
  font-size: var(--step-2);
}

.h4 {
  font-size: var(--step-1);
  line-height: 1.2;
}

p {
  text-wrap: pretty;
}

/* The browser default (`smaller`) is far too heavy at display sizes. */
sup {
  font-size: 0.52em;
  line-height: 0;
}

.display sup,
.h1 sup,
.facts__value sup {
  font-size: 0.38em;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--fg-muted);
  font-weight: 300;
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose {
  color: var(--fg-muted);
  max-width: 62ch;
}

/* Small letterspaced label — used above every section title. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background-color: var(--line-strong);
  flex: none;
}

.eyebrow--plain::before {
  display: none;
}

.italic {
  font-style: italic;
}

.accent {
  color: var(--accent);
}

.muted {
  color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow {
  max-width: calc(var(--shell-narrow) + var(--gutter) * 2);
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.section--soft {
  background-color: var(--bg-soft);
}

/* First section on a page that opens under the fixed header instead of a hero. */
.page-top {
  padding-top: calc(var(--header-h) + var(--safe-top) + clamp(2.5rem, 7vw, 5rem));
}

.rule {
  height: 1px;
  background-color: var(--line);
  border: 0;
}

.stack-sm > * + * {
  margin-top: 0.75rem;
}

.stack > * + * {
  margin-top: 1.5rem;
}

.stack-lg > * + * {
  margin-top: 2.5rem;
}

/* Section head: eyebrow + title, optionally with copy alongside. */
.section-head {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}

@media (min-width: 62rem) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.section-head__title {
  margin-top: 1.25rem;
}

/* --------------------------------------------------------------------------
   5. Image frames
   -------------------------------------------------------------------------- */

.frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 4 / 3);
  background-color: var(--bg-soft);
}

/* A frame is often a button, so the photo can be opened in the lightbox. */
button.frame {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}

.frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out-soft), opacity 0.6s var(--ease);
}

.frame--tall {
  --ratio: 3 / 4;
}

.frame--square {
  --ratio: 1;
}

.frame--wide {
  --ratio: 16 / 10;
}

.frame--pano {
  --ratio: 21 / 9;
}

a:hover .frame > img,
button:hover .frame > img,
.zoom:hover .frame > img {
  transform: scale(1.045);
}

figcaption {
  margin-top: 0.9rem;
  font-size: var(--step--1);
  color: var(--fg-subtle);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   6. Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--fg);
  --btn-fg: var(--bg);
  --btn-border: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.05em 2.1em;
  background-color: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.btn:hover {
  --btn-bg: var(--accent);
  --btn-border: var(--accent);
  --btn-fg: var(--on-accent);
}

.btn:active {
  transform: translateY(1px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  --btn-border: var(--line-strong);
}

.btn--on-image {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-border: rgb(255 255 255 / 0.55);
  backdrop-filter: blur(6px);
}

.btn--on-image:hover {
  --btn-bg: #fff;
  --btn-fg: #17140f;
  --btn-border: #fff;
}

.btn--solid-light {
  --btn-bg: #fffdfa;
  --btn-fg: #17140f;
  --btn-border: #fffdfa;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Understated text link with a travelling arrow. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line-strong);
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.link-arrow svg {
  width: 1.1em;
  height: 1.1em;
  transition: transform var(--dur) var(--ease);
}

.link-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.link-arrow:hover svg {
  transform: translateX(0.3rem);
}

.link-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}

.link-underline:hover {
  background-size: 100% 1px;
}

.skip-link {
  position: fixed;
  top: calc(0.75rem + var(--safe-top));
  left: 0.75rem;
  z-index: 200;
  padding: 0.85rem 1.25rem;
  background-color: var(--fg);
  color: var(--bg);
  font-size: var(--step--2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateY(-150%);
  transition: transform 0.3s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   7. Header
   -------------------------------------------------------------------------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  color: #fff;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease),
    box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.header::after {
  content: "";
  position: absolute;
  inset: var(--safe-top) 0 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgb(0 0 0 / 0.45),
    rgb(0 0 0 / 0)
  );
  opacity: 1;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

/* Pages that don't open on a full-bleed image start in the solid state. */
.header--solid,
.header.is-stuck {
  color: var(--fg);
  background-color: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}

.header--solid::after,
.header.is-stuck::after {
  opacity: 0;
}

.header.is-hidden {
  transform: translateY(-100%);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.brand {
  display: block;
  flex: none;
  width: clamp(8.5rem, 12vw, 11rem);
  aspect-ratio: 1124.82 / 362.48;
  background-color: currentColor;
  -webkit-mask: url("../img/logopostanegro.svg") no-repeat center / contain;
  mask: url("../img/logopostanegro.svg") no-repeat center / contain;
  transition: opacity var(--dur) var(--ease);
}

.brand:hover {
  opacity: 0.7;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}

.nav__link {
  position: relative;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-block: 0.4rem;
  white-space: nowrap;
  transition: opacity var(--dur) var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: clamp(0.65rem, 1.5vw, 1.25rem);
}

/* Language segmented control */
.lang {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 28%, transparent);
  border-radius: 999px;
}

.lang__btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 999px;
  opacity: 0.65;
  transition: opacity var(--dur) var(--ease),
    background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.lang__btn:hover {
  opacity: 1;
}

.lang__btn[aria-pressed="true"] {
  opacity: 1;
  background-color: currentColor;
}

/* The label text is drawn by a child so the pill can use currentColor. */
.lang__btn[aria-pressed="true"] span {
  color: var(--bg);
  mix-blend-mode: normal;
}

.header:not(.is-stuck):not(.header--solid) .lang__btn[aria-pressed="true"] span {
  color: #17140f;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  transition: background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.icon-btn:hover {
  background-color: color-mix(in srgb, currentColor 12%, transparent);
}

.icon-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sun / moon swap */
.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

.burger {
  display: none;
}

.burger__bars {
  position: relative;
  width: 1.1rem;
  height: 0.6rem;
}

.burger__bars::before,
.burger__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.burger__bars::before {
  top: 0;
}

.burger__bars::after {
  top: 100%;
}

.burger[aria-expanded="true"] .burger__bars::before {
  top: 50%;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] .burger__bars::after {
  top: 50%;
  transform: rotate(-45deg);
}

/* Mobile menu panel */
.menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  align-content: center;
  padding: calc(var(--header-h) + var(--safe-top)) var(--gutter) 3rem;
  background-color: var(--bg);
  color: var(--fg);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.menu.is-open {
  visibility: visible;
  opacity: 1;
}

.menu__list {
  display: grid;
  gap: 0.35rem;
  border-top: 1px solid var(--line);
}

.menu__item {
  border-bottom: 1px solid var(--line);
}

.menu__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(0.9rem, 3vw, 1.4rem);
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease),
    color var(--dur) var(--ease);
}

.menu.is-open .menu__link {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 60ms + 80ms);
}

.menu__link:hover {
  color: var(--accent);
}

.menu__link span {
  font-family: var(--font-sans);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  color: var(--fg-subtle);
}

.menu__foot {
  margin-top: 2.5rem;
  display: grid;
  gap: 0.4rem;
  font-size: var(--step--1);
  color: var(--fg-muted);
}

.lang--menu {
  display: none;
  width: max-content;
  margin-bottom: 1.25rem;
}

@media (max-width: 47.99rem) {
  /* Not enough room beside the wordmark — the pill lives in the menu instead. */
  .header .lang {
    display: none;
  }

  .lang--menu {
    display: flex;
  }
}

@media (max-width: 61.99rem) {
  @supports (-webkit-touch-callout: none) {
    html,
    body {
      height: 100%;
      overflow: hidden;
    }

    body {
      overflow-y: auto;
    }

    .header {
      color: var(--fg);
      background-color: var(--bg);
    }

    .header::after {
      opacity: 0;
    }
  }

  .nav {
    display: none;
  }

  .burger {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  }

  /* While the panel is open the header must read on the panel background. */
  .header.is-menu-open {
    color: var(--fg);
  }

  .header.is-menu-open::after {
    opacity: 0;
  }
}

@media (min-width: 62rem) {
  .menu {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(100svh, 62rem);
  display: grid;
  align-content: end;
  padding-block: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 4vh, 3rem);
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 28s var(--ease) infinite alternate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      to top,
      rgb(10 8 5 / 0.72) 0%,
      rgb(10 8 5 / 0.32) 38%,
      rgb(10 8 5 / 0.06) 65%,
      rgb(10 8 5 / 0.28) 100%
    );
}

@keyframes kenburns {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.09) translate3d(-1.2%, -1.4%, 0);
  }
}

.hero__content {
  max-width: 46rem;
}

.hero .eyebrow {
  color: rgb(255 255 255 / 0.82);
}

.hero .eyebrow::before {
  background-color: rgb(255 255 255 / 0.55);
}

.hero__title {
  margin-top: 1.5rem;
  text-shadow: 0 1px 40px rgb(0 0 0 / 0.35);
}

.hero__title em {
  font-style: italic;
  color: #f0dcb8;
}

.hero__lede {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: rgb(255 255 255 / 0.86);
}

.hero__actions {
  margin-top: 2.25rem;
}

.hero__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(3rem, 9vh, 6rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.22);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.75);
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.hero__scroll::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background-color: currentColor;
  transform-origin: left;
  animation: scrollcue 2.6s var(--ease) infinite;
}

@keyframes scrollcue {
  0%,
  100% {
    transform: scaleX(0.35);
    opacity: 0.5;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@media (max-width: 47.99rem) {
  .hero__foot {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }
}

/* Compact hero for interior pages */
.page-hero {
  position: relative;
  display: grid;
  align-content: end;
  min-height: min(72svh, 44rem);
  padding-block: 8rem clamp(2.5rem, 6vw, 4.5rem);
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}

.page-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgb(10 8 5 / 0.7),
    rgb(10 8 5 / 0.2) 55%,
    rgb(10 8 5 / 0.35)
  );
}

.page-hero .eyebrow {
  color: rgb(255 255 255 / 0.82);
}

.page-hero .eyebrow::before {
  background-color: rgb(255 255 255 / 0.55);
}

.page-hero__title {
  margin-top: 1.25rem;
}

.page-hero__lede {
  margin-top: 1.25rem;
  max-width: 42rem;
  color: rgb(255 255 255 / 0.85);
  font-size: var(--step-1);
}

/* --------------------------------------------------------------------------
   9. Facts strip
   -------------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

@media (min-width: 55rem) {
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.facts__item {
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1rem, 2vw, 2rem);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.facts__item:nth-child(2n) {
  border-right: 0;
}

@media (min-width: 55rem) {
  .facts__item:nth-child(2n) {
    border-right: 1px solid var(--line);
  }

  .facts__item:last-child {
    border-right: 0;
  }
}

.facts__value {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  letter-spacing: -0.02em;
}

.facts__label {
  margin-top: 0.6rem;
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. Editorial split
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .split {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .split--reverse > :first-child {
    order: 2;
  }

  .split__aside {
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top) + 3rem);
  }
}

/* Asymmetric photo mosaic */
.mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

.mosaic > * {
  grid-column: span 12;
}

@media (min-width: 48rem) {
  .mosaic__a {
    grid-column: 1 / span 7;
  }
  .mosaic__b {
    grid-column: 8 / span 5;
    align-self: end;
  }
  .mosaic__c {
    grid-column: 1 / span 4;
    margin-top: clamp(1rem, 4vw, 4rem);
  }
  .mosaic__d {
    grid-column: 5 / span 8;
    margin-top: clamp(1rem, 4vw, 4rem);
  }
  .mosaic__e {
    grid-column: 1 / span 6;
  }
  .mosaic__f {
    grid-column: 7 / span 6;
    margin-top: clamp(0rem, 5vw, 5rem);
  }
}

/* Full-bleed image band */
.band {
  position: relative;
  min-height: min(80svh, 46rem);
  display: grid;
  place-items: center;
  padding: clamp(4rem, 12vw, 8rem) 0;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}

.band__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Darkest behind the quote, lighter at the edges, so the photograph is still
     legible as a photograph while the text keeps its contrast. */
  background: radial-gradient(ellipse 72% 58% at 50% 50%, rgb(6 5 3 / 0.76), rgb(6 5 3 / 0.34) 78%),
    linear-gradient(rgb(6 5 3 / 0.26), rgb(6 5 3 / 0.26));
}

.band__quote {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
  text-shadow: 0 1px 30px rgb(0 0 0 / 0.4);
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-style: italic;
  line-height: 1.25;
}

.band__cite {
  display: block;
  margin-top: 1.75rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.75);
}

/* --------------------------------------------------------------------------
   11. Cards
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 48rem) {
  .cards--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .cards--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card__body {
  padding-top: 1.5rem;
}

.card__title {
  font-size: var(--step-2);
  transition: color var(--dur) var(--ease);
}

a:hover .card__title {
  color: var(--accent);
}

.card__text {
  margin-top: 0.75rem;
  color: var(--fg-muted);
}

/* Suite card */
.suite {
  display: block;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.suite__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.suite__index {
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  color: var(--fg-subtle);
}

.suite__title {
  margin-top: 1.5rem;
  font-size: var(--step-2);
  transition: color var(--dur) var(--ease);
}

.suite:hover .suite__title {
  color: var(--accent);
}

.suite__text {
  margin-top: 0.7rem;
  color: var(--fg-muted);
  font-size: var(--step--1);
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-top: 1.1rem;
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.tags li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tags li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--line-strong);
}

.suite__more {
  margin-top: 1.5rem;
}

/* Amenity grid */
/* Four items, so 2 or 4 per row always fills the grid — no orphan cells. */
.amenities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background-color: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 62rem) {
  .amenities {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.amenity {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  background-color: var(--bg);
}

.amenity svg {
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.15rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.amenity__title {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.amenity__text {
  margin-top: 0.2rem;
  font-size: var(--step--1);
  color: var(--fg-subtle);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   12. Reviews
   -------------------------------------------------------------------------- */

.score {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.score__value {
  font-family: var(--font-display);
  font-size: var(--step-5);
  line-height: 0.85;
  letter-spacing: -0.03em;
}

.score__meta {
  font-size: var(--step--1);
  color: var(--fg-muted);
  line-height: 1.4;
}

.bars {
  display: grid;
  gap: 1.1rem;
}

.bar__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--step--1);
  margin-bottom: 0.5rem;
}

.bar__head span:last-child {
  color: var(--fg-subtle);
  font-variant-numeric: tabular-nums;
}

.bar__track {
  display: block;
  height: 2px;
  background-color: var(--line);
  overflow: hidden;
}

.bar__fill {
  display: block;
  height: 100%;
  width: 0;
  background-color: var(--accent);
  transition: width 1.4s var(--ease-out-soft);
}

.is-visible .bar__fill {
  width: var(--value, 0%);
}

/* --------------------------------------------------------------------------
   13. Gallery
   -------------------------------------------------------------------------- */

/* A plain grid rather than a column-flow masonry: with masonry the visual
   order runs down each column, so the lightbox sequence stops matching what
   the eye follows. Uniform tiles keep DOM order and reading order identical. */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

@media (min-width: 64rem) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 96rem) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.gallery__item {
  display: block;
  width: 100%;
  padding: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--tile-ratio, 3 / 2);
  background-color: var(--bg-soft);
  cursor: zoom-in;
}

.gallery--rooms {
  --tile-ratio: 4 / 3;
}

.gallery__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out-soft), opacity 0.5s var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgb(10 8 5 / 0);
  transition: background-color var(--dur) var(--ease);
}

.gallery__item:hover::after {
  background-color: rgb(10 8 5 / 0.12);
}

/* Horizontal filmstrip used on the suite pages */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 30rem);
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.strip > * {
  scroll-snap-align: center;
}

.strip::-webkit-scrollbar {
  height: 3px;
}

.strip::-webkit-scrollbar-thumb {
  background-color: var(--line-strong);
}

/* Lightbox — <dialog> gives us Esc, focus trapping and inertness for free. */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: #fff;
  overflow: hidden;
}

.lightbox::backdrop {
  background-color: rgb(8 7 5 / 0.94);
  backdrop-filter: blur(4px);
}

.lightbox__stage {
  position: absolute;
  inset: clamp(3.5rem, 8vh, 6rem) clamp(1rem, 6vw, 6rem);
  display: grid;
  place-items: center;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background-color: transparent;
  animation: lightbox-in 0.4s var(--ease-out-soft);
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lightbox__bar {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox__bar--top {
  top: 0;
}

.lightbox__bar--bottom {
  bottom: 0;
  justify-content: center;
  gap: 1.5rem;
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.3);
  color: #fff;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.lightbox__btn:hover {
  background-color: rgb(255 255 255 / 0.14);
  border-color: rgb(255 255 255 / 0.6);
}

.lightbox__btn svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox__count {
  font-variant-numeric: tabular-nums;
  min-width: 4rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   14. Map & contact
   -------------------------------------------------------------------------- */

.map-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 22rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--bg-soft);
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) contrast(0.95);
  transition: filter 0.6s var(--ease);
}

.map-frame:hover iframe {
  filter: grayscale(0);
}

:root[data-theme="dark"] .map-frame iframe {
  filter: grayscale(1) invert(0.92) contrast(0.86) brightness(0.94);
}

:root[data-theme="dark"] .map-frame:hover iframe {
  filter: invert(0.92) contrast(0.86) brightness(0.94);
}

.contact-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.contact-list li {
  border-bottom: 1px solid var(--line);
}

.contact-list a,
.contact-list > li > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.1rem;
  transition: color var(--dur) var(--ease);
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-list dt,
.contact-list__label {
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  flex: none;
}

.contact-list__value {
  text-align: right;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.footer {
  padding-block: clamp(3.5rem, 8vw, 6rem) 2rem;
  border-top: 1px solid var(--line);
  background-color: var(--bg-soft);
}

.footer__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 48rem) {
  .footer__grid {
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  }
}

.footer__brand {
  display: block;
  width: min(15rem, 70%);
  aspect-ratio: 1124.82 / 362.48;
  background-color: var(--fg);
  -webkit-mask: url("../img/logopostanegro.svg") no-repeat left center / contain;
  mask: url("../img/logopostanegro.svg") no-repeat left center / contain;
}

.footer__title {
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 1.1rem;
}

.footer__links {
  display: grid;
  gap: 0.65rem;
  font-size: var(--step--1);
  color: var(--fg-muted);
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
}

.socials {
  display: flex;
  gap: 0.6rem;
}

.socials a {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.socials a:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.socials svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Floating booking bar for small screens */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  gap: 0.75rem;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  background-color: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.45s var(--ease);
}

.dock.is-visible {
  transform: none;
}

.dock .btn {
  flex: 1;
  padding-inline: 1rem;
}

@media (max-width: 47.99rem) {
  .dock {
    display: flex;
  }
}

.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background-color: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  color: var(--fg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
    visibility 0.4s var(--ease), background-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.to-top svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 47.99rem) {
  .to-top {
    bottom: 5.25rem;
  }
}

/* --------------------------------------------------------------------------
   16. Motion
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.85s var(--ease-out-soft),
    transform 0.85s var(--ease-out-soft);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Images fade in once decoded, so a slow connection never flashes a hard edge. */
.fade-img {
  opacity: 0;
}

.fade-img.is-loaded {
  opacity: 1;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .fade-img {
    opacity: 1;
  }

  .hero__media img {
    animation: none;
  }

  .bar__fill {
    width: var(--value, 0%);
  }
}

/* --------------------------------------------------------------------------
   17. Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.no-js .reveal,
.no-js .fade-img {
  opacity: 1;
  transform: none;
}

@media print {
  .header,
  .dock,
  .to-top,
  .menu {
    display: none !important;
  }
}
