/* =========================================================================
   COMPONENTS — canonical, token-referencing. One CTA (variants only),
   one nav, one menu, one footer. No per-section button styles.
   ========================================================================= */

/* --- CTA (the one pill) ------------------------------------------------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--cta-h);
  padding-inline: var(--cta-pad-x);
  border-radius: var(--cta-radius);
  font-family: var(--cta-font);
  font-size: var(--cta-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: var(--cta-tracking);
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  border: 0.5px solid var(--accent);   /* hairline — Chiara: 1px read clunky */
  background: transparent;
  color: var(--accent);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
/* Default = outline Linen; hover fills Linen, label goes Limestone */
.cta:hover, .cta:focus-visible { background: var(--accent); color: var(--surface); }

/* solid variant — Linen fill, Limestone label (nav "BOOK YOUR STAY") */
.cta--solid { background: var(--accent); color: var(--surface); border-color: var(--accent); }
.cta--solid:hover, .cta--solid:focus-visible { background: #A79582; border-color: #A79582; color: var(--surface); }

/* light-outline variant — for use over the dark hero (Alabaster @70%) */
.cta--light { border-color: var(--bg); color: var(--bg); background: color-mix(in srgb, var(--bg) 0%, transparent); }
.cta--light:hover, .cta--light:focus-visible { background: color-mix(in srgb, var(--bg) 12%, transparent); color: var(--bg); }

/* --- TEXT CTA (underlined caps link) ------------------------------------ */
.text-cta {
  display: inline-flex; flex-direction: column; gap: 6px;   /* Figma drew 11 — Chiara: closer */
  align-items: flex-start; width: max-content;
  font-family: var(--font-body); font-weight: 400;
  font-size: var(--cta-size); letter-spacing: var(--cta-tracking);
  text-transform: uppercase; color: var(--accent);
  transition: opacity var(--dur) var(--ease);
}
.text-cta::after {
  content: ""; display: block; height: var(--hairline); width: 100%;
  background: currentColor; transition: width var(--dur) var(--ease);
}
.text-cta:hover, .text-cta:focus-visible { opacity: 0.5; }
.text-cta:hover::after, .text-cta:focus-visible::after { width: 5px; }
/* on-image variant: Limestone label, collapses to 5px, opacity .75 */
.text-cta--light { color: var(--surface); }
.text-cta--light:hover, .text-cta--light:focus-visible { opacity: 0.75; }

/* --- NAV ---------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.nav__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-lg);
  min-height: 85px;   /* content sits 5px closer to top (Chiara); was 95 */
  padding-block: var(--space-md);
}
.nav__logo { display: block; position: relative; width: 167px; max-width: 40vw; } /* Chiara-calibrated (Figma 206) */
.nav__logo img { width: 100%; height: auto; transition: opacity var(--dur) var(--ease); }
.nav__logo .logo--ebony { position: absolute; inset: 0; opacity: 0; }

.nav__links { display: flex; gap: var(--space-lg); align-items: center; }
.nav__links a {
  font-family: var(--font-body); font-weight: 400;
  font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase; /* Chiara 17 Jul: 13px */
  color: var(--bg); transition: opacity var(--dur) var(--ease);
}
.nav__links a:hover { opacity: 0.7; }

.nav__actions { display: flex; align-items: center; gap: var(--space-sm); }
.nav__menu {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer; color: var(--bg);
  font-family: var(--font-body); font-weight: 400;
  font-size: 13px; letter-spacing: 0.09em; text-transform: uppercase; /* Chiara 17 Jul: 13px */
}
.nav__burger { display: inline-flex; flex-direction: column; gap: 6px; width: 29px; }
.nav__burger span { display: block; height: 1px; background: currentColor; width: 100%; }
/* nav CTAs sit at 45px */
.nav .cta { height: var(--cta-h-nav); font-size: var(--cta-size); padding-inline: 26px; }

/* solid (scrolled) state — Alabaster bar, dark text */
.nav.is-solid {
  background: color-mix(in srgb, var(--bg) 78%, transparent);   /* frosted (Chiara) */
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav.is-solid .logo--alabaster { opacity: 0; }
.nav.is-solid .logo--ebony { opacity: 1; }
.nav.is-solid .nav__links a,
.nav.is-solid .nav__menu { color: var(--ink); }
.nav.is-solid .cta--light { border-color: var(--accent); color: var(--ink); }
.nav.is-solid .cta--light:hover { background: var(--accent); color: var(--surface); }
.nav.is-hidden { transform: translateY(-100%); }

/* --- MOBILE / OVERLAY MENU (Limestone panel — client system) ------------ */
.menu {
  position: fixed; inset: 0; z-index: 150;
  background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column;
  padding: var(--space-xl) var(--gutter) var(--space-2xl);
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.menu[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
/* Mobile per Figma 6285:3024: logo top-left, small close ring top-right,
   everything below centered in one column on Limestone. */
.menu__logo { position: absolute; top: var(--space-md); left: var(--gutter); width: 122px; }
.menu__close {
  position: absolute; top: var(--space-md); right: var(--gutter);
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--bg);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
}
.menu__inner {
  margin: auto 0; display: grid; gap: var(--space-md);
  justify-items: center; text-align: center;
  padding-top: var(--space-2xl);   /* clear the logo/close row */
  max-width: var(--max-w); width: 100%; margin-inline: auto;
}
.menu__group-label {
  font-family: var(--font-body); font-weight: 400; font-size: var(--type-eyebrow);
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent);
  margin-bottom: var(--space-xs);
}
.menu__list { display: grid; gap: var(--space-xxs); }
.menu__list a {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--type-menu); line-height: 1.45; color: var(--ink);
  transition: opacity var(--dur) var(--ease);
}
.menu__list a:hover { opacity: 0.6; }
.menu__foot {
  display: grid; justify-items: center; gap: var(--space-lg);
  padding-top: var(--space-md);
}
.menu__social { display: flex; gap: var(--space-sm); }
.menu__social a { color: var(--accent); display: inline-flex; }
.menu__social svg { width: 18px; height: 18px; }
/* pills stack, equal width (Chiara 22 Jul — was side-by-side per Figma) */
.menu__ctas { display: grid; gap: var(--space-sm); width: min(100%, 260px); }
.menu__ctas .cta { height: var(--cta-h-sm); font-size: var(--cta-size-mobile); padding-inline: var(--space-sm); width: 100%; }
@media (max-width: 768px) {
  body.menu-open { overflow: hidden; }   /* scroll-lock is a full-screen-overlay behaviour — mobile only */

  /* footer mobile rules live in the LATER ≤768 block (after the base footer
     rules — same-specificity overrides win by source order, and this block
     sits before them) */
}

/* --- DESKTOP: dropdown panel (Chiara 22 Jul — wireframe pattern, not a
   full-page takeover). Same markup: the .menu becomes a panel anchored under
   the nav; page stays visible beneath. Newsletter/socials stay in the footer —
   the .menu__foot is hidden here, which is what lets the panel be compact. --- */
@media (min-width: 769px) {
  .menu {
    inset: auto 0 auto 0; top: 0;
    z-index: 90;                        /* under the nav (z100): burger stays clickable and toggles */
    padding: calc(85px + var(--space-lg)) var(--gutter) var(--space-xl);
    background: var(--bg);
    border-bottom: var(--hairline) solid color-mix(in srgb, var(--line) 70%, transparent);
    box-shadow: var(--shadow-panel);
    overflow: visible;
    transform: translateY(-16px);
    transition: opacity var(--dur-slow) var(--ease-float),
                visibility var(--dur-slow) var(--ease-float),
                transform var(--dur-slow) var(--ease-float);
  }
  .menu__close, .menu__foot, .menu__logo { display: none; }
  .menu__inner { padding-top: 0; justify-items: start; text-align: left; }
  /* columns hug their content and align to the logo's gutter — not stretched
     across --max-w. The gap is the rhythm; the void was the old problem. */
  .menu__inner { margin: 0; max-width: none; justify-content: start;
    grid-template-columns: repeat(4, max-content); gap: var(--space-3xl); }
  .menu__group-label { margin-bottom: var(--space-sm); }
  .menu__list a { font-size: var(--type-menu); }
  /* columns drift up one beat apart once the panel lands */
  .menu__group { opacity: 0; transform: translateY(10px);
    transition: opacity var(--dur-slow) var(--ease-float), transform var(--dur-slow) var(--ease-float); }
  .menu[data-open="true"] .menu__group { opacity: 1; transform: none; }
  .menu[data-open="true"] .menu__group:nth-child(2) { transition-delay: var(--stagger); }
  .menu[data-open="true"] .menu__group:nth-child(3) { transition-delay: calc(2 * var(--stagger)); }
  .menu[data-open="true"] .menu__group:nth-child(4) { transition-delay: calc(3 * var(--stagger)); }

  /* the panel is Alabaster, so the transparent nav must flip to its dark
     (solid-state) colours while the menu is open */
  body.menu-open .nav { background: var(--bg); }
  body.menu-open .nav .logo--alabaster { opacity: 0; }
  body.menu-open .nav .logo--ebony { opacity: 1; }
  body.menu-open .nav .nav__links a,
  body.menu-open .nav .nav__menu { color: var(--ink); }
  body.menu-open .nav .cta--light { border-color: var(--accent); color: var(--ink); }

  /* burger → X while open */
  .nav__menu[aria-expanded="true"] .nav__burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav__menu[aria-expanded="true"] .nav__burger span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }
  .nav__burger span { transition: transform var(--dur) var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  .menu, .menu__group { transition: none; }
}

/* --- TAG CHIP ----------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center;
  padding: 2.5px 16px; border-radius: 5px;   /* Chiara 21 Jul: pill 3px shorter */
  background: var(--chip-bg);
  font-family: var(--font-body); font-weight: 400;
  font-size: var(--type-eyebrow); color: var(--accent);
  text-transform: capitalize; line-height: 1.6;
}

/* --- SAVE ICON (bookmark toggle) ---------------------------------------- */
.save-btn {
  width: 47px; height: 47px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border: 0; cursor: pointer; color: var(--accent);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.save-btn svg { width: 18px; height: 18px; }
.save-btn[aria-pressed="true"] { background: var(--accent); color: var(--surface); }
.save-btn[aria-pressed="true"] svg { fill: currentColor; }

/* --- START A CONVERSATION — slide-out (house line: a conversation, not a
   form). One panel, opened from every contact trigger; footer keeps the SEO
   contact essentials. --- */
.convo-backdrop {
  position: fixed; inset: 0; z-index: 160;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow) var(--ease);
}
body.convo-open .convo-backdrop { opacity: 1; visibility: visible; }
.convo {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 170;
  width: min(600px, 100vw);   /* Chiara 27 Jul: wider panel, compact fields — everything fits the viewport height */
  background: var(--surface); color: var(--ink);
  transform: translateX(100%); visibility: hidden;
  transition: transform var(--dur-slow) var(--ease-float), visibility var(--dur-slow) var(--ease-float);
  overflow-y: auto;
  padding: var(--space-xl);
  display: grid; align-content: center;   /* short content centers to the viewport */
}
.convo[data-open="true"] { transform: none; visibility: visible; }
.convo__close {
  position: absolute; top: var(--space-md); right: var(--space-md);
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--bg);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
}
.convo__in { display: grid; gap: var(--space-sm); }   /* Chiara 27 Jul: header block breathes */
.convo__in h3 { font-size: var(--type-h2); }
.convo__intro { font-weight: 300; font-size: var(--type-sub); line-height: 1.7; }   /* Chiara 27 Jul: one rung down + open leading */
.convo-form {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: var(--space-md); row-gap: var(--space-md);   /* Chiara 27 Jul: air between fields */
  margin-top: var(--space-md);
}
.convo__field { display: grid; gap: 6px; }
.convo__field--full, .convo__submit, .convo__note { grid-column: 1 / -1; }
.convo__label {
  font-family: var(--font-body); font-size: var(--type-eyebrow);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.convo-form input:not(.field--honey), .convo-form select, .convo-form textarea {
  border: 0; border-bottom: var(--hairline) solid var(--line); border-radius: 0;
  background: transparent; padding: 6px 0; font: inherit; font-size: var(--type-sub); color: var(--ink);
}
.convo-form input:focus-visible, .convo-form select:focus-visible, .convo-form textarea:focus-visible {
  outline: none; border-bottom-color: var(--ink);
}
.convo__submit { margin-top: var(--space-sm); justify-self: start; }
.convo__note, .convo__error { font-size: var(--type-meta); color: var(--accent); max-width: 52ch; }
.convo__error { color: var(--ink); }
.convo__done { margin-top: var(--space-md); font-weight: 300; font-size: var(--type-sub); }
body.convo-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .convo, .convo-backdrop { transition: none; }
}

/* --- FOOTER (Linen band) ------------------------------------------------ */
.footer { background: var(--accent); color: var(--bg); padding-block: var(--space-3xl) var(--space-2xl); }   /* tighter under the affiliation logos */
.footer__grid {
  display: grid; column-gap: var(--space-2xl); row-gap: 0;   /* row space owned by the logos row itself */
  grid-template-columns: repeat(3, 1fr) 1.6fr; align-items: start;   /* 3 equal link cols, wider newsletter */
}
.footer__col h4 {
  font-family: var(--font-body); font-weight: 400; font-size: var(--type-eyebrow);
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--bg);
  margin-bottom: var(--space-md);
}
.footer__col ul { display: grid; gap: var(--space-xs); }
.footer__col a {
  font-weight: 300; font-size: var(--type-body); line-height: var(--lh-body-tight);
  color: var(--bg); transition: opacity var(--dur) var(--ease);
}
.footer__col a:hover { opacity: 0.7; }
.footer__news h3 { color: var(--bg); font-size: var(--type-h1); margin-bottom: var(--space-md); }
.footer__news p { font-weight: 300; color: var(--bg); margin-bottom: var(--space-md); max-width: 34ch; }
/* Chiara 27 Jul: marks sit IN the Partners column's empty gap, bottoms level
   with Privacy Policy (cell bottom = tallest column) — the footer reads as
   one block instead of a stray bottom row. Explicit placements for every
   block: sharing cell 2 must not knock the other columns out of auto-flow. */
/* flex-end, not center: the two marks are different heights, so centering
   floats Coastline mid-air against Virtuoso — bottoms level reads as one line
   (client 27 Jul). Mobile overrides back to column/center below. */
.footer__logos {
  display: flex; flex-direction: row; align-items: flex-end;
  gap: var(--space-lg); opacity: 0.9;
}
@media (min-width: 769px) {
  .footer__grid > .footer__col:nth-child(1) { grid-column: 1; grid-row: 1; }
  .footer__grid > .footer__col:nth-child(2) { grid-column: 2; grid-row: 1; }
  .footer__grid > .footer__col:nth-child(3) { grid-column: 3; grid-row: 1; }
  .footer__news { grid-column: 4; grid-row: 1; }
  /* Chiara 27 Jul: marks side-by-side, under the EXPLORE column, bottoms level
     with Privacy Policy so the footer reads as one block */
  .footer__logos { grid-column: 1; grid-row: 1; align-self: end; justify-self: start; }
}
/* Affiliation marks — height set per logo so the artwork reads at matched
   optical weight, not matched box size (Virtuoso is a tall stacked lockup,
   Coastline a wide horizontal one). */
.footer__logos img { width: auto; object-fit: contain; }
.footer__logos img[src*="virtuoso"]  { height: 56px; }
.footer__logos img[src*="coastline"] { height: 28px; }

/* --- NEWSLETTER FORM ---------------------------------------------------- */
.news-form { display: flex; gap: var(--space-xs); max-width: 402px; }
.news-form input {
  flex: 1; height: 40px; border-radius: 5px; border: 0;
  background: var(--bg); color: var(--ink);
  padding-inline: var(--space-sm); font-size: var(--type-meta);
}
.news-form button {
  height: 40px; padding-inline: var(--space-md); border-radius: 5px; border: 0;
  background: var(--bg); color: var(--accent); cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: var(--type-meta);
  transition: opacity var(--dur) var(--ease);
}
.news-form button:hover { opacity: 0.85; }
.field--honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- SUB-FOOTER --------------------------------------------------------- */
.subfooter {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md); padding-block: var(--space-lg);
}
.subfooter__logo { width: 216px; max-width: 45vw; }
.subfooter .meta, .subfooter a { color: var(--accent); font-size: var(--type-meta); }
.subfooter a:hover { opacity: 0.7; }

/* --- responsive: LAYOUT FLIPS ONLY -------------------------------------- */
/* Nav links NEVER wrap (Chiara's rule): each link is one line, and the moment
   the row can't fit, JS adds .nav--collapsed → links fold into the burger.
   No fixed breakpoint — the trigger is the actual overflow. */
.nav__links a { white-space: nowrap; }
.nav--collapsed .nav__links { display: none; }
.nav--collapsed .nav__actions .cta--light { display: none; }
@media (max-width: 768px) {
  .cta { height: var(--cta-h-mobile); font-size: var(--cta-size-mobile); padding-inline: 24px; }
  .text-cta { font-size: var(--cta-size-mobile); }   /* text CTAs step down with the pills */
  .nav .cta { height: var(--cta-h-mobile); }
  .nav__in { min-height: 0; gap: var(--space-sm);
    padding-block: calc(var(--space-md) - 5px); }   /* row rides 5px higher AND the solid bar stays symmetric (Chiara 22 Jul: bottom-heavy padding on scroll) */
  .nav__menu { font-size: var(--type-eyebrow); }   /* ≈ "TRAVEL" in the logo lockup (Chiara 22 Jul) */
  /* CTA underline reads −0.2 thinner (0.8 → 0.6 effective). scaleY, not a
     0.6px height — WebKit rounds sub-pixel heights away and the line vanishes */
  .text-cta::after { transform: scaleY(0.75); transform-origin: bottom; }
  .text-cta { gap: 3px; }   /* Chiara 22 Jul: 6px underline offset floats at the smaller mobile type */
  .save-btn { width: 34px; height: 34px; }          /* Chiara 22 Jul: 47 read huge; 23 Jul: −5% again */
  .save-btn svg { width: 14px; height: 14px; }
  .nav__actions .cta { display: none; }         /* keep only MENU + burger on mobile */
  .nav__links { display: none; }                /* Chiara 23 Jul: hide in CSS from first paint — waiting for the JS overflow-collapse flashed desktop links on load */
  .nav__logo { width: 107px; }
  .menu__inner { grid-template-columns: 1fr; gap: var(--space-lg); }

  /* footer (Chiara 22 Jul, from Figma + notes): newsletter first (centered,
     heading one line), link groups split equally across two columns — EXPLORE
     + PARTNERS left, CONTACT + legal right, every link on one line — then
     Virtuoso/Coastline centered beneath; subfooter stacked + centered */
  .footer { padding-block: var(--space-2xl); }
  .footer__grid { grid-template-columns: 1fr 1fr; row-gap: var(--space-xl); column-gap: var(--space-md); }
  .footer__news { order: -1; grid-column: 1 / -1; text-align: center; margin-bottom: var(--space-md); }
  .footer__news h3 br { display: none; }   /* heading on one line */
  .footer__news p { margin-inline: auto; }
  .footer__news .news-form { flex-direction: column; max-width: none; }
  .news-form input { flex: none; }   /* column axis: flex-basis 0 was collapsing the 40px height */
  .footer__col a { white-space: nowrap; }   /* each page on one line */
  .footer__col:nth-child(1) { grid-column: 1; grid-row: 2; }
  .footer__col:nth-child(2) { grid-column: 1; grid-row: 3; }
  .footer__col:nth-child(3) { grid-column: 2; grid-row: 2 / span 2; }
  .footer__col:nth-child(3) li:nth-child(7) { margin-top: var(--space-md); }   /* breath before Terms */
  /* Chiara 27 Jul (client: "still looks weird"): the two marks are opposite
     shapes (tall lockup vs wide wordmark) — side-by-side never optically
     agrees. Stacked on one center axis, Coastline first. */
  .footer__logos { grid-column: 1 / -1; grid-row: 4; flex-direction: column; align-items: center; justify-content: center; margin-top: 0; gap: var(--space-sm); }   /* Chiara 27 Jul: marks ride up — the grid row-gap alone is the space above */
  .footer__logos img[src*="virtuoso"]  { height: 42px; }
  .footer__logos img[src*="coastline"] { height: 21px; }
  .subfooter { flex-direction: column; gap: var(--space-sm); text-align: center; padding-block: var(--space-lg) var(--space-md); }
  .subfooter__logo { max-width: 42.75vw; }   /* Chiara 23 Jul: wordmark −5% (45vw cap governs at phone widths) */
}
