/* ==========================================================================
   Pat's Pizza Pasta Palace — global styles
   Palette: terracotta / olive / parchment / charcoal, warm gold accents.
   Spacing runs on an 8px base scale; type is fluid via clamp().
   ========================================================================== */

:root {
  /* Color */
  --terracotta: #b04724;
  --terracotta-dark: #8c3517;
  --olive: #55603a;
  --olive-dark: #3f4829;
  --cream: #faf6ed;
  --parchment: #f1e9d7;
  --charcoal: #2c2620;
  --charcoal-soft: #52493e;
  --gold: #c6952b;
  --gold-light: #dfb75e;
  --white: #fffdf8;

  /* Spacing scale (8px base) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;

  /* Type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --text-sm: clamp(0.875rem, 0.85rem + 0.15vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.9vw, 1.875rem);
  --text-2xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --text-hero: clamp(2.5rem, 1.6rem + 4.5vw, 5.25rem);

  --radius: 10px;
  --shadow: 0 10px 30px rgba(44, 38, 32, 0.12);
  --header-height: 4.25rem;
  --content-width: 72rem;
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--charcoal);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  color: var(--charcoal);
}

p {
  margin: 0 0 var(--space-2);
}

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

a {
  color: var(--terracotta-dark);
}

/* Visible focus for every interactive element (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--cream);
  padding: var(--space-1) var(--space-2);
  z-index: 100;
}

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

.container {
  width: min(100% - 2.5rem, var(--content-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-8);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-12);
  }
}

.section-kicker {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: var(--space-1);
}

.section-title {
  font-size: var(--text-2xl);
}

.section-intro {
  max-width: 42rem;
  font-size: var(--text-lg);
  color: var(--charcoal-soft);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px; /* mobile tap target */
  min-width: 44px;
  padding: 0.75rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.button-primary {
  background: var(--gold);
  color: var(--charcoal);
}

.button-primary:hover {
  background: var(--gold-light);
}

.button-secondary {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}

.button-secondary:hover {
  background: rgba(255, 253, 248, 0.12);
}

.button-outline {
  background: transparent;
  color: var(--terracotta-dark);
  border-color: var(--terracotta);
}

.button-outline:hover {
  background: var(--terracotta);
  color: var(--white);
}

/* ---------- Header & navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 237, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--parchment);
  box-shadow: 0 4px 20px rgba(44, 38, 32, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--charcoal);
  min-height: 44px;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--cream);
  background: var(--terracotta);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
}

.opening-badge {
  display: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive-dark);
  border: 1.5px solid var(--olive);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .opening-badge {
    display: inline-block;
  }
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
}

.site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--parchment);
  box-shadow: var(--shadow);
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  color: var(--charcoal);
}

.site-nav a:hover {
  background: var(--parchment);
  color: var(--terracotta-dark);
}

.site-nav a[aria-current="page"] {
  color: var(--terracotta-dark);
  font-weight: 600;
}

.site-nav .nav-cta {
  background: var(--gold);
  color: var(--charcoal);
  border-radius: 999px;
  justify-content: center;
  font-weight: 600;
}

.site-nav .nav-cta:hover {
  background: var(--gold-light);
  color: var(--charcoal);
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .site-nav a {
    padding: 0.5rem 0.9rem;
  }

  .site-nav .nav-cta {
    margin-left: 0.5rem;
    padding-inline: 1.25rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(92vh, 56rem);
  display: flex;
  align-items: center;
  color: var(--white);
  isolation: isolate;
  padding-block: var(--space-12) var(--space-8);
}

.hero .cdn-image {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero .cdn-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(28, 20, 14, 0.72) 0%,
    rgba(28, 20, 14, 0.45) 55%,
    rgba(28, 20, 14, 0.78) 100%
  );
}

.hero-content {
  max-width: 46rem;
}

.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--space-2);
}

.hero h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-2);
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--parchment);
  margin-bottom: var(--space-4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

/* Permit-style placard: the official-looking "Opening 2033" notice */
.permit-placard {
  max-width: 26rem;
  background: var(--cream);
  color: var(--charcoal);
  border: 2px solid var(--charcoal);
  outline: 6px solid var(--cream);
  box-shadow: var(--shadow);
  padding: var(--space-2) var(--space-3);
  transform: rotate(-1deg);
}

.permit-placard-header {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-align: center;
  color: var(--terracotta-dark);
  border-bottom: 1px solid var(--charcoal);
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
}

.permit-placard-year {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
  margin: 0;
}

.permit-placard-note {
  font-size: 0.78rem;
  text-align: center;
  color: var(--charcoal-soft);
  margin: 0.5rem 0 0;
}

/* ---------- Blur-up CDN image frames ---------- */

.cdn-image {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Oversized blur hides the upscaled placeholder's pixel edges */
.cdn-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(18px);
  transform: scale(1.1);
}

.cdn-image img {
  position: relative;
  opacity: 0;
  transition: opacity 400ms ease;
}

.cdn-image.is-loaded img {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cdn-image img {
    transition: none;
  }
}

.image-frame {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
  margin-top: var(--space-4);
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-6);
  }
}

.about-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.about-gallery .image-frame:first-child {
  grid-column: 1 / -1;
}

.about-gallery .image-frame:first-child img {
  aspect-ratio: 16 / 9;
}

.pillars {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.pillars li {
  padding-left: var(--space-3);
  position: relative;
}

.pillars li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--gold);
}

.pillars strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  display: block;
}

/* ---------- Band sections (olive / charcoal backgrounds) ---------- */

.band {
  background: var(--olive-dark);
  color: var(--cream);
}

.band .section-title,
.band h2,
.band h3 {
  color: var(--white);
}

.band .section-kicker {
  color: var(--gold-light);
}

.band .section-intro {
  color: var(--parchment);
}

/* ---------- Menu page ---------- */

.page-hero {
  position: relative;
  isolation: isolate;
  color: var(--white);
  padding-block: var(--space-12) var(--space-8);
}

.page-hero .cdn-image {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero .cdn-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(28, 20, 14, 0.68);
}

.page-hero h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 4rem);
  color: var(--white);
  margin-bottom: var(--space-1);
}

.page-hero p {
  font-size: var(--text-lg);
  color: var(--parchment);
  max-width: 40rem;
  margin: 0;
}

.menu-controls {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  margin-top: var(--space-4);
  background: var(--parchment);
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .menu-controls {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.menu-controls .field {
  margin: 0;
}

.menu-note {
  grid-column: 1 / -1;
  font-size: var(--text-sm);
  color: var(--charcoal-soft);
  margin: 0;
}

.menu-category {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--parchment);
}

.menu-category:last-child {
  border-bottom: none;
}

.menu-category h2 {
  font-size: var(--text-xl);
  margin-bottom: 0.25rem;
}

.menu-tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--olive);
  margin-bottom: var(--space-3);
}

.menu-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .menu-items {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-6);
  }
}

.menu-item-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.menu-item-name {
  font-size: var(--text-lg);
  margin: 0;
}

.menu-item-row::after {
  content: "";
  order: 1;
  flex: 1;
  border-bottom: 2px dotted rgba(44, 38, 32, 0.28);
  transform: translateY(-4px);
}

.menu-item-price {
  order: 2;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.menu-item-description {
  margin: 0.35rem 0 0;
  color: var(--charcoal-soft);
  font-size: var(--text-sm);
  max-width: 34rem;
}

#menu-empty {
  text-align: center;
  padding-block: var(--space-8);
  color: var(--charcoal-soft);
}

/* ---------- Forms ---------- */

.field {
  margin-bottom: var(--space-2);
}

.field label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  font: inherit;
  color: var(--charcoal);
  background: var(--white);
  border: 1.5px solid #b8ac96;
  border-radius: 8px;
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--terracotta);
}

.field-error {
  display: block;
  min-height: 1.25em;
  margin-top: 0.3rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--terracotta-dark);
}

.band .field-error {
  color: var(--gold-light);
}

/* Honeypot: visually removed, still in the DOM for bots to find */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-success {
  background: var(--parchment);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.form-success:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.form-success h3 {
  margin-bottom: 0.5rem;
}

.form-success p {
  margin: 0;
  color: var(--charcoal-soft);
}

.band .form-success {
  background: rgba(250, 246, 237, 0.1);
  border-left-color: var(--gold);
}

.band .form-success p {
  color: var(--parchment);
}

/* Notify section layout */
.notify-grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 1024px) {
  .notify-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

.notify-form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  .notify-form-row {
    flex-direction: row;
    align-items: flex-start;
  }

  .notify-form-row .field {
    flex: 1;
    margin-bottom: 0;
  }

  .notify-form-row .button {
    margin-top: 1.6rem; /* aligns with input below its label */
  }
}

.form-disclaimer {
  font-size: var(--text-sm);
  color: var(--parchment);
  opacity: 0.85;
  margin-top: var(--space-2);
}

/* ---------- Careers ---------- */

.careers-form {
  max-width: 40rem;
  margin-top: var(--space-4);
}

/* ---------- Under-construction (game) page ---------- */

.construction {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-12);
}

.construction-card {
  max-width: 30rem;
  background: var(--parchment);
  border: 2px dashed var(--olive);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-4);
}

.construction-card h1 {
  font-size: var(--text-2xl);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--charcoal);
  color: var(--parchment);
  padding-block: var(--space-8) var(--space-4);
  margin-top: var(--space-8);
}

.hero + .site-footer,
.band + .site-footer {
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(250, 246, 237, 0.18);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-6);
  }
}

.footer-brand .brand-name {
  color: var(--white);
  font-size: var(--text-lg);
}

.footer-disclaimer {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: #c9beac;
  max-width: 28rem;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--space-2);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--parchment);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  font-size: var(--text-sm);
  color: #c9beac;
}

.footer-easter-egg {
  color: #c9beac;
  text-decoration: none;
  border-bottom: 1px dotted #c9beac;
}

.footer-easter-egg:hover {
  color: var(--gold-light);
}

/* ---------- Scroll reveals ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 550ms ease, transform 550ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button,
  .nav-toggle-bar {
    transition: none;
  }
}
