/* =================================================================
   Aura — Sanctuary Editorial (spa / wellness / beauty)
   Pipeline B standardized per §2.9.
   Default palette: aura-warm-sanctuary.  Default style: aura-playfair-lato.
   CSS vars consumed from engine injection (template_modifier.py):
     palette -> --bg, --bg-alt, --bg-surface, --bg-card, --text,
                --text-sub, --text-muted, --primary, --secondary,
                --accent, --border, --border-hi
     style   -> --font-display, --font-body, --font-mono, --section-pad
   Variable vocabulary rename (§5.32 case 3):
     original --sage  →  --secondary
     original --gold  →  --primary
   All hardcoded rgba() converted to color-mix() (§5.15).
   ================================================================= */

:root {
  /* Palette: Warm Sanctuary */
  --bg: #F4EFE3;
  --bg-alt: #E9E1D3;
  --bg-surface: #FFFFFF;
  --bg-card: #FAF7EE;
  --text: #2B2620;
  --text-sub: #5C5349;
  --text-muted: #8A8275;
  --primary: #C9A96A;
  --secondary: #93A087;
  --accent: #A38B5C;
  --border: #DCD4C2;
  --border-hi: #C9A96A;

  /* Typography System */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing & Layout */
  --nav-h:       72px;
  --section-pad: 5rem;
  --container:   1200px;
  --radius: 2px;
  --radius-lg: 4px;
  --transition:  .3s ease;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 3px 3px,
      color-mix(in srgb, var(--text) 4%, transparent) 1px,
      transparent 1px);
  background-size: 80px 80px;
  line-height: 1.6;
  margin: 0;
  padding-top: 80px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--text);
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.section { padding: var(--section-pad) 0; }
.bg-alt { background: var(--bg-alt); }
.text-center { text-align: center; }

/* Navigation */
.nav {
  position: fixed; top: 0; width: 100%; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg-surface) 95%, transparent);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; box-sizing: border-box;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 30px; }
.nav-link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text);
  transition: 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* [mobile_baseline 20260902] MOBILE NAV TOGGLE — the pulse-tech / vita-health pattern,
   not a third one. Hidden on desktop; the phone block below reveals it. Until this
   existed the 768px block hid .nav-links with nothing to bring them back, so a phone
   got this site with NO NAVIGATION AT ALL. */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary);
  color: var(--bg-surface);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: 0.3s;
  text-align: center;
  /* [mobile_fixes 20260930] no global box-sizing:border-box reset in this template, so a
     caller's inline max-width (the checkout CTA sets max-width:300px) capped only the
     content box -- the real rendered width was 300 + 64px padding + 2px border = 366px,
     not 300. border-box makes an author's max-width mean what it says. */
  box-sizing: border-box;
}
.btn:hover { background: var(--secondary); border-color: var(--secondary); }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--bg-surface); }

/* Page animations */
main { animation: fadeIn 0.5s; min-height: calc(100vh - 80px); min-height: calc(100svh - 80px); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero & steam animations */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg-card);
  padding: 120px 20px;
  text-align: center;
  display: flex; align-items: center; justify-content: center;
  min-height: 80vh;
}
.hero-content { position: relative; z-index: 10; max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: clamp(3rem, 5vw, 4.5rem); margin-bottom: 20px; line-height: 1.1; }
.hero p {
  font-size: 1.2rem;
  color: var(--text-sub);
  margin-bottom: 40px;
  font-weight: 300;
}

.steam-wrap { position: absolute; inset: 0; pointer-events: none; opacity: 0.7; overflow: hidden; }
.steam {
  position: absolute; bottom: -20%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--primary) 8%, transparent) 0%,
    transparent 60%);
  filter: blur(40px);
  border-radius: 50%;
  animation: rise linear infinite;
}
.steam:nth-child(1) { width: 500px; height: 500px; left: 10%; animation-duration: 20s; }
.steam:nth-child(2) {
  width: 700px; height: 700px; right: -5%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--secondary) 12%, transparent) 0%,
    transparent 60%);
  animation-duration: 25s; animation-delay: 2s;
}
.steam:nth-child(3) { width: 450px; height: 450px; left: 40%; animation-duration: 18s; animation-delay: 8s; }
@keyframes rise {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(-120vh) scale(1.5); opacity: 0; }
}

/* Service cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}
.service-card {
  padding: 50px 30px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  transition: 0.4s;
}
.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px color-mix(in srgb, var(--primary) 5%, transparent);
}
.service-card h3 {
  color: var(--primary);
  font-size: 1.8rem;
}

/* Spa calculator */
.calc-box {
  max-width: 900px;
  margin: 40px auto;
  background: var(--bg-surface);
  padding: 50px;
  border: 1px solid var(--border);
  box-shadow: 0 15px 40px color-mix(in srgb, var(--text) 3%, transparent);
}
.calc-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 25px;
  border: 1px solid var(--border);
  margin-bottom: 15px;
  cursor: pointer;
  transition: 0.3s;
}
.calc-item:hover { border-color: var(--secondary); }
.calc-item.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}
.calc-item-title { font-size: 1.2rem; font-family: var(--font-display); }
.calc-item-price {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--primary);
}
.calc-result {
  text-align: center;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.calc-result h3 {
  font-size: 3.5rem;
  color: var(--primary);
  margin: 10px 0;
  line-height: 1;
}
#spa-bundle-badge {
  color: var(--bg-surface);
  background: var(--secondary);
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: 20px;
  display: none;
  margin: 0 auto 20px;
  width: fit-content;
}
.strike-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 1.5rem;
  display: none;
  margin-bottom: -10px;
}

/* Contact form inputs */
.contact-card {
  margin-top: 50px;
  max-width: 500px;
  margin-left: auto; margin-right: auto;
  background: var(--bg-surface);
  padding: 40px;
  border: 1px solid var(--border);
}
.contact-card input,
.contact-card select,
.contact-card textarea {
  padding: 15px;
  width: 100%;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  background: var(--bg-surface);
  box-sizing: border-box;
}
.contact-card select { cursor: pointer; margin-bottom: 30px; }
.contact-card button { width: 100%; border: none; }

/* Chat widget & footer */
.chat-widget {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 60px; height: 60px;
  background: var(--bg);
  border: 1px solid var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 5px 20px color-mix(in srgb, var(--primary) 15%, transparent);
  z-index: 1000;
  transition: 0.3s;
}
.chat-widget:hover {
  background: var(--primary);
  color: var(--bg-surface);
  transform: scale(1.05);
}

.footer {
  background: var(--bg-alt);
  padding: 50px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer h2 {
  font-size: 1.5rem;
  color: var(--primary);
}
.footer p {
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-surface); flex-direction: column; padding: 2rem 1.5rem; gap: 1.2rem;
    border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  /* [mobile_fixes 20260930] the nav's CTA reuses the plain .btn class shared with
     buttons elsewhere on the page, so the hide has to be scoped to the nav's own
     one — a bare .btn{display:none} would take every button on the site with it. */
  .nav > .btn { display: none; }
  .service-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.5rem; }
  .calc-box { padding: 25px; }
  .calc-item { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* [slot-system] section-background paint — Aura has no tiles/bands, so its full-bleed
   sections are the paint surfaces. HERO_IMAGE → .hero, ABOUT_IMAGE/CONTACT_IMAGE →
   .paint-section. Painted by main.js ([data-img] loop, adds .has-image). Empty tokens keep
   the cream section colours (pixel-intact). Dark scrim + light text = robust legibility over
   any customer photo; the contact .contact-card keeps its own --bg-surface so the form stays
   readable regardless of the background photo. */
.hero, .paint-section { background-size: cover; background-position: var(--hero-focus, center); }
.paint-section { position: relative; overflow: hidden; }
.hero.has-image::after, .paint-section.has-image::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(20,16,10,.5) 0%, rgba(20,16,10,.64) 100%);
}
.paint-section.has-image .container { position: relative; z-index: 1; }
.hero.has-image .hero-content h1, .hero.has-image .hero-content p,
.paint-section.has-image .container h1, .paint-section.has-image .container p { color: #F6F1E7 !important; }
.hero.has-image .btn-outline { color: #F6F1E7; border-color: rgba(246,241,231,.6); }

/* ══ DAMPHI MOBILE BASELINE v1 — GENERATED, DO NOT HAND-EDIT ══
   Source: templates/_shared/mobile/mobile_baseline.css
   Regenerate: python3 Tools/apply_mobile_baseline.py spa-wellness
   Edit the baseline, never this block. ══ */
@media (max-width: 768px) {
  .container, .nav { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero { padding-top: 4rem; padding-bottom: 4rem; }
  h1, h2, h3, p { overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
  :is(h1, h2, h3, p) > * { overflow-wrap: inherit; hyphens: inherit; max-width: 100%; }
}
@media (hover: none), (pointer: coarse) {
  .steam { display: none !important; }
  .nav { backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    background: var(--bg-surface) !important; }
}
/* ══ END DAMPHI MOBILE BASELINE ══ */
