/* ==========================================================================
   CARTA MAGNA — Marketing site
   Art direction: Mediterranean golden-hour (scene_1) × imperial crest.
   Palette, type scale and motion system derived from the brand reference.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — Rojo Magna */
  --magna-800: #6b1417;
  --magna-700: #7e181b;
  --magna-600: #9e1f22;
  --magna-500: #b8242a;
  --magna-300: #d98a8c;
  --magna-100: #f6dada;

  /* Crest cream */
  --crema: #f3deb8;
  --crema-deep: #e9cf9f;

  /* Sunset accents */
  --miel: #ffc46b;
  --albaricoque: #f2a56b;
  --brasa: #e0733a;
  --malva: #a07a86;
  --buganvilla: #d2336e;
  --terracota: #b8653c;
  --olivo: #7c8452;
  --olivo-900: #4b5234;
  --mar: #5b7584;

  /* Light surfaces */
  --bg-light: #f6e8d7;
  --bg-light-2: #f2e0ca;
  --surface-light: #fbf4ea;
  --surface-sunken: #efdfcc;
  --border-light: #dcc7b2;
  --border-light-strong: #c4a98f;
  --text-strong: #24160f;
  --text: #3b2a20;
  --text-muted: #6e5646;

  /* Dark surfaces */
  --bg-dark: #1a110c;
  --surface-dark: #24160f;
  --surface-dark-2: #33221a;
  --surface-dark-3: #3f2a20;
  --border-dark: rgba(243, 222, 184, 0.14);
  --border-dark-strong: rgba(243, 222, 184, 0.28);
  --text-on-dark: #f6e8d7;
  --text-on-dark-muted: #c9b39d;

  /* Title pair — the Carta digital posters: a constant word in Rojo Magna
     and the changing one in Mar de Tarde. Shared by the section claims, the
     home-row titles and the hero, so the whole site speaks one voice. The
     home-row titles cycle the three of them word by word (see home.css). */
  --title-a: var(--magna-600);
  --title-b: var(--mar);
  --title-c: var(--terracota);

  /* Semantic */
  --focus: #ffc46b;
  --success: #4b5234;
  --danger: #9e1f22;

  /* Gradients */
  --grad-sky: linear-gradient(
    180deg,
    #8e6b7b 0%,
    #b98680 18%,
    #e3946a 42%,
    #f4ae6c 58%,
    #ffd79a 68%,
    #f2a56b 74%,
    #5b7584 100%
  );
  --grad-sun: radial-gradient(
    circle at 14% 66%,
    #fff1cf 0 1.5%,
    #ffd58a 4%,
    rgba(242, 140, 70, 0.55) 16%,
    rgba(224, 115, 58, 0.18) 34%,
    transparent 58%
  );
  --grad-stucco: linear-gradient(100deg, #fbebd6 0%, #f6e8d7 38%, #eedcc8 100%);
  /* Full-screen surfaces that carry the crest: Rojo Magna with a soft
     golden-hour falloff. Used by the mobile menu. */
  --grad-magna: linear-gradient(160deg, var(--magna-700) 0%, var(--magna-600) 55%, var(--magna-800) 100%);
  --grad-bulb: radial-gradient(
    ellipse 60% 50% at 50% 30%,
    rgba(255, 196, 107, 0.42) 0%,
    rgba(255, 196, 107, 0.12) 40%,
    transparent 70%
  );
  --grad-night: radial-gradient(120% 90% at 20% 0%, #3a2418 0%, #24160f 45%, #1a110c 100%);

  /* Type */
  --font-inscription: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-ui: "Instrument Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fs-display: clamp(2.6rem, 1.5rem + 4.4vw, 5.2rem);
  --fs-h1: clamp(2.2rem, 1.4rem + 3.2vw, 3.9rem);
  --fs-h2: clamp(1.85rem, 1.3rem + 2vw, 3.1rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.7rem);
  --fs-eyebrow: 0.78rem;
  --fs-body-l: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-caption: 0.8125rem;

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --section-y: clamp(80px, 11vw, 176px);
  --shell: 1320px;
  --gutter: clamp(20px, 4vw, 40px);

  /* Radii */
  --r-xs: 6px;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --r-xl: 48px;
  --r-arch: 999px 999px 24px 24px;
  --r-pill: 999px;

  /* Shadows — always warm (hue ~20°), never neutral grey */
  --sh-1: 0 1px 2px rgba(78, 51, 34, 0.1), 0 2px 6px rgba(78, 51, 34, 0.06);
  --sh-2: 0 6px 16px -4px rgba(78, 51, 34, 0.18), 0 2px 4px rgba(78, 51, 34, 0.08);
  --sh-3: 0 24px 48px -16px rgba(126, 63, 37, 0.3), 0 8px 16px -8px rgba(78, 51, 34, 0.16);
  --sh-4: 0 40px 90px -30px rgba(36, 22, 15, 0.55), 0 12px 30px -12px rgba(78, 51, 34, 0.25);
  --sh-glow: 0 0 0 1px rgba(255, 196, 107, 0.35), 0 0 48px -6px rgba(255, 196, 107, 0.45);
  --sh-red: 0 12px 28px -10px rgba(158, 31, 34, 0.55);
  --ring-crest: inset 0 0 0 1px var(--magna-600), inset 0 0 0 5px var(--surface-light),
    inset 0 0 0 6px var(--magna-600);

  /* Motion */
  --ease-ola: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-imperio: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ocaso: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-brisa: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --ease-sello: cubic-bezier(0.34, 1.56, 0.64, 1);
  --d-chispa: 120ms;
  --d-rapido: 200ms;
  --d-base: 320ms;
  --d-revelar: 720ms;
  --d-escena: 1200ms;
  --d-ocaso: 2400ms;

  --nav-h: 76px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
video,
svg,
canvas {
  display: block;
  max-width: 100%;
}

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

/* Keep link colours under author control in every state (`:where()` adds no
   specificity, so component rules still win). */
a:where(:link, :visited, :hover, :active, :focus) {
  color: inherit;
}

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

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

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

::selection {
  background: var(--magna-600);
  color: var(--surface-light);
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
}
.skip:focus {
  left: 12px;
  top: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--surface-light);
  color: var(--text-strong);
  box-shadow: var(--sh-3);
}

/* --------------------------------------------------------------------------
   3. Typography helpers
   -------------------------------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1,
.h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2,
.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h3,
.h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.005em;
}

em,
.ital {
  font-style: italic;
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-inscription);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.2;
}

.lede {
  font-size: var(--fs-body-l);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 62ch;
}

.small {
  font-size: var(--fs-small);
  font-weight: 500;
}

.caption {
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.num {
  font-family: var(--font-inscription);
  font-weight: 600;
}

.measure {
  max-width: 62ch;
}
.measure-tight {
  max-width: 46ch;
}

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

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

.section--light {
  background: var(--grad-stucco);
  color: var(--text);
}
.section--cream {
  background: var(--surface-light);
  color: var(--text);
}
.section--dark {
  background: var(--grad-night);
  color: var(--text-on-dark);
}
.section--deep {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin-bottom: clamp(40px, 5vw, 72px);
  max-width: 760px;
}

/* Two light sections in a row get a hairline so the seam is felt, not seen. */
.section--light + .section--light::before,
.section--cream + .section--cream::before,
.section--light + .section--cream::before,
.section--cream + .section--light::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--shell));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
  align-items: center;
}
.section-head .eyebrow {
  color: var(--magna-600);
}
.section--dark .section-head .eyebrow,
.section--deep .section-head .eyebrow {
  color: var(--albaricoque);
}
.section--dark .lede,
.section--deep .lede {
  color: var(--text-on-dark-muted);
}

.grid {
  display: grid;
  gap: var(--s-5);
}

/* --------------------------------------------------------------------------
   5. Atmosphere layers — grain, leaf gobo, sunset sweep
   -------------------------------------------------------------------------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.on-dark .grain,
body[data-bg="dark"] .grain {
  mix-blend-mode: overlay;
  opacity: 0.07;
}

.sun-sweep {
  position: fixed;
  z-index: 1;
  width: 110vmax;
  height: 110vmax;
  left: var(--sweep-x, 10%);
  top: var(--sweep-y, 60%);
  pointer-events: none;
  background: var(--grad-sun);
  mix-blend-mode: soft-light;
  opacity: 0.6;
  transform: translate(-14%, -66%);
  will-change: left, top;
  transition: opacity 600ms var(--ease-ola);
}

.gobo {
  position: absolute;
  z-index: 0;
  width: 62vw;
  max-width: 900px;
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.075;
  background: radial-gradient(
      ellipse 40% 22% at 30% 35%,
      rgba(75, 82, 52, 0.9) 0%,
      transparent 60%
    ),
    radial-gradient(ellipse 30% 18% at 62% 48%, rgba(75, 82, 52, 0.75) 0%, transparent 62%),
    radial-gradient(ellipse 34% 20% at 48% 68%, rgba(75, 82, 52, 0.6) 0%, transparent 64%);
  filter: blur(14px);
  animation: gobo-drift 34s var(--ease-brisa) infinite alternate;
}

@keyframes gobo-drift {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  to {
    transform: translate3d(4%, 3%, 0) rotate(6deg) scale(1.08);
  }
}

.hairline {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--border-light) 18%, var(--border-light) 82%, transparent);
}

.seam {
  position: relative;
  height: 2px;
  overflow: hidden;
}
.seam::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    #ffc46b 20%,
    #fff1cf 50%,
    #ffc46b 80%,
    transparent
  );
  background-size: 220% 100%;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

/* --------------------------------------------------------------------------
   6. Reveal / motion primitives
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity var(--d-revelar) var(--ease-imperio),
    transform var(--d-revelar) var(--ease-imperio);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="scale"] {
  transform: translate3d(0, 24px, 0) scale(0.97);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.line-mask > span {
  display: block;
  transform: translate3d(0, 110%, 0);
  transition: transform 900ms var(--ease-imperio);
  transition-delay: var(--reveal-delay, 0ms);
}
.is-in .line-mask > span,
.line-mask.is-in > span {
  transform: none;
}

.u-italic-underline {
  position: relative;
  font-style: italic;
  white-space: nowrap;
}
.u-italic-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  height: 2px;
  background: linear-gradient(90deg, var(--miel), var(--albaricoque));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms var(--ease-imperio) 520ms;
}
.is-in .u-italic-underline::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal],
  .line-mask > span {
    opacity: 1 !important;
    transform: none !important;
  }
  .call-fab::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   7. Buttons, badges, chips
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--magna-600);
  --btn-fg: var(--surface-light);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  box-shadow: var(--sh-red);
  transition: background var(--d-rapido) var(--ease-ola), transform var(--d-rapido) var(--ease-ola),
    box-shadow var(--d-rapido) var(--ease-ola);
  overflow: hidden;
  white-space: nowrap;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: rgba(255, 196, 107, 0.45);
  opacity: 0;
  transition: opacity var(--d-rapido) var(--ease-ola);
}
.btn:hover {
  --btn-bg: var(--magna-500);
  transform: translateY(-2px);
  box-shadow: var(--sh-red), 0 18px 40px -18px rgba(255, 196, 107, 0.55);
}
.btn:hover::after {
  opacity: 1;
}
.btn:active {
  transform: translateY(0);
  --btn-bg: var(--magna-700);
}

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--text-strong);
  border: 1.5px solid var(--text-strong);
  box-shadow: none;
}
.btn--secondary:hover {
  --btn-bg: var(--text-strong);
  --btn-fg: var(--bg-light);
  box-shadow: none;
}
.section--dark .btn--secondary,
.section--deep .btn--secondary,
.hero .btn--secondary {
  --btn-fg: var(--crema);
  border-color: var(--crema);
}
.section--dark .btn--secondary:hover,
.section--deep .btn--secondary:hover,
.hero .btn--secondary:hover {
  --btn-bg: var(--crema);
  --btn-fg: var(--bg-dark);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--magna-600);
  min-height: 44px;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}
.btn--ghost:hover {
  --btn-bg: transparent;
  transform: none;
  box-shadow: none;
}
.btn--ghost::after {
  display: none;
}
.btn--ghost .btn__label {
  position: relative;
}
.btn--ghost .btn__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-base) var(--ease-ola);
}
.btn--ghost:hover .btn__label::after {
  transform: scaleX(1);
}
.btn--ghost .arrow {
  transition: transform var(--d-base) var(--ease-ola);
}
.btn--ghost:hover .arrow {
  transform: translateX(4px);
}
.section--dark .btn--ghost,
.section--deep .btn--ghost,
.hero .btn--ghost {
  --btn-fg: var(--albaricoque);
}

.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: var(--fs-small);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-inscription);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}
.badge--offer {
  background: var(--magna-600);
  color: var(--crema);
}
.badge--live {
  background: transparent;
  border: 1px solid var(--olivo);
  color: var(--olivo-900);
}
.badge--new {
  background: rgba(210, 51, 110, 0.12);
  color: var(--buganvilla);
}
.badge--live .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--olivo);
  box-shadow: 0 0 0 0 rgba(124, 132, 82, 0.6);
  animation: pulse-dot 2.4s var(--ease-brisa) infinite;
}
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 132, 82, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(124, 132, 82, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 132, 82, 0);
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--r-pill);
  background: var(--surface-light);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all var(--d-rapido) var(--ease-ola);
}
.chip:hover {
  border-color: var(--magna-600);
  color: var(--magna-600);
  transform: translateY(-1px);
}
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--magna-600);
  border-color: var(--magna-600);
  color: var(--surface-light);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   8. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--d-base) var(--ease-ola), backdrop-filter var(--d-base) var(--ease-ola),
    border-color var(--d-base) var(--ease-ola);
  border-bottom: 1px solid transparent;
}
.nav__inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.nav.is-stuck {
  background: rgba(26, 17, 12, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border-dark);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--crema);
  flex: 0 0 auto;
}
.brand__crest {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 4px 12px rgba(26, 17, 12, 0.5));
}
.brand__word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand__word b {
  font-family: var(--font-inscription);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.brand__word span {
  font-family: var(--font-ui);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--albaricoque);
  margin-top: 3px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 16px);
  margin-left: auto;
}
.nav__link,
.nav__link:link,
.nav__link:visited {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 500;
  white-space: nowrap;
  color: rgba(246, 232, 215, 0.82);
  padding-block: 6px;
  transition: color var(--d-rapido) var(--ease-ola);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--miel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-base) var(--ease-ola);
}
.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text-on-dark);
}
.nav__link:hover::after,
.nav__link.is-current::after {
  transform: scaleX(1);
}
.nav__cta {
  margin-left: 6px;
}
/* Phone CTA — a quiet pill beside the primary button. Base colours suit the
   dark nav; the light-nav variant below re-inks it. */
.nav__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
  padding: 9px;
  border: 1px solid var(--border-dark);
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1;
  color: var(--crema);
  white-space: nowrap;
  transition: background var(--d-rapido) var(--ease-ola), border-color var(--d-rapido) var(--ease-ola),
    color var(--d-rapido) var(--ease-ola);
}
/* Below the widest screens the pill sheds its label so the nav keeps one line;
   the link keeps its accessible name through aria-label. */
.nav__phone-text {
  display: none;
}
@media (min-width: 1080px) {
  .nav__phone {
    padding: 9px 16px 9px 14px;
  }
  .nav__phone-text {
    display: inline;
  }
}
.nav__phone:hover,
.nav__phone:focus-visible {
  background: rgba(246, 232, 215, 0.1);
  border-color: var(--miel);
}
.nav__phone svg {
  flex: 0 0 auto;
  color: var(--miel);
}
.nav__phone b {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav--light .nav__phone {
  color: var(--text-strong);
  border-color: rgba(78, 51, 34, 0.22);
}
.nav--light .nav__phone:hover,
.nav--light .nav__phone:focus-visible {
  background: rgba(78, 51, 34, 0.06);
  border-color: var(--magna-600);
}
.nav--light .nav__phone svg {
  color: var(--magna-600);
}
.nav__burger {
  display: none;
  width: 46px;
  height: 46px;
  margin-left: auto;
  border: 1px solid var(--border-dark);
  border-radius: var(--r-sm);
  background: rgba(26, 17, 12, 0.35);
  color: var(--crema);
  cursor: pointer;
  place-items: center;
}
.nav__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav__burger span::before,
.nav__burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--d-base) var(--ease-ola);
}
.nav__burger span::before {
  top: -6px;
}
.nav__burger span::after {
  top: 6px;
}

.nav-sheet {
  position: fixed;
  /* Start under the fixed header: when the menu is taller than the viewport
     its content scrolls inside the sheet instead of sliding behind (and over)
     the Carta Magna logo. */
  inset: var(--nav-h) 0 0;
  z-index: 79;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  justify-content: safe center;
  gap: 4px;
  padding: clamp(14px, 3vh, 28px) var(--gutter)
    calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* The sheet is the page's own field, flat: opening the menu should feel
     like the page has turned over, not like a second brand surface. */
  background: var(--es-field, var(--bn-field, #ede2d2));
  color: var(--text-strong);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--d-base) var(--ease-ola), visibility var(--d-base);
}
.nav-sheet.is-open {
  opacity: 1;
  visibility: visible;
}
.nav-sheet a {
  font-family: var(--font-display);
  /* Compact titles: the mobile sheet has to fit eight destinations plus two
     demo actions without turning into another overlay over the header. The
     1.5rem floor keeps the coloured type large enough to stay readable. */
  font-size: clamp(1.5rem, 5.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--tone, var(--text-strong));
  padding-block: 7px;
  border-bottom: 1px solid color-mix(in srgb, var(--tone, var(--border-light-strong)) 30%, transparent);
  transform: translateY(14px);
  opacity: 0;
  transition: color var(--d-rapido) var(--ease-ola),
    border-color var(--d-rapido) var(--ease-ola), transform 520ms var(--ease-imperio),
    opacity 520ms var(--ease-imperio);
}
/* Every destination takes one of the three poster tones — the same cycle the
   page titles use (Rojo Magna → Mar de Tarde → Terracota), so the menu reads
   as a small index of the type above it. */
.nav-sheet a.tw--magna {
  --tone: var(--title-a);
}
.nav-sheet a.tw--mar {
  --tone: var(--title-b);
}
.nav-sheet a.tw--terracota {
  --tone: var(--title-c);
}
.nav-sheet a:hover,
.nav-sheet a:focus-visible {
  color: var(--text-strong);
  border-bottom-color: var(--text-strong);
}
/* The section you are in is the one line that has been selected: a flat red
   box behind its words and cream type on top — the same pair as ::selection
   in this file. No radius and no extra spacing, so it reads as a text
   selection rather than a button. */
.nav-sheet a[aria-current="page"],
.nav-sheet a[aria-current="page"]:hover,
.nav-sheet a[aria-current="page"]:focus-visible {
  border-bottom-color: transparent;
  color: var(--surface-light);
}
.nav-sheet a[aria-current="page"] > span {
  background: var(--magna-600);
  color: var(--surface-light);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.nav-sheet a:focus-visible,
.nav-sheet .nav-sheet__cta:focus-visible {
  outline-color: var(--magna-700);
}
.nav-sheet.is-open a {
  transform: none;
  opacity: 1;
  transition-delay: calc(var(--i, 0) * 60ms);
}
/* Demo actions live below the link list as real buttons, not as extra text
   links. */
.nav-sheet__actions {
  display: grid;
  gap: 8px;
  margin-top: clamp(12px, 2.5vh, 22px);
}
.nav-sheet .nav-sheet__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--magna-600);
  border-radius: var(--r-pill);
  background: var(--magna-600);
  color: var(--surface-light);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  transform: translateY(14px);
  opacity: 0;
  transition: background var(--d-rapido) var(--ease-ola),
    border-color var(--d-rapido) var(--ease-ola), color var(--d-rapido) var(--ease-ola),
    transform 520ms var(--ease-imperio), opacity 520ms var(--ease-imperio);
}
/* Keep the hover colours immediate; only the entrance (transform/opacity)
   follows the staggered link timing. */
.nav-sheet.is-open .nav-sheet__cta {
  transition-delay: 0ms, 0ms, 0ms, calc(var(--i, 0) * 60ms), calc(var(--i, 0) * 60ms);
}
.nav-sheet .nav-sheet__cta:hover,
.nav-sheet .nav-sheet__cta:focus-visible {
  background: var(--magna-700);
  border-color: var(--magna-700);
  color: var(--surface-light);
}
.nav-sheet .nav-sheet__cta--secondary {
  background: transparent;
  border-color: color-mix(in srgb, var(--text-strong) 35%, transparent);
  color: var(--text-strong);
}
.nav-sheet .nav-sheet__cta--secondary:hover,
.nav-sheet .nav-sheet__cta--secondary:focus-visible {
  background: rgba(78, 51, 34, 0.06);
  border-color: var(--text-strong);
  color: var(--text-strong);
}

/* --------------------------------------------------------------------------
   9. Floating call button — mobile only. A red disc that dials the restaurant
   directly (tel:), so the phone is always one tap away.
   -------------------------------------------------------------------------- */
.call-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 77;
  display: none;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--surface-light);
  background: var(--magna-600);
  box-shadow: var(--sh-4);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--d-rapido) var(--ease-ola), box-shadow var(--d-rapido) var(--ease-ola),
    background var(--d-rapido) var(--ease-ola);
}
.call-fab:hover,
.call-fab:focus-visible {
  background: var(--magna-700);
  transform: translateY(-2px);
}
.call-fab:active {
  transform: translateY(0);
}
/* A soft pulse ring to draw the eye, without ever blocking the tap. */
.call-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--magna-600);
  pointer-events: none;
  animation: call-fab-pulse 2.6s var(--ease-ola) infinite;
}
@keyframes call-fab-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70%,
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   10. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .nav__links {
    display: none;
  }
  .nav__burger {
    display: grid;
  }
  .call-fab {
    display: inline-flex;
  }
  .nav__phone {
    display: none;
  }
}
