/* ==========================================================================
   Bobby's Pizza — main stylesheet
   Brand colours and type come from the restaurant's own identity; all
   content on the pages is injected live from the SIPO API.
   ========================================================================== */

/* ---------- fonts ---------- */
@font-face { font-family:'Body Sans'; src:url('../fonts/body-400.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Body Sans'; src:url('../fonts/body-500.woff2') format('woff2'); font-weight:500; font-display:swap; }
@font-face { font-family:'Body Sans'; src:url('../fonts/body-700.woff2') format('woff2'); font-weight:700; font-display:swap; }
@font-face { font-family:'Body Sans'; src:url('../fonts/body-800.woff2') format('woff2'); font-weight:800; font-display:swap; }
@font-face { font-family:'Display Title'; src:url('../fonts/display-title.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Script Accent'; src:url('../fonts/script-accent.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Label Sans'; src:url('../fonts/label-sans.ttf') format('truetype'); font-weight:400; font-display:swap; }

/* ---------- tokens ---------- */
:root {
  --red: #ac0202;
  --red-dark: #8a0101;
  --green: #4ab74a;
  --green-deep: #17a352;
  --yellow: #fab919;
  --cream: #f5f5ef;
  --ink: #2d3332;
  --muted: #5d6462;
  --line: rgba(45, 51, 50, .12);
  --shadow: 0 10px 30px rgba(45, 51, 50, .10);
  --radius: 14px;
  --strip-h: 34px;
  --header-h: 72px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: var(--strip-h);           /* room for the SIPO status strip */
  background: var(--cream);
  color: var(--ink);
  font-family: 'Body Sans', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }

.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .script { font-family: 'Script Accent', cursive; font-size: 2.1rem; color: var(--green-deep); margin: 0 0 .1em; }
.section-head h2 { font-family: 'Display Title', Georgia, serif; font-size: clamp(2rem, 4vw, 2.9rem); color: var(--red); text-transform: uppercase; letter-spacing: .01em; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- buttons ---------- */
.btn, a.btn-primary, a.btn-red, a.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 13px 26px; border: 0; border-radius: 999px;
  font-family: 'Body Sans', sans-serif; font-size: .95rem; font-weight: 700; letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.16); }
.btn-primary { background: var(--green); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-outline { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: var(--strip-h); z-index: 900;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { height: 48px; width: auto; }
.brand-name { font-family: 'Display Title', Georgia, serif; font-size: 1.25rem; color: var(--red); text-transform: uppercase; line-height: 1; }
.brand-sub { display: block; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 10px 16px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; color: var(--ink); text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover { background: rgba(172,2,2,.07); color: var(--red); }
.main-nav a.active { color: var(--red); }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 4px auto; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: url('../img/bg-paper.jpg') center/cover no-repeat;
}
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(245,245,239,.92) 0%, rgba(245,245,239,.72) 45%, rgba(245,245,239,.15) 100%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 30px; padding: 56px 0 64px; }
.hero-logo { width: 190px; margin-bottom: 8px; }
.hero h1 { font-family: 'Display Title', Georgia, serif; font-size: clamp(2.6rem, 6vw, 4.4rem); color: var(--red); text-transform: uppercase; line-height: .92; }
.hero .script { font-family: 'Script Accent', cursive; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--green-deep); margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-note { max-width: 460px; font-size: .92rem; color: var(--muted); }
.hero-art { position: relative; }
.hero-art img { width: 100%; filter: drop-shadow(0 18px 34px rgba(0,0,0,.22)); }

/* ---------- popular items (uiManager #menuGrid) ---------- */
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }

.menu-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.menu-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(45,51,50,.16); }

.menu-image-container, .menu-card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #efefe7; }
.menu-image-container img, .menu-card-img img { width: 100%; height: 100%; object-fit: cover; }
.menu-category-badge {
  position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}

.menu-details, .menu-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.menu-details h3, .menu-card-body h3 { font-size: 1.1rem; margin: 0 0 6px; color: var(--ink); }
.menu-details p, .menu-card-body p { margin: 0 0 14px; font-size: .9rem; color: var(--muted); flex: 1; }
.menu-price, .menu-card-footer .price { font-family: 'Label Sans', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--red); white-space: nowrap; }
.menu-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.menu-card-footer .order-link {
  padding: 8px 16px; border-radius: 999px; background: var(--green); color: #fff;
  font-size: .82rem; font-weight: 700; text-decoration: none;
}
.menu-card-footer .order-link:hover { background: var(--green-deep); }
.menu-details .btn-primary { align-self: flex-start; }

/* ---------- about ---------- */
.about { background: var(--cream); }
.about-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 46px; align-items: center; }
.about-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-family: 'Display Title', Georgia, serif; font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--red); text-transform: uppercase; }
.about-text p { color: var(--muted); }

/* ---------- categories band ---------- */
.categories { background: var(--yellow); }
.categories .section-head h2, .categories .section-head .script { color: var(--red); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; aspect-ratio: 3 / 4; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-card:hover img { transform: scale(1.05); }
.cat-card span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px;
  background: var(--red); color: var(--cream); text-align: center;
  font-family: 'Label Sans', sans-serif; font-size: 1.05rem;
}

/* ---------- order band ---------- */
.order-band { position: relative; background: url('../img/bg-order.jpg') center/cover no-repeat; color: #fff; text-align: center; }
.order-band::after { content: ''; position: absolute; inset: 0; background: rgba(20,12,8,.55); }
.order-band .wrap { position: relative; z-index: 1; padding-top: 86px; padding-bottom: 86px; }
.order-band h2 { font-family: 'Display Title', Georgia, serif; font-size: clamp(2.2rem, 5vw, 3.4rem); text-transform: uppercase; }
.order-band p { max-width: 520px; margin: 0 auto 26px; color: rgba(255,255,255,.88); }

/* ---------- page header (menu / contact) ---------- */
.page-header { position: relative; background: url('../img/bg-paper.jpg') center/cover no-repeat; text-align: center; padding: 60px 0 54px; }
.page-header::after { content: ''; position: absolute; inset: 0; background: rgba(245,245,239,.72); }
.page-header .wrap { position: relative; z-index: 1; }
.page-header h1 { font-family: 'Display Title', Georgia, serif; font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--red); text-transform: uppercase; }
.page-header p { margin: 0; color: var(--muted); }

/* ---------- menu page ---------- */
.menu-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 34px; }
.menu-tab {
  padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); cursor: pointer;
  font-family: 'Body Sans', sans-serif; font-size: .88rem; font-weight: 700;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.menu-tab:hover { border-color: var(--red); color: var(--red); }
.menu-tab.active { background: var(--red); border-color: var(--red); color: #fff; }
.menu-note { text-align: center; color: var(--muted); font-size: .86rem; margin-top: 30px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
.loading::after { content: ''; display: block; width: 26px; height: 26px; margin: 14px auto 0; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card h2 { font-family: 'Display Title', Georgia, serif; font-size: 1.5rem; color: var(--red); text-transform: uppercase; }
.info-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .label { min-width: 92px; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.info-row .value { font-weight: 500; }
.info-row a { color: var(--red); text-decoration: none; font-weight: 700; }
.info-row a:hover { text-decoration: underline; }

.hours-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.hours-row:last-child { border-bottom: 0; }
.hours-row .day { font-weight: 500; }
.hours-row .time { text-align: right; color: var(--muted); }
.hours-row.today { background: rgba(250,185,25,.18); border-radius: 8px; padding-left: 10px; padding-right: 10px; }
.hours-row.today .day, .hours-row.today .time { color: var(--red); font-weight: 700; }
.closed-day { color: #b02a2a; }

.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); line-height: 0; }
.map-embed iframe { width: 100%; height: 340px; border: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 56px 0 26px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 34px; }
.site-footer h3 { color: #fff; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,.85); }
.footer-brand img { height: 74px; margin-bottom: 14px; }
.footer-contact p { margin: 0 0 10px; }
#footer-hours { list-style: none; margin: 0; padding: 0; }
#footer-hours li { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: .9rem; }
#footer-hours li.today { color: var(--yellow); font-weight: 700; }
#footer-hours .day { font-weight: 500; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14);
  font-size: .82rem;
}
.footer-credits { display: flex; align-items: center; gap: 1.5rem; }
.footer-credits span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
.footer-credits a { font-weight: 700; text-decoration: none; }
.footer-credits a:hover { text-decoration: underline; }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 950;
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--red); color: #fff; font-size: 1.2rem; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- reveal on scroll ---------- */
.fade-in, .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-in.visible, .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in, .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-note { margin: 0 auto; }
  .about-inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  body.nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px; }
  .main-nav a { padding: 12px 14px; }
  .site-header a.header-order { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
}
