/* =========================================
   AThetalife • base.css
   Purpose: site-wide resets and base styles
   ========================================= */

/* -------- Reset / Normalization -------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Smooth scrolling (respect reduced motion) */
:where(html) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  :where(html) { scroll-behavior: auto; }
}

/* -------- Global Defaults -------- */
:where(body) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Global page background + text color */
body {
  margin: 0;
  background: var(--bg);              /* -> --color-bg */
  color: var(--ink);                  /* -> --color-ink */
  font-family: var(--font-sans);
  line-height: var(--lh-base, 1.55);
}

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

/* Containers */
.container {
  width: min(100% - 2rem, var(--maxw, 1120px));
  margin-inline: auto;
  padding-inline: var(--container-pad, 1rem);
}

/* -------- Type -------- */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--lh-tight, 1.2);
  font-weight: 600;
  color: var(--ink);
}

p {
  margin-bottom: var(--space-4, 1.5rem);
  color: var(--muted);
}

/* -------- Links -------- */
a {
  color: var(--accent, #2f8e8c);
  text-decoration: none;
  transition: color var(--dur-2, .18s) var(--ease-std, cubic-bezier(.2,.65,.3,1));
}
a:hover { color: var(--brand, #4b3f72); }

/* -------- Buttons (baseline) -------- */
button {
  font-family: inherit;
  font-size: inherit;
  padding: var(--space-2, .5rem) var(--space-3, .75rem);
  border: none;
  border-radius: var(--radius-2, 10px);
  cursor: pointer;
  transition: background var(--dur-2, .18s) var(--ease-std, cubic-bezier(.2,.65,.3,1));
}

/* -------- Focus styles -------- */
:where(a, button, input, select, textarea):focus { outline: none; }
:where(a, button, input, select, textarea):focus-visible {
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(75,63,114,.35));
  border-radius: var(--radius-2, 10px);
}

/* Text selection (with fallback if color-mix unsupported) */
::selection { color: var(--ink); }
@supports (background: color-mix(in oklab, white, black)) {
  ::selection { background: color-mix(in oklab, var(--brand), white 70%); }
}
@supports not (background: color-mix(in oklab, white, black)) {
  ::selection { background: rgba(75,63,114,.25); }
}

/* =========================================
   Components (site-wide)
   ========================================= */

/* Cards & panels used across pages */
.card,
.panel {
  background: var(--surface);     /* -> --color-surface */
  border: 1px solid var(--border);/* -> --color-border */
  box-shadow: var(--shadow, 0 6px 24px rgba(0,0,0,.08));
  border-radius: var(--radius-3, 14px);
}

/* -------- Footer -------- */
footer {
  margin-top: auto;
  background: var(--surface);
  padding: var(--space-4, 1rem);
  text-align: center;
  font-size: var(--fs-200, .875rem);
  color: var(--muted);
  border-top: 1px solid var(--border);
}