@import url("fonts.css");

/* ==========================================================================
   Pierian Chalets — site stylesheet
   Direction 1A "Hearth" (warm stone, Newsreader serif, light background).
   Token values come from the handoff README, which is the source of truth.
   Nothing here is rounded and nothing casts a shadow — that is deliberate.
   ========================================================================== */

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

:root {
  /* surfaces */
  --bg:            #faf7f1;  /* page */
  --bg-sand:       #f2ece1;  /* availability section, booking card */
  --bg-dark:       #2f3730;  /* things-to-do band, CTA band */
  --bg-footer:     #221f1b;
  --photo-ph:      #dcd3c4;  /* placeholder image fill */

  /* ink */
  --ink:           #221f1b;
  --ink-body:      #3f3a32;
  --ink-soft:      #4a443b;
  --ink-muted:     #5f584d;
  --ink-quiet:     #6d675e;
  --ink-label:     #8a7f6d;  /* uppercase labels only — see contrast note */
  --ink-ph:        #8d8271;  /* text on placeholder images */
  --ink-note:      #a1957f;  /* "placeholder" notes — delete with them */
  --on-dark:       #eef0ea;
  --on-dark-soft:  rgba(238, 240, 234, .72);
  --on-dark-quiet: rgba(238, 240, 234, .6);
  --on-dark-rule:  rgba(238, 240, 234, .16);
  --on-footer:     #cfc8bb;
  --on-footer-dim: #7d766a;
  --on-hero:       #fdfbf7;
  --on-hero-soft:  rgba(253, 251, 247, .86);

  /* accent */
  --accent:        #2f5741;  /* active nav, links, prices, stars, button hover */
  --accent-light:  #9db3a1;  /* numerals on the dark band */

  /* lines */
  --rule:          #e6ded1;
  --rule-input:    #ddd2c0;

  /* type */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;  /* 300 & 400 */
  --font-text:    "Alegreya Sans", system-ui, -apple-system, sans-serif;

  /* geometry */
  --radius: 0;
  --shadow: none;
  --page:   1180px;  /* max content width, inclusive of the side padding */
  --pad:    44px;    /* section side padding */

  /* motion — the only transition in the design */
  --t: background-color .18s ease, color .18s ease, border-color .18s ease;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color-scheme: light;  /* keeps native date pickers on the light palette */
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a {
  color: inherit;
  text-decoration: none;
  transition: var(--t);
}

a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; height: auto; }

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

blockquote { margin: 0; }

figure { margin: 0; }

input, select, textarea, button { font-family: inherit; }

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

/* Focus ring needs to be visible against the two dark bands as well. */
.band--dark :focus-visible,
.site-footer :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--on-dark);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: top .15s ease;
}

.skip-link:focus { top: 12px; }

/* Motion — including the prefers-reduced-motion switch — lives in §17. */

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

/* Content is capped at 1180px and centred. Coloured bands run full-bleed;
   their inner wrapper carries the cap so the band edge reaches the viewport. */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.band--sand   { background: var(--bg-sand); }
.band--dark   { background: var(--bg-dark); color: var(--on-dark); }

.section      { padding-block: 80px; }
.section--tall{ padding-block: 82px; }
.section--dark{ padding-block: 78px; }

/* Header row: h2 left, note right, hairline underneath. */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.section-head--ruled {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 22px;
}

/* Sub-section heads (Amenities) sit two pixels tighter. */
.section-head--tight { padding-bottom: 20px; }

.section-head__note {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-label);
  text-align: right;
}

.band--dark .section-head__note {
  letter-spacing: .16em;
  color: var(--on-dark-quiet);
}

.section-head__lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 420px;
}

.measure { max-width: 620px; }

/* --------------------------------------------------------------------------
   4. Type roles
   -------------------------------------------------------------------------- */

.h-hero    { font-weight: 300; font-size: 62px; line-height: 1.04; letter-spacing: -.015em; }
.h-page    { font-weight: 300; font-size: 52px; line-height: 1.05; letter-spacing: -.02em; }
.h-section { font-weight: 400; font-size: 38px; line-height: 1.1;  letter-spacing: -.01em; }
.h-sub     { font-weight: 400; font-size: 34px; line-height: 1.1; }
.h-cta     { font-weight: 300; font-size: 32px; line-height: 1.1; }
.h-card    { font-weight: 400; font-size: 27px; line-height: 1.2; }
.h-item    { font-weight: 400; font-size: 22px; line-height: 1.25; }

.band--dark .h-section { font-weight: 300; }

.eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.micro {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-label);
}

/* The "Placeholder …" notes. Delete these elements with the content they
   annotate — they must not reach production. */
.placeholder-note {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-note);
}

/* --------------------------------------------------------------------------
   5. Buttons and link affordances
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 17px 28px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: var(--t);
}

.btn:hover { text-decoration: none; }

/* Dark button — the default call to action. */
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: var(--accent); }

/* Light button — used on photography and on the dark bands. */
.btn--light { background: var(--bg); color: var(--ink); }
.btn--light:hover { background: var(--accent); color: var(--on-dark); }

.btn--on-dark { background: var(--on-dark); color: var(--ink); }
.btn--on-dark:hover { background: var(--accent); color: var(--on-dark); }

.btn--block { display: block; width: 100%; padding-inline: 24px; }

.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Underlined uppercase link — "See the Grand", cross-links. */
.link-rule {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 3px;
}

.link-rule:hover { text-decoration: none; color: var(--ink); border-bottom-color: var(--ink); }

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

/* --------------------------------------------------------------------------
   6. Photo placeholders
   --------------------------------------------------------------------------
   No photography exists yet. Each `.ph` stands in for one shot and is
   captioned with the shot it needs. To ship a real image, replace the whole
   element with:

     <picture>
       <source srcset="assets/img/grand-hero.avif" type="image/avif">
       <source srcset="assets/img/grand-hero.webp" type="image/webp">
       <img src="assets/img/grand-hero.jpg" width="1180" height="520"
            alt="…" loading="lazy" decoding="async" class="photo">
     </picture>
   -------------------------------------------------------------------------- */

.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  background-color: var(--photo-ph);
  background-image: repeating-linear-gradient(135deg,
    rgba(0, 0, 0, .055) 0 6px,
    rgba(0, 0, 0, 0) 6px 12px);
  color: var(--ink-ph);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ph--lg { font-size: 12px; letter-spacing: .16em; }
.ph--sm { font-size: 10px; letter-spacing: .12em; }

/* A real photo dropped into a grid cell should fill it the same way. */
.photo { width: 100%; height: 100%; object-fit: cover; }

/* <picture> is inline by default, which would leave a baseline gap under the
   image and stop it filling a fixed-height tile. */
picture { display: block; }

/* Pulls the crop downwards. Needed where a portrait master sits in a landscape
   slot — a centred crop would frame empty sky instead of the building. */
.photo--focus-below { object-position: 50% 65%; }

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

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-block: 20px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.wordmark:hover { text-decoration: none; }

.wordmark__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  letter-spacing: .01em;
}

.wordmark__place {
  font-size: 9.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-label);
  margin-top: 5px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.site-nav > a[aria-current="page"],
.nav-item__toggle.is-current {
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 3px;
}

/* Dropdown ------------------------------------------------------------------
   THE CHALETS is a category, not a page — it opens a submenu listing each
   chalet. Adding a third one is a matter of adding an <li> to the .nav-sub on
   every page; docs/tools/check-launch.sh fails if the pages disagree. */

/* The nav and the dropdown item fill the header vertically, so the panel can
   hang from `top: 100%` and land exactly on the header's bottom rule whatever
   the nav text metrics turn out to be once the webfont loads. */
.site-header__inner > .site-nav { align-self: stretch; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
}

.nav-item__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: var(--t);
}

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

/* Typographic marks only, per the brief — this is a 4px CSS triangle, not an
   icon set. It flips when the menu is open. */
.nav-item__caret {
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .55;
  transition: transform var(--t-ui, .18s) ease, opacity var(--t-ui, .18s) ease;
}

.nav-item__toggle[aria-expanded="true"] .nav-item__caret {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: -18px;
  z-index: 70;
  min-width: 200px;
  margin-top: 21px;          /* the header's 20px padding + its 1px rule */
  padding: 6px 0;
  background: var(--bg);
  border: 1px solid var(--rule);
  text-transform: none;
  letter-spacing: .04em;
  font-size: 13px;
  font-weight: 400;
}

/* Bridges the gap between the trigger and the panel so the pointer can travel
   into the submenu without it closing underneath. */
.nav-sub::before {
  content: "";
  position: absolute;
  inset: -21px 0 100% 0;
}

.nav-item.is-open > .nav-sub { display: block; }

.nav-sub a {
  display: block;
  padding: 9px 18px;
  color: var(--ink);
  white-space: nowrap;
}

.nav-sub a:hover {
  text-decoration: none;
  background: var(--bg-sand);
  color: var(--accent);
}

.nav-sub a[aria-current="page"] {
  color: var(--accent);
  font-weight: 500;
}

/* Keyboard and no-JS fallback: the panel opens on hover and whenever anything
   inside it has focus, so the chalet pages stay reachable even if site.js
   never runs. Desktop only — below 900px this becomes an accordion. */
@media (min-width: 900px) {
  .nav-item:hover > .nav-sub,
  .nav-item:focus-within > .nav-sub { display: block; }
}

.lang {
  display: flex;
  gap: 8px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: none;
  color: var(--ink-label);
  padding-left: 6px;
  border-left: 1px solid var(--rule);
}

.lang a[aria-current="true"] { color: var(--ink); }

/* Hamburger — shown once the horizontal nav no longer fits (see §14). */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  content: "";
}

.nav-toggle__bars {
  position: relative;
  margin: 0 auto;
}

.nav-toggle__bars::before { position: absolute; top: -7px; }
.nav-toggle__bars::after  { position: absolute; top:  7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { top: 0; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   8. Hero (home)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__overlay {
  position: relative;
  width: 100%;
  padding: 56px var(--pad) 40px;
  background: linear-gradient(to top, rgba(28, 24, 19, .72), rgba(28, 24, 19, 0));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.hero__text {
  max-width: 620px;
  color: var(--on-hero);
}

.hero__eyebrow { opacity: .8; margin-bottom: 18px; }

.hero__text h1 { margin-bottom: 18px; }

.hero__lede {
  font-size: 17px;
  line-height: 1.6;
  max-width: 520px;
  color: var(--on-hero-soft);
}

.hero__cta { flex: none; }

/* --------------------------------------------------------------------------
   9. The chalets — card grid
   -------------------------------------------------------------------------- */

.stack-40 { display: flex; flex-direction: column; gap: 40px; }
.stack-38 { display: flex; flex-direction: column; gap: 38px; }
.stack-32 { display: flex; flex-direction: column; gap: 32px; }

.chalet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.chalet-card { display: flex; flex-direction: column; }

.chalet-card__media { height: 300px; }

.chalet-card__body {
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chalet-card__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.chalet-card__price {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--accent);
  white-space: nowrap;
}

.chalet-card__text {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.chalet-card .link-rule { margin-top: 4px; }

/* --------------------------------------------------------------------------
   10. Things to do — dark band
   --------------------------------------------------------------------------
   The hairlines between cells are the grid background showing through a 1px
   gap; every cell repaints itself with the band colour. */

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--on-dark-rule);
}

.activity {
  background: var(--bg-dark);
  padding: 30px 28px 34px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity__num {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--accent-light);
}

.activity p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-dark-soft);
}

/* --------------------------------------------------------------------------
   11. Availability — rail + form
   -------------------------------------------------------------------------- */

.availability {
  display: flex;
  gap: 56px;
  align-items: flex-start;
}

.availability__rail {
  width: 320px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.availability__phone {
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--accent);
  border-top: 1px solid var(--rule-input);
  padding-top: 16px;
  margin-top: 6px;
  align-self: flex-start;
}

.early-bird {
  margin-top: 8px;
  background: var(--accent);
  color: var(--bg-sand);
  padding: 18px 20px;
}

.early-bird__label {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 7px;
}

.early-bird__body { font-size: 14.5px; line-height: 1.55; }

/* Form ---------------------------------------------------------------- */

/* The form sits in its own flex child so that swapping the <form> for the
   confirmation panel on success does not disturb the section layout. */
.availability__form {
  flex: 1;
  min-width: 0;
}

.enquiry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  align-items: start;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field--wide { grid-column: span 2; }

.field > .field__label,
.field > span:first-child {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-label);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--rule-input);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

.field input[type="date"] { padding-block: 12px; }

.field textarea { resize: vertical; min-height: 108px; }

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-label) 50%),
                    linear-gradient(135deg, var(--ink-label) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); }

/* Invalid state — only applied after a submit attempt, by JS. */
.field--invalid input,
.field--invalid select,
.field--invalid textarea { border-color: #9a3b2c; }

.field__error {
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: #9a3b2c;
}

.field__error:empty { display: none; }

/* Honeypot — off-screen, never focusable by a human. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.enquiry__submit { grid-column: span 2; justify-self: start; padding-inline: 34px; }

.enquiry__status { grid-column: span 2; }

.form-message {
  padding: 18px 20px;
  border: 1px solid var(--rule-input);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-body);
}

.form-message--error {
  border-color: #9a3b2c;
  color: #7e3123;
}

.form-message__title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 8px;
}

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

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.review {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review__stars {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: .3em;
}

.review__quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.55;
  color: #332f28;
}

.review__who {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-label);
}

/* --------------------------------------------------------------------------
   13. Chalet detail pages
   -------------------------------------------------------------------------- */

.breadcrumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 44px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-label);
}

.breadcrumb [aria-current="page"] { color: var(--ink); }

.crosslink {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Gallery -------------------------------------------------------------- */

.gallery { padding-top: 26px; display: flex; flex-direction: column; gap: 12px; }

/* Grand: hero spans two 190px rows, two stacked tiles to its right. */
.gallery__top--grand {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  grid-template-rows: 190px 190px;
  gap: 12px;
}

.gallery__top--grand > :first-child { grid-row: span 2; }

.gallery__strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.gallery__strip .gallery__tile { height: 96px; }

/* Cozy: 400px hero left, stacked tiles right. */
.gallery__top--cozy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gallery__top--cozy > :first-child { height: 400px; }

.gallery__col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

.gallery__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

/* Every tile is a button so the lightbox is reachable by keyboard. */
.gallery__tile {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.gallery__tile .ph,
.gallery__tile picture { width: 100%; height: 100%; }

.gallery__tile:hover .ph { color: var(--ink); }

.gallery__tile--more .ph {
  font-weight: 500;
  color: var(--ink);
}

/* Title + booking card -------------------------------------------------- */

.chalet-intro {
  padding-top: 64px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 64px;
  align-items: start;
}

.chalet-intro__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule-input);
  padding: 8px 12px;
}

/* Chips are static specs on the chalet pages, but the 404 uses them as links. */
a.chip:hover {
  text-decoration: none;
  color: var(--accent);
  border-color: var(--accent);
}

.chalet-intro__lede { font-size: 17px; line-height: 1.7; color: var(--ink-body); }
.chalet-intro__body { font-size: 16px; line-height: 1.7; color: var(--ink-muted); }

.booking-card {
  position: sticky;
  top: 24px;
  border: 1px solid var(--rule);
  background: var(--bg-sand);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.booking-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.booking-card__amount {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1;
}

.booking-card__unit { font-size: 14px; color: var(--ink-quiet); }

.booking-card__terms {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule-input);
  padding-top: 16px;
}

.booking-card__call {
  font-size: 12.5px;
  text-align: center;
  color: var(--accent);
}

/* Amenities ------------------------------------------------------------- */

.amenities { padding-top: 70px; }

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 32px;
  font-size: 15.5px;
  color: var(--ink-body);
}

.amenity-grid li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

/* The em-dash is a bullet, not a word — the empty alt text keeps screen
   readers from announcing it before every amenity. */
.amenity-grid li::before {
  content: "—" / "";
  color: var(--accent);
  flex: none;
}

/* CTA band -------------------------------------------------------------- */

.cta-band {
  margin-top: 70px;
  padding-block: 56px;
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-band__text { display: flex; flex-direction: column; gap: 8px; }

.cta-band__sub { font-size: 15px; color: rgba(238, 240, 234, .7); }

.cta-band .btn { flex: none; padding-inline: 30px; }

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-footer);
  color: var(--on-footer);
  padding-block: 52px;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--bg);
}

.site-footer__line { font-size: 14px; }

.site-footer__legal {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-footer-dim);
}

/* --------------------------------------------------------------------------
   15. Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: rgba(24, 21, 17, .95);
  color: var(--on-dark);
}

.lightbox[hidden] { display: none; }

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  flex: none;
}

.lightbox__count {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-quiet);
}

.lightbox__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--on-dark-rule);
  background: none;
  color: var(--on-dark);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--t);
}

.lightbox__btn:hover { background: rgba(238, 240, 234, .12); }

.lightbox__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 20px;
}

.lightbox__figure {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lightbox__media {
  flex: 1;
  min-height: 0;
}

.lightbox__media .ph,
.lightbox__media picture { width: 100%; height: 100%; }

/* The lightbox is where the whole photograph should be visible, so it is
   `contain` here rather than the cropped `cover` used in the tiles — and any
   tile-specific crop offset is dropped. */
.lightbox__media .photo {
  object-fit: contain;
  object-position: center;
}

.lightbox__caption {
  flex: none;
  text-align: center;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-quiet);
}

.lightbox__nav { flex: none; font-size: 20px; letter-spacing: 0; padding: 0; }

body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   16. Responsive
   --------------------------------------------------------------------------
   The mock is desktop-only at 1180px. Breakpoints per the handoff, with one
   addition: the horizontal nav needs ~860px to lay out, so the hamburger
   takes over below 900px rather than waiting for 640px.
   -------------------------------------------------------------------------- */

/* Tablet — 640px to 1023px */
@media (max-width: 1023px) {
  :root { --pad: 32px; }

  .h-hero    { font-size: 48px; }
  .h-page    { font-size: 42px; }
  .h-section { font-size: 32px; }
  .h-sub     { font-size: 30px; }

  .hero { height: 460px; }

  /* 3-column grids collapse to 2. */
  .activity-grid,
  .review-grid { grid-template-columns: repeat(2, 1fr); }

  .amenity-grid { grid-template-columns: repeat(2, 1fr); }

  /* Availability stacks: rail above form. */
  .availability { flex-direction: column; gap: 36px; }
  .availability__rail { width: 100%; }
  .early-bird { max-width: 420px; }

  /* Chalet intro stacks; the booking card stops sticking. */
  .chalet-intro { grid-template-columns: 1fr; gap: 40px; }
  .booking-card { position: static; }

  /* Gallery becomes a single-column stack of 16:9 tiles. */
  .gallery__top--grand,
  .gallery__top--cozy,
  .gallery__strip,
  .gallery__col,
  .gallery__pair { display: flex; flex-direction: column; gap: 12px; }

  .gallery__top--grand > :first-child,
  .gallery__top--cozy > :first-child { height: auto; }

  .gallery__tile,
  .gallery__strip .gallery__tile { height: auto; }

  /* Tiles lose their fixed height here, so the 16:9 shape has to come from the
     content itself — placeholder and real photo alike. */
  .gallery__tile .ph,
  .gallery__tile picture,
  .gallery__tile .photo { aspect-ratio: 16 / 9; height: auto; }
}

/* Nav collapses before the layout does. */
@media (max-width: 899px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    inset: 0 0 auto;
    top: 100%;
    z-index: 80;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--pad) 24px;
  }

  .site-header { position: relative; }

  .site-nav.is-open { display: flex; }

  .site-nav > a,
  .nav-item__toggle {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 0;
    border-bottom: 1px solid var(--rule);
  }

  .site-nav > a[aria-current="page"],
  .nav-item__toggle.is-current {
    border-bottom: 1px solid var(--rule);
    padding-bottom: 6px;
  }

  /* The dropdown becomes an in-flow accordion: no overlay, no absolute
     positioning, and the submenu pushes the rest of the menu down. */
  .nav-item {
    display: block;
  }

  .nav-item__toggle {
    width: 100%;
    justify-content: space-between;
  }

  .nav-sub {
    position: static;
    min-width: 0;
    margin: 0;
    padding: 4px 0 4px 18px;
    border: none;
    background: none;
    font-size: 14px;
  }

  .nav-sub::before { content: none; }

  .nav-sub a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid var(--rule);
  }

  .nav-sub li:last-child a { border-bottom: none; }

  .nav-sub a:hover { background: none; }

  .lang {
    margin-top: 16px;
    padding-left: 0;
    border-left: none;
    border-top: none;
  }

  .lang a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 4px;
  }
}

/* Phone — under 640px */
@media (max-width: 639px) {
  :root { --pad: 20px; }

  .section,
  .section--tall { padding-block: 56px; }
  .section--dark { padding-block: 56px; }

  .h-hero    { font-size: 36px; }
  .h-page    { font-size: 34px; }
  .h-section { font-size: 28px; }
  .h-sub     { font-size: 26px; }
  .h-cta     { font-size: 26px; }
  .h-card    { font-size: 24px; }

  .hero { height: auto; min-height: 420px; }
  .hero__overlay { flex-direction: column; align-items: flex-start; gap: 28px; padding-top: 120px; }
  .hero__cta { width: 100%; }

  /* Every grid is one column. */
  .chalet-grid,
  .activity-grid,
  .review-grid,
  .amenity-grid,
  .enquiry { grid-template-columns: 1fr; }

  .field--wide,
  .enquiry__submit,
  .enquiry__status { grid-column: span 1; }

  .enquiry__submit { justify-self: stretch; }

  /* Section heads stack rather than squeeze. */
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .section-head__note { text-align: left; }

  .breadcrumb-row { flex-direction: column; align-items: flex-start; gap: 14px; }

  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .cta-band .btn { width: 100%; }

  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 24px; }

  .lightbox__stage { padding-inline: 12px; }
  .lightbox__nav { position: static; }
}

/* ==========================================================================
   17. Motion
   ==========================================================================
   ADDITIVE AND SELF-CONTAINED. Everything from here to the end of the file can
   be deleted in one block to return the site to a still, transition-free state.

   The original design called for no motion at all; transitions were added
   afterwards and signed off. They stay deliberately quiet:

     - fades and 6px drifts only — nothing lifts, scales, rotates or bounces
     - cards stay still on hover
     - nothing is triggered by scroll position; there is no parallax
     - every duration is under a third of a second
     - all of it switches off under prefers-reduced-motion (bottom of section)

   Three tokens below drive the whole feel.
   -------------------------------------------------------------------------- */

:root {
  --t-page: .30s;   /* page enter, cross-page fade */
  --t-ui:   .22s;   /* overlays, menus, hover states */
  --t-tiny: .16s;   /* in-place text and image swaps */
  --ease:   cubic-bezier(.4, 0, .2, 1);
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* --- Page enter ---------------------------------------------------------- */

/* Runs on every load, and doubles as the fallback for browsers without
   cross-document view transitions. Pure CSS, so it cannot leave the page
   stuck at opacity 0 if JavaScript fails. */
body { animation: fade-in var(--t-page) var(--ease) both; }

@media print {
  body { animation: none; }
}

/* --- Between pages ------------------------------------------------------- */

/* Cross-document view transitions: the outgoing page fades away, the incoming
   one fades up from 6px. Every page loads this stylesheet, so every page opts
   in. Browsers without support simply navigate as before — nothing to detect,
   nothing to polyfill, no JavaScript involved. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: fade-in var(--t-ui) var(--ease) reverse both;
}

::view-transition-new(root) {
  animation: rise-in var(--t-page) var(--ease) both;
}

/* In-page anchors (the skip link, "#availability") glide rather than jump. */
html { scroll-behavior: smooth; }

/* --- Mobile menu --------------------------------------------------------- */

@media (max-width: 899px) {
  .site-nav {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;   /* same reason as the lightbox — see below */
    transition:
      opacity   var(--t-ui) var(--ease),
      transform var(--t-ui) var(--ease),
      display   var(--t-ui) allow-discrete;
  }

  .site-nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  /* Entry needs a start value; without this the menu would only animate shut. */
  @starting-style {
    .site-nav.is-open {
      opacity: 0;
      transform: translateY(-6px);
    }
  }
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  transition:
    transform        var(--t-ui) var(--ease),
    top              var(--t-ui) var(--ease),
    background-color var(--t-ui) var(--ease);
}

/* --- Lightbox ------------------------------------------------------------ */

/* `allow-discrete` lets the overlay animate out before `display: none` lands,
   so the [hidden] attribute stays the single source of truth and site.js needs
   no changes. Browsers without it open and close instantly, as before. */
.lightbox {
  opacity: 1;
  transition:
    opacity var(--t-ui) var(--ease),
    display var(--t-ui) allow-discrete;
}

/* `display` is still `flex` for the 220ms the fade-out takes, so the overlay
   would otherwise keep swallowing clicks after it is logically closed. */
.lightbox[hidden] {
  opacity: 0;
  pointer-events: none;
}

@starting-style {
  .lightbox:not([hidden]) { opacity: 0; }
}

/* The media node is rebuilt on every step, so this replays as a crossfade
   each time the guest moves through the gallery. */
.lightbox__media > * {
  animation: fade-in var(--t-tiny) var(--ease) both;
}

/* --- Gallery tiles ------------------------------------------------------- */

/* Colour only. The tiles do not lift or scale — see the handoff. */
.gallery__tile .ph {
  transition:
    color            var(--t-ui) var(--ease),
    background-color var(--t-ui) var(--ease);
}

/* --- Form ---------------------------------------------------------------- */

/* Errors appear as the text is written into them, rather than snapping in. */
.field__error:not(:empty) {
  animation: rise-in var(--t-tiny) var(--ease) both;
}

.form-message {
  animation: rise-in var(--t-ui) var(--ease) both;
}

.field input,
.field select,
.field textarea {
  transition: border-color var(--t-ui) var(--ease);
}

/* --- Reduced motion ------------------------------------------------------
   The whole section above collapses to nothing for anyone who has asked their
   system for less movement. Durations are near-zero rather than `none` so that
   transitionend / animationend still fire and discrete `display` swaps still
   complete. View transitions are cancelled outright. */

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

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
