/* AMBA HAUS — Midnight
   Order: tokens → reset → typography → layout → components → utilities → media queries */

/* ---------- Tokens ---------- */
:root {
  --midnight: #06172B;
  --deep: #0A2038;
  --ivory: #F2E7CD;
  --brass: #B99A66;
  --parchment: #F4EFE5;
  --slate: #73808B;

  --ivory-soft: rgba(242, 231, 205, 0.78); /* secondary text, ~9:1 on midnight */
  --hairline: rgba(185, 154, 102, 0.45);
  --hairline-faint: rgba(242, 231, 205, 0.12);
  --hairline-strong: rgba(185, 154, 102, 0.8); /* form field lines: >3:1 on deep blue */

  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;

  --max: 72rem;
  --max-text: 38rem;
  --header-h: 4.5rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }

/* ---------- Typography ---------- */
body {
  background: var(--midnight);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: var(--serif); font-weight: 300; line-height: 1.1; letter-spacing: 0.005em; }
h1, .display { font-size: clamp(2.6rem, 7vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h3 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); font-weight: 400; }
em, .italic { font-style: italic; }
p + p { margin-top: var(--space-2); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brass);
}
.lede { font-size: 1.15rem; color: var(--ivory-soft); max-width: var(--max-text); }
.muted { color: var(--ivory-soft); }

a { color: var(--ivory); text-decoration-color: var(--brass); text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 1px solid var(--brass); outline-offset: 4px; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.container--narrow { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }
.section { padding-block: var(--space-6); background: var(--midnight); }
.section--deep { background: var(--deep); }
/* Cream sections alternate with midnight to lighten the page. The colour tokens are re-scoped,
   so text, links, lines and buttons inside flip to dark-on-cream automatically.
   Brass is deepened to bronze so small text keeps ~5:1 contrast on parchment. */
.section--cream {
  background: var(--parchment);
  color: var(--ivory);
  --ivory: #06172B;
  --ivory-soft: rgba(6, 23, 43, 0.74);
  --brass: #7D6033;
  --hairline: rgba(125, 96, 51, 0.45);
  --hairline-faint: rgba(6, 23, 43, 0.12);
  --hairline-strong: rgba(6, 23, 43, 0.5);
}
.section--cream a:hover { color: var(--brass); }
.section--cream a.tile:hover { background: rgba(6, 23, 43, 0.035); }
.section--cream .btn:hover, .section--cream .btn:focus-visible { color: var(--parchment); }
.section--cream .btn--solid { color: var(--parchment); }
.section--cream .btn--solid:hover { background: var(--midnight); border-color: var(--midnight); }
.section--cream .field select option { background: #fff; color: var(--midnight); }
.section--cream .field input::placeholder, .section--cream .field textarea::placeholder { color: rgba(6, 23, 43, 0.55); }
.section--cream .form__status[data-state="error"] { color: #9a3b12; }
.section--cream .portrait { border-color: transparent; }
.section--center { text-align: center; }
.section--center .lede { margin-inline: auto; }
.section__head { margin-bottom: var(--space-5); }
.section__head .eyebrow { display: block; margin-bottom: var(--space-2); }
.section__head .lede { margin-top: var(--space-3); }
.stack > * + * { margin-top: var(--space-3); }

/* ---------- Header ---------- */
.skip-link { position: absolute; left: -999px; top: 0; padding: var(--space-1) var(--space-2); background: var(--ivory); color: var(--midnight); z-index: 100; }
.skip-link:focus { left: var(--space-2); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 23, 43, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-faint);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.site-header__brand img { height: 2.6rem; width: auto; }
.nav { display: flex; align-items: center; gap: var(--space-4); }
.nav__list { display: flex; gap: var(--space-3); }
.nav__list a, .nav-toggle {
  font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; font-weight: 400;
}
.nav__list a[aria-current="page"] { color: var(--brass); }
.nav-toggle { display: none; background: none; border: 1px solid var(--hairline); padding: 0.55rem 0.9rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.95rem 1.9rem;
  border: 1px solid var(--brass);
  background: transparent;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease;
}
.btn:hover, .btn:focus-visible { background: var(--brass); color: var(--midnight); }
.btn--small { padding: 0.6rem 1.15rem; font-size: 0.7rem; }
.btn--solid { background: var(--brass); color: var(--midnight); }
.btn--solid:hover { background: var(--ivory); border-color: var(--ivory); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.text-link { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Motifs ---------- */
.divider-star { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--brass); margin-block: var(--space-4); }
.divider-star::before, .divider-star::after { content: ""; height: 1px; width: min(7rem, 20vw); background: var(--hairline); }
.divider-star svg { width: 1.1rem; height: 1.1rem; }
.moon-arc { width: min(15rem, 60vw); margin-inline: auto; color: var(--ivory); opacity: 0.9; }
.moon-icon { width: 2rem; height: 2rem; color: var(--brass); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding-block: var(--space-5) var(--space-6);
  background: radial-gradient(ellipse 70% 60% at 50% 0%, #12304f 0%, var(--midnight) 70%);
}
.hero__logo { width: min(22rem, 72vw); margin: 0 auto var(--space-4); }
.hero h1 { font-style: italic; }
.hero .lede { margin: var(--space-3) auto var(--space-4); }

/* Inner page hero */
.page-hero { text-align: center; padding-block: var(--space-6) var(--space-5); background: radial-gradient(ellipse 60% 70% at 50% 0%, #102b47 0%, var(--midnight) 70%); }
.page-hero .eyebrow { display: block; margin-bottom: var(--space-2); }
.page-hero .lede { margin: var(--space-3) auto 0; }

/* ---------- Tiles ---------- */
.tiles { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
.tile {
  display: block;
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid var(--hairline);
  text-decoration: none;
  transition: background-color 0.4s ease;
}
a.tile:hover { background: rgba(242, 231, 205, 0.035); }
.tile .eyebrow { display: block; margin-bottom: var(--space-2); }
.tile h3 { margin-bottom: var(--space-1); }
.tile p { color: var(--ivory-soft); font-size: 0.98rem; }
.tile .moon-icon { margin-bottom: var(--space-3); }

/* ---------- Offering sections (Experiences) ---------- */
.offering { display: grid; gap: var(--space-4); align-items: start; }
.offering__meta { display: flex; flex-direction: column; gap: var(--space-2); }
.offering__formats { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ivory-soft); border-top: 1px solid var(--hairline-faint); padding-top: var(--space-2); }
.offering__list { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.offering__list li { padding-left: 1.4rem; position: relative; }
.offering__list li::before { content: "☾"; position: absolute; left: 0; color: var(--brass); }
.offering .btn { margin-top: var(--space-3); }

/* ---------- Quote ---------- */
.quote { text-align: center; max-width: 44rem; margin-inline: auto; }
.quote blockquote { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.35; }
.quote figcaption { margin-top: var(--space-3); }

/* ---------- Portrait (About) ---------- */
.portrait { aspect-ratio: 4 / 5; background: radial-gradient(ellipse at 50% 30%, #143457 0%, var(--deep) 75%); border: 1px solid var(--hairline-faint); display: grid; place-items: center; }
.portrait img { width: 45%; opacity: 0.85; }
.split { display: grid; gap: var(--space-5); align-items: center; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: var(--space-2); align-items: baseline;
  padding-block: var(--space-3);
  font-family: var(--serif); font-size: 1.45rem; font-weight: 400;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brass); font-family: var(--sans); font-weight: 300; font-size: 1.4rem; transition: transform 0.3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-bottom: var(--space-3); color: var(--ivory-soft); max-width: var(--max-text); }

/* ---------- Booking ---------- */
.cal-embed { min-height: 38rem; border: 1px solid var(--hairline-faint); background: var(--deep); }
.cal-fallback { display: inline-block; margin-top: var(--space-3); }
.prep { display: grid; gap: var(--space-4); }
.prep ul { display: grid; gap: var(--space-1); padding-left: 1.1rem; color: var(--ivory-soft); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-3); }
.form__row { display: grid; gap: var(--space-3); }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 400; color: var(--ivory-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline-strong);
  border-radius: 0;
  color: var(--ivory);
  font-size: 1.05rem;
}
.field select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--deep); color: var(--ivory); }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ivory); }
.field input::placeholder, .field textarea::placeholder { color: rgba(242, 231, 205, 0.7); }
.form__status { min-height: 1.5rem; font-size: 0.98rem; }
.form__status[data-state="error"] { color: #f3c9a8; }
.form__thanks { padding: var(--space-4) 0; }
.form__thanks h3 { margin-bottom: var(--space-2); }
.visually-hidden, .form__hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.newsletter { display: grid; gap: var(--space-2); grid-template-columns: 1fr auto; align-items: end; }
.newsletter .form__status { grid-column: 1 / -1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); border-top: 1px solid var(--hairline-faint); padding-block: var(--space-5) var(--space-4); }
.site-footer__grid { display: grid; gap: var(--space-5); }
.site-footer__logo { width: 9rem; }
.site-footer__meta { display: grid; gap: var(--space-1); color: var(--ivory-soft); font-size: 0.95rem; }
.site-footer__meta a { color: var(--ivory-soft); }
.site-footer__nav { display: grid; gap: var(--space-1); }
.site-footer__nav a { text-decoration: none; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; }
.site-footer__legal { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--hairline-faint); font-size: 0.8rem; color: var(--ivory-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); }

/* ---------- Sticky mobile Book ---------- */
.sticky-book { display: none; }

/* ---------- Reveal (JS adds .reveal; content is visible without JS) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Media queries ---------- */
@media (max-width: 767px) {
  /* Sticky bar height = 2 × 1.15rem padding + 0.75rem × 1.7 line + 1px border; sized in rem so it grows with the user's text size. */
  html { scroll-padding-bottom: calc(4.6rem + 1px); }
  body { padding-bottom: calc(4.6rem + 1px); }
  .page-book { padding-bottom: 0; }
  .page-book .sticky-book { display: none; }
  .section { padding-block: var(--space-5); }
  .js .nav-toggle { display: inline-block; }
  .nav .btn { display: none; }
  /* Without JS the links simply wrap under the logo; with JS they collapse behind the Menu button. */
  .site-header__inner { flex-wrap: wrap; height: auto; min-height: var(--header-h); }
  .nav__list { flex-wrap: wrap; gap: var(--space-2); }
  .js .site-header__inner { flex-wrap: nowrap; height: var(--header-h); }
  .js .nav__list {
    display: none;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--midnight);
    border-bottom: 1px solid var(--hairline);
    padding: var(--space-2) 1.25rem var(--space-3);
  }
  .js .nav--open .nav__list { display: flex; }
  .js .nav__list a { display: block; padding-block: 0.9rem; border-bottom: 1px solid var(--hairline-faint); }
  .sticky-book {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 1.15rem;
    text-align: center;
    background: var(--midnight);
    border-top: 1px solid var(--brass);
    color: var(--ivory);
    text-decoration: none;
    font-size: 0.75rem; letter-spacing: 0.28em; text-transform: uppercase;
  }
  .newsletter { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles--3 { grid-template-columns: repeat(3, 1fr); }
  .form__row { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1.2fr 1fr 1.4fr; }
  .site-footer__grid:has(> [hidden]) { grid-template-columns: 1fr auto; }
  .offering { grid-template-columns: 1fr 1.4fr; gap: var(--space-5); }
  .split { grid-template-columns: 1fr 1.2fr; }
  .prep { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Footer Instagram link: logo + handle */
.site-footer__meta a.social { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; width: fit-content; }
.site-footer__meta a.social svg { width: 1.15rem; height: 1.15rem; color: var(--brass); flex: none; }
.site-footer__meta a.social:hover, .site-footer__meta a.social:hover svg { color: var(--ivory); }
