/* Caves Beach House. Palette and type are taken from the house itself:
   white weatherboard, dove-grey render, navy linen, travertine and timber. */
@font-face { font-family: "Caslon Display"; font-weight: 400; font-display: swap; src: url(/fonts/caslon-display.woff2) format("woff2"); }
@font-face { font-family: "Caslon Text"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/caslon-italic.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 300 700; font-display: swap; src: url(/fonts/hanken.woff2) format("woff2"); }

:root {
  --paper: #f7f6f2;
  --white: #ffffff;
  --stone: #e9e6df;
  --ink: #15222c;
  --muted: #5a656e;
  --navy: #16324a;
  --navy-deep: #0f2536;
  --timber: #a8744a;
  --line: rgba(21, 34, 44, .14);
  --serif: "Caslon Display", "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); padding: 10px 16px; }
.skip:focus { left: 8px; }

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

/* Type */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--timber); margin-bottom: 18px; }
.eyebrow--light { color: #d9b594; }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.6vw, 64px); line-height: 1.06; letter-spacing: -.015em; text-wrap: balance; }
.display--sm { font-size: clamp(28px, 3vw, 42px); line-height: 1.12; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; }
p + p { margin-top: 1em; }

/* Links and buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 2px; background: var(--navy); color: var(--white); font-size: 15px; font-weight: 600; letter-spacing: .02em; text-decoration: none; white-space: nowrap; transition: background-color .25s var(--ease), color .25s var(--ease); }
.btn:hover { background: var(--navy-deep); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--paper); }
.arrow { flex: none; transition: transform .3s var(--ease); }
a:hover > .arrow, button:hover > .arrow { transform: translateX(4px); }
.link { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid currentColor; }
.link-light { color: var(--white); font-weight: 500; font-size: 15px; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* Navigation */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 72px; padding-inline: var(--gutter); color: var(--white); transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease); }
.nav__brand { font-family: var(--serif); font-size: 19px; white-space: nowrap; letter-spacing: .01em; text-decoration: none; margin-right: auto; }
.nav__links { display: none; gap: 28px; font-size: 14px; font-weight: 500; }
.nav__links a { text-decoration: none; opacity: .9; }
.nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav__cta { background: var(--white); color: var(--ink); min-height: 40px; padding: 0 14px; font-size: 13px; }
.nav__cta:hover { background: var(--paper); }
.nav.is-solid { background: rgba(247, 246, 242, .94); backdrop-filter: blur(10px); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.nav.is-solid .nav__cta { background: var(--navy); color: var(--white); }

/* Hero */
.hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: min(100svh, 980px); padding: 120px var(--gutter) 40px; color: var(--white); overflow: hidden; background: var(--navy-deep); }
.hero__media { position: absolute; inset: 0; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 22, 32, .78) 0%, rgba(10, 22, 32, .28) 42%, rgba(10, 22, 32, .12) 70%, rgba(10, 22, 32, .38) 100%), linear-gradient(to right, rgba(10, 22, 32, .42) 0%, rgba(10, 22, 32, 0) 62%); }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero__inner { position: relative; max-width: 760px; }
.hero__eyebrow { color: var(--white); opacity: .92; }
.hero__title { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 12vw, 168px); line-height: .92; letter-spacing: -.025em; }
.hero__lede { margin-top: 22px; max-width: 30em; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 32px; }
.hero__rating { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .32); font-size: 14px; text-decoration: none; }
.hero__score { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 16px; }
.hero__score .laurel { height: 1.9em; color: #e3b05c; }
.hero__score .star { display: none; }
.star { color: #e3b05c; }

/* Facts strip */
.facts { border-bottom: 1px solid var(--line); background: var(--white); }
.facts__list { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1320px; margin-inline: auto; padding: 8px var(--gutter); }
.facts__list li { padding: 18px 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts__list strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: -.01em; text-transform: none; color: var(--ink); }

/* Intro */
.intro { display: grid; gap: 48px; padding-block: clamp(72px, 10vw, 150px); }
.intro__text > * + * { margin-top: 22px; }
.intro__text .display { margin-top: 0; }
.intro__text p:not(.eyebrow):not(.lead) { color: var(--muted); }
.intro__text .link { margin-top: 32px; }
.intro__media { position: relative; padding-bottom: 12%; }
.intro__main img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 38% 50%; }
.intro__inset { position: absolute; left: -4%; bottom: 0; width: 46%; border: 10px solid var(--paper); }
.intro__inset img { aspect-ratio: 1; object-fit: cover; }

/* Spaces */
.spaces { display: grid; gap: clamp(64px, 9vw, 140px); padding-bottom: clamp(72px, 10vw, 150px); }
.space { display: grid; gap: 28px; align-items: center; }
.space__media { overflow: hidden; }
.space__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1.2s var(--ease); }
.space:hover .space__media img { transform: scale(1.025); }
.space__text p:not(.eyebrow) { margin-top: 20px; color: var(--muted); max-width: 34em; }

/* Bedrooms */
.bedrooms { padding-block: clamp(72px, 9vw, 130px); background: var(--stone); }
.section-head { margin-bottom: clamp(32px, 4vw, 56px); }
.section-head__note { margin-top: 16px; color: var(--muted); }
.section-head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.rooms { --edge: max(var(--gutter), calc((100vw - 1320px) / 2 + var(--gutter))); display: flex; gap: 20px; overflow-x: auto; padding-inline: var(--edge); padding-bottom: 12px; scroll-snap-type: x proximity; scroll-padding-inline: var(--edge); scrollbar-width: thin; scrollbar-color: rgba(21, 34, 44, .3) transparent; }
.room { flex: none; width: min(78vw, 400px); scroll-snap-align: start; }
.room__img { overflow: hidden; margin-bottom: 20px; }
.room__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.room__name { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; }
.room__bed { margin-top: 6px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--timber); }
.room__note { margin-top: 10px; font-size: 15.5px; line-height: 1.55; color: var(--muted); }

/* Amenities */
.amenities { padding-top: clamp(72px, 10vw, 150px); }
.amenities__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
.amenities__group .eyebrow { margin-bottom: 4px; }
.amenities__group li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.4; }
.know a { text-underline-offset: 4px; text-decoration-thickness: 1px; white-space: nowrap; }

/* Gallery */
.gallery { padding-block: clamp(72px, 10vw, 150px); }
.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mosaic__item { position: relative; overflow: hidden; cursor: zoom-in; background: var(--stone); }
.mosaic__item img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .9s var(--ease); }
.mosaic__item:hover img { transform: scale(1.04); }
.mosaic__item--1 { grid-column: span 2; }
.gallery__plan { margin-top: 28px; }

/* Location */
.location { background: var(--navy-deep); color: var(--white); padding-bottom: clamp(72px, 9vw, 130px); }
.location__pano { width: 100%; height: clamp(180px, 26vw, 420px); object-fit: cover; }
.location__grid { display: grid; gap: 32px; padding-block: clamp(56px, 8vw, 110px); }
.location p:not(.eyebrow):not(.lead) { color: rgba(255, 255, 255, .74); }
.distances { margin-top: 36px; border-top: 1px solid rgba(255, 255, 255, .22); }
.distances div { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .22); font-size: 15.5px; }
.distances dd { color: #d9b594; text-align: right; white-space: nowrap; }
.location__media { display: grid; gap: 10px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.location__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.location__photos img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Reviews */
.reviews { display: grid; gap: 48px; padding-block: clamp(72px, 10vw, 150px); }
.reviews__number { margin-top: -.14em; font-family: var(--serif); font-size: clamp(96px, 13vw, 176px); line-height: .85; letter-spacing: -.03em; }
.fav { display: flex; align-items: center; gap: clamp(8px, 1.2vw, 18px); width: fit-content; padding-bottom: 10px; }
.fav .reviews__number { margin-top: 0; font-size: clamp(72px, 9vw, 128px); line-height: 1; }
.laurel { flex: none; height: 1em; width: auto; overflow: visible; color: #b98d3e; }
.laurel--right { transform: scaleX(-1); }
.fav .laurel { height: clamp(84px, 10vw, 140px); }
.fav__title { margin-top: 10px; font-family: var(--serif); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; }
.reviews__meta { margin: 12px 0 28px; max-width: 24em; color: var(--muted); }
.reviews__score .link { display: flex; width: fit-content; }
.reviews__list { display: grid; gap: 0; align-content: start; }
.quote { padding: 32px 0; border-top: 1px solid var(--line); }
.quote:last-child { border-bottom: 1px solid var(--line); }
.quote blockquote { font-size: 19px; line-height: 1.5; }
.quote--lead blockquote { font-family: var(--serif); font-size: clamp(24px, 2.5vw, 34px); line-height: 1.22; letter-spacing: -.005em; }
.quote blockquote p + p { margin-top: .7em; }
.quote figcaption { margin-top: 18px; font-size: 14px; font-weight: 600; }
.quote figcaption span { margin-left: 10px; font-weight: 400; color: var(--muted); }

/* Book */
.book { background: var(--white); border-top: 1px solid var(--line); padding-block: clamp(72px, 9vw, 130px); }
.book__grid { display: grid; gap: 40px; grid-template-areas: 'head' 'options' 'know'; }
.book__head { grid-area: head; }
.book__options { grid-area: options; }
.know { grid-area: know; }
.book__head > p:not(.eyebrow) { margin-top: 20px; color: var(--muted); max-width: 30em; }
.know { border-top: 1px solid var(--line); font-size: 15.5px; }
.know li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.know span { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--timber); padding-top: 3px; }
.book__options { display: grid; gap: 12px; align-content: start; }
.option { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 20px; padding: 26px 28px; border: 1px solid var(--line); text-decoration: none; transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.option__name { font-family: var(--serif); font-size: clamp(28px, 3vw, 38px); line-height: 1.1; }
.option__note { grid-column: 1; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); transition: color .3s var(--ease); }
.option .arrow { grid-column: 2; grid-row: 1 / span 2; width: 26px; height: 26px; }
.option:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.option:hover .option__note { color: rgba(255, 255, 255, .8); }
.option:hover .arrow { transform: translateX(6px); }

/* Footer */
.footer { background: var(--navy-deep); color: rgba(255, 255, 255, .72); padding-block: 64px 110px; font-size: 14.5px; }
.footer__grid { display: grid; gap: 36px; }
.footer__brand { font-family: var(--serif); font-size: 28px; color: var(--white); margin-bottom: 10px; }
.footer__label { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #d9b594; margin-bottom: 10px; }
.footer__social { display: flex; gap: 24px; }
.footer__social a { color: var(--white); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.footer__legal p + p { margin-top: 6px; }

/* Sticky booking bar (small screens) */
.bookbar { position: fixed; inset: auto 0 0 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); box-shadow: 0 -1px 0 var(--line); transform: translateY(110%); transition: transform .4s var(--ease); }
.bookbar.is-visible { transform: none; }
.bookbar p { font-size: 13px; line-height: 1.35; color: var(--muted); }
.bookbar strong { display: block; font-size: 15px; color: var(--ink); }
.bookbar span { display: inline-flex; align-items: center; gap: 5px; }

/* Cookie notice */
.cookies { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; max-width: 420px; padding: 22px 24px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(15, 37, 54, .18); font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.cookies[hidden] { display: none; }
.cookies__title { font-family: var(--serif); font-size: 22px; line-height: 1.2; color: var(--ink); margin-bottom: 8px; }
.cookies__actions { display: flex; align-items: center; gap: 22px; margin-top: 18px; }
.cookies__decline { font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; padding: 10px 0; }
body.has-cookie-notice .bookbar { transform: translateY(110%); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(9, 18, 26, .96); color: var(--white); }
.lightbox[hidden] { display: none; }
.lightbox__figure { display: grid; justify-items: center; gap: 14px; padding: 56px 12px 20px; max-width: 100vw; }
.lightbox__img { max-width: min(94vw, 1500px); max-height: calc(100svh - 150px); width: auto; height: auto; }
.lightbox__figure figcaption { font-size: 14px; color: rgba(255, 255, 255, .75); text-align: center; max-width: 60ch; }
.lightbox__count { position: absolute; top: 20px; left: 24px; font-size: 13px; letter-spacing: .1em; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; transition: background-color .2s; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .14); }
.lightbox__close { top: 8px; right: 12px; }
.lightbox__prev { left: 8px; bottom: 10px; }
.lightbox__next { right: 8px; bottom: 10px; }

/* Motion: content is visible by default; script opts in to the reveal. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero__img { animation: settle 2.4s var(--ease) both; }
  .hero__inner > *, .hero__rating { animation: rise 1s var(--ease) both; }
  .hero__inner > :nth-child(2) { animation-delay: .08s; }
  .hero__inner > :nth-child(3) { animation-delay: .18s; }
  .hero__inner > :nth-child(4) { animation-delay: .28s; }
  .hero__rating { animation-delay: .4s; }
}
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

@media (min-width: 640px) {
  .facts__list { grid-template-columns: repeat(6, 1fr); }
  .lightbox__prev { left: 16px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .lightbox__next { right: 16px; bottom: auto; top: 50%; transform: translateY(-50%); }
}

@media (min-width: 900px) {
  body { font-size: 18px; }
  .nav { height: 84px; gap: 32px; }
  .nav__cta { min-height: 44px; padding: 0 20px; font-size: 14px; }
  .nav__links { display: flex; }
  .nav__brand { font-size: 24px; }
  .hero { padding-bottom: 48px; }
  .hero__rating { position: absolute; right: var(--gutter); bottom: 48px; margin: 0; padding: 0; border: 0; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
  .hero__score { font-size: 22px; }
  .facts__list li { padding: 26px 0; }

  .intro { grid-template-columns: 5fr 6fr; gap: clamp(48px, 7vw, 120px); align-items: center; }
  .intro__inset { left: -14%; width: 44%; }

  .space { grid-template-columns: 7fr 4fr; gap: clamp(40px, 6vw, 96px); }
  .space--flip .space__media { order: 2; }
  .space--flip { grid-template-columns: 4fr 7fr; }

  .amenities__grid { grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 4vw, 64px); }
  .mosaic { grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(150px, 15vw, 230px); }
  .mosaic__item img { aspect-ratio: auto; }
  .mosaic__item--1 { grid-column: span 4; grid-row: span 2; }
  .mosaic__item--2, .mosaic__item--3 { grid-column: span 2; }
  .mosaic__item--4, .mosaic__item--5, .mosaic__item--6 { grid-column: span 2; grid-row: span 2; }
  .mosaic__item--7 { grid-column: span 3; }
  .mosaic__item--8 { grid-column: span 3; }
  .mosaic__item--7, .mosaic__item--8 { grid-row: span 1; }

  .location__grid { grid-template-columns: 5fr 6fr; gap: clamp(48px, 7vw, 120px); }
  .location__media { grid-template-columns: 2fr 1fr; }
  .location__photos { grid-template-columns: 1fr; }
  .location__photos img { aspect-ratio: auto; }

  .reviews { grid-template-columns: 4fr 7fr; gap: clamp(48px, 7vw, 120px); }
  .reviews__score { position: sticky; top: 120px; align-self: start; }

  .book__grid { grid-template-columns: 5fr 6fr; grid-template-areas: 'head options' 'know options'; gap: 40px clamp(48px, 7vw, 120px); align-items: start; }
  .footer { padding-bottom: 64px; }
  .footer__grid { grid-template-columns: 2fr 1fr 2fr; }
  .footer__legal { text-align: right; }
  .bookbar { display: none; }
  .cookies { left: auto; right: 24px; bottom: 24px; }
}
