/* ============================================================
   Lamsoor 63 — shared styles
   Loaded before Tailwind CDN; per-page overrides via body[data-page=].
   ============================================================ */

/* ---------- Base ---------- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body {
  font-family: "Manrope", system-ui, sans-serif;
  background: #EAF4F2;
  color: #153B41;
}
::selection { background: #206D79; color: #EAF4F2; }
:focus-visible { outline: 2px solid #206D79; outline-offset: 3px; border-radius: 2px; }

/* ---------- SVG noise grain ---------- */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.08; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.35' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.grain-light::after { opacity: 0.045; mix-blend-mode: multiply; }
.grain-dark::after  { opacity: 0.18;  mix-blend-mode: screen; }

/* ---------- Atmospheric backgrounds ---------- */
.atmosphere {
  background:
    radial-gradient(60% 50% at 18% 25%, rgba(106,143,144,0.11), transparent 60%),
    radial-gradient(50% 60% at 85% 80%, rgba(32,109,121,0.08), transparent 65%),
    radial-gradient(40% 40% at 50% 100%, rgba(32,109,121,0.08), transparent 70%),
    #EAF4F2;
}
.atmosphere-dark { background: #153B41; }

/* ---------- Reveal-on-scroll (CSS view-timeline; opt-out via body[data-no-reveal]) ---------- */
.reveal { opacity: 1; }
@supports (animation-timeline: view()) {
  body:not([data-no-reveal]) .reveal {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 30%;
  }
  @keyframes revealUp {
    from { opacity: 0; transform: translate3d(0, 24px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
  }
}

/* ---------- Hairlines & glyphs ---------- */
.rule { height: 1px; background: linear-gradient(90deg, transparent, rgba(21,59,65,0.25) 30%, rgba(21,59,65,0.25) 70%, transparent); }
.num-glyph { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 400; line-height: 1; }
.serif-italic { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; }

/* ---------- Editorial pull-quote glyph ---------- */
.quote::before {
  content: "“"; font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 4.5em; line-height: 0.75; display: block; color: #206D79;
  margin-bottom: 0.05em; font-weight: 400;
}

/* ---------- Spring-eased link underline ---------- */
.link-underline { position: relative; display: inline-block; }
.link-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right center;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}
.link-underline:hover::after,
.link-underline:focus-visible::after { transform: scaleX(1); transform-origin: left center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.65rem;
  padding: 1rem 1.85rem;
  font-family: "Manrope", system-ui, sans-serif; font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; user-select: none;
  transition:
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 380ms cubic-bezier(0.22, 1, 0.36, 1),
    color 380ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 380ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 380ms cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 2px #EAF4F2, 0 0 0 4px #206D79; }
.btn:active { transform: translate3d(0, 1px, 0); }
.btn-primary {
  background: #206D79; color: #EAF4F2;
  box-shadow: 0 14px 30px -18px rgba(32,109,121,0.55), 0 4px 10px -6px rgba(21,59,65,0.35);
}
.btn-primary:hover {
  background: #153B41; transform: translate3d(0,-1px,0);
  box-shadow: 0 22px 40px -22px rgba(32,109,121,0.65), 0 8px 16px -10px rgba(21,59,65,0.45);
}
.btn-ghost { background: transparent; color: #153B41; border-color: rgba(21,59,65,0.30); }
.btn-ghost:hover { background: rgba(21,59,65,0.04); border-color: #153B41; transform: translate3d(0,-1px,0); }
.btn-on-dark { background: #EAF4F2; color: #153B41; }
.btn-on-dark:hover { background: #DCE9E6; transform: translate3d(0,-1px,0); box-shadow: 0 22px 40px -22px rgba(234,244,242,0.4); }

/* ---------- Nav: compact by default + smart-shrink override on the landing ---------- */
#nav {
  background: rgba(234,244,242,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(21,59,65,0.1);
  transition: background-color 500ms cubic-bezier(0.22,1,0.36,1), border-color 500ms cubic-bezier(0.22,1,0.36,1);
}
.nav-strip {
  height: 72px;
  transition: height 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-logo {
  height: 52px; width: auto;
  transition: height 600ms cubic-bezier(0.22, 1, 0.36, 1), filter 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 768px) {
  .nav-strip { height: 90px; }
  .nav-logo  { height: 70px; }
}

/* Landing override: nav is transparent + tall over the hero, shrinks on scroll */
body[data-page="landing"] #nav:not(.nav-scrolled) {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
body[data-page="landing"] #nav:not(.nav-scrolled) .nav-strip { height: 100px; }
body[data-page="landing"] #nav:not(.nav-scrolled) .nav-logo  { height: 80px; filter: brightness(0) invert(1); }
@media (min-width: 768px) {
  body[data-page="landing"] #nav:not(.nav-scrolled) .nav-strip { height: 170px; }
  body[data-page="landing"] #nav:not(.nav-scrolled) .nav-logo  { height: 150px; }
}

/* ---------- Mobile nav: hamburger toggle + dropdown menu (under 768px only) ---------- */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  padding: 0; margin-left: 4px;
  background: transparent; border: 0; cursor: pointer;
  position: relative;
}
.nav-toggle-bar {
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  background-color: #153B41;
  border-radius: 1px;
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-toggle-bar:nth-child(1) { top: 14px; }
.nav-toggle-bar:nth-child(2) { top: 19.5px; }
.nav-toggle-bar:nth-child(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Cool bars when the nav is transparent over the landing hero */
body[data-page="landing"] #nav:not(.nav-scrolled) .nav-toggle-bar { background-color: #EAF4F2; }

/* Dropdown menu — slides down from below the nav strip */
.nav-menu {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: rgba(234, 244, 242, 0.98);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(21, 59, 65, 0.1);
  display: none;
  transform-origin: top center;
}
.nav-menu[data-open] {
  display: block;
  animation: navMenuIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes navMenuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 8px 24px 24px;
}
.nav-menu li + li { border-top: 1px solid rgba(21, 59, 65, 0.08); }
.nav-menu a {
  display: block;
  padding: 18px 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #153B41;
  transition: color 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-menu a:hover,
.nav-menu a:focus-visible { color: #206D79; }
.nav-menu [aria-current="page"] { color: #206D79; }

/* Desktop (≥ 768px): hide the hamburger and keep the dropdown closed */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu   { display: none !important; }
}

/* Compact the header CTA on mobile so it sits comfortably next to the hamburger. */
@media (max-width: 767px) {
  #nav .btn-primary {
    padding: 0.55rem 0.85rem;
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    gap: 0.4rem;
    white-space: nowrap;
  }
  #nav .btn-primary svg { width: 10px; height: 7px; }

  /* Landing hero (unscrolled): the nav is taller and more spacious, so the
     bordeaux fill reads heavier. Trim it further for visual balance. */
  body[data-page="landing"] #nav:not(.nav-scrolled) .btn-primary {
    padding: 0.45rem 0.7rem;
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    gap: 0.35rem;
  }
  body[data-page="landing"] #nav:not(.nav-scrolled) .btn-primary svg { width: 9px; height: 6px; }
}

/* ---------- Marquee (landing) ---------- */
.marquee { display: flex; width: max-content; animation: marquee 42s linear infinite; }
@keyframes marquee {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}

/* ---------- Treatment card image treatment (landing) ---------- */
.image-treatment::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(21,59,65,0.55) 100%);
}
.image-treatment::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(32,109,121,0.18); mix-blend-mode: multiply;
}
.image-treatment > img,
.image-treatment > div.img {
  transition: transform 1400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.image-treatment:hover > img,
.image-treatment:hover > div.img { transform: scale(1.05); }

/* ---------- Hero scroll cue (landing) ---------- */
@keyframes scrollPulse {
  0%   { opacity: 0.25; transform: translate3d(0, 0, 0) scaleY(1); }
  50%  { opacity: 0.9;  transform: translate3d(0, 6px, 0) scaleY(0.6); }
  100% { opacity: 0.25; transform: translate3d(0, 0, 0) scaleY(1); }
}
.scroll-cue { animation: scrollPulse 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite; transform-origin: top center; }

/* ---------- Social set — editorial row, icon + tiny letter-spaced label ---------- */
.social-set {
  --social-color: #153B41;
  --social-hover: #206D79;
  --social-rule: rgba(32, 109, 121, 0.22);
  color: var(--social-color);
  display: flex; align-items: center; justify-content: center;
  gap: clamp(32px, 6vw, 56px);
  padding-top: 18px;
  border-top: 1px solid var(--social-rule);
}
.social-set a {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    color 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.social-set a:hover,
.social-set a:focus-visible {
  transform: translate3d(0, -2px, 0);
  color: var(--social-hover);
  outline: none;
}
.social-set .social-icon {
  display: inline-block;
  width: 22px; height: 22px;
  background-color: currentColor;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: contain;
          mask-size: contain;
}
.social-set .social-icon--instagram {
  -webkit-mask-image: url("../media/icons/instagram.svg");
          mask-image: url("../media/icons/instagram.svg");
}
.social-set .social-icon--facebook {
  -webkit-mask-image: url("../media/icons/facebook.svg");
          mask-image: url("../media/icons/facebook.svg");
}
.social-set .social-icon--whatsapp {
  -webkit-mask-image: url("../media/icons/whatsapp.svg");
          mask-image: url("../media/icons/whatsapp.svg");
}
.social-set .social-label {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
/* Mask URLs are relative to the stylesheet (assets/), so subpages need their own resolution.
   We already use ../media/icons in the styles — that's correct for the stylesheet's location. */

/* Dark variant — used inside the footer over the espresso atmosphere. */
.social-set-dark {
  --social-color: rgba(234, 244, 242, 0.75);
  --social-hover: #DCE9E6;
  --social-rule:  rgba(234, 244, 242, 0.16);
}
