/* ============================================================
   Fabbrica di Pizza — Main Design System
   Neon Warmth
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("/assets/fonts/SpaceMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Backgrounds */
  --c-ink: #0B0A0C;
  --c-ink-2: #16131A;
  --c-ink-3: #221E28;
  --c-line: #2A2530;
  --c-line-soft: #1E1A24;

  /* Primary accent */
  --c-flame: #FF6B2C;
  --c-flame-deep: #E04B12;
  --c-flame-glow: rgba(255, 107, 44, 0.45);
  --c-flame-dim: rgba(255, 107, 44, 0.15);

  /* Secondary accent */
  --c-gold: #E8B44A;
  --c-gold-dim: rgba(232, 180, 74, 0.25);

  /* Dietary accent */
  --c-basil: #7FB069;
  --c-basil-dim: rgba(127, 176, 105, 0.2);

  /* Text */
  --c-cream: #F7F1E8;
  --c-cream-2: #D8CFC1;
  --c-muted: #8A8290;

  /* Semantic */
  --c-danger: #E05252;
  --c-success: #7FB069;

  /* Backward-compatible aliases */
  --c-obsidian: var(--c-ink);
  --c-charcoal: var(--c-ink-2);
  --c-neon: var(--c-flame);
  --c-neon-dim: var(--c-flame-dim);
  --c-grey: var(--c-muted);

  /* Typography */
  --f-heading: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "Space Mono", ui-monospace, monospace;

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --space-7: 8rem;

  /* Shape */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  /* Layout */
  --container: 1320px;
  --container-narrow: 820px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--c-ink);
  background-image:
    radial-gradient(
      1200px 600px at 50% -10%,
      rgba(255, 107, 44, 0.06),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 90% 110%,
      rgba(232, 180, 74, 0.04),
      transparent 60%
    );
  background-attachment: fixed;
  color: var(--c-cream);
  font-family: var(--f-body);
  font-size: clamp(15px, 1vw, 16px);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

iframe {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--c-flame);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
}

::selection {
  background: var(--c-flame);
  color: #FFFFFF;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-3);
  color: var(--c-cream);
  font-family: var(--f-heading);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
}

h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
}

p {
  margin: 0 0 var(--space-3);
}

ul,
ol {
  margin-top: 0;
}

ul {
  padding: 0;
  list-style: none;
}

/* ---------- Accessibility ---------- */
.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;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--c-flame);
  color: var(--c-ink);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--c-flame);
  outline-offset: 3px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section__head {
  max-width: 720px;
  margin-bottom: var(--space-5);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 var(--space-2);
  color: var(--c-gold);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

.section__label::before {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--c-gold), transparent);
}

.section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
}

.section__sub {
  max-width: 60ch;
  margin: var(--space-2) 0 0;
  color: var(--c-cream-2);
}

/* ---------- Prose ---------- */
.prose {
  color: var(--c-cream-2);
  font-size: 1.0625rem;
}

.prose p {
  margin-bottom: var(--space-3);
  color: var(--c-cream-2);
}

.prose h2 {
  margin-top: var(--space-5);
  color: var(--c-cream);
  font-size: 1.5rem;
}

.prose .lead {
  color: var(--c-cream);
  font-size: 1.25rem;
}

.prose a {
  color: var(--c-gold);
  text-decoration: underline;
  text-decoration-color: var(--c-gold-dim);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--c-gold);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  html {
    scroll-padding-top: 64px;
  }

  body {
    background-attachment: scroll;
  }
}