/**
 * Studio 360 — Base reset, typography, utilities
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

::selection {
  background: rgba(212, 175, 55, 0.35);
  color: var(--s360-white);
}

body.s360-body {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  font-family: var(--s360-font-body);
  font-size: var(--s360-step-0);
  line-height: 1.7;
  color: var(--s360-white);
  background-color: var(--s360-bg);
  -webkit-font-smoothing: antialiased;
}

/* Subtle film grain — fixed overlay */
body.s360-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: var(--s360-noise);
  background-repeat: repeat;
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

body.s360-body > *:not(.s360-header):not(.s360-modal) {
  position: relative;
  z-index: 1;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--s360-gold);
  text-decoration: none;
  transition: color var(--s360-duration) var(--s360-ease-out);
}

a:hover {
  color: var(--s360-gold-hover);
}

a:focus-visible {
  outline: 2px solid var(--s360-gold);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--s360-font-heading);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.65em;
}

h1 {
  font-size: var(--s360-step-5);
  line-height: 1.08;
}

h2 {
  font-size: var(--s360-step-4);
  line-height: 1.1;
}

h3 {
  font-size: var(--s360-step-3);
  line-height: 1.15;
}

h4 {
  font-size: var(--s360-step-2);
  line-height: 1.2;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.s360-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.s360-site-main {
  flex: 1;
  width: 100%;
}

.s360-container {
  width: var(--s360-container);
  margin-inline: auto;
}

.s360-section {
  padding-block: clamp(3rem, 5vw + 1rem, 5.5rem);
}

.s360-text-muted {
  color: var(--s360-white-muted);
}

.s360-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s var(--s360-ease-out),
    transform 0.65s var(--s360-ease-out);
  transition-delay: calc(var(--s360-stagger, 0) * var(--s360-stagger-base));
  animation: s360-reveal-fallback 0s 1.5s forwards;
}

.s360-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

@keyframes s360-reveal-fallback {
  to { opacity: 1; transform: translateY(0); }
}

/* Decorative label (replaces emoji in headings where needed) */
.s360-label-dot {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 0.5em;
  vertical-align: 0.15em;
  border-radius: 50%;
  background: var(--s360-gradient-gold);
  box-shadow: var(--s360-glow-gold);
}

@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;
  }

  .s360-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
