/* ============================================================
   VALAMAR TALE — Design System
   Soulful Living, editorial, grounded, poetic
   ============================================================ */

:root {
  /* Brand palette */
  --cream:        #EFE8D4;   /* primary light beige */
  --cream-soft:   #F4EFE1;   /* lighter paper */
  --cream-deep:   #E4DAC0;   /* warm beige shade */
  --red:          #821027;   /* Albanian red */
  --burgundy:     #4F050F;   /* heritage burgundy */
  --green:        #5E7354;   /* wild green */
  --green-deep:   #45533D;
  --white:        #FFFFFF;

  /* Ink / text */
  --ink:          #2B1810;   /* warm near-black */
  --ink-soft:     rgba(43, 24, 16, 0.62);
  --ink-faint:    rgba(43, 24, 16, 0.40);
  --on-dark:      #EFE8D4;
  --on-dark-soft: rgba(239, 232, 212, 0.66);

  /* Type — Funkis A Sharp simulated with Jost (geometric grotesque); Awesome Ways simulated with Tangerine (calligraphic accent); logo wordmark keeps the brand Didone serif */
  --display: 'Jost', 'Helvetica Neue', Arial, sans-serif;   /* Funkis A Sharp Semibold */
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;       /* Funkis A Sharp Light */
  --accent: 'Tangerine', 'Cormorant Garamond', cursive;      /* Awesome Ways */
  --logo: 'Cormorant Garamond', Georgia, serif;

  /* Spacing scale */
  --pad-x: clamp(22px, 6vw, 120px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 86px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Hide scrollbars softly while keeping scroll */
::selection { background: var(--red); color: var(--cream); }

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

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 12px;
  color: var(--red);
  margin: 0;
}
.eyebrow.on-dark { color: var(--on-dark-soft); }

.display {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0;
}

h1.display { font-size: clamp(42px, 7vw, 100px); font-weight: 600; }
h2.display { font-size: clamp(34px, 5vw, 68px); font-weight: 600; }
h3.display { font-size: clamp(24px, 2.8vw, 38px); font-weight: 500; }

/* Calligraphic accent (Awesome Ways) — for poetic quotes & accent words */
.accent {
  font-family: var(--accent);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: 0;
}

.lede {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.45;
  font-style: normal;
  color: var(--ink-soft);
  margin: 0;
}

.body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.78;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 17px 30px;
  border: none;
  cursor: pointer;
  background: var(--red);
  color: var(--cream);
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: color .5s var(--ease), background .5s var(--ease);
  text-decoration: none;
}
.btn .btn-arrow {
  transition: transform .5s var(--ease);
  display: inline-block;
}
.btn:hover .btn-arrow { transform: translateX(6px); }
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--burgundy);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
  z-index: 0;
}
.btn:hover::before { transform: scaleX(1); }
.btn > * { position: relative; z-index: 1; }

/* Inverted button (cream fill on dark backgrounds) — keep label visible on hover */
.btn.invert { background: var(--cream); color: var(--burgundy); }
.btn.invert::before { background: var(--burgundy); }
.btn.invert:hover { color: var(--cream); }

/* Outline / ghost button */.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(43,24,16,0.28);
}
.btn.ghost::before { background: var(--ink); }
.btn.ghost:hover { color: var(--cream); }
.btn.ghost.on-dark { color: var(--cream); border-color: rgba(239,232,212,0.4); }
.btn.ghost.on-dark::before { background: var(--cream); }
.btn.ghost.on-dark:hover { color: var(--burgundy); }

/* Text link with animated underline */
.link-underline {
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12.5px;
  color: var(--red);
  cursor: pointer;
  background: none; border: none; padding: 0;
  display: inline-flex; align-items: center; gap: 10px;
  position: relative;
}
.link-underline::after {
  content:""; position:absolute; left:0; bottom:-6px; height:1px; width:100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }
.link-underline .arr { transition: transform .45s var(--ease); }
.link-underline:hover .arr { transform: translateX(5px); }
.link-underline.on-dark { color: var(--on-dark); }

/* ---------- Image placeholder ---------- */
.imgph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(94,115,84,0.10) 0px, rgba(94,115,84,0.10) 1px,
      transparent 1px, transparent 11px),
    var(--cream-deep);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.imgph .imgph-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  max-width: 84%;
  text-align: center;
}
.imgph .imgph-kicker {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-size: 9.5px;
  color: rgba(43,24,16,0.45);
  border: 1px solid rgba(43,24,16,0.22);
  padding: 5px 12px;
}
.imgph .imgph-concept {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.3;
  color: rgba(43,24,16,0.62);
}
.imgph.on-dark {
  background:
    repeating-linear-gradient(135deg,
      rgba(239,232,212,0.07) 0px, rgba(239,232,212,0.07) 1px,
      transparent 1px, transparent 12px),
    linear-gradient(150deg, #4a4034 0%, #3a3329 45%, #2c2620 100%);
}
.imgph.on-dark .imgph-kicker { color: var(--on-dark-soft); border-color: rgba(239,232,212,0.32); }
.imgph.on-dark .imgph-concept { color: var(--on-dark-soft); }
.imgph.has-img { background: var(--cream-deep); }

/* ---------- Layout ---------- */
.section { padding: clamp(72px, 11vh, 150px) var(--pad-x); position: relative; }
.rule { height: 1px; background: rgba(43,24,16,0.14); width: 100%; }

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

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: rgba(79,5,15,0.3); }
::-webkit-scrollbar-thumb:hover { background: var(--burgundy); }

/* ---------- App view transition ---------- */
.view {
  animation: viewIn .7s var(--ease) both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* utility */
.center-col { max-width: 760px; margin: 0 auto; text-align: center; }
.uppercase-wide { text-transform: uppercase; letter-spacing: 0.28em; font-weight: 300; font-size: 12px; }

/* ---------- Hover interactions ---------- */
.mega-link:hover { color: var(--red) !important; padding-left: 8px !important; }
.foot-link:hover { opacity: 1 !important; }
.cat-card .cat-img { transition: transform 1.1s var(--ease); }
.cat-card:hover .cat-img { transform: scale(1.05); }
.re-card { transition: border-color .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease); }
.re-card:hover { border-color: rgba(79,5,15,0.45) !important; box-shadow: 0 24px 50px -28px rgba(43,24,16,0.4); transform: translateY(-4px); }
.hosp-card { transition: transform .4s var(--ease); }
.hosp-card:hover { transform: translateY(-4px); }
.svc-cell:hover .link-underline::after { transform: scaleX(1); transform-origin: left; }
.svc-cell:hover .link-underline .arr { transform: translateX(5px); }
.svc-cell { transition: background .4s var(--ease); }
.svc-cell:hover { background: var(--cream-soft) !important; }
.nav-item:hover { opacity: 1 !important; }
.hdr-action:hover { opacity: 1 !important; }
.float-btn:hover .float-label { max-width: 130px; margin-left: 12px; }

/* ---------- Responsive ---------- */
.mob-toggle { display: none; }

@media (max-width: 1080px) {
  :root { --header-h: 74px; }
  .desk-nav, .desk-actions { display: none !important; }
  .mob-toggle { display: inline-flex !important; }
  .mob-menu { }
  .hosp-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr !important; }
  .usp-grid { grid-template-columns: 1fr 1fr !important; }
  .usp-grid > div > div { border-right: none !important; padding-left: 0 !important; }
  .svc-grid { grid-template-columns: 1fr 1fr !important; }
  .cat-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .book-grid { grid-template-columns: 1fr !important; }
  .value-row { grid-template-columns: 40px 1fr !important; }
  .value-row p.body { grid-column: 1 / -1; }
  .two-col.flip .sub-img-wrap { order: 1 !important; }
  .two-col.flip > div:last-child { order: 2 !important; }
  .hero-taglines { display: none !important; }
  h1.display { font-size: clamp(40px, 12vw, 70px); }
}

@media (max-width: 520px) {
  .usp-grid { grid-template-columns: 1fr !important; }
  .svc-grid { grid-template-columns: 1fr !important; }
  .hosp-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   EXPORT BUTTON + PRINT / PDF PRESENTATION VIEWS
   ============================================================ */
.export-pdf-btn {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 180;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 26px;
  background: var(--burgundy);
  color: var(--cream);
  border: 1px solid rgba(239,232,212,0.22);
  font-family: var(--sans);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11.5px;
  cursor: pointer;
  box-shadow: 0 16px 40px -16px rgba(20,4,8,0.7);
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.export-pdf-btn:hover { background: var(--red); transform: translateX(-50%) translateY(-2px); }

/* hidden on screen, shown only when printing */
.print-views { display: none; }

@media print {
  @page { size: A4 landscape; margin: 0; }

  html, body { background: #fff !important; overflow: visible !important; }
  .screen-only, .export-pdf-btn { display: none !important; }
  .print-views { display: block !important; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- Presentation slide shell ---- */
.print-page {
  width: 297mm;
  height: 208.5mm;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  page-break-after: always;
  break-after: page;
}
.print-page:last-child { page-break-after: auto; break-after: auto; }

.pp-eyebrow {
  font-family: var(--sans); font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.3em; font-size: 9px; color: var(--red); margin: 0;
}
.pp-eyebrow.on-dark { color: rgba(239,232,212,0.85); }

/* ---- Top bar ---- */
.pp-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14mm; height: 16mm; flex: 0 0 16mm;
  border-bottom: 1px solid rgba(43,24,16,0.14); color: var(--ink);
}
.pp-logo { display: flex; align-items: center; gap: 10px; color: var(--burgundy); }
.pp-wordmark { font-family: var(--logo); font-weight: 500; font-size: 15px; letter-spacing: 0.24em; text-transform: uppercase; }
.pp-nav { display: flex; gap: 18px; }
.pp-nav-item { font-family: var(--sans); font-weight: 300; font-size: 10px; letter-spacing: 0.04em; color: var(--ink-soft); position: relative; }
.pp-nav-item.is-active { color: var(--red); font-weight: 500; }
.pp-nav-item.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1.5px; background: var(--red); }
.pp-bar-action { font-family: var(--sans); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream); background: var(--red); padding: 7px 14px; }

/* ---- Page 1 hero band ---- */
.pp-hero { position: relative; flex: 0 0 78mm; overflow: hidden; color: var(--cream); }
.pp-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pp-hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,8,15,0.32) 0%, rgba(43,8,15,0.1) 40%, rgba(43,8,15,0.66) 100%); }
.pp-hero-copy { position: absolute; left: 14mm; right: 14mm; bottom: 9mm; }
.pp-hero-title { font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1.02; letter-spacing: -0.02em; margin: 8px 0 0; color: var(--cream); }
.pp-hero-title .accent { font-family: var(--accent); font-weight: 700; font-size: 1.15em; }

/* ---- Page 1 blocks ---- */
.pp-block { flex: 1 1 0; padding: 7mm 14mm; display: flex; flex-direction: column; min-height: 0; }
.pp-block .pp-eyebrow { margin-bottom: 5mm; }
.pp-block-dark { background: var(--burgundy); }
.pp-grid { display: grid; gap: 6mm; flex: 1; min-height: 0; }
.pp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pp-grid-4 { grid-template-columns: repeat(4, 1fr); }

.pp-card { display: flex; flex-direction: column; }
.pp-card-img { height: 26mm; overflow: hidden; margin-bottom: 4px; }
.pp-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pp-card h4 { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); margin: 4px 0 3px; }
.pp-card p { font-family: var(--sans); font-weight: 300; font-size: 9.5px; line-height: 1.5; color: var(--ink-soft); margin: 0; }

.pp-card-photo { position: relative; overflow: hidden; }
.pp-card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pp-card-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,8,15,0) 45%, rgba(43,8,15,0.8) 100%); }
.pp-card-photo h4 { position: absolute; left: 9px; right: 9px; bottom: 8px; color: var(--cream); font-size: 14px; margin: 0; z-index: 1; }

/* ---- Pages 2 & 3 mega menu ---- */
.pp-mega-page { background: var(--cream-soft); }
.pp-mega { flex: 1; display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 12mm; padding: 16mm 14mm; align-items: stretch; min-height: 0; }
.pp-mega-intro { display: flex; flex-direction: column; }
.pp-mega-title { font-family: var(--display); font-weight: 600; font-size: 52px; letter-spacing: -0.02em; color: var(--burgundy); margin: 10px 0 14px; }
.pp-mega-blurb { font-family: var(--sans); font-weight: 300; font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 20px; max-width: 320px; }
.pp-mega-enter { font-family: var(--sans); font-weight: 400; text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; color: var(--red); display: inline-flex; align-items: center; gap: 9px; margin-top: auto; }
.pp-mega-cols { display: flex; gap: 14mm; }
.pp-col-head { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.28em; font-weight: 400; font-size: 9.5px; color: var(--green); margin: 0 0 16px; }
.pp-mega-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pp-mega-cols li { font-family: var(--display); font-weight: 500; font-size: 19px; color: var(--ink); line-height: 1.1; }
.pp-mega-feature { overflow: hidden; }
.pp-mega-feature img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* ── WordPress integration: modal overlays ──────────────────────────────────
   Overlays keep inline `display:flex` for their *shown* state but default to
   the `hidden` attribute, toggled by assets/js/modal.js. Inline display would
   otherwise beat the UA `[hidden]{display:none}` rule and render both modals
   full-screen on page load. This makes `hidden` authoritative again. */
[data-modal][hidden] { display: none !important; }

/* ── Header logo sizing (visual-qa fix) ─────────────────────────────────────
   The header logo <img> had no size constraint, so the full lockup rendered at
   its natural height (~338px) and spilled well below the fixed header bar
   (--header-h: 86px), overlapping page content at every scroll position. The
   scroll JS already handles header background / show-hide / default⇄ondark
   swap; only the intrinsic image size was missing. Constrain to fit the bar. */
.logo-mark { flex: 0 0 auto; }
.site-logo__img { height: clamp(40px, 4.4vw, 54px); width: auto; display: block; }
@media (max-width: 900px) { .site-logo__img { height: 40px; } }

/* ── Mega-menu panel positioning (visual-qa fix) ────────────────────────────
   [data-mega-panel] had no positioning rule, so when un-hidden it rendered
   in normal flow inside the header's flex row — clipping its top rows instead
   of dropping below the bar. Anchor it as a full-width dropdown under the
   fixed header. .nav-group is forced static so the panel positions against the
   fixed <header> (full width) rather than the individual nav item. */
.desk-nav .nav-group { position: static !important; }
[data-mega-panel] {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  z-index: 5;
  box-shadow: 0 26px 44px rgba(43,24,16,0.14);
}
