/* ============================================================
   Dubrovnik Sky View — "Above the Line"
   Print-quiet editorial: large margins, small type, photographs
   given room. One committed light world, chalk paper and a
   green-grey ink, with a single muted Adriatic slate used almost
   nowhere. No dark variant on purpose — the paper IS the identity.

   Type is set in faces macOS and iOS already have, so the site
   loads with zero external requests: no font CDN, nothing to
   consent to under GDPR, and no flash of fallback text.
   To licence the intended production faces later, swap
   --serif for GT Sectra Fine (or Ogg) and --sans for Söhne.
   ============================================================ */

:root {
  --paper:  #EFEEEA;
  --paper2: #E7E5DE;
  --ink:    #1A1D1B;
  --soft:   #7A7D77;
  --blue:   #46647A;
  --hair:   #D6D5CE;

  --serif: "Hoefler Text", "Big Caslon", Baskerville, "Palatino Linotype", Georgia, serif;
  --sans:  Optima, "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 76px);
  --shell:  1240px;

  /* one vertical rhythm for section spacing, so nothing drifts */
  --band: clamp(72px, 11vw, 168px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* jumping to a section must not park its heading under the sticky header */
section[id] { scroll-margin-top: 92px; }

a { color: inherit; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; text-decoration: none;
}
.skip:focus { left: 0; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- shared type ---------- */
.label {
  margin: 0 0 18px;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--soft);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.012em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(38px, 6vw, 74px); line-height: 1.08; }
h2 { font-size: clamp(27px, 3.6vw, 43px); line-height: 1.16; }
h1 i, h2 i { font-style: italic; color: var(--blue); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--soft); max-width: 42ch; }
.meta { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }

.cap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  font-size: 11.5px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--soft);
}

.btn {
  display: inline-block;
  margin-top: 34px;
  padding: 15px 30px;
  border: 1px solid var(--ink);
  font-size: 12.5px;
  letter-spacing: .17em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .35s ease, color .35s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.link {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--hair);
  transition: border-color .3s ease, color .3s ease;
}
.link:hover { color: var(--blue); border-bottom-color: var(--blue); }
.link + .link { margin-top: 12px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s ease;
}
.site-head.is-stuck { border-bottom-color: var(--hair); }

.head-inner {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 54px);
  min-height: 78px;
}

.brand { text-decoration: none; display: flex; align-items: baseline; gap: 9px; margin-right: auto; }
.brand-mark {
  font-size: 12.5px; letter-spacing: .34em; text-transform: uppercase;
}
.brand-sub {
  font-family: var(--serif); font-size: 17px; font-style: italic; color: var(--blue);
}

.nav { display: flex; gap: clamp(16px, 2.4vw, 34px); }
.nav a {
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: var(--soft);
  transition: color .3s ease;
}
.nav a:hover, .nav a.is-current { color: var(--ink); }

.lang { display: flex; gap: 2px; }
.lang button {
  appearance: none; -webkit-appearance: none;
  background: none; border: 0; cursor: pointer;
  font-family: inherit; color: var(--soft);
  font-size: 11px; letter-spacing: .14em;
  padding: 6px 8px;
  transition: color .3s ease;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom: 1px solid var(--ink); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(56px, 9vw, 124px) var(--band); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 34fr) minmax(0, 41fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.hero-say { padding-top: clamp(0px, 2vw, 30px); }
.hero-fig { margin: 0; position: relative; }
.hero-fig video,
.hero-fig img {
  width: 100%;
  aspect-ratio: 4 / 5;      /* the clip is 9:16, so a portrait frame crops it least */
  object-fit: cover;
  display: block;
  background: var(--paper2);
}

/* ---------- today's light ----------
   A hairline strip, not a banner. It is the only thing on the page that
   changes by itself, so it earns a rule above and below and nothing else. */
.sunstrip {
  border-block: 1px solid var(--hair);
  margin-bottom: var(--band);
}
.sun-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px clamp(20px, 3.4vw, 46px);
  padding-block: 17px;
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.sun-label { color: var(--ink); }
.sun-item { color: var(--soft); }
.sun-v {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-left: 5px;
}
.sun-go {
  margin-left: auto;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

/* ---------- about ----------
   Deliberately pictureless. Two image-led sections precede it, so a block
   of pure type is what breaks the rhythm. */
.about {
  background: var(--paper2);
  padding-block: clamp(60px, 9vw, 120px);
  margin-bottom: var(--band);
}
.about-inner { max-width: 74ch; }
.about .label { text-align: center; }
.about h2 {
  text-align: center;
  max-width: 24ch;
  margin: 0 auto clamp(30px, 4vw, 52px);
}
.about-body { max-width: 62ch; margin-inline: auto; }
.about-body p { color: var(--soft); }
.about-body .lede-big {
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1.1em;
}

/* the owners' portrait closes the story */
.about-fig {
  margin: clamp(38px, 5vw, 60px) auto 0;
  max-width: 560px;
}
.about-fig img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: 50% 35%;
}

/* ---------- the view ---------- */
.view { padding-bottom: var(--band); }

/* Full-bleed panorama: the page's one loud moment, and it is a photograph. */
.pano { margin: 0 0 clamp(40px, 6vw, 84px); }
.pano img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: 50% 42%;
}
@media (max-width: 700px) {
  .pano img { aspect-ratio: 4 / 3; }
}

/* Anyone should be able to stop moving video. Sits quietly until hovered. */
.pano-toggle {
  position: absolute;
  right: clamp(12px, 1.6vw, 18px);
  top: clamp(12px, 1.6vw, 18px);
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(20, 24, 22, .3);
  backdrop-filter: blur(6px);
  opacity: .72;
  transition: opacity .3s ease, background .3s ease;
}
.pano-toggle:hover { opacity: 1; background: rgba(20, 24, 22, .55); }
.pano-toggle:focus-visible { opacity: 1; outline-color: #fff; }

.view-grid {
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(0, 45fr);
  gap: clamp(28px, 5vw, 84px);
  align-items: start;
}
.view-grid > div:last-child { color: var(--soft); }
.view-grid > div:last-child p { max-width: 46ch; }

.seelist { list-style: none; margin: 30px 0 0; padding: 0; }
.seelist li {
  padding: 13px 0;
  border-top: 1px solid var(--hair);
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
}
.seelist li:last-child { border-bottom: 1px solid var(--hair); }

/* the closing tagline under the see-list */
.view-tag {
  margin: 22px 0 0;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- the numbers ----------
   Inverted: the only dark surface on the page, so it breaks the run of
   paper-coloured sections and gives the eye somewhere to land. */
.numbers {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(54px, 8vw, 100px);
  margin-bottom: var(--band);
}
.numbers .label { color: rgba(239, 238, 234, .5); margin-bottom: 26px; }

.stat-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(239, 238, 234, .2);
}
.stat-row li {
  padding: clamp(24px, 3vw, 38px) clamp(14px, 2vw, 30px) 4px 0;
  border-right: 1px solid rgba(239, 238, 234, .2);
}
.stat-row li:last-child { border-right: 0; }

.stat-fig {
  display: block;
  font-family: var(--serif);
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat-k {
  display: block;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1.5;
  color: rgba(239, 238, 234, .58);
  max-width: 20ch;
}

/* ---------- experiences ---------- */
.exp { padding-bottom: var(--band); }
.exp-grid {
  display: grid;
  grid-template-columns: minmax(0, 47fr) minmax(0, 38fr);
  gap: clamp(30px, 6vw, 92px);
  align-items: center;
}
/* flipping the image to the right also swaps the column widths, so the
   photograph keeps the same generous share in both directions */
.exp--flip .exp-grid { grid-template-columns: minmax(0, 38fr) minmax(0, 47fr); }
.exp--flip .exp-fig { order: 2; }
.exp-fig { margin: 0; }
.exp-fig img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }

/* The third experience does not repeat the two-column rhythm a third time:
   the photograph runs taller and the text sits on top of it as a card. */
#private .exp-grid {
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  align-items: center;
}
#private .exp-fig img { aspect-ratio: 4 / 5; }
#private .exp-say {
  position: relative;
  z-index: 2;
  margin-left: clamp(-92px, -7vw, -28px);
  background: var(--paper);
  padding: clamp(26px, 3.2vw, 46px);
}
#private .exp-say p { max-width: 38ch; }

.exp-say h2 { margin-bottom: 22px; }
.exp-say p { color: var(--soft); max-width: 44ch; }
.exp-say .meta { margin: 24px 0 20px; }

/* Mornings carries two separate offers (book the space / the instructor),
   so each gets its own labelled block with its own CTA and phone number. */
.exp-actions {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}
.exp-action {
  padding-top: 20px;
  border-top: 1px solid var(--hair);
}
.exp-action-k {
  display: block;
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.exp-action p {
  color: var(--soft);
  font-size: 15px;
  margin-bottom: 14px;
  max-width: 40ch;
}

/* the lead-in line above the Evenings private CTA */
.exp-lead {
  color: var(--soft);
  font-size: 15px;
  margin: 4px 0 14px;
  max-width: 44ch;
}

/* ---------- gallery ----------
   Full-bleed track whose first frame still lines up with the text column.
   Uses 100% (not 100vw) so a visible scrollbar can never push the page sideways. */
.gallery {
  --edge: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  padding-bottom: var(--band);
}
.gal-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(26px, 3.4vw, 44px);
}
.gal-ctrl { display: flex; gap: 8px; flex: none; }
.gal-btn {
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  width: 46px; height: 46px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  transition: background .3s ease, color .3s ease, border-color .3s ease, opacity .3s ease;
}
.gal-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gal-btn:disabled { opacity: .3; cursor: default; }

.gal-track {
  display: flex;
  gap: clamp(10px, 1.4vw, 18px);
  padding-inline: var(--edge);
  /* without this the first frame snaps flush to the window edge instead of
     lining up with the text column above it */
  scroll-padding-inline-start: var(--edge);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.gal-track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .gal-track { scroll-behavior: auto; } }

.gal-item {
  flex: 0 0 clamp(232px, 27vw, 384px);
  margin: 0;
  scroll-snap-align: start;
}
.gal-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- faq ---------- */
.faq { padding-bottom: var(--band); }
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 32fr) minmax(0, 53fr);
  gap: clamp(28px, 5vw, 84px);
  align-items: start;
}
.faq-head h2 { max-width: 14ch; }

.faq-list { border-top: 1px solid var(--hair); }
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-item h3 { margin: 0; font-family: var(--sans); font-weight: 400; }

.faq-q {
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  background: none;
  border: 0;
  padding: 22px 0;
  text-align: left;
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.35;
  color: var(--ink);
  transition: color .3s ease;
}
.faq-q:hover { color: var(--blue); }

/* the marker is drawn, so it never depends on a glyph being present */
.faq-q i {
  position: relative;
  flex: none;
  width: 13px; height: 13px;
  align-self: center;
}
.faq-q i::before,
.faq-q i::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: currentColor;
}
.faq-q i::after { transform: rotate(90deg); transition: transform .35s ease; }
.faq-q[aria-expanded="true"] i::after { transform: rotate(0deg); }

/* animating grid-template-rows collapses cleanly without a fixed height,
   and visibility keeps the closed answer out of the tab order */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .38s ease, visibility .38s;
}
.faq-a > div { overflow: hidden; }
.faq-a p {
  color: var(--soft);
  font-size: 15.5px;
  max-width: 54ch;
  padding-bottom: 24px;
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .faq-a { transition: none; } }

/* ---------- visit ---------- */
.visit { padding-bottom: var(--band); }
.visit-head { max-width: 42ch; margin-bottom: clamp(34px, 5vw, 60px); }

.visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  border-top: 1px solid var(--hair);
}
.fact { padding: 26px 0 30px; border-bottom: 1px solid var(--hair); }
.fact h3 {
  font-family: var(--sans);
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--soft); margin-bottom: 10px;
}
.fact p { font-size: 15.5px; line-height: 1.6; max-width: 32ch; }

.visit-fig { margin: clamp(40px, 6vw, 76px) 0 0; }
.visit-fig img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }

/* ---------- closing ---------- */
.close {
  padding-block: var(--band);
  border-top: 1px solid var(--hair);
  text-align: center;
}
.close h2 { max-width: 20ch; margin-inline: auto; }

/* ---------- footer ---------- */
.site-foot { background: var(--paper2); padding-block: clamp(50px, 7vw, 84px) 30px; }

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(30px, 4vw, 56px);
  padding-bottom: clamp(38px, 5vw, 60px);
}
.foot-brand { display: flex; flex-direction: column; gap: 4px; }

.foot-col h3 {
  font-family: var(--sans);
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--soft); margin-bottom: 16px;
}
.foot-col .link { display: block; width: fit-content; }
.addr { font-size: 15px; line-height: 1.6; margin-bottom: 16px; }

.foot-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  font-size: 11.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--soft);
}
.foot-base p { margin: 0; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .9s ease, transform .9s cubic-bezier(.22,.61,.36,1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
}

/* ---------- narrow ---------- */
@media (max-width: 900px) {
  /* the nav drops to its own row and scrolls sideways rather than
     disappearing — most visitors arrive here from Instagram, on a phone */
  .head-inner { flex-wrap: wrap; min-height: 0; padding-block: 15px 0; row-gap: 4px; }
  .nav {
    order: 3;
    width: 100%;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 13px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }

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

  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row li:nth-child(2n) { border-right: 0; padding-left: clamp(16px, 4vw, 26px); }
  .stat-row li:nth-child(-n+2) { border-bottom: 1px solid rgba(239, 238, 234, .2); }
  .stat-row li { padding-bottom: 22px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  /* These must out-specify the two-class and id-scoped rules above,
     or those keep their desktop columns at phone width. */
  .hero-grid,
  .view-grid,
  .exp-grid,
  .faq-grid,
  .exp--flip .exp-grid,
  #private .exp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sun-go { margin-left: 0; width: 100%; }
  .exp--flip .exp-fig { order: 0; }

  /* the overlap card only works when there is a column to overlap */
  #private .exp-say { margin-left: 0; padding: 0; background: none; }
  .hero-fig video, .hero-fig img { aspect-ratio: 4 / 5; }
  #private .exp-fig img { aspect-ratio: 4 / 5; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}
