/* =====================================================================
   Scituate Pizza Company
   Palette is pulled from the sign: brick, cream, oven-black, ember gold.
   ===================================================================== */

:root {
  --cream: #F7EDE0;
  --white: #FFFDF8;
  --ink: #2B2320;
  --brick: #C1432D;
  --brick-dark: #9E3220;
  --basil: #4B5D3A;
  --gold: #D9A441;
  --rule: rgba(43, 35, 32, 0.18);
  --rule-light: rgba(255, 253, 248, 0.25);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }

p { margin: 0 0 1em; max-width: 62ch; }
a { color: inherit; }
ul { padding: 0; }
img { max-width: 100%; height: auto; }

code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(43, 35, 32, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* Keyboard users need to see where they are. */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Anchor links land below the sticky header instead of under it. */
[id] { scroll-margin-top: 6rem; }

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

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 3px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--brick); color: var(--white); border-color: var(--brick); }
.btn-primary:hover { background: var(--brick-dark); border-color: var(--brick-dark); }
.btn-outline { border-color: currentColor; background: transparent; }
.btn-outline:hover { background: rgba(43, 35, 32, 0.06); }
.btn-full { width: 100%; }
.btn-lg { font-size: 1.1rem; padding: 1em 2em; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   Top bars
   --------------------------------------------------------------------- */
.setup-bar {
  background: var(--gold);
  color: var(--ink);
  font-size: 0.88rem;
  padding: 0.7rem 1.5rem;
  text-align: center;
}
.setup-bar code { background: rgba(43, 35, 32, 0.15); }

.announce-bar {
  background: var(--ink);
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  text-align: center;
}

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  position: relative;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.wordmark-mark { width: 46px; height: auto; display: block; flex-shrink: 0; }
.wordmark-text {
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  line-height: 0.88;
  display: block;
}
.wordmark-line1 { display: block; font-weight: 800; font-size: 1.45rem; letter-spacing: 0.01em; }
.wordmark-line2 { display: block; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.34em; }

.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.site-nav a:hover { color: var(--brick); }
.nav-order {
  background: var(--brick);
  color: var(--white) !important;
  padding: 0.55em 1.2em;
  border-radius: 3px;
}
.nav-order:hover { background: var(--brick-dark); color: var(--white) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { width: 24px; height: 3px; background: var(--ink); display: block; }

@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.25rem;
    gap: 1rem;
    border-bottom: 2px solid var(--ink);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .nav-toggle { display: flex; }
}

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero { padding: 4.5rem 1.5rem 4rem; }
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-sub { font-size: 1.15rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hero-art img { width: 100%; max-width: 340px; display: block; margin: 0 auto; }

@media (max-width: 900px) {
  .hero { padding-top: 3rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 230px; }
}

/* ---------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------- */
.section-inner { max-width: var(--max-width); margin: 0 auto; padding: 4.5rem 1.5rem; }
.section-sub { font-size: 1.05rem; opacity: 0.85; }

.sandwiches { background: var(--brick); color: var(--white); }
.sandwiches h2, .sandwiches .section-sub { color: var(--white); }

.story { background: var(--ink); color: var(--cream); }
.story-lead { font-size: 1.3rem; font-weight: 600; }

/* ---------------------------------------------------------------------
   Menu lists
   --------------------------------------------------------------------- */
.menu-list { list-style: none; margin: 2rem 0 0; }
.menu-list > li { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.menu-list--inverted > li { border-bottom-color: var(--rule-light); }

.menu-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; }
.menu-name { font-weight: 700; font-size: 1.1rem; min-width: 0; }
.menu-tag { display: block; font-weight: 400; font-size: 0.88rem; opacity: 0.72; margin-top: 0.2rem; }

/* One or two price columns, aligned in a grid so the decimals line up. */
.menu-prices { display: flex; gap: 1.25rem; flex-shrink: 0; }
.menu-price {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.menu-list--sized .menu-price { min-width: 4.2rem; text-align: right; }

.menu-sizes-head {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: 0 0 0.4rem !important;
  border-bottom: none !important;
}
.menu-size-label {
  min-width: 4.2rem;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

.menu-note { margin-top: 1.1rem; font-size: 0.9rem; opacity: 0.72; }
.menu-note--after { margin-top: 1.25rem; }
.menu-fineprint {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  opacity: 0.7;
}
.menu-fineprint p { margin: 0 0 0.35rem; }

/* Menu bands on the home page */
.menu-band--inverted { background: var(--brick); color: var(--white); }
.menu-band--inverted h2,
.menu-band--inverted .section-sub,
.menu-band--inverted .menu-note { color: var(--white); }

/* What's new */
.whats-new { background: var(--ink); color: var(--cream); }
.new-grid {
  list-style: none;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.new-grid h3 {
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.5rem;
  margin: 0 0 0.4rem;
  color: var(--gold);
}
.new-grid p { margin: 0; opacity: 0.85; }
@media (max-width: 800px) { .new-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* More menu prompt */
.more-menu-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.more-menu-inner h2 { margin-bottom: 0.3rem; }
.more-menu-inner p { margin: 0; }

.story-kicker {
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
  margin-top: 1.5rem;
}

/* ---------------------------------------------------------------------
   Visit
   --------------------------------------------------------------------- */
.visit-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; }
.visit-address { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.75rem; }
.visit-phone { font-size: 1.2rem; font-weight: 600; }
.visit-phone a { text-decoration: none; color: var(--brick); }
.hours-list { list-style: none; margin: 1.5rem 0 0; }
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 800px) { .visit-inner { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 3.5rem 1.5rem 2rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.footer-logo { width: 100%; max-width: 190px; display: block; }
.footer-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
  opacity: 0.7;
}
.footer-line { margin: 0 0 0.35rem; opacity: 0.9; }
.footer-line a { text-decoration: none; border-bottom: 1px solid var(--rule-light); }
.footer-social a { margin-right: 1rem; }
.footer-cta { margin-top: 1.25rem; }
.footer-copy {
  text-align: center;
  margin: 2.5rem auto 0;
  font-size: 0.85rem;
  opacity: 0.55;
}
@media (max-width: 800px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-logo { max-width: 150px; }
}

/* ---------------------------------------------------------------------
   Order page
   --------------------------------------------------------------------- */
.order-page { padding: 3rem 1.5rem 5rem; }
.order-inner { max-width: var(--max-width); margin: 0 auto; }

.order-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; margin-top: 2rem; }
.order-section-head { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 2.5rem; }
.order-section-head:first-child { margin-top: 0; }

.order-items { list-style: none; margin: 1rem 0 0; }
.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--rule);
  padding: 0.9rem 0;
  gap: 1.5rem;
}
.order-item-text { min-width: 0; padding-top: 0.25rem; }
.order-item .menu-name { display: block; font-size: 1.05rem; }

/* One row per price: a small and a large are two different things to
   say on the phone, so each gets its own counter. */
.order-item-sizes { display: flex; flex-direction: column; gap: 0.4rem; flex-shrink: 0; }
.size-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}
.size-row.is-added { background: rgba(217, 164, 65, 0.22); }
.size-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  min-width: 1.9rem;
}
.size-price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 3.6rem;
  text-align: right;
}
.size-row--static { opacity: 0.75; padding-right: 0.35rem; }

.menu-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
}
.menu-jump a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4em 0.9em;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.menu-jump a:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.order-section { margin-bottom: 3rem; }
.order-section-head { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.3rem; }
.order-section-blurb { font-size: 0.95rem; opacity: 0.8; }

.order-summary {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 1.5rem;
  align-self: start;
  position: sticky;
  top: 6rem;
}
.cart-list { list-style: none; margin: 0 0 1rem; }
.cart-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; font-size: 0.95rem; }
.cart-empty { opacity: 0.6; font-size: 0.9rem; }
.cart-total-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
  border-top: 2px solid var(--ink);
  padding-top: 0.75rem;
  margin-bottom: 0.75rem;
}
.cart-fineprint { font-size: 0.8rem; opacity: 0.65; margin-bottom: 1rem; }

.order-review { max-width: 560px; }
.confirm-eyebrow {
  color: var(--brick);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}
.order-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.order-handoff { max-width: 640px; }
.order-embed { margin-top: 2rem; min-height: 300px; }
.order-powered { font-size: 0.85rem; opacity: 0.6; margin-top: 1.5rem; }
.order-warning {
  background: var(--gold);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  font-size: 0.92rem;
  max-width: 60ch;
}

@media (max-width: 860px) {
  .order-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}

/* ---------------------------------------------------------------------
   Narrow screens: give the item name the full width and put the prices
   on their own line, so descriptions stop wrapping into a ribbon.
   --------------------------------------------------------------------- */
.menu-price-label { display: none; }

@media (max-width: 620px) {
  /* Printed menu lists */
  .menu-row { flex-direction: column; align-items: stretch; gap: 0.45rem; }
  .menu-prices { justify-content: flex-start; gap: 1.5rem; }
  .menu-list--sized .menu-price { min-width: 0; text-align: left; }
  .menu-sizes-head { display: none; }
  .menu-price-label {
    display: inline;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-right: 0.15rem;
  }

  /* Order builder */
  .order-item { flex-direction: column; align-items: stretch; gap: 0.7rem; }
  .order-item-text { padding-top: 0; }
  .order-item-sizes { width: 100%; }
  .size-row { justify-content: flex-start; gap: 0.7rem; padding-left: 0; }
  .size-price { min-width: 4rem; text-align: left; }
  .size-row .qty-control { margin-left: auto; }
  .size-row--static { padding-left: 0; }
}
