/*
 * Liva Beautyscape — Main Stylesheet
 * Fonts: EB Garamond (Adobe Caslon substitute via Google Fonts) + Lato
 * To use authentic Adobe Caslon: swap the Google Fonts import for
 * an Adobe Fonts kit and update --serif below.
 */

/* ── Variables ────────────────────────────────────────────────── */
:root {
  --olive:        #566038;
  --olive-hover:  #667046;
  --olive-light:  #7a9048;
  --heading:      #6E6E38;
  --label:        #888848;
  --text:         #2A2A2A;
  --text-mid:     #666660;
  --white:        #ffffff;
  --bg:           #ffffff;
  --bg-warm:      #F8F4EE;
  --border:       #DDD6C8;
  --img-bg:       #D0C9BA;

  --serif:  'Libre Caslon Display', Georgia, serif;
  --sans:   'Lato', 'Helvetica Neue', Arial, sans-serif;

  --max-w:  1200px;
  --hdr-h:  170px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.75; }
img   { display: block; max-width: 100%; height: auto; }
a     { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Container ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 30px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--primary {
  background: var(--olive);
  color: var(--white);
  border: 2px solid var(--olive);
}
.btn--primary:hover {
  background: var(--olive-hover);
  border-color: var(--olive-hover);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn--outline:hover { background: rgba(255,255,255,0.12); }

/* ── Arrow Links ──────────────────────────────────────────────── */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  transition: gap 0.2s;
}
.link-arrow:hover { gap: 11px; }

/* ── Section Label ────────────────────────────────────────────── */
.section-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
  margin-bottom: 0px;
}

/* ── Site Header ──────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--hdr-h);
  transition: background 0.35s ease, backdrop-filter 0.35s ease;
}
.site-header.scrolled,
.site-header.nav-open {
  background: rgba(18, 24, 12, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;

  height: 100%;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 100px; width: auto; }

/* ── Main Nav ─────────────────────────────────────────────────── */
.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; gap: 40px; }
.nav-link {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  padding-bottom: 5px;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.2s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { border-bottom-color: var(--white); }

/* ── Mobile Nav Toggle ────────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 201;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero — Home Page ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 580px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: url('../images/Bamboo_forest.jpg') center / cover no-repeat;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(108deg, rgba(12,18,8,0.76) 28%, rgba(12,18,8,0.22) 100%);
}
.hero__content {
  position: absolute;
  top: var(--hdr-h);
  left: 0; right: 0;
  z-index: 1;
  padding: 28px 0 48px;
}
.hero__title {
  font-family: var(--serif);
  font-size: clamp(4rem, 6.5vw, 6.2rem);
  font-weight: 200;
  color: var(--white);
  line-height: 0.9;
  letter-spacing: -1px;
  max-width: 540px;
  margin-bottom: 18px;
}
.hero__sub {
  font-size: 1.2rem;
  font-weight: 300;
  color: rgba(255,255,255,0.88);
  line-height: 1.65;
  margin-bottom: 34px;
}

/* ── Hero — Inner Pages ───────────────────────────────────────── */
.page-hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  background: url('../images/Bamboo_forest.jpg') center / cover no-repeat;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,16,8,0.42) 0%, rgba(10,16,8,0.68) 100%);
}
.page-hero__content {
  position: absolute;
  top: var(--hdr-h);
  left: 0; right: 0;
  z-index: 1;
  padding: 24px 0 32px;
}
.page-hero__title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
}

/* ── Sections ─────────────────────────────────────────────────── */
.section       { padding: 50px 0; }
.section--alt  { background: var(--bg-warm); }

/* ── Two-Column Layout ────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: top;
}

/* ── Image Frame ──────────────────────────────────────────────── */
.img-frame {
  border-radius: 20px;
  overflow: hidden;
  background: var(--img-bg);
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-frame--wide   { aspect-ratio: 3 / 2; }
.img-frame--tall   { aspect-ratio: 2 / 3; }
.img-frame--square { aspect-ratio: 1 / 1; }

/* ── Home: Intro Section ──────────────────────────────────────── */
.intro-text h2 {
  font-family: var(--serif);
  font-size: clamp(3.1rem, 3.5vw, 4rem);
  color: var(--heading);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.1rem;
  margin-bottom: 20px;
}
.intro-text p {
  font-size: 1.2rem;
  color: var(--text);
  max-width: 440px;
  line-height: 1.8;
}

/* ── Home: Featured Treatments ────────────────────────────────── */
.treatments-section { text-align: center; }
.treatments-section > .container > h2 {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 4vw, 3.8rem);
  color: var(--heading);
  font-weight: 400;
  margin-bottom: 30px;
  margin-top: 20px;
  line-height: 3.0rem;
}
.treatments-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.treatment-card__image {
  border-radius: 20px;
  overflow: hidden;
  background: var(--img-bg);
  aspect-ratio: 1 / 1;
  margin-bottom: 16px;
}
.treatment-card__image img { width: 100%; height: 100%; object-fit: cover; }
.treatment-card__title {
  font-family: var(--serif);
  font-size: 2.0rem;
  color: var(--heading);
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.3;
}
.treatment-card .link-arrow { justify-content: center; }

/* ── Home: Boutique Section ───────────────────────────────────── */
.boutique-text h2 {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 3.5vw, 3.5rem);
  color: var(--heading);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.1rem;
  margin-bottom: 20px;
}
.boutique-text h2 em { font-style: italic; color: var(--heading); }
.boutique-text p {
  font-size: 1.20rem;
  color: var(--text);
  max-width: 460px;
  margin-bottom: 26px;
  line-height: 1.8;
}

/* ── Services: Intro ──────────────────────────────────────────── */
.services-intro h2 {
  font-family: var(--serif);
  font-size: clamp(3.0rem, 3vw, 2.8rem);
  color: var(--heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.1rem;
  margin-bottom: 18px;
}
.services-intro p {
  font-size: 1.2rem;
  max-width: 440px;
  line-height: 1.8;
}

/* ── Services: Grid ───────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
}
.service-col h3 {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--heading);
  font-weight: 400;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.sub-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
  margin-top: 20px;
  margin-bottom: 8px;
}
.service-col ul li {
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1.4;
  padding: 5px 0;
}

/* ── Video Banner ─────────────────────────────────────────────── */
.video-trigger {
  display: block;
  position: relative;
  width: 100%;
  height: 360px;
  cursor: pointer;
  overflow: hidden;
  border: none;
  padding: 0;
  background: none;
  border-radius: 20px;   /* matches .img-frame */
}
.video-trigger__bg {
  position: absolute;
  inset: 0;
  /* Swap images/video-poster.jpg for your background image */
  background: var(--olive-light) url('../images/video-poster.jpg') center / cover no-repeat;
  transition: transform 0.5s ease;
}
.video-trigger:hover .video-trigger__bg { transform: scale(1.03); }
.video-trigger__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 8, 0.35);
  transition: background 0.3s ease;
}
.video-trigger:hover .video-trigger__overlay { background: rgba(10, 16, 8, 0.25); }
.video-trigger__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 1;
}
.play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.video-trigger:hover .play-btn {
  background: var(--olive);
  border-color: var(--olive);
  transform: scale(1.1);
}
.play-btn svg { width: 32px; height: 32px; margin-left: 4px; }
.video-trigger__label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}

/* ── Video Modal ──────────────────────────────────────────────── */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-modal[hidden] { display: none; }
.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}
.video-modal__inner {
  position: relative;
  width: 90vw;
  max-width: 960px;
  z-index: 1;
}
.video-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s;
  padding: 4px 8px;
}
.video-modal__close:hover { opacity: 1; }
.video-modal__video {
  width: 100%;
  display: block;
  border-radius: 4px;
}

/* ── About ────────────────────────────────────────────────────── */
.about-text h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  color: var(--heading);
  font-weight: 400;
  line-height: 1.18;
  margin-bottom: 24px;
}
.about-text h2 em { font-style: italic; }
.about-text p {
  font-size: 1.2rem;
  color: var(--text);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-text p:last-child { margin-bottom: 0; }

/* ── Contact ──────────────────────────────────────────────────── */
.contact-heading {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--heading);
  font-weight: 400;
  margin-bottom: 32px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--text);
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--text);
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--olive); }
.form-group textarea { resize: vertical; min-height: 148px; }

.contact-info { margin-top: 24px; }
.contact-info strong {
  font-size: 1.3rem;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}
.contact-info address {
  font-size: 1.1rem;
  font-style: normal;
  color: var(--text);
  line-height: 1.9;
}
.contact-info a { color: var(--text); border-bottom: 1px solid var(--border); }
.contact-info a:hover { border-bottom-color: var(--olive); color: var(--olive); }

.form-required-note {
  font-size: 0.75rem;
  color: var(--text-mid);
  margin-top: 10px;
}

.form-success {
  display: none;
  padding: 16px 20px;
  background: #e8eed8;
  border-left: 4px solid var(--olive);
  font-size: 0.9rem;
  color: var(--olive);
  margin-top: 16px;
  line-height: 1.6;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--olive);
  color: var(--white);
  padding: 68px 0;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.footer-cta h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--white);
  font-weight: 400;
  line-height: 1.18;
  margin-bottom: 12px;
}
.footer-cta p {
  font-size: 1rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 28px;
  max-width: 340px;
  line-height: 1.75;
}
.footer-info address {
  font-style: normal;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.95;
}
.footer-info a {
  color: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  transition: border-color 0.2s;
}
.footer-info a:hover { border-bottom-color: white; }
.footer-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.28);
  margin: 20px 0 16px;
}
.footer-social { font-size: 0.88rem; color: rgba(255,255,255,0.88); }
.footer-social strong {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
}
.footer-social a {
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  transition: border-color 0.2s;
  padding-bottom: 1px;
}
.footer-social a:hover { border-bottom-color: white; }
.footer-social .sep { margin: 0 8px; opacity: 0.45; }

/* ── Tooltips ─────────────────────────────────────────────────── */
.tooltip {
  position: relative;
  display: inline;
  border-bottom: 1px dotted currentColor;
  cursor: help;
}
.tooltip:focus { outline: 2px solid var(--olive); outline-offset: 2px; border-radius: 2px; }
.tooltip__bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2210;
  color: var(--white);
  font-family: var(--sans);
  font-size: 1.0rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.6;
  padding: 14px 20px;
  border-radius: 4px;
  border: 1px solid var(--label);
  min-width: 345px;
  max-width: 450px;
  white-space: normal;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 300;
}
/* Two-layer caret so the border colour shows on the arrow tip */
.tooltip__bubble::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--label);
}
.tooltip__bubble::after {
  content: '';
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a2210;
}
.tooltip:hover .tooltip__bubble,
.tooltip:focus .tooltip__bubble { opacity: 1; }

/* ── Learn-More Popovers (home treatment cards) ───────────────── */
/*
 * Same dark bubble as .tooltip but applied to live <a> links.
 * - No dotted underline (the link has its own arrow style).
 * - Cursor stays pointer so the link remains obviously clickable.
 * - Bubble text-transform / letter-spacing reset so it reads as
 *   normal prose, not uppercase like its .link-arrow parent.
 */
.link-popover {
  position: relative;
}
.link-popover__bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2210;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.6;
  padding: 14px 20px;
  border-radius: 4px;
  border: 1px solid var(--label);
  min-width: 345px;
  max-width: 450px;
  white-space: normal;
  text-align: center;
  opacity: 0;
  pointer-events: none;          /* bubble never blocks the link click */
  transition: opacity 0.2s ease;
  z-index: 300;
}
/* Two-layer caret so the border colour shows on the arrow tip */
.link-popover__bubble::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--label);
}
.link-popover__bubble::after {
  content: '';
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a2210;
}
.link-popover:hover .link-popover__bubble,
.link-popover:focus  .link-popover__bubble { opacity: 1; }

/* Touch-open state (JS-driven, mobile only) */
.tooltip.touch-open .tooltip__bubble,
.link-popover.touch-open .link-popover__bubble { opacity: 1; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .treatments-grid       { grid-template-columns: repeat(2, 1fr); }
  .services-grid         { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  /* 120px = 100px logo + 20px breathing room */
  :root { --hdr-h: 120px; }

  /* On mobile the JS uses position:fixed — hide the caret arrows
     since the bubble is no longer anchored directly above its trigger */
  .tooltip__bubble::before,
  .tooltip__bubble::after,
  .link-popover__bubble::before,
  .link-popover__bubble::after { display: none; }

  .container    { padding: 0 24px; }
  .header-inner { padding: 0 24px; }
  .footer-inner { padding: 0 24px; grid-template-columns: 1fr; gap: 40px; }

  .nav-toggle { display: flex; }

  /*
   * Nav anchors at top:0 so the dark-green background extends
   * all the way up behind the header/logo. padding-top pushes the
   * links below the logo area. translateY(-100%) guarantees the
   * entire panel is above the viewport when closed.
   */
  .main-nav {
    position: fixed;
    top: 0;
    left: 0; right: 0;
    background: rgba(18, 24, 12, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--hdr-h) 24px 36px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 199;
  }
  .main-nav.open  { transform: translateY(0); }
  .nav-list       { flex-direction: column; gap: 28px; }
  .nav-link       { font-size: 0.88rem; }

  .two-col        { grid-template-columns: 1fr; gap: 36px; }
  .section        { padding: 56px 0; }

  /* Ensure hero is tall enough to show all content below the header */
  .hero      { min-height: calc(var(--hdr-h) + 380px); }
  .page-hero { min-height: calc(var(--hdr-h) + 110px); }
}

@media (max-width: 560px) {
  .treatments-grid { grid-template-columns: 1fr; }
  .services-grid   { grid-template-columns: 1fr; }
}
