/* =====================================================================
   LUMÉA Skin Studio — Concept Demo Landing Page
   Stylesheet
   =====================================================================
   HOW THIS FILE IS ORGANISED (top to bottom):
   1.  Design tokens (CSS variables) — brand colors, radius, shadow, width
   2.  Reset / base styles
   3.  Layout helpers (container, sections)
   4.  Components (buttons, nav, cards, gallery, FAQ, footer, sticky bar)
   5.  Responsive breakpoints (mobile-first: base styles = mobile,
       then min-width media queries add tablet/desktop layout)

   TO RE-BRAND THIS TEMPLATE FOR A NEW CLIENT:
   Change the values in the ":root" block below (Section 1). Almost
   everything else in this file references those variables, so changing
   a handful of values re-colors the whole page.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. DESIGN TOKENS — edit these to re-brand the whole site
--------------------------------------------------------------------- */
:root {
  /* Brand colors — warm, premium neutral + soft rose (avoid cheap pink) */
  --color-primary: #9c6b4f;        /* main brand color: warm terracotta/brown */
  --color-primary-dark: #7a5138;   /* hover/active state of primary */
  --color-secondary: #d8ab9f;      /* secondary/accent: soft dusty rose */
  --color-accent-dark: #3f2f26;    /* deep brown, used for dark sections/footer */

  /* WhatsApp buttons intentionally keep a WhatsApp-brand color rather than
     the site's own palette — a UX/conversion choice, not a branding one.
     NOTE: WhatsApp's brighter accent green (#25D366) fails WCAG AA for
     white button text (measured ~2:1 contrast) — too low for real-world
     accessibility. This uses WhatsApp's own darker brand teal instead,
     which keeps the same "this is WhatsApp" recognition at ~7.7:1
     contrast with white text (AA-compliant). */
  --color-whatsapp: #075e54;
  --color-whatsapp-dark: #054942;

  /* Neutrals */
  --color-bg: #faf6f1;             /* page background: warm ivory */
  --color-bg-alt: #f2e9e0;         /* alternating section background */
  --color-surface: #ffffff;        /* card / surface background */
  --color-text: #362a22;           /* main text — dark warm brown for contrast */
  --color-text-muted: #6b5b51;     /* secondary text */
  --color-border: #e6d9cc;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  /* Shadow (warm-tinted, soft) */
  --shadow-sm: 0 2px 8px rgba(63, 47, 38, 0.08);
  --shadow-md: 0 12px 32px rgba(63, 47, 38, 0.12);

  /* Layout */
  --page-width: 1200px;
  --page-width-narrow: 760px;
  /* Vertical rhythm between sections. The vw component only kicks in above
     ~1065px, so mobile/tablet sit at the 3rem floor and desktop scales up
     to a 4.5rem ceiling — roughly 25% tighter than a plain 6rem max. */
  --space-section: clamp(3rem, 4.5vw, 4.5rem);

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

/* ---------------------------------------------------------------------
   2. RESET / BASE
--------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* prevents off-canvas mobile menu from creating a
                          horizontal scrollbar while it's translated off-screen */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* safety net against accidental horizontal scroll */
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--color-accent-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; margin-bottom: 0.4em; }

p { margin: 0 0 1em; color: var(--color-text-muted); }

a { color: var(--color-primary-dark); }

ul { margin: 0; padding: 0; list-style: none; }

/* Keyboard accessibility: visible focus ring everywhere */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--color-accent-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0.5rem; }

/* ---------------------------------------------------------------------
   3. LAYOUT HELPERS
--------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow { max-width: var(--page-width-narrow); }

section { padding-block: var(--space-section); }

.section-head {
  max-width: 640px;
  margin: 0 auto 2rem;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 0.6em;
}

.eyebrow--on-dark { color: var(--color-secondary); }

.section-lead { color: var(--color-text-muted); }

/* ---------------------------------------------------------------------
   4. COMPONENTS
--------------------------------------------------------------------- */

/* Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  min-height: 48px; /* comfortable tap target */
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--whatsapp:hover, .btn--whatsapp:focus-visible { background: var(--color-whatsapp-dark); color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
.btn--ghost:hover { background: var(--color-bg-alt); }

.btn--large { padding: 1rem 1.75rem; font-size: 1.05rem; }
.btn--small { padding: 0.55rem 1rem; font-size: 0.9rem; min-height: 44px; }
.btn--block { width: 100%; }

.badge {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 241, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.logo__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.site-header__actions { display: flex; align-items: center; gap: 0.75rem; }

.main-nav__list { display: flex; gap: 1.75rem; }
.main-nav__list a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav__list a:hover { color: var(--color-primary-dark); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  position: relative;
  /* Must outrank .main-nav (z-index 99) and .nav-backdrop (z-index 98)
     so the button stays clickable — and visible — while the mobile menu
     is open, instead of being painted over by the panel. */
  z-index: 101;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-accent-dark);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bar { top: 50%; transform: translate(-50%, -50%); }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

/* Hero --------------------------------------------------------------- */
.hero {
  padding-top: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 65%);
}
.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}
.hero__copy { text-align: center; max-width: 640px; }
.hero__lead { font-size: 1.05rem; }

.hero__offer {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.hero__offer-label { color: var(--color-text-muted); font-size: 0.9rem; }
.hero__offer-price { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; color: var(--color-primary-dark); }

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.hero__media { width: 100%; max-width: 420px; }
.hero__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Cards / grid --------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.card__icon { border-radius: var(--radius-sm); margin-bottom: 1rem; }

.feature {
  text-align: center;
  padding: 1.5rem 1rem;
}
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
}
.feature__icon svg { width: 28px; height: 28px; }

/* Why-us section background */
.why-us { background: var(--color-bg-alt); }

/* Gallery ---------------------------------------------------------- */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.gallery__item {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
}
.gallery__item img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.gallery__item figcaption {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(63, 47, 38, 0.75);
  color: #fff;
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* Offer band --------------------------------------------------------- */
.offer { background: var(--color-accent-dark); color: #fff; }
.offer__inner { display: flex; justify-content: center; }
.offer__card {
  text-align: center;
  max-width: 560px;
}
.offer__card h2 { color: #fff; }
.offer__price { color: var(--color-secondary); }
.offer__terms {
  text-align: left;
  display: inline-block;
  margin: 0 auto 2rem;
  color: #f1e5da;
}
.offer__terms li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.offer__terms li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: 700;
}

/* FAQ ---------------------------------------------------------------- */
.faq__list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.faq__item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-accent-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin-top: 0.85rem; margin-bottom: 0; }

/* Contact -------------------------------------------------------------- */
.contact__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
.contact__details dl { margin: 0 0 1.5rem; }
.contact__details dt {
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-top: 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.contact__details dt:first-child { margin-top: 0; }
.contact__details dd { margin: 0.25rem 0 0; color: var(--color-text-muted); }

.contact__buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Contact map preview card — a stylised map graphic standing in for a real
   Google Maps embed. See the HTML comment above .contact__map in
   index.html for the swap-in instructions. */
.contact__map {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 240px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.contact__map-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.contact__map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.contact__map-pin-icon {
  width: 40px;
  height: 40px;
  color: var(--color-primary-dark);
  filter: drop-shadow(0 4px 6px rgba(63, 47, 38, 0.25));
}
.contact__map-pin-label {
  background: var(--color-surface);
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

/* Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--color-accent-dark);
  color: #e8ddd2;
  padding-block: 2.5rem;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: center;
}
.site-footer__brand { font-family: var(--font-heading); font-size: 1.2rem; color: #fff; margin: 0 0 0.4em; }
.site-footer__note { font-size: 0.85rem; color: #cbb9a8; margin: 0; }
.site-footer__links { display: flex; justify-content: center; gap: 1.5rem; }
.site-footer__links a { color: #e8ddd2; font-size: 0.85rem; text-decoration: underline; }
.site-footer__copyright { font-size: 0.78rem; color: #a8927e; margin: 0; }

/* Mobile sticky WhatsApp bar ------------------------------------------ */
.sticky-wa {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(250, 246, 241, 0.97);
  border-top: 1px solid var(--color-border);
  backdrop-filter: blur(6px);
}

/* ---------------------------------------------------------------------
   5. RESPONSIVE BREAKPOINTS (mobile-first)
   Base styles above = mobile (~375px and up).
   Tablet/desktop layout (nav, grid columns) kicks in at 768px.
   The sticky WhatsApp bar has its own, separate 600px breakpoint — see
   "Phone only" below — since it's a phone-only UI pattern, not a general
   layout breakpoint.
--------------------------------------------------------------------- */

/* Mobile nav: hidden off-canvas menu until toggled open.
   Open/closed state lives in one place — the "nav-open" class on <body>,
   set only by openMenu()/closeMenu() in main.js — so the panel, the
   backdrop, and the scroll lock below can never fall out of sync with
   each other. */
@media (max-width: 767.98px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    padding: 5.5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 99;
  }
  body.nav-open .main-nav { transform: translateX(0); }
  .main-nav__list { flex-direction: column; gap: 1.25rem; }
  .main-nav__list a { font-size: 1.05rem; }

  /* Dimmed backdrop behind the off-canvas menu. Sits above the page
     content but below the menu panel (99) and the toggle button (101),
     per the z-index scale documented on .nav-toggle above. */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(63, 47, 38, 0.45); /* var(--color-accent-dark), tinted */
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

  /* Lock background scrolling while the menu is open. Set on both <html>
     and <body> because the browser's actual root scrolling element is
     <html> (documentElement), not <body> — overflow:hidden on body alone
     does not reliably stop programmatic/wheel scrolling of the page. */
  body.nav-open,
  html.nav-open {
    overflow: hidden;
  }
}

/* Tablet and up (>= 768px) */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .main-nav { display: block; }
  .main-nav__list { display: flex; }

  /* The off-canvas menu and its backdrop are a mobile-only pattern. Force
     the backdrop fully hidden at desktop widths regardless of any
     leftover nav-open state (e.g. a menu that was open right before the
     viewport crossed this breakpoint), so it can never sit over desktop
     content. */
  .nav-backdrop { display: none; }

  .hero__inner { flex-direction: row; text-align: left; align-items: center; }
  .hero__copy { text-align: left; min-width: 0; flex: 1 1 auto; }
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
  .hero__media { flex-shrink: 0; width: min(420px, 34vw); }

  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .gallery__grid { grid-template-columns: repeat(4, 1fr); }

  .contact__grid { grid-template-columns: 1fr 1fr; align-items: start; }

  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  .site-footer__links { justify-content: flex-start; }
}

/* Phone only (<= 600px): the sticky WhatsApp bar shows here, and the
   header's own WhatsApp button steps aside so there's a single, obvious
   WhatsApp CTA on small screens instead of two green buttons stacked at
   once. Tablet (768px) and desktop keep the header button and never show
   the sticky bar. */
@media (max-width: 600px) {
  .site-header__actions .btn--whatsapp { display: none; }
  /* Reserve space at the bottom so the fixed bar never covers content or
     the footer — matches the bar's real rendered height plus a margin. */
  body { padding-bottom: 92px; }
}

@media (min-width: 601px) {
  .sticky-wa { display: none; }
  body { padding-bottom: 0; }
}
