/* =============================================================
   Majik Pizza — Base layer
   Design tokens, reset, typography, layout primitives.
   ============================================================= */

:root {
  /* Brand palette — sampled from the Majik Pizza printed menu */
  --red: #c8202e;
  --red-dark: #a4161f;
  --red-bright: #e63329;
  --green: #57ae47;
  --green-dark: #3f8c33;
  --cream: #f2efe4;
  --cream-deep: #e7e2d1;
  --charcoal: #2b2e34;
  --ink: #14161a;
  --white: #ffffff;

  /* Semantic */
  --bg: var(--white);
  --text: var(--ink);
  --muted: #5d636e;
  --rule: rgba(20, 22, 26, 0.12);

  /* Type */
  --font-display: "Barlow Condensed", "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-script: "Yellowtail", "Brush Script MT", cursive;

  /* Spacing / layout */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1240px;
  --max-narrow: 820px;
  --header-h: 92px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

@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;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}

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

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

/* ---------- Typography ---------- */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.6rem, 7vw, 5.25rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); }
h4 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h5 { font-size: 1.05rem; letter-spacing: 0.08em; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.7;
  color: var(--muted);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.75rem;
}

.script { font-family: var(--font-script); text-transform: none; }
.t-red { color: var(--red); }
.t-green { color: var(--green); }
.t-center { text-align: center; }

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--max-narrow); }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--cream { background: var(--cream); }
.section--dark { background: var(--ink); color: var(--white); }
.section--dark .lede { color: rgba(255, 255, 255, 0.72); }

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2.25rem); }

@media (min-width: 760px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Accessibility ---------- */

.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 {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 999;
  background: var(--red);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

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

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}
