/* ── Custom properties ─────────────────────────────────────────────── */
:root {
  --black:      #000000;
  --cyprus:     #003f4b;
  --dove-gray:  #707070;
  --nobel:      #b4b4b4;
  --steel-teal: #5f848b;
  --white:      #ffffff;
  --font:       "Gabarito", Helvetica;

  /* Layout tokens used by .split-section and .split-bleed.
     They are re-declared per breakpoint below, so those blocks need
     no media queries of their own for spacing, type size or height. */
  --gutter:        120px;  /* page edge → text */
  --split-gap:      80px;  /* text → image side */
  --split-pad-y:    80px;  /* text top/bottom */
  --frame:         100px;  /* white space around framed (split-section) image */
  --frame-inner:     0px;  /* frame on the side that faces the text */
  --section-min:   840px;  /* min-height split-section */
  --bleed-min:     700px;  /* min-height split-bleed */
  --bleed-h2-lg:    80px;  /* .split-bleed--lg (Om Kronosalen) */
  --section-h2:     60px;
  --bleed-h2:       50px;
  --body-size:      26px;  /* running text: hero, split blocks, contact */

  /* Header and footer. --gutter (above) is their side padding. */
  --header-pad-y:   40px;
  --header-logo:   120px;
  --header-h:      calc(var(--header-pad-y) * 2 + var(--header-logo));  /* used by the hero */
  --footer-pad-y:   60px;
  --footer-logo:   200px;
  --footer-text:    30px;
  --bar-pad-y:      28px;

  /* Contact */
  --contact-pad-y: 100px;
  --contact-gap:    80px;
  --contact-h2:     80px;
  --field-text:     20px;
}

@media (max-width: 1199px) {
  :root {
    --gutter:        60px;
    --split-gap:     40px;
    --split-pad-y:   60px;
    --frame:         60px;
    --frame-inner:   60px;
    --section-min:  600px;
    --bleed-min:    600px;
    --bleed-h2-lg:  clamp(44px, 6vw, 64px);  /* 46px at 768, 64px from ~1070 */
    --section-h2:    40px;
    --bleed-h2:      40px;
    --body-size:    18px;
    --header-pad-y:  32px;
    --header-logo:   80px;
    --footer-pad-y:  48px;
    --footer-logo:  140px;
    --footer-text:   22px;
    --bar-pad-y:     24px;
    --contact-pad-y: 80px;
    --contact-gap:   60px;
    --contact-h2:    64px;
    --field-text:    16px;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter:        24px;
    --split-gap:     24px;   /* stacked: same inset on both sides */
    --split-pad-y:   40px;
    --section-min:    0px;
    --bleed-min:      0px;
    --bleed-h2-lg:   36px;
    --section-h2:    32px;
    --bleed-h2:      28px;
    --body-size:    16px;
    --header-pad-y:  20px;
    --header-logo:   56px;
    --footer-pad-y:  40px;
    --footer-logo:  100px;
    --footer-text:   18px;
    --bar-pad-y:     20px;
    --contact-pad-y: 48px;
    --contact-gap:   40px;
    --contact-h2:    40px;
    --field-text:    16px;  /* 16px minimum: smaller makes iOS zoom the page on focus */
  }
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

img     { display: block; max-width: 100%; height: auto; }
a       { text-decoration: none; color: inherit; }
address { font-style: normal; }
p       { padding-bottom: 20px; }

/* Keyboard focus: visible on every link, button and field */
:focus-visible { outline: 3px solid var(--cyprus); outline-offset: 3px; }
.contact :focus-visible,
.mobile-menu :focus-visible,
.footer-bar :focus-visible,
.hamburger.open:focus-visible { outline-color: var(--white); }

/* ── Header ────────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--header-pad-y) var(--gutter);
  background: var(--white);
}

.header-logo img { height: var(--header-logo); width: auto; }

.header-right {
  display: flex;
  align-items: center;
  gap: 60px;
}

header nav {
  display: flex;
  gap: 60px;
  align-items: center;
}

header nav a { font-size: 25px; }

/* Social icon rows (header, mobile menu, footer) */
.header-social,
.mobile-social,
.footer-social {
  display: flex;
  align-items: center;
}

.header-social  { gap: 16px; }
.mobile-social  { gap: 28px; }
.footer-social  { gap: 14px; flex-shrink: 0; }

.header-social img { height: 28px; width: auto; }
.mobile-social img { height: 36px; width: auto; }
.footer-social img { height: 42px; width: auto; }

/* ── Hamburger button ──────────────────────────────────────────────────
   Positioned with its own z-index so it stays above the open menu overlay
   (z-index 1000). The header must not create a stacking context, or the
   button would be trapped underneath the overlay and impossible to tap. */
.hamburger {
  display: none;
  position: relative;
  z-index: 1001;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}

.hamburger.open span { background: var(--white); }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Mobile menu overlay ───────────────────────────────────────────── */
.mobile-menu {
  display: flex;
  position: fixed;
  inset: 0;
  background: var(--cyprus);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.mobile-menu nav a {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
}

/* ── Buttons (shared look; each keeps its own size/spacing) ────────── */
.btn-primary,
.tagline-banner,
.form-button {
  background: var(--cyprus);
  color: var(--white);
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover,
.tagline-banner:hover,
.form-button:hover { background: var(--black); }

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 5fr 8fr; /* auto minimum on purpose: the text column grows to fit the headline's longest word */
  min-height: calc(100vh - var(--header-h)); /* fill the screen below the header */
}

.hero-content {
  padding: 80px 60px 100px var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  font-size: 100px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 40px;
  overflow-wrap: break-word;
}

.hero-content p {
  font-size: var(--body-size);
  line-height: 1.4;
  max-width: 520px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  padding: 22px 40px;
  margin-top: 60px;
  width: fit-content;
}

/* The image is taken out of the flow, so its proportions never decide the hero's height. */
.hero-image { position: relative; }

.hero-image img,
.hero-image video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Hero + Tagline wrapper (shared background logo) ───────────────── */
.hero-tagline-wrap {
  position: relative;
  overflow: hidden;
}

/* Grey logo sits behind both sections */
.hero-tagline-bg {
  position: absolute;
  top: 20%;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Lift both sections above the background logo */
.hero,
.tagline {
  position: relative;
  z-index: 1;
}

/* ── Tagline ───────────────────────────────────────────────────────── */
.tagline-content {
  padding: 80px var(--gutter) 60px;
  text-align: center;
}

.tagline .tagline-lines {
  padding-bottom: 0;
  font-size: 70px;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 50px;
}

.tagline-banner {
  display: inline-block;
  padding: 20px 40px;
  font-size: 30px;
  line-height: 1.25;
}

/* ── Gallery / Carousel ────────────────────────────────────────────── */
.gallery { padding: 60px 14%; }

.carousel {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;  /* vertical scroll stays native, horizontal swipes go to the script */
}

.carousel:active { cursor: grabbing; }

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

/* Fixed ratio, so the carousel keeps its height even if an editor uploads a different crop */
.carousel-slide img {
  width: 100%;
  aspect-ratio: 30 / 17;
  object-fit: cover;
  pointer-events: none;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
}

.carousel-dots .dot {
  position: relative;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--steel-teal);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}

/* Invisible extra hit area, so the small dots are easy to tap */
.carousel-dots .dot::after {
  content: "";
  position: absolute;
  inset: -6px -3px;
}

.carousel-dots .dot.active { background: var(--steel-teal); }

@media (hover: hover) {
  .carousel-dots .dot:hover { background: var(--steel-teal); }
}

/* ── Dynamic split blocks (EE Fluid blocks) ────────────────────────────
   Two block types share one layout:

     .split-section  white background, image framed with white space
     .split-bleed    coloured background, image bleeds to the window edge

   Both are a two-column grid: [media | text]. Modifier --reverse mirrors
   it. On phones they stack, image first. Spacing, type size and min-height
   come from the tokens in :root, so the only media query these blocks
   need is the stacking rule at the bottom of this file.

   Variables set per variant (read by the shared rules below):
     --media-order  -1 = media left, 1 = media right
     --pad-l/--pad-r  text padding; the outer edge gets --gutter, the side
                      facing the image gets --split-gap
     --media-pad    padding around a framed image                         */

.split-section,
.split-bleed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* equal columns, never widened by content */
}

/* Text column (shared) */
.split-section__text,
.split-bleed__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--split-pad-y) var(--pad-r) var(--split-pad-y) var(--pad-l);
}

.split-section__text h2,
.split-bleed__text h2 { font-weight: 700; line-height: 1.2; margin-bottom: 30px; overflow-wrap: break-word; hyphens: auto; }

.split-section__text p,
.split-bleed__text p  { font-size: var(--body-size); line-height: 1.4; }

.split-section__text p:last-child,
.split-bleed__text p:last-child { padding-bottom: 0; }

.split-section__media,
.split-bleed__media { order: var(--media-order); }

/* split-section: white, framed image. Default = image left. */
.split-section {
  --media-order: -1;
  --pad-l: var(--split-gap);
  --pad-r: var(--gutter);
  --media-pad: var(--frame) var(--frame-inner) var(--frame) var(--frame);
  min-height: var(--section-min);
}

.split-section--reverse,
.split-section.reverse {  /* .reverse = the old class name, still accepted */
  --media-order: 1;
  --pad-l: var(--gutter);
  --pad-r: var(--split-gap);
  --media-pad: var(--frame) var(--frame) var(--frame) var(--frame-inner);
}

.split-section__text h2 { font-size: var(--section-h2); }

.split-section__media { padding: var(--media-pad); }

.split-section__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* split-bleed: coloured background, image flush with the window edge.
   Default = text left, image right. Teal is the only background colour. */
.split-bleed {
  --split-bg: var(--steel-teal);
  --split-fg: var(--white);
  --media-order: 1;
  --pad-l: var(--gutter);
  --pad-r: var(--split-gap);
  min-height: var(--bleed-min);
  background: var(--split-bg);
  color: var(--split-fg);
}

.split-bleed--reverse {
  --media-order: -1;
  --pad-l: var(--split-gap);
  --pad-r: var(--gutter);
}


.split-bleed__text h2 { font-size: var(--bleed-h2); }

/* Large-heading variant: the Om Kronosalen intro block */
.split-bleed--lg .split-bleed__text h2 {
  font-size: var(--bleed-h2-lg);
  line-height: 1;
  margin-bottom: 40px;
}

.split-bleed__media { position: relative; }

.split-bleed__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Contact / Booking ─────────────────────────────────────────────── */
.contact {
  background: var(--steel-teal);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--contact-gap);
  padding: var(--contact-pad-y) var(--gutter);
  color: var(--white);
}

.contact-info h2 {
  font-size: var(--contact-h2);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 40px;
}

.contact-info address {
  font-size: var(--body-size);
  line-height: 1.5;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-field label {
  font-size: var(--field-text);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  font-family: var(--font);
  font-size: var(--field-text);
  background: var(--white);
  border: 1px solid var(--dove-gray);
  padding: 0 14px;
  height: 50px;
  color: var(--black);
  width: 100%;
  appearance: none;
}

.form-field textarea {
  height: 188px;
  padding: 12px 14px;
  resize: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--nobel); }

.form-button {
  margin-top: 20px;
  font-size: 30px;
  border: none;
  width: 300px;
  height: 80px;
}

/* ── Footer ────────────────────────────────────────────────────────── */
.footer-main {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  padding: var(--footer-pad-y) var(--gutter);
  background: var(--white);
}

.footer-address {
  flex: 1;  /* pushes the logo to the right edge */
  font-size: var(--footer-text);
  line-height: 1.35;
}

.footer-logo { flex-shrink: 0; }
.footer-logo img { height: var(--footer-logo); width: auto; }

.footer-bar {
  background: var(--steel-teal);
  padding: var(--bar-pad-y) var(--gutter);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.footer-partner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-partner span {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
}

.partner-logo img { height: 35px; width: auto; }

/* ── Tablet (≤1199px) ──────────────────────────────────────────────── */
@media (max-width: 1199px) {
  header nav            { gap: 36px; }
  header nav a          { font-size: 18px; }

  .hero                 { grid-template-columns: 1fr 1fr; min-height: 600px; }
  .hero-content         { padding: 60px 40px 60px var(--gutter); }
  .hero-content h1      { font-size: 64px; margin-bottom: 28px; }
  .btn-primary          { font-size: 22px; padding: 16px 28px; margin-top: 40px; }

  .tagline-content      { padding: 60px var(--gutter) 40px; }
  .tagline .tagline-lines           { font-size: 48px; }
  .tagline-banner       { font-size: 22px; }

  .gallery              { padding: 40px 8%; }

  .form-button          { font-size: 22px; width: 220px; height: 60px; }
}

/* ── Mobile (≤767px) ───────────────────────────────────────────────── */
@media (max-width: 767px) {
  .header-right     { display: none; }
  .hamburger        { display: flex; }

  .hero              { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .hero-content      { padding: 48px var(--gutter); }
  .hero-content h1   { font-size: 40px; margin-bottom: 20px; }
  .btn-primary       { font-size: 20px; padding: 14px 24px; margin-top: 32px; width: 100%; }
  .hero-image        { aspect-ratio: 4 / 3; max-height: 350px; }

  .hero-tagline-bg   { top: 10%; }

  .tagline-content   { padding: 40px var(--gutter); }
  .tagline .tagline-lines        { font-size: 26px; }
  .tagline-banner    { font-size: 16px; }

  .gallery            { padding: 32px 24px; }
  .carousel-dots .dot { width: 16px; height: 16px; }

  /* Split blocks stack, image first */
  .split-section,
  .split-bleed            { grid-template-columns: minmax(0, 1fr); }
  .split-section__media,
  .split-bleed__media     { order: -1; }
  .split-section__media   { padding: 25px 25px 0; }
  .split-section__media img { height: auto; aspect-ratio: 4 / 3; }
  .split-bleed__media     { aspect-ratio: 4 / 3; }
  .split-section__text h2,
  .split-bleed__text h2   { margin-bottom: 16px; }
  .split-bleed--lg .split-bleed__text h2 { margin-bottom: 20px; }

  .contact           { grid-template-columns: minmax(0, 1fr); }
  .form-button       { width: 100%; font-size: 20px; height: 60px; }

  .footer-main       { flex-direction: column; gap: 32px; }
  .footer-bar        { justify-content: center; }
}

/* ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ── Simple pages (404, tack) ──────────────────────────────────────── */
.hero--simple { grid-template-columns: minmax(0, 1fr); min-height: calc(70vh - var(--header-h)); }

/* ── Hero video (optional, field hero_video) ───────────────────────────
   Sits on top of the hero image; the image shows while the video loads,
   and on its own for visitors who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .hero-image video { display: none; }
}
