/* ==========================================================================
   Art's Varsity Pizza — styles.css
   Mobile-first. No frameworks, no build step. Edit directly.
   ========================================================================== */

:root {
  /* Palette. --red is taken from the original logo artwork, deepened so it
     reads as painted sign enamel rather than flat screen red. */
  --red:        #c9231a;
  --red-deep:   #8e1610;
  --char:       #141110;   /* warm near-black: the dusk photograph */
  --char-soft:  #2a2321;
  --cream:      #f6eee0;   /* paper plate */
  --cream-edge: #e4d6c0;
  --gold:       #e9a93c;   /* the lit sign out front */
  --white:      #ffffff;
  --ink:        #241c1a;
  --ink-muted:  #6b5c57;

  --shell: 100%;
  --gutter: 1.25rem;

  --display: "Alfa Slab One", "Rockwell", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --bar-h: 4.25rem;   /* height of the sticky call bar on phones */
}

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

html {
  -webkit-text-size-adjust: 100%;   /* stop iOS inflating text in landscape */
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;       /* so anchors clear the sticky header */
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;             /* 17px floor — readable without zoom */
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* room for the fixed call bar */
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.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; left: 0.5rem; top: -4rem;
  background: var(--white); color: var(--ink);
  padding: 0.75rem 1rem; border-radius: 0 0 6px 6px;
  z-index: 100; font-weight: 700; transition: top 0.15s;
}
.skip-link:focus { top: 0; }

.shell {
  width: min(100% - (var(--gutter) * 2), 68rem);
  margin-inline: auto;
}

/* -------------------------------------------------------------- header -- */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--red);
  border-bottom: 3px solid var(--red-deep);
}

.masthead__inner {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 3.5rem;
  width: min(100% - 1.5rem, 68rem);
  margin-inline: auto;
}

.masthead__logo { flex: 0 0 auto; line-height: 0; }
.masthead__logo img { width: 2.5rem; height: auto; }

.masthead__name {
  display: none;                    /* phones: the logo already says it, and
                                       the nav needs the width */
  font-family: var(--display);
  font-size: 1.0625rem;
  color: var(--white);
  white-space: nowrap;
  margin-right: auto;
}

.masthead__logo { margin-right: auto; }

/* Horizontal, thumb-reachable nav. No hamburger: four links fit, and a
   visible link always beats a menu that has to be opened first. */
.masthead__nav {
  display: flex; gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.masthead__nav::-webkit-scrollbar { display: none; }

.masthead__nav a {
  display: flex; align-items: center;
  padding: 0.5rem 0.7rem;
  min-height: 2.75rem;             /* 44px tap target */
  color: var(--white);
  text-decoration: none;
  font-weight: 600; font-size: 0.9375rem;
  white-space: nowrap;
  border-radius: 999px;
}
.masthead__nav a:hover { background: rgba(0, 0, 0, 0.18); }

/* ---------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  display: grid; place-items: center;
  min-height: min(82svh, 40rem);
  padding: 2.5rem var(--gutter) 3rem;
  background: var(--char);
  text-align: center;
  overflow: hidden;
}

.hero__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(125% 80% at 50% 40%, rgba(20, 17, 16, 0.12) 0%, rgba(20, 17, 16, 0.62) 78%),
    linear-gradient(to bottom, rgba(20, 17, 16, 0.45), rgba(20, 17, 16, 0.32) 38%, rgba(20, 17, 16, 0.82));
}

.hero__inner { position: relative; z-index: 1; max-width: 34rem; }

.hero__mark { margin: 0 0 1rem; }
.hero__mark img {
  width: min(50vw, 12.5rem);
  margin-inline: auto;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6));
}

.hero__line {
  color: #f3e8dc;
  font-size: 1.0625rem;
  margin: 0 0 1.25rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.hero__cta { display: grid; gap: 0.625rem; }

/* -------------------------------------------------------------- status -- */
/* Filled in by app.js from the hours table. */
.status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(20, 17, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--cream);
  font-size: 0.9375rem; font-weight: 600;
}
.status__dot {
  width: 0.625rem; height: 0.625rem; border-radius: 50%;
  background: var(--ink-muted); flex: 0 0 auto;
}
.status[data-open="yes"] .status__dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(233, 169, 60, 0.25);
}

/* ------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;              /* 52px — comfortable for thumbs */
  padding: 0.5rem 1.5rem;
  font-family: var(--body);
  font-size: 1.0625rem; font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.btn svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }

.btn--primary {
  background: var(--red); color: var(--white);
  border-color: var(--red-deep);
  box-shadow: 0 3px 0 var(--red-deep);
}
.btn--primary:hover { background: #d92a20; }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--red-deep); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.18); }

.btn--dark {
  background: var(--char); color: var(--cream);
  border-color: var(--char);
}
.btn--dark:hover { background: var(--char-soft); }

/* ------------------------------------------------------------ sections -- */
.section { padding: 3.25rem 0; }
.section--menu  { background: var(--cream); }
.section--visit { background: var(--char); color: var(--cream); }
.section--story { background: var(--white); }

.menu__banner {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 55%;
  border-radius: 10px;
  margin-bottom: 1.75rem;
}

.section__title {
  font-size: clamp(1.9rem, 8vw, 2.75rem);
  margin-bottom: 0.5rem;
}
.section--menu .section__title { color: var(--red); }

.section__note {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.section--visit .section__note { color: #cbbcb4; }

/* ---------------------------------------------------------- menu sizes -- */
.sizes {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  list-style: none; padding: 0; margin: 0 0 1.5rem;
}
.sizes li {
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--cream-edge);
  background: var(--white);
  border-radius: 999px;
  font-weight: 700; font-size: 0.9375rem;
}

/* ----------------------------------------------------------- menu tabs -- */
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab {
  min-height: 3rem;                 /* 48px */
  padding: 0.5rem 0.4rem;
  font-family: var(--body);
  font-size: clamp(0.875rem, 3.6vw, 1rem); font-weight: 700;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--cream-edge);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.tab[aria-selected="true"] {
  background: var(--red);
  border-color: var(--red-deep);
  color: var(--white);
}

.tabpanel[hidden] { display: none; }

/* ---------------------------------------------------------- menu items -- */
.dish {
  padding: 1rem 0;
  border-bottom: 1px solid var(--cream-edge);
}
.dish:last-child { border-bottom: 0; }

.dish__name {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 0.15rem;
}
.dish__desc { margin: 0; color: var(--ink-muted); font-size: 1rem; }

.flag {
  font-family: var(--body);
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white); background: var(--red);
  padding: 0.15rem 0.5rem; border-radius: 999px;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------- hours -- */
.hours { list-style: none; padding: 0; margin: 0 0 2rem; }

.hours li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.hours li:last-child { border-bottom: 0; }

.hours li[data-today] {
  background: rgba(233, 169, 60, 0.14);
  border-bottom-color: transparent;
  color: var(--white);
}
.hours .day { font-weight: 700; }
.hours [data-today] .day::after {
  content: " — today";
  font-weight: 400; color: var(--gold);
}

/* --------------------------------------------------------------- visit -- */
.visit__grid { display: grid; gap: 2.25rem; }

.visit__address {
  font-style: normal;
  font-size: 1.125rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}
.visit__address a { color: var(--gold); }

.visit__actions { display: grid; gap: 0.625rem; margin-bottom: 1.5rem; }

.visit__aerial {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.deliver {
  margin: 0;
  padding: 1rem 1.1rem;
  background: rgba(233, 169, 60, 0.1);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: 1rem;
}

/* --------------------------------------------------------------- story -- */
.story__body { max-width: 46rem; }   /* keeps the portrait beside its text
                                        rather than stranded at the page edge */
.story p { margin: 0 0 1.1rem; }

.story__poppie {
  /* Phones: sit above the prose. Floating it here squeezes the text into a
     ~190px column, which is far too narrow to read comfortably. */
  display: block;
  width: 9.5rem;
  margin: 0 0 1.25rem;
}
.story__poppie img {
  width: 100%;
  aspect-ratio: 1;              /* source is 4:3 — crop, don't squash */
  object-fit: cover;
  object-position: 52% 32%;     /* keeps him centred in the circle */
  border-radius: 50%;
  border: 4px solid var(--cream);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.story__caption {
  clear: both;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
}

/* -------------------------------------------------------------- footer -- */
.footer {
  background: var(--red);
  color: var(--white);
  padding: 2.5rem 0 2rem;
  text-align: center;
}
.footer a { color: var(--white); }
.footer__name { font-family: var(--display); font-size: 1.5rem; margin-bottom: 0.5rem; }
.footer__nap { margin: 0 0 1.25rem; line-height: 1.7; }

.social { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.social a {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}
.social img { width: 1.4rem; height: 1.4rem; }

.footer__fine {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

/* ------------------------------------------------- sticky call bar (mobile) */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1.35fr 1fr;
  background: var(--char);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
}

.actionbar a {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--bar-h);
  color: var(--white);
  text-decoration: none;
  font-weight: 700; font-size: 1.0625rem;
}
.actionbar a:first-child { background: var(--red); }
.actionbar svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

/* ---------------------------------------------------------- wider screens */
@media (min-width: 34em) {
  .story__poppie {
    float: right;
    width: 8.5rem;
    margin: 0 0 0.75rem 1.25rem;
  }
}

@media (min-width: 40em) {
  :root { --gutter: 2rem; }
  .hero__cta { display: flex; justify-content: center; flex-wrap: wrap; }
  .visit__actions { display: flex; flex-wrap: wrap; }
  .section { padding: 4.5rem 0; }
}

@media (min-width: 56em) {
  body { padding-bottom: 0; }          /* call bar is hidden at this width */
  .actionbar { display: none; }
  .masthead__inner { min-height: 4rem; }
  .masthead__logo img { width: 2.9rem; }
  .masthead__name { display: block; font-size: 1.25rem; }
  .masthead__nav a { font-size: 1rem; padding: 0.5rem 1rem; }
  .hero { min-height: min(78svh, 44rem); }
  .hero__mark img { width: 18rem; }
  .hero__line { font-size: 1.25rem; }
  .visit__grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 3rem; }
  .section__title { font-size: 3rem; }
  .tabs { grid-template-columns: repeat(3, max-content); }
  .tab { padding: 0.5rem 1.5rem; }
  .dish__name { font-size: 1.4rem; }
  .story__poppie { width: 11rem; }
}

/* Print: give people a menu they can stick on the fridge. */
@media print {
  .masthead, .actionbar, .hero__cta, .visit__actions, .social { display: none; }
  body { background: #fff; color: #000; padding: 0; }
  .section--visit { background: #fff; color: #000; }
  .tabpanel[hidden] { display: block !important; }
}
