/* ==========================================================================
   CHIMAERA — Global reset & base layout
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--color-pale);
  color: var(--color-ink);
  font-family: var(--font-text);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

/* Visually hidden but available to assistive tech */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-s);
  z-index: 1000;
  padding: var(--space-2xs) var(--space-s);
  background: var(--color-ink);
  color: var(--color-white);
  transition: top var(--duration-fast) var(--ease-editorial);
}

.skip-link:focus {
  top: var(--space-s);
}

/* Consistent, visible focus ring everywhere — never suppressed */
:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 3px;
}

body.nav-open {
  overflow: hidden;
}

/* ---- Page shell ---- */
.page {
  position: relative;
  min-height: 100svh;
}

/* Atmosphere canvas sits behind everything, persistent, non-interactive */
#atmosphere-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Large viewport: covers the screen with the phone's browser bar shown
     or hidden, so scrolling never resizes (and wipes) the canvas. */
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
}

.site-content {
  position: relative;
  z-index: 1;
}

/* ---- Editorial grid primitives ---- */
.grid-50 {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 64rem) {
  .grid-50 {
    grid-template-columns: 1fr 1fr;
    min-height: 100svh;
  }

  .grid-50--ruled {
    position: relative;
  }

  .grid-50--ruled::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: var(--rule-width);
    background: currentColor;
    opacity: 0.25;
  }
}

.grid-50__half {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--page-margin);
}

.grid-50__half--image {
  padding: 0;
  min-height: 60svh;
}

@media (min-width: 64rem) {
  .grid-50__half--image {
    min-height: 100%;
  }
}

.grid-50__half--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 60svh;
}

@media (min-width: 64rem) {
  .grid-50__half--image img {
    min-height: 100svh;
  }
}

.field-coral {
  background: var(--color-coral);
  /* ink beats white here too — 4.54:1 vs 3.84:1 against this coral — so it inherits the body default */
}

.field-pale {
  background: transparent;
  color: var(--color-ink);
}

.field-transparent {
  background: transparent;
}

/*
 * Like .field-transparent, but also opts into live luminance sampling
 * for the fixed header (see js/header-theme.js) — use this on any
 * section where the persistent atmosphere itself, not a solid field
 * colour, is what's directly behind the header. .landing gets the
 * same treatment by name for historical reasons; this is the general
 * form any other page can use.
 */
.field-atmosphere {
  background: transparent;
}

.hairline {
  border: 0;
  height: var(--rule-width);
  background: currentColor;
  opacity: 0.3;
  margin: 0;
}

.container {
  padding-inline: var(--page-margin);
}

/* ==========================================================================
   STAMP — "Sold out"
   ==========================================================================

   One stamp everywhere (next-event strip, event cards, past posters).
   Never rotated; on posters it sits inside the top-left corner.
   Spec: docs/HOMEPAGE-SPEC.md §1.
   ========================================================================== */

.stamp {
  display: inline-block;

  padding: var(--space-3xs) var(--space-2xs);

  background: var(--color-coral-deep);
  color: var(--color-pale-warm);

  font-family: var(--font-micro);
  font-size: var(--text-small);
  font-weight: 700;
  line-height: 1.2;

  letter-spacing: 0.1em;
  text-transform: uppercase;
}
