/* ============================================================
   Nicky Schildt — shared site styles
   Front page, public gallery, lightbox.
   ============================================================ */

:root {
  --fade: 2.4s;
  --scrim-o: 0.42;
  --accent: oklch(0.76 0.105 67);
  --tracking: 0.34em;
  --bone: #efeae1;
  --ink: #0d0b09;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ig-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2c2.7 0 3 0 4.1.06 1.1.05 1.8.23 2.5.5.7.27 1.3.63 1.9 1.2.6.6.96 1.2 1.2 1.9.27.65.45 1.4.5 2.5.06 1.1.06 1.4.06 4.1s0 3-.06 4.1c-.05 1.1-.23 1.8-.5 2.5a5.2 5.2 0 0 1-1.2 1.9c-.6.6-1.2.96-1.9 1.2-.65.27-1.4.45-2.5.5-1.1.06-1.4.06-4.1.06s-3 0-4.1-.06c-1.1-.05-1.8-.23-2.5-.5a5.2 5.2 0 0 1-1.9-1.2 5.2 5.2 0 0 1-1.2-1.9c-.27-.65-.45-1.4-.5-2.5C2 15 2 14.7 2 12s0-3 .06-4.1c.05-1.1.23-1.8.5-2.5.27-.7.63-1.3 1.2-1.9.6-.6 1.2-.96 1.9-1.2.65-.27 1.4-.45 2.5-.5C9 2 9.3 2 12 2zm0 1.8c-2.7 0-3 0-4 .06-.96.04-1.5.2-1.8.33-.45.18-.78.39-1.1.72-.33.32-.54.65-.72 1.1-.13.34-.29.86-.33 1.8C3.8 9 3.8 9.3 3.8 12s0 3 .06 4c.04.96.2 1.5.33 1.8.18.45.39.78.72 1.1.32.33.65.54 1.1.72.34.13.86.29 1.8.33 1 .06 1.3.06 4 .06s3 0 4-.06c.96-.04 1.5-.2 1.8-.33.45-.18.78-.39 1.1-.72.33-.32.54-.65.72-1.1.13-.34.29-.86.33-1.8.06-1 .06-1.3.06-4s0-3-.06-4c-.04-.96-.2-1.5-.33-1.8a3 3 0 0 0-.72-1.1 3 3 0 0 0-1.1-.72c-.34-.13-.86-.29-1.8-.33-1-.06-1.3-.06-4-.06zM12 7.2a4.8 4.8 0 1 1 0 9.6 4.8 4.8 0 0 1 0-9.6zm0 1.8a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm5-3.3a1.1 1.1 0 1 1 0 2.3 1.1 1.1 0 0 1 0-2.3z'/></svg>");
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Crossfade background (front page) ---------- */
#stage { position: fixed; inset: 0; z-index: 0; background: var(--ink); }

/* Background sets: desktop (landscape) vs mobile (portrait). Only present as two
   sets when the mobile gallery has images (#stage.stage--dual); otherwise the
   single desktop set shows in every orientation. display:none keeps the hidden
   set's images from being fetched. */
.bg-set { position: absolute; inset: 0; }
.bg-set--mobile { display: none; }
@media (orientation: portrait) {
  .stage--dual .bg-set--desktop { display: none; }
  .stage--dual .bg-set--mobile { display: block; }
}

.frame {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 40%; background-repeat: no-repeat;
  opacity: 0; transition: opacity var(--fade) ease-in-out; will-change: opacity;
}
.frame.active { opacity: 1; }

.scrim {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(125% 110% at 50% 46%,
      rgba(7,6,5,0.66) 0%, rgba(7,6,5,0.14) 50%, rgba(7,6,5,0.62) 100%),
    linear-gradient(180deg, rgba(7,6,5,0.18) 0%, rgba(7,6,5,0) 28%, rgba(7,6,5,0) 70%, rgba(7,6,5,0.3) 100%);
  opacity: var(--scrim-o);
}
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  mix-blend-mode: overlay; opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Wordmark ---------- */
.content {
  position: fixed; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6vmin;
  padding-top: max(6vmin, env(safe-area-inset-top));
  padding-bottom: max(6vmin, env(safe-area-inset-bottom));
  pointer-events: none;
}
.content a { pointer-events: auto; }

.wordmark { display: flex; flex-direction: column; align-items: center; }
.wordmark .l1 {
  font-size: clamp(3rem, 11.5vw, 11rem); font-weight: 700; line-height: 0.9;
  letter-spacing: calc(var(--tracking) * 0.5); text-transform: uppercase;
  text-indent: calc(var(--tracking) * 0.5); text-shadow: 0 2px 40px rgba(0,0,0,0.45);
}
.wordmark .l2 {
  margin-top: clamp(0.5rem, 1.6vw, 1.4rem);
  font-size: clamp(1rem, 3.6vw, 3.2rem); font-weight: 300; line-height: 1;
  letter-spacing: var(--tracking); text-transform: uppercase; text-indent: var(--tracking);
  color: color-mix(in oklab, var(--bone) 86%, transparent); text-shadow: 0 2px 30px rgba(0,0,0,0.4);
}
.rule {
  width: clamp(48px, 7vw, 92px); height: 1px;
  margin: clamp(1.4rem, 3.4vw, 2.6rem) 0 clamp(1.1rem, 2.6vw, 1.9rem);
  background: var(--accent); opacity: 0.92;
}
.contact {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(0.6rem, 1.5vw, 1rem);
}
.email {
  font-size: clamp(0.7rem, 1.45vw, 0.95rem); font-weight: 400;
  letter-spacing: 0.26em; text-indent: 0.26em; text-transform: uppercase;
  color: color-mix(in oklab, var(--bone) 72%, transparent);
  text-decoration: none; transition: color 0.4s ease, letter-spacing 0.4s ease;
}
.email:hover { color: var(--accent); letter-spacing: 0.32em; }
.social {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: clamp(0.62rem, 1.2vw, 0.8rem); font-weight: 400;
  letter-spacing: 0.2em; text-indent: 0.2em; text-transform: uppercase;
  color: color-mix(in oklab, var(--bone) 52%, transparent);
  text-decoration: none; transition: color 0.4s ease, letter-spacing 0.4s ease;
}
.social::before {
  content: ""; width: 13px; height: 13px; display: inline-block; text-indent: 0;
  background: currentColor;
  -webkit-mask: var(--ig-mask) center / contain no-repeat;
  mask: var(--ig-mask) center / contain no-repeat;
}
.social:hover { color: var(--accent); letter-spacing: 0.26em; }

/* Honeypot — visually & assistively hidden; only bots fill it. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Bottom dock wraps the booking button + galleries card.
   On desktop it disappears (display:contents) so each child keeps its own
   fixed position (button bottom-left, card bottom-right). On mobile the dock
   itself becomes a bottom-anchored flex column — no JS measurement needed. */
.bottom-dock { display: contents; }

/* ============================================================
   Galleri-boks (front page, bottom-right frosted panel)
   ============================================================ */
.galleries-card {
  position: fixed; z-index: 4;
  right: clamp(18px, 3.4vw, 48px);
  bottom: calc(clamp(18px, 3.4vh, 44px) + env(safe-area-inset-bottom));
  width: clamp(280px, 30vw, 384px);
  max-width: calc(100vw - 36px);
  border: 1px solid color-mix(in oklab, var(--bone) 60%, transparent);
  background: rgba(13, 11, 9, 0.34);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  box-shadow: 0 18px 60px rgba(0,0,0,0.42);
}
.galleries-card__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 15px 18px 11px;
  border-bottom: 1px solid color-mix(in oklab, var(--bone) 22%, transparent);
}
.galleries-card__title {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.28em; text-indent: 0.28em;
  text-transform: uppercase; color: var(--bone);
}
.galleries-card__count {
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: color-mix(in oklab, var(--bone) 55%, transparent);
}

/* Scroll region — sized to show ~3.6 rows, scrolls to the rest. */
.galleries-list {
  list-style: none;
  max-height: calc(3.6 * 84px);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--bone) 35%, transparent) transparent;
}
.galleries-list::-webkit-scrollbar { width: 6px; }
.galleries-list::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--bone) 30%, transparent);
}

.gal-row {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px;
  padding: 13px 18px; text-decoration: none; color: inherit;
  border-bottom: 1px solid color-mix(in oklab, var(--bone) 12%, transparent);
  transition: background 0.3s ease;
}
.gal-row:last-child { border-bottom: none; }
.gal-row:hover { background: color-mix(in oklab, var(--bone) 8%, transparent); }
.gal-thumb {
  width: 56px; height: 56px; object-fit: cover; display: block;
  background: #1a1714;
  border: 1px solid color-mix(in oklab, var(--bone) 18%, transparent);
}
.gal-thumb--empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; letter-spacing: 0.14em; color: color-mix(in oklab, var(--bone) 40%, transparent);
}
.gal-meta { min-width: 0; }
.gal-name {
  display: block;
  font-size: 0.92rem; font-weight: 400; letter-spacing: 0.01em; color: var(--bone);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gal-date {
  display: block;
  margin-top: 3px; font-size: 0.68rem; letter-spacing: 0.06em;
  color: color-mix(in oklab, var(--bone) 52%, transparent);
}
.gal-arrow { color: color-mix(in oklab, var(--bone) 45%, transparent); transition: transform 0.3s ease, color 0.3s ease; }
.gal-row:hover .gal-arrow { color: var(--accent); transform: translateX(3px); }

/* ============================================================
   Public gallery page (gallery.php)
   ============================================================ */
body.gallery-page { overflow-y: auto; background: #080706; }

.gallery-bg { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center; filter: grayscale(0.4) brightness(0.4); transform: scale(1.05); }
.gallery-bg::after { content: ""; position: absolute; inset: 0; background: rgba(8,7,6,0.72); }

.gallery-wrap { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) clamp(18px, 4vw, 48px) 96px; }

.gallery-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: clamp(28px, 5vw, 56px);
}
.gallery-back {
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
  color: color-mix(in oklab, var(--bone) 70%, transparent); transition: color 0.3s ease;
}
.gallery-back:hover { color: var(--accent); }
.gallery-wordmark { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: color-mix(in oklab, var(--bone) 55%, transparent); }

.gallery-header { margin-bottom: clamp(26px, 4vw, 48px); }
.gallery-title { font-size: clamp(1.8rem, 5vw, 3.4rem); font-weight: 300; letter-spacing: 0.02em; }
.gallery-sub { margin-top: 10px; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in oklab, var(--bone) 50%, transparent); }

/* Photo grid — flows in rows (reading order, left to right) */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.photo-grid figure { margin: 0; cursor: zoom-in; position: relative; background: #14110e; }
.photo-grid img { width: 100%; height: auto; display: block; transition: opacity 0.4s ease; }
.photo-grid figure:hover img { opacity: 0.88; }
.photo-grid figure::after {
  content: ""; position: absolute; inset: 0;
  outline: 1px solid color-mix(in oklab, var(--bone) 0%, transparent);
  transition: outline-color 0.3s ease; outline-offset: -1px;
}
.photo-grid figure:hover::after { outline-color: color-mix(in oklab, var(--bone) 40%, transparent); }

.gallery-empty { padding: 60px 0; text-align: center; color: color-mix(in oklab, var(--bone) 50%, transparent); letter-spacing: 0.12em; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center;
  background: rgba(5,4,4,0.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; box-shadow: 0 30px 90px rgba(0,0,0,0.6); }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border: none; background: transparent; cursor: pointer;
  color: color-mix(in oklab, var(--bone) 70%, transparent); font-size: 2rem; line-height: 1;
  transition: color 0.2s ease;
}
.lb-btn:hover { color: var(--bone); }
.lb-prev { left: 1vw; } .lb-next { right: 1vw; }
.lb-close { top: clamp(14px, 3vh, 28px); right: clamp(14px, 3vw, 28px); transform: none; width: 44px; height: 44px; font-size: 1.6rem; }
.lb-count {
  position: absolute; bottom: clamp(14px, 3vh, 28px); left: 50%; transform: translateX(-50%);
  font-size: 0.72rem; letter-spacing: 0.22em; color: color-mix(in oklab, var(--bone) 60%, transparent);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
  .wordmark .l1 { font-size: clamp(2.6rem, 17vw, 4.6rem); }
  .wordmark .l2 { font-size: clamp(0.95rem, 5.2vw, 1.7rem); }
  .email { font-size: 0.72rem; letter-spacing: 0.2em; text-indent: 0.2em; }

  /* --- Front page, mobile ---
     The page scrolls: the hero (name + contact) fills the first screen, and the
     galleries list sits just below the fold — scroll down to reveal it — for a
     cleaner first impression. "Book mig" is a fixed corner CTA (bottom-right);
     the "Om mig" tab sits bottom-left (see the about section). */
  .home { overflow-y: auto; overflow-x: hidden; }
  .home .content {
    position: relative; inset: auto;
    min-height: 100svh;
    justify-content: center;
    padding: 12vh 22px calc(92px + env(safe-area-inset-bottom));
  }

  .home .bottom-dock { display: contents; }
  .home .galleries-card {
    position: relative; inset: auto; z-index: 3;
    width: auto; max-width: none;
    margin: 0 12px calc(96px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; min-height: 0;
  }
  .home .galleries-list { max-height: none; flex: none; }

  .home .book-cta {
    position: fixed; z-index: 6;
    left: auto; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 12px 18px; font-size: 0.68rem; letter-spacing: 0.16em; text-indent: 0.16em;
  }

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

@media (min-width: 601px) and (max-width: 1024px) {
  .wordmark .l1 { font-size: clamp(4rem, 13vw, 8rem); }
  .wordmark .l2 { font-size: clamp(1.4rem, 4.4vw, 2.6rem); }
}

@media (max-height: 460px) and (orientation: landscape) {
  .content { justify-content: center; }
  .wordmark .l1 { font-size: clamp(2rem, 11vh, 3.4rem); }
  .wordmark .l2 { font-size: clamp(0.8rem, 3.6vh, 1.3rem); }
  .rule { margin: 1rem 0 0.8rem; }
  .galleries-card { width: clamp(240px, 34vw, 320px); }
  .galleries-list { max-height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .frame { transition: none; }
}

/* ============================================================
   Front-page "book" call-to-action
   ============================================================ */
.book-cta {
  position: fixed; z-index: 4;
  left: clamp(18px, 3.4vw, 48px);
  bottom: calc(clamp(18px, 3.4vh, 44px) + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 0.7em;
  padding: 14px 22px;
  border: 1px solid var(--accent);
  background: rgba(13, 11, 9, 0.34);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  color: var(--bone); text-decoration: none;
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.24em; text-indent: 0.24em;
  text-transform: uppercase;
  box-shadow: 0 18px 60px rgba(0,0,0,0.42);
  transition: background 0.3s ease, color 0.3s ease, letter-spacing 0.3s ease;
}
.book-cta::before {
  content: ""; width: 14px; height: 14px; display: inline-block; text-indent: 0;
  background: var(--accent);
  -webkit-mask: var(--cal-mask) center / contain no-repeat;
  mask: var(--cal-mask) center / contain no-repeat;
  transition: background 0.3s ease;
}
.book-cta:hover { background: var(--accent); color: #1a1206; letter-spacing: 0.28em; }
.book-cta:hover::before { background: #1a1206; }

:root {
  --cal-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1V3a1 1 0 0 1 1-1zm12 7H5v10h14V9zM5 7h14V6H5v1z'/></svg>");
}

/* ============================================================
   Booking page (book.php)
   ============================================================ */
body.booking-page { overflow-y: auto; background: #080706; }
.booking-bg { position: fixed; inset: 0; z-index: 0; background-size: cover; background-position: center 40%; filter: grayscale(0.45) brightness(0.32); transform: scale(1.05); }
.booking-bg::after { content: ""; position: absolute; inset: 0; background: rgba(8,7,6,0.78); }

.booking-wrap { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) clamp(18px, 4vw, 48px) 110px; }

.booking-header { margin-bottom: clamp(22px, 3.5vw, 38px); max-width: 640px; }
.booking-title { font-size: clamp(1.9rem, 5vw, 3.4rem); font-weight: 300; letter-spacing: 0.02em; }
.booking-lead { margin-top: 14px; font-size: clamp(0.92rem, 1.5vw, 1.04rem); line-height: 1.65; color: color-mix(in oklab, var(--bone) 72%, transparent); }

/* ---------- Calendar ---------- */
.cal {
  border: 1px solid color-mix(in oklab, var(--bone) 20%, transparent);
  background: rgba(13, 11, 9, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
  box-shadow: 0 24px 70px rgba(0,0,0,0.4);
}
.cal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px clamp(14px, 2.4vw, 26px);
  border-bottom: 1px solid color-mix(in oklab, var(--bone) 14%, transparent);
}
.cal-month {
  font-size: clamp(1.05rem, 2.2vw, 1.5rem); font-weight: 300; letter-spacing: 0.04em;
  text-transform: capitalize; flex: 1; min-width: 0;
}
.cal-month b { font-weight: 500; }
.cal-month .yr { color: color-mix(in oklab, var(--bone) 50%, transparent); font-weight: 300; margin-left: 0.35em; }
.cal-nav {
  width: 40px; height: 40px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in oklab, var(--bone) 22%, transparent);
  background: transparent; color: var(--bone); cursor: pointer;
  font-size: 1.1rem; line-height: 1; transition: border-color 0.25s, background 0.25s, color 0.25s, opacity 0.25s;
}
.cal-nav:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.cal-nav:disabled { opacity: 0.28; cursor: not-allowed; }
.cal-today {
  flex: none; padding: 9px 16px; border: 1px solid color-mix(in oklab, var(--bone) 22%, transparent);
  background: transparent; color: var(--bone); cursor: pointer;
  font: inherit; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  transition: border-color 0.25s, color 0.25s;
}
.cal-today:hover { border-color: var(--accent); color: var(--accent); }

.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 12px clamp(14px, 2.4vw, 26px) 0;
}
.cal-weekdays span {
  font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: color-mix(in oklab, var(--bone) 42%, transparent); text-align: left; padding: 0 4px 8px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: color-mix(in oklab, var(--bone) 10%, transparent);
  border-top: 1px solid color-mix(in oklab, var(--bone) 10%, transparent);
}
.cal-day {
  position: relative; background: #0e0c0a; min-height: clamp(78px, 11vw, 116px);
  padding: 9px 9px 10px; display: flex; flex-direction: column; gap: 5px;
  border: none; text-align: left; font: inherit; color: inherit; width: 100%;
}
.cal-day__num {
  font-size: 0.86rem; font-variant-numeric: tabular-nums;
  color: color-mix(in oklab, var(--bone) 78%, transparent);
}
.cal-day.is-out { background: #0b0a08; }
.cal-day.is-out .cal-day__num { color: color-mix(in oklab, var(--bone) 22%, transparent); }
.cal-day.is-past .cal-day__num { color: color-mix(in oklab, var(--bone) 32%, transparent); }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day.is-today .cal-day__num { color: var(--accent); font-weight: 600; }

.cal-day.is-free { cursor: pointer; transition: background 0.2s ease; }
.cal-day.is-free:hover { background: #15110c; }
.cal-day.is-free .cal-free {
  margin-top: auto; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: color-mix(in oklab, var(--bone) 34%, transparent); transition: color 0.2s ease;
  display: inline-flex; align-items: center; gap: 5px;
}
.cal-day.is-free:hover .cal-free { color: var(--accent); }
.cal-day.is-free .cal-free::before { content: "+"; font-size: 0.85rem; line-height: 1; }

.cal-day.is-full .cal-free { color: color-mix(in oklab, var(--bone) 30%, transparent); }
.cal-day.is-full .cal-free::before { content: ""; }

.cal-chip {
  font-size: 0.62rem; line-height: 1.25; letter-spacing: 0.02em;
  padding: 3px 6px; border-left: 2px solid var(--accent);
  background: color-mix(in oklab, var(--accent) 16%, transparent);
  color: color-mix(in oklab, var(--bone) 92%, transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-chip--pending {
  border-left-style: dashed;
  background: color-mix(in oklab, var(--bone) 7%, transparent);
  color: color-mix(in oklab, var(--bone) 62%, transparent);
}

.cal-legend {
  display: flex; flex-wrap: wrap; gap: 18px 26px;
  padding: 16px clamp(14px, 2.4vw, 26px);
  border-top: 1px solid color-mix(in oklab, var(--bone) 14%, transparent);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 9px; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in oklab, var(--bone) 60%, transparent); }
.cal-legend i { width: 14px; height: 14px; display: inline-block; }
.cal-legend .lg-free { border: 1px solid color-mix(in oklab, var(--bone) 30%, transparent); }
.cal-legend .lg-booked { background: color-mix(in oklab, var(--accent) 55%, transparent); border-left: 2px solid var(--accent); }
.cal-legend .lg-pending { background: color-mix(in oklab, var(--bone) 10%, transparent); border-left: 2px dashed color-mix(in oklab, var(--bone) 55%, transparent); }
.cal-legend .lg-full { background: #0b0a08; border: 1px solid color-mix(in oklab, var(--bone) 16%, transparent); }

/* ---------- Booking modal ---------- */
.bk-modal {
  position: fixed; inset: 0; z-index: 80; display: none;
  align-items: center; justify-content: center; padding: 22px;
  background: rgba(5,4,4,0.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.bk-modal.open { display: flex; }
.bk-panel {
  width: 100%; max-width: 460px; background: #14110e;
  border: 1px solid color-mix(in oklab, var(--bone) 22%, transparent);
  box-shadow: 0 36px 100px rgba(0,0,0,0.6);
  max-height: calc(100vh - 44px); overflow-y: auto;
}
.bk-panel__head { padding: 22px 24px 16px; border-bottom: 1px solid color-mix(in oklab, var(--bone) 12%, transparent); position: relative; }
.bk-panel__eyebrow { font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent); }
.bk-panel__date { margin-top: 8px; font-size: 1.3rem; font-weight: 300; }
.bk-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border: none; background: transparent; color: color-mix(in oklab, var(--bone) 60%, transparent); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.bk-close:hover { color: var(--bone); }
.bk-form { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.bk-field label { display: block; font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in oklab, var(--bone) 56%, transparent); margin-bottom: 7px; }
.bk-opt { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.9em; color: color-mix(in oklab, var(--bone) 38%, transparent); }
.bk-input, .bk-textarea {
  width: 100%; font: inherit; font-size: 0.92rem; color: var(--bone); background: #0b0a08;
  border: 1px solid color-mix(in oklab, var(--bone) 18%, transparent); padding: 11px 13px;
  transition: border-color 0.25s;
}
.bk-input:focus, .bk-textarea:focus { outline: none; border-color: var(--accent); }
.bk-textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.bk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bk-submit {
  margin-top: 4px; padding: 14px; border: 1px solid var(--accent); background: var(--accent);
  color: #1a1206; font: inherit; font-weight: 600; font-size: 0.74rem; letter-spacing: 0.18em;
  text-transform: uppercase; cursor: pointer; transition: filter 0.25s;
}
.bk-submit:hover { filter: brightness(1.07); }
.bk-note { font-size: 0.72rem; line-height: 1.55; color: color-mix(in oklab, var(--bone) 52%, transparent); }
.bk-success {
  padding: 30px 24px; text-align: center;
}
.bk-success .ok-mark { width: 52px; height: 52px; margin: 0 auto 16px; border: 1px solid var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.5rem; }
.bk-success h3 { font-weight: 300; font-size: 1.3rem; margin-bottom: 10px; }
.bk-success p { font-size: 0.9rem; line-height: 1.6; color: color-mix(in oklab, var(--bone) 65%, transparent); }

/* Inline page banner (sent confirmation / errors) */
.bk-banner { padding: 14px 18px; margin-bottom: 24px; border: 1px solid; font-size: 0.88rem; letter-spacing: 0.02em; }
.bk-banner--ok { border-color: rgba(150,200,150,0.4); background: rgba(150,200,150,0.08); color: #a9d2a0; }
.bk-banner--err { border-color: rgba(231,165,154,0.4); background: rgba(231,165,154,0.08); color: #e7a59a; }

@media (max-width: 560px) {
  .cal-day { min-height: 66px; padding: 6px 5px 7px; }
  .cal-day__num { font-size: 0.78rem; }
  .cal-chip { font-size: 0.56rem; padding: 2px 4px; }
  .cal-day.is-free .cal-free span { display: none; }
  .bk-row { grid-template-columns: 1fr; }
  .cal-month { font-size: 1.05rem; }
}

/* ============================================================
   "Om mig" side drawer (front page) — left-edge tab + slide-in panel
   ============================================================ */
.about-scrim {
  position: fixed; inset: 0; z-index: 6;
  background: rgba(8, 7, 6, 0.62);
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.about-scrim.open { opacity: 1; pointer-events: auto; }

.about-drawer {
  position: fixed; top: 0; left: 0; z-index: 7;
  height: 100%; width: min(360px, 86vw);
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.about-drawer.open { transform: translateX(0); }

.about-tab {
  position: absolute; top: 50%; right: -46px; transform: translateY(-50%);
  width: 46px; min-height: 158px; padding: 16px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid var(--accent); border-left: 0; border-radius: 0 14px 14px 0;
  background: rgba(13, 11, 9, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(115%); backdrop-filter: blur(16px) saturate(115%);
  color: var(--bone); cursor: pointer;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
  transition: background 0.3s ease, color 0.3s ease;
}
.about-tab:hover { background: var(--accent); color: #1a1206; }
.about-tab__txt {
  writing-mode: vertical-rl; transform: rotate(180deg);
  letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.74rem; font-weight: 500;
}
.about-tab__chev { font-size: 1.2rem; line-height: 1; color: var(--accent); transition: transform 0.4s ease, color 0.3s ease; }
.about-tab:hover .about-tab__chev { color: #1a1206; }
.about-drawer.open .about-tab__chev { transform: rotate(180deg); }
.about-drawer:not(.open) .about-tab__chev { animation: about-bob 1.8s ease-in-out infinite; }
@keyframes about-bob { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }

.about-panel {
  position: relative; height: 100%; width: 100%;
  background: #14110e;
  border-right: 1px solid color-mix(in oklab, var(--accent) 42%, transparent);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; overflow-y: auto;
}
.about-photo { flex: none; width: 100%; height: 46%; min-height: 200px; max-height: 400px; }
.about-photo picture, .about-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--bone) 22%, transparent);
  background: rgba(8, 7, 6, 0.5); color: var(--bone); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
  transition: background 0.2s ease;
}
.about-close:hover { background: rgba(8, 7, 6, 0.82); }
.about-body { padding: 28px 28px 34px; }
.about-title { font-weight: 300; font-size: 1.6rem; letter-spacing: 0.01em; margin-bottom: 8px; padding-right: 34px; }
.about-sub { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.about-text { font-size: 0.92rem; line-height: 1.78; color: color-mix(in oklab, var(--bone) 82%, transparent); white-space: normal; }

/* Mobile: the "Om mig" tab is a horizontal pill anchored to the bottom-left
   corner (instead of the vertically-centred left-edge tab used on desktop). */
@media (max-width: 600px) {
  .about-tab {
    top: auto; transform: none;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 100%; right: auto;
    width: auto; min-height: 0; height: 44px; padding: 0 16px;
    flex-direction: row; gap: 9px;
    border-radius: 0 12px 12px 0;
  }
  .about-tab__txt {
    writing-mode: horizontal-tb; transform: none;
    letter-spacing: 0.16em; font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-drawer, .about-scrim, .about-tab__chev { transition: none; animation: none; }
}

/* ---- "Min portfolio" button (on the Om-mig panel) ---- */
.about-portfolio-btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  margin-top: 24px; padding: 12px 22px;
  border: 1px solid var(--accent); background: transparent; color: var(--bone);
  font-family: inherit; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer; transition: background 0.3s ease, color 0.3s ease, letter-spacing 0.3s ease;
}
.about-portfolio-btn:hover { background: var(--accent); color: #1a1206; letter-spacing: 0.24em; }

/* ---- Portfolio full-screen lightbox carousel ---- */
.pf-lb { position: fixed; inset: 0; z-index: 9; background: rgba(6,5,4,0.97); display: none; flex-direction: column; }
.pf-lb.open { display: flex; }
.pf-lb__stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 60px 72px 14px; }
.pf-lb__stage img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 24px 90px rgba(0,0,0,0.6); }
.pf-lb__count { position: absolute; top: 22px; left: 26px; z-index: 2; font-size: 0.72rem; letter-spacing: 0.2em; color: color-mix(in oklab, var(--bone) 60%, transparent); }
.pf-lb__close, .pf-lb__nav {
  position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(239,234,225,0.18); background: rgba(8,7,6,0.45); color: var(--bone);
  cursor: pointer; border-radius: 50%;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background 0.2s ease, color 0.2s ease;
}
.pf-lb__close:hover, .pf-lb__nav:hover { background: var(--accent); color: #1a1206; }
.pf-lb__close { top: 16px; right: 20px; width: 42px; height: 42px; font-size: 1.05rem; }
.pf-lb__nav { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 1.7rem; line-height: 1; }
.pf-lb__prev { left: 16px; }
.pf-lb__next { right: 16px; }
.pf-lb__strip { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 18px; scrollbar-width: thin; }
.pf-thumb { flex: none; width: 78px; height: 56px; padding: 0; border: 1px solid transparent; background: none; cursor: pointer; opacity: 0.5; transition: opacity 0.2s ease, border-color 0.2s ease; }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-thumb:hover { opacity: 0.85; }
.pf-thumb.is-active { opacity: 1; border-color: var(--accent); }

@media (max-width: 600px) {
  .pf-lb__stage { padding: 56px 14px 8px; }
  .pf-lb__nav { width: 42px; height: 42px; font-size: 1.4rem; }
  .pf-lb__prev { left: 8px; }
  .pf-lb__next { right: 8px; }
  .pf-thumb { width: 62px; height: 46px; }
}

/* ============================================================
   Photo ordering (select mode in a gallery) + delivery galleries
   ============================================================ */

/* Select toggle in the gallery topbar */
.gallery-select-toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--bone) 30%, transparent);
  color: var(--bone);
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.gallery-select-toggle:hover { border-color: var(--accent); }
.gallery-select-toggle[aria-pressed="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }

/* Checkbox overlay on each grid figure (hidden unless selecting) */
.grid-check {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
  background: rgba(8,7,6,0.45);
  display: none; pointer-events: none;
}
body.is-selecting .photo-grid figure { cursor: pointer; }
body.is-selecting .grid-check { display: block; }
.photo-grid figure.is-selected .grid-check { background: var(--accent); border-color: var(--accent); }
.photo-grid figure.is-selected .grid-check::after {
  content: ""; position: absolute; left: 8px; top: 4px;
  width: 6px; height: 11px; border: solid var(--ink);
  border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
body.is-selecting .photo-grid figure.is-selected img { opacity: 0.82; }
body.is-selecting .photo-grid figure.is-selected::after { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Fixed selection bar */
.select-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; align-items: center; gap: 14px;
  padding: 14px max(18px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom));
  background: rgba(8,7,6,0.92); backdrop-filter: blur(8px);
  border-top: 1px solid color-mix(in oklab, var(--bone) 16%, transparent);
}
body.is-selecting .select-bar { display: flex; }
.select-bar__count { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--bone); }
.select-bar__allbtn {
  background: transparent; border: 1px solid color-mix(in oklab, var(--bone) 28%, transparent);
  color: var(--bone); font: inherit; font-size: 0.78rem; padding: 9px 16px; border-radius: 2px; cursor: pointer;
}
.select-bar__allbtn:hover { border-color: var(--accent); }
.select-bar__cancel {
  margin-left: auto; background: transparent; border: 1px solid color-mix(in oklab, var(--bone) 28%, transparent);
  color: var(--bone); font: inherit; font-size: 0.78rem; padding: 9px 16px; border-radius: 2px; cursor: pointer;
}
.select-bar__order {
  background: var(--accent); color: var(--ink); border: none; font: inherit; font-weight: 600;
  font-size: 0.82rem; padding: 10px 20px; border-radius: 2px; cursor: pointer;
}
.select-bar__order:disabled { opacity: 0.4; cursor: not-allowed; }

/* Selected-numbers line inside the order modal */
.bk-selected { font-size: 0.8rem; color: var(--accent); margin: 0 0 4px; letter-spacing: 0.02em; }

/* ---- Delivery page (deliver.php) ---- */
.delivery-page { min-height: 100svh; }
.delivery-wrap { max-width: 1100px; margin: 0 auto; padding: 22px 18px 80px; position: relative; z-index: 1; }
.delivery-msg { max-width: 460px; margin: 8vh auto 0; text-align: center; }
.delivery-msg h1 { font-size: 1.5rem; font-weight: 500; letter-spacing: 0.04em; margin: 0 0 14px; }
.delivery-msg p { color: color-mix(in oklab, var(--bone) 65%, transparent); line-height: 1.6; }
.delivery-login { text-align: left; }
.delivery-form { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.delivery-form label { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in oklab, var(--bone) 56%, transparent); }
.delivery-actions { margin: 8px 0 22px; }
/* Self-contained grid — deliberately NOT .photo-grid, whose figure::after overlay
   would sit on top of the download link and swallow the click. */
.delivery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.delivery-tile { position: relative; margin: 0; background: #14110e; }
.delivery-tile img { width: 100%; height: auto; display: block; }
.delivery-dl {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(8,7,6,0.82); color: var(--bone); text-decoration: none;
  font-size: 0.74rem; letter-spacing: 0.04em; padding: 7px 12px; border-radius: 2px;
  border: 1px solid color-mix(in oklab, var(--bone) 24%, transparent);
}
.delivery-dl:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.delivery-foot { margin-top: 30px; font-size: 0.76rem; color: color-mix(in oklab, var(--bone) 50%, transparent); text-align: center; }

@media (max-width: 760px) {
  .delivery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Delivery video tiles (no preview — placeholder + download) */
.delivery-tile--video .delivery-vid {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  aspect-ratio: 16 / 9; background: #14110e; padding: 16px; text-align: center;
}
.delivery-vid__icon {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--bone) 14%, transparent); color: var(--bone); font-size: 1.05rem;
}
.delivery-vid__name { font-size: 0.78rem; color: color-mix(in oklab, var(--bone) 72%, transparent); word-break: break-word; }
