/* ============================================================
   PizzaLayer Site — Global Reset & Base Styles
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--void);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── Inner Column ─────────────────────────────────────── */
.inner {
  width: 100%;
  max-width: var(--inner);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Sections ─────────────────────────────────────────── */
section { position: relative; }

.section-dark  { background: var(--dark); }
.section-deep  { background: var(--deep); }
.section-void  { background: var(--void); }
.section-light { background: var(--light-bg); color: var(--text-dark); }
.section-white { background: var(--light-surface); color: var(--text-dark); }
.section-panel { background: var(--panel); }
.section-grad  { background: var(--grad-violet); }

.py-xs  { padding-block: 40px; }
.py-sm  { padding-block: 60px; }
.py-md  { padding-block: 80px; }
.py-lg  { padding-block: 120px; }
.py-xl  { padding-block: 160px; }

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400; /* Bungee has one weight */
  line-height: 1.1;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
h4 { font-size: 1.15rem; }

p { line-height: 1.75; }

.label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.7;
  color: var(--text-secondary);
}

.lead-dark { color: var(--text-dark-sub); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all var(--mid) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-orange);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255,107,53,0.55);
}

.btn-ghost {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur-sm);
}
.btn-ghost:hover {
  background: var(--glass-bg-med);
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--light-border);
}
.btn-outline-dark:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn-sm { padding: 10px 20px; font-size: 0.82rem; }
.btn-lg { padding: 18px 40px; font-size: 1rem; }

/* ── Cards / Glass ───────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

.glass-card:hover {
  border-color: var(--border-bright);
  background: var(--glass-bg-med);
  transform: translateY(-3px);
  transition: all var(--mid) var(--ease);
}

.card-light {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  padding: 32px;
  transition: all var(--mid) var(--ease);
}
.card-light:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

/* ── Badge / Tag ─────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.badge-orange { background: var(--orange-dim); color: var(--orange); border: 1px solid var(--border-orange); }
.badge-dark   { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-light  { background: rgba(255,107,53,0.08); color: var(--orange); border: 1px solid rgba(255,107,53,0.2); }

/* ── Divider ─────────────────────────────────────────── */
.divider { width: 100%; height: 1px; background: var(--border); }
.divider-light { background: var(--light-border); }

/* ── Noise / Grain Overlay ───────────────────────────── */
.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.noise-overlay > * { position: relative; z-index: 1; }

/* ── Glow Orb ────────────────────────────────────────── */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.glow-orb-orange { background: rgba(255,107,53,0.18); }
.glow-orb-violet { background: rgba(110,60,200,0.15); }

/* ── Section Header ──────────────────────────────────── */
.section-header { margin-bottom: 60px; }
.section-header .label { margin-bottom: 12px; }
.section-header h2 { margin-bottom: 20px; }
.section-header .lead { max-width: 560px; }
.section-header.centered {
  text-align: center;
}
.section-header.centered .lead { margin-inline: auto; }

/* ── Grid Helpers ────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── Flex Helpers ────────────────────────────────────── */
.flex      { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm { gap: 12px; }
.flex-gap-md { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }

/* ── Misc ────────────────────────────────────────────── */
.text-orange { color: var(--orange); }
.text-center { text-align: center; }
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 32px; }
.mt-lg { margin-top: 60px; }
.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 32px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Highlight Box ───────────────────────────────────── */
.highlight-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--orange-dim);
  border: 1px solid var(--border-orange);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--orange-light);
}
.highlight-box-dark {
  background: rgba(255,107,53,0.06);
  color: var(--orange);
  border-color: rgba(255,107,53,0.15);
}

/* ── Code Inline ─────────────────────────────────────── */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255,107,53,0.1);
  color: var(--orange-light);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ── Scroll Reveal ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Flash Messages ──────────────────────────────────── */
.flash-message {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}
.flash-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.flash-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ── Form Styles ─────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 8px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 13px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--fast), box-shadow var(--fast);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 130px; }

/* Light form variant */
.form-light .form-group label { color: var(--text-dark-sub); }
.form-light .form-group input,
.form-light .form-group textarea,
.form-light .form-group select {
  background: var(--light-surface);
  border-color: var(--light-border);
  color: var(--text-dark);
}
.form-light .form-group input:focus,
.form-light .form-group textarea:focus {
  border-color: var(--orange);
}
.form-light .form-group input::placeholder,
.form-light .form-group textarea::placeholder { color: var(--text-dark-mute); }

/* ── Responsive Utilities ────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  h1 { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .py-lg { padding-block: 80px; }
  .py-xl { padding-block: 100px; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ── Accessibility Utilities ─────────────────────────── */

/* Screen-reader-only utility */
.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 navigation link */
.skip-to-main {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top 0.15s;
}
.skip-to-main:focus {
  top: 16px;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Visible focus ring for keyboard users (not hidden by default on dark bg) */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* Respect reduced motion preference */
@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;
  }
}

/* ── Toggle / UI control buttons (Google Sans) ───────────────────────────── */
.btn-toggle,
[data-toggle],
.tab-btn,
.filter-btn,
.section-toggle {
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.01em;
}
