/* ==========================================================================
   captains2026 — The Old Captain's House, Island Brač
   Palette from the house's own dusk photography and Brač limestone.
   Type: Marcellus (lapidary capitals — the stonemason island) + Lora (log-book serif).
   Signature: the horizon line; the house's real chart coordinates as wayfinding.
   ========================================================================== */

/* ---- Fonts ---- */
@font-face {
  font-family: 'Marcellus';
  src: url('../fonts/marcellus-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Marcellus';
  src: url('../fonts/marcellus-400-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-400-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-400i-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-400i-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-600-latin.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-600-latin-ext.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}

/* ---- Tokens ---- */
:root {
  --limestone: #f2efe8;
  --foam: #faf9f5;
  --ink: #1c2b36;
  --ink-soft: #46555f;
  --dusk: #14212b;
  --dusk-2: #1b2c39;
  --adriatic: #3e7c96;
  --adriatic-deep: #2c5d73;
  --lamplight: #d9a05b;
  --lamplight-bright: #e8b26b;
  --hairline: rgba(28, 43, 54, 0.22);
  --hairline-light: rgba(242, 239, 232, 0.28);

  --display: 'Marcellus', 'Times New Roman', serif;
  --body: 'Lora', Georgia, serif;

  --text: clamp(1.0313rem, 0.98rem + 0.2vw, 1.125rem);
  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --sec-pad: clamp(4.5rem, 4rem + 4vw, 8rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Reset-ish ---- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font: 400 var(--text) / 1.72 var(--body);
  color: var(--ink);
  background: var(--limestone);
  -webkit-font-smoothing: antialiased;
}
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--adriatic-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--adriatic); }
:focus-visible { outline: 2px solid var(--adriatic); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--dusk); color: #fff; padding: 0.6rem 1.2rem;
}
.skip-link:focus { left: 0; }

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

.system-slot > :empty { display: none; }
.system-slot .blog-featured:only-child { display: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font: 400 0.8125rem / 1 var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 1.9rem 0.95rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-ghost { color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.btn.btn-lamp {
  color: var(--dusk);
  background: var(--lamplight);
  border-color: var(--lamplight);
}
.btn.btn-lamp:hover { background: var(--lamplight-bright); border-color: var(--lamplight-bright); color: var(--dusk); }
.btn-ghost-dark { color: var(--ink); background: transparent; font-family: var(--display); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--limestone); }

/* ---- Top bar ---- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem var(--gutter);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.topbar.is-scrolled {
  background: rgba(20, 33, 43, 0.94);
  box-shadow: 0 1px 0 var(--hairline-light);
  backdrop-filter: blur(10px);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
  text-decoration: none;
  font: 400 0.9375rem / 1.2 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.topbar-brand img { width: 44px; height: auto; }
.topbar-nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
.topbar-nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font: 400 0.78rem / 1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.topbar-nav a:hover { color: #fff; border-bottom-color: var(--lamplight); }
.topbar-nav a.nav-cta {
  color: var(--dusk);
  background: var(--lamplight);
  padding: 0.65rem 1.1rem 0.55rem;
  border-radius: 2px;
  border-bottom: 0;
}
.topbar-nav a.nav-cta:hover { background: var(--lamplight-bright); }

.topbar-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  padding: 0.85rem;
  cursor: pointer;
}
.topbar-toggle-bars,
.topbar-toggle-bars::before,
.topbar-toggle-bars::after {
  display: block;
  width: 17px;
  height: 2px;
  background: #fff;
  position: relative;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.topbar-toggle-bars::before, .topbar-toggle-bars::after { content: ''; }
.topbar-toggle-bars::before { position: absolute; top: -5px; }
.topbar-toggle-bars::after { position: absolute; top: 5px; }
.topbar-toggle[aria-expanded="true"] .topbar-toggle-bars { background: transparent; }
.topbar-toggle[aria-expanded="true"] .topbar-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.topbar-toggle[aria-expanded="true"] .topbar-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--dusk);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem var(--gutter) 3rem;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav nav { display: flex; flex-direction: column; gap: 0.2rem; }
.mobile-nav a {
  color: var(--limestone);
  text-decoration: none;
  font: 400 1.35rem / 1.3 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--hairline-light);
}
.mobile-nav a.nav-cta { color: var(--lamplight); border-bottom: 0; }
.mobile-nav-coords {
  margin: 2.4rem 0 0;
  color: rgba(242, 239, 232, 0.55);
  font: 400 0.8rem / 1 var(--display);
  letter-spacing: 0.2em;
}

/* ---- Hero ---- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(20, 33, 43, 0.42), rgba(20, 33, 43, 0.08) 38%, rgba(20, 33, 43, 0.62) 88%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 8rem var(--gutter) clamp(4rem, 9vh, 7rem);
  color: #fff;
}
.hero-eyebrow {
  margin: 0 0 1.4rem;
  font: 400 0.8rem / 1.5 var(--display);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--lamplight-bright);
  text-shadow: 0 1px 12px rgba(12, 20, 27, 0.85), 0 0 2px rgba(12, 20, 27, 0.9);
}
.hero h1, .hero-sub { text-shadow: 0 2px 18px rgba(12, 20, 27, 0.55); }
.hero h1 {
  margin: 0 0 1.3rem;
  font: 400 clamp(2.9rem, 1.8rem + 6vw, 6.4rem) / 1.04 var(--display);
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero-sub {
  margin: 0 0 2.4rem;
  max-width: 34em;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-horizon {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  height: 1px;
  background: var(--limestone);
}

/* ---- Sections & the horizon-line eyebrow ---- */
.sec { padding: var(--sec-pad) 0; }
.tone-light { background: var(--limestone); }
.tone-shade { background: var(--foam); }
.tone-dusk { background: var(--dusk); color: var(--limestone); }
.tone-dusk a { color: var(--lamplight-bright); }
.tone-dusk .sec-title { color: var(--limestone); }

.sec-inner { width: min(var(--wrap), 100%); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0 0 2.6rem;
  font: 400 0.8rem / 1 var(--display);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--adriatic-deep);
}
.eyebrow::before { content: ''; width: 2.4rem; height: 1px; background: var(--hairline); flex: none; }
.eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--hairline); }
.tone-dusk .eyebrow { color: var(--lamplight); }
.tone-dusk .eyebrow::before, .tone-dusk .eyebrow::after { background: var(--hairline-light); }

.sec-title {
  margin: 0 0 1.8rem;
  font: 400 clamp(1.85rem, 1.4rem + 2.2vw, 3rem) / 1.14 var(--display);
  letter-spacing: 0.03em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 22em;
}

/* ---- Content patterns used by the section modules ---- */
.lede { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.58; max-width: 33em; }

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.8rem, 4vw, 4rem);
  align-items: start;
}
.cols-2 > div > p:first-child { margin-top: 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split figure { margin: 0; }
.split img { border-radius: 3px; }
.split figcaption {
  margin-top: 0.7rem;
  font: 400 0.78rem / 1.5 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 2.8rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}
.fact-strip li {
  flex: 1 1 9rem;
  padding: 1.1rem 1.4rem 0 0;
  font: 400 0.84rem / 1.5 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fact-strip strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.amenities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}
.amenities li {
  padding: 1.15rem 1rem 1.15rem 0;
  border-bottom: 1px solid var(--hairline);
  font: 400 0.92rem / 1.45 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.amenities li small {
  display: block;
  font-family: var(--body);
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
}

/* rooms filmstrip */
.rooms {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  margin: 2.6rem calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter) 0.6rem;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 3.5rem), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 3.5rem), transparent 100%);
}
.rooms::-webkit-scrollbar { display: none; }
.rooms.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rooms figure { flex: 0 0 min(21rem, 78vw); scroll-snap-align: start; margin: 0; }
.rooms figure img { -webkit-user-drag: none; }
.rooms img { height: 15rem; width: 100%; object-fit: cover; border-radius: 3px; }
.rooms figcaption {
  margin-top: 0.55rem;
  font: 400 0.78rem / 1.4 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* photo chapter break */
.break {
  position: relative;
  min-height: 62vh;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
}
.break::before { content: ''; position: absolute; inset: 0; background: rgba(20, 33, 43, 0.52); }
.break-inner {
  position: relative;
  width: min(52rem, 92%);
  padding: 6rem 0;
  text-align: center;
  color: #fff;
}
.break-inner p {
  font: 400 clamp(1.35rem, 1.1rem + 1.6vw, 2.1rem) / 1.5 var(--display);
  letter-spacing: 0.02em;
  margin: 0;
}
.break-inner p + p { margin-top: 1.4rem; font-size: 0.72em; color: rgba(255, 255, 255, 0.85); }

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-item { display: block; border-radius: 3px; overflow: hidden; }
.gallery-item[hidden] { display: none; }
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}
.gallery-item:hover img { transform: scale(1.035); }
.gallery-expand-row { text-align: center; margin: 2.4rem 0 0; }

/* reviews */
.review { max-width: 46rem; margin: 0 auto 3.2rem; }
.review:last-child { margin-bottom: 0; }
.review blockquote {
  margin: 0;
  font: italic 400 clamp(1.15rem, 1.05rem + 0.7vw, 1.5rem) / 1.55 var(--body);
  color: var(--limestone);
}
.review blockquote::before {
  content: '“';
  font: 400 2.2em/0.4 var(--display);
  color: var(--lamplight);
  display: block;
  margin: 0.35em 0 0.15em;
}
.review cite {
  display: block;
  margin-top: 1.2rem;
  font: 400 0.8rem / 1.4 var(--display);
  font-style: normal;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lamplight-bright);
}

/* FAQ — native details/summary */
.faq-list { max-width: 50rem; }
.faq-list details { border-bottom: 1px solid var(--hairline); }
.faq-list details:first-of-type { border-top: 1px solid var(--hairline); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 0.2rem;
  font: 400 1.06rem / 1.45 var(--display);
  letter-spacing: 0.04em;
  color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  margin-left: auto;
  font: 400 1.3rem / 1 var(--display);
  color: var(--adriatic);
  transition: transform 0.25s var(--ease);
  flex: none;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details > div { padding: 0 0.2rem 1.5rem; color: var(--ink-soft); max-width: 46rem; }
.faq-list details > div > p:first-child { margin-top: 0; }

/* rates */
.rates-table { width: 100%; max-width: 34rem; border-collapse: collapse; margin: 0 0 2.2rem; }
.rates-table td {
  padding: 0.8rem 0.2rem;
  border-bottom: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}
.rates-table td:last-child { text-align: right; font-family: var(--display); letter-spacing: 0.06em; white-space: nowrap; }
.terms { margin: 0; padding: 0; list-style: none; max-width: 34rem; }
.terms li {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.65rem 0.2rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.98rem;
}
.terms li span:last-child { font-family: var(--display); letter-spacing: 0.05em; text-align: right; }

/* booking */
.booking-wrap { text-align: center; max-width: 42rem; margin: 0 auto; }
.booking-wrap .sec-title { margin-left: auto; margin-right: auto; }
.booking-invite { font-style: italic; color: rgba(242, 239, 232, 0.88); }
.booking-contacts {
  margin: 2.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2.8rem;
  font: 400 1.02rem / 1.5 var(--display);
  letter-spacing: 0.08em;
}
.booking-contacts a { color: var(--limestone); text-decoration-color: var(--lamplight); }
.booking-cta { margin: 2.6rem 0 0; }
.booking-note { margin-top: 2.2rem; font-size: 0.9rem; color: rgba(242, 239, 232, 0.6); }
.booking-map {
  margin: 3.4rem auto 0;
  max-width: 42rem;
  border: 1px solid var(--hairline-light);
  border-radius: 3px;
  overflow: hidden;
}
.booking-map iframe { display: block; width: 100%; height: 300px; border: 0; }

/* ---- Footer ---- */
.footer { background: var(--dusk); color: rgba(242, 239, 232, 0.75); border-top: 1px solid var(--hairline-light); }
.footer-inner {
  width: min(var(--wrap), 100%);
  margin: 0 auto;
  padding: 4rem var(--gutter) 3rem;
  text-align: center;
}
.footer-logo { margin: 0 auto 1.8rem; opacity: 0.92; }
.footer a { color: var(--limestone); }
.footer-partners { margin: 0 0 1.6rem; font-size: 0.95rem; }
.footer-partners a { margin: 0 0.7rem; }
.footer-coords {
  margin: 0 0 0.6rem;
  font: 400 0.78rem / 1.6 var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242, 239, 232, 0.5);
}
.footer-copy { margin: 0; font-size: 0.85rem; color: rgba(242, 239, 232, 0.45); }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(12, 20, 27, 0.96);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; display: grid; place-items: center; height: 100vh; padding: 3.4rem 0.5rem; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; }
.lb-close, .lb-prev, .lb-next {
  background: transparent;
  color: rgba(242, 239, 232, 0.85);
  border: 0;
  font: 300 2.4rem / 1 var(--body);
  cursor: pointer;
  padding: 1rem 1.2rem;
  transition: color 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--lamplight-bright); }
.lb-close { position: absolute; top: 0.6rem; right: 0.8rem; z-index: 2; }
.lb-count {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font: 400 0.8rem / 1 var(--display);
  letter-spacing: 0.24em;
  color: rgba(242, 239, 232, 0.65);
}

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 1023px) {
  .topbar-nav { display: none; }
  .topbar-toggle { display: flex; }
  .split { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .cols-2 { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 6rem; }
  .hero-photo { object-position: 68% center; }
  .break { min-height: 52vh; }
  .rooms img { height: 12.5rem; }
}
@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fact-strip li { flex-basis: 7.2rem; }
  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .booking-contacts { flex-direction: column; gap: 0.9rem; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery-item img, .btn, .topbar { transition: none; }
}
