/* ==========================================================================
   Viara Med Spa & Wellness — Reset, elements, layout primitives, utilities
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  hanging-punctuation: first last;
}

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

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
  overflow-x: hidden;
  transition: background-color var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out);
}

body.is-locked { overflow: hidden; }

img, svg, video, canvas, picture { display: block; max-width: 100%; height: auto; }
img { background: var(--surface-2); }

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

:where(a) { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
:where(a):hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--accent-tint); color: var(--text); }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin-block: var(--sp-7);
}

/* ---- Headings ---------------------------------------------------------- */

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-display);
  color: var(--text);
  text-wrap: balance;
}

h1, .h1 { font-size: var(--step-6); line-height: var(--lh-tight); }
h2, .h2 { font-size: var(--step-5); }
h3, .h3 { font-size: var(--step-3); }
h4, .h4 { font-size: var(--step-2); }

h5, h6 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

p, li { text-wrap: pretty; }
p { max-width: var(--measure); }

strong, b { font-weight: 600; }
em, i { font-style: italic; }

small, .text-sm { font-size: var(--step--1); }
.text-xs { font-size: var(--step--2); }

blockquote {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.45;
  font-style: italic;
  color: var(--text-soft);
}

code, kbd, samp { font-family: var(--font-mono); font-size: .9em; }

/* ---- Layout primitives ------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--width-xl);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--lg { max-width: var(--width-lg); }
.shell--md { max-width: var(--width-md); }
.shell--sm { max-width: var(--width-sm); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--tint { background: var(--bg-tint); }
.section--wash { background: var(--accent-wash); }
.section--surface { background: var(--surface); }

.stack > * + * { margin-block-start: var(--flow, var(--sp-4)); }
.stack-2 > * + * { margin-block-start: var(--sp-2); }
.stack-3 > * + * { margin-block-start: var(--sp-3); }
.stack-4 > * + * { margin-block-start: var(--sp-4); }
.stack-5 > * + * { margin-block-start: var(--sp-5); }
.stack-6 > * + * { margin-block-start: var(--sp-6); }
.stack-7 > * + * { margin-block-start: var(--sp-7); }

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}
.row--between { justify-content: space-between; }
.row--center { justify-content: center; }
.row--tight { gap: var(--sp-2); }
.row--top { align-items: flex-start; }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.split {
  display: grid;
  gap: clamp(var(--sp-6), 4vw, var(--sp-8));
  align-items: center;
}
@media (min-width: 62rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-start { grid-template-columns: 1.15fr 1fr; }
  .split--wide-end { grid-template-columns: 1fr 1.15fr; }
  .split--sidebar { grid-template-columns: minmax(0, 1fr) 21rem; align-items: start; }
  .split--reverse > *:first-child { order: 2; }
}

/* ---- Utilities --------------------------------------------------------- */

.center { text-align: center; margin-inline: auto; }
.center p, .center .lede { margin-inline: auto; }
.measure { max-width: var(--measure); }
.measure-sm { max-width: 46ch; }
.mx-auto { margin-inline: auto; }
.full-bleed { width: 100%; }

.lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 58ch;
}

.muted { color: var(--text-muted); }
.soft { color: var(--text-soft); }
.accent-text { color: var(--accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-body);
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
.eyebrow--plain::before, .eyebrow--plain::after { display: none; }

.script {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: .5rem; left: 50%;
  transform: translate(-50%, -160%);
  z-index: 1000;
  padding: .7rem 1.25rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r-pill);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-med) var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--accent-ink); }

/* Hide below the breakpoint without clobbering the element's own display
   value above it (important for .btn, which is inline-flex). */
@media (max-width: 47.999rem) { .hide-sm { display: none !important; } }
@media (min-width: 62rem) { .hide-lg-up { display: none !important; } }

/* Icon carrier: `display: contents` lets the injected <svg> act as a direct
   child of the parent, so flex/grid alignment rules still target it. */
.i { display: contents; }

.no-wrap { white-space: nowrap; }

/* Decorative hairline divider with a botanical dot */
.rule {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--border-strong);
}
.rule::before, .rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
}
.rule > span { color: var(--hairline); font-size: .8rem; letter-spacing: .3em; }

/* ---- Scroll reveal ----------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity var(--t-reveal) var(--ease-out),
              transform var(--t-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal--left { transform: translate3d(-26px, 0, 0); }
.reveal--right { transform: translate3d(26px, 0, 0); }
.reveal--scale { transform: scale(.96); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* JS-less safety net: if the script never runs, show everything. */
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---- Print ------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .bg-decor, .theme-toggle,
  .nav-drawer, .cta-band, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 1rem; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
