/* ═══════════════════════════════════════════════════════════
   Bella Fresca Pizzeria — homepage (concept 4b)
   Reference width 1180px; production layout is fluid.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Colour */
  --cream:      #f7f2ea;
  --ink:        #171310;
  --red:        #a62131;
  --green:      #3f5522;
  --red-tint:   #f0c0be;
  --green-tint: #c6d6a2;
  --rule:       #ddd3c2;
  --muted:      #6b6155;

  /* Type */
  --display: 'Instrument Serif', 'Times New Roman', serif;
  --ui: 'Archivo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  /* Rhythm — 30px gutter at the reference width, tightening on phones */
  --gutter: clamp(18px, 2.6vw, 30px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity .2s ease;
}
a:hover { opacity: .72; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 6px;
  z-index: 10;
  transform: translateY(-220%);
  background: var(--green);
  color: var(--cream);
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.skip:focus-visible { transform: translateY(0); }

/* ─── Shared type roles ──────────────────────────────────── */

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  line-height: 1.5;
}

.button {
  position: relative;
  display: inline-block;
  border: 1px solid var(--cream);
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1;
}

/* The brief fixes these control sizes visually. Their hit areas are grown to
   44px behind the artwork so touch targets stay comfortable without redrawing
   anything. Vertical only — every one of these already spans enough width. */
.button, .pill, .nav-toggle, .footer a { position: relative; }

.button::after, .pill::after, .nav-toggle::after, .footer a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: max(100%, 44px);
  transform: translateY(-50%);
}

/* ─── 1. Header ──────────────────────────────────────────── */

.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  white-space: nowrap;
}

.header__left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.pill {
  flex: none;
  border: 1px solid var(--red);
  border-radius: 999px;
  padding: 9px 20px;
  color: var(--red);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
}

/* The lockup holds its size; the nav side gives way first. */
.header__logo { flex: none; }
.header__logo img { width: clamp(88px, 10.5vw, 124px); height: auto; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  border: 0;
  background: none;
  padding: 9px 0;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle::before {
  content: "";
  width: 18px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.nav-toggle:hover { opacity: .72; }

/* ─── 2. Masthead ────────────────────────────────────────── */

.masthead { padding: 6px 24px 26px; text-align: center; }

.masthead__word {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  /* 152px at the 1180px reference width, scaling down with the viewport */
  font-size: min(12.55vw, 152px);
  line-height: 1;
  letter-spacing: .005em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--green);
}

/* ─── 3. Hero photo ──────────────────────────────────────── */

.hero {
  width: 100%;
  height: clamp(320px, 44vw, 520px);
  object-fit: cover;
  object-position: 50% 60%;
}

/* ─── 4 & 6. Marquee bands ───────────────────────────────── */

.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 11px 0;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee__track--left  { animation: marquee-left  55s linear infinite; }
.marquee__track--right { animation: marquee-right 62s linear infinite; }

.marquee__seq {
  display: flex;
  align-items: baseline;
  gap: 26px;
  padding-right: 26px;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: .12em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--green);
}
.marquee__seq i { font-style: normal; color: var(--red); }

/* Three identical sequences (~2970px each). Shifting by exactly one of them —
   a third of the track — lands on a pixel-identical frame, so the loop is seamless.
   Two sequences remain on screen at all times, covering viewports up to ~5900px. */
@keyframes marquee-left  { from { transform: translate3d(0,0,0); }             to { transform: translate3d(calc(-100% / 3),0,0); } }
@keyframes marquee-right { from { transform: translate3d(calc(-100% / 3),0,0); } to { transform: translate3d(0,0,0); } }

/* ─── 5. Positioning statement ───────────────────────────── */

.statement {
  padding: clamp(44px, 6.4vw, 76px) var(--gutter);
  text-align: center;
}

.statement__line {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  /* The floor is set by the longer line, "pizzeria in Castlemaine", which has
     to survive a 320px screen on two lines rather than three. */
  font-size: clamp(26px, 5.4vw, 64px);
  line-height: 1.08;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--red);
}

/* ─── 7–9. Destination panels ────────────────────────────── */

.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.panel__photo {
  width: 100%;
  height: clamp(300px, 39.8vw, 470px);
  object-fit: cover;
}

.panel__block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px clamp(24px, 3.9vw, 46px);
  text-align: center;
  color: var(--cream);
}
.panel__block--red   { background: var(--red); }
.panel__block--green { background: var(--green); padding-block: 60px; }

.panel__block--red   .eyebrow { color: var(--red-tint); }
.panel__block--green .eyebrow { color: var(--green-tint); }

.panel__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 4.9vw, 58px);
  line-height: 1.08;
  text-transform: uppercase;
}

.panel__body {
  margin: 0;
  max-width: 400px;
  font-size: 15px;
  line-height: 1.7;
}

/* ─── 10. Footer ─────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--rule);
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__tel { color: var(--green); }
.footer__ig  { color: var(--red); }

/* ═══ Responsive ═════════════════════════════════════════
   Breakpoints run widest to narrowest so each one refines the last.
   ═════════════════════════════════════════════════════════ */

/* Below the no-wrap threshold the masthead is allowed to stack. */
@media (max-width: 900px) {
  .masthead__word { font-size: clamp(44px, 19vw, 128px); white-space: normal; }
}

/* Panels stack; photo always above its colour block, 7→8→9 order kept. */
@media (max-width: 860px) {
  .panel { grid-template-columns: 1fr; }
  .panel--flip .panel__photo { order: -1; }
}

/* Nav collapses to a menu button; logo and phone pill stay put. */
@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }

  .header__left { gap: 18px; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 4px var(--gutter) 18px;
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
  }
  .header[data-nav-open] .nav { display: flex; }
  .nav a { width: 100%; padding: 14px 0; }
}

@media (max-width: 620px) {
  .masthead { padding-bottom: 20px; }

  .marquee__seq { font-size: 16px; gap: 20px; padding-right: 20px; }

  .panel__block { gap: 18px; padding-block: 44px; }

  /* Stacked rows are spaced so the 44px hit areas never overlap each other. */
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    white-space: normal;
  }
}

/* Under ~420px the header bar runs out of room. The toggle drops to its rule
   alone and the pill tightens, so the lockup never gets squeezed. */
@media (max-width: 420px) {
  .header { gap: 14px; }
  .header__left { gap: 14px; }
  .nav-toggle__label { display: none; }
  .nav-toggle::before { width: 20px; }
  .pill { padding: 9px 15px; letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  a { transition: none; }
}
