/* ==========================================================================
   Base — reset, typography, layout shell
   ========================================================================== */

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--color-text);
  background: var(--gradient-app-bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur-slow) var(--ease-out), color var(--dur-slow) var(--ease-out);
}

/* Ambient background texture: soft floating candle-glow orbs */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}
body::before {
  width: 260px; height: 260px;
  top: -60px; right: -40px;
  background: var(--color-gold);
}
body::after {
  width: 320px; height: 320px;
  bottom: 10%; left: -80px;
  background: var(--color-coral);
  opacity: 0.28;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 var(--space-2);
  letter-spacing: 0.2px;
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--space-3); color: var(--color-text-muted); }

a { color: inherit; text-decoration: none; }

button, input, select { font-family: inherit; }

::selection { background: var(--color-gold); color: var(--color-bg-deep); }

/* App shell: mobile-first single column, capped width on larger screens */
.app-shell {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  padding: calc(var(--space-5) + var(--safe-top)) var(--space-5) calc(var(--nav-height) + var(--space-6) + var(--safe-bottom));
  position: relative;
}

@media (min-width: 768px) {
  .app-shell { max-width: 600px; padding-top: var(--space-7); }
}
@media (min-width: 1200px) {
  .app-shell { max-width: 680px; }
}

.material-icons,
.material-symbols-rounded {
  font-size: 22px;
  vertical-align: middle;
  line-height: 1;
}

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

/* Respect reduced motion preference across the whole app */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible keyboard focus ring everywhere, styled to match the brand */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
