/* =============================================================
   Majik Pizza — Components
   Logo, header, nav, buttons, tiles, cards, footer.
   ============================================================= */

/* ---------- Logo ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: var(--logo-size, 1.6rem);
  line-height: 1;
}

.logo__word {
  font-family: var(--font-script);
  font-size: 1.55em;
  color: var(--logo-ink, var(--ink));
  letter-spacing: -0.01em;
  padding-right: 0.06em;
}

.logo__slice { width: 1.15em; height: auto; flex: none; }

.logo__stack { display: flex; flex-direction: column; gap: 0.12em; }

.logo__pizza {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35em;
  letter-spacing: 0.02em;
  color: var(--red);
  border-top: 0.09em solid var(--green);
  border-bottom: 0.09em solid var(--red);
  padding-block: 0.04em;
}

.logo__tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.42em;
  letter-spacing: 0.3em;
  color: var(--logo-ink, var(--ink));
}

.logo--light { --logo-ink: var(--white); }
.logo--lg { --logo-size: clamp(2rem, 5.5vw, 3.75rem); }

/* ---------- Header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--rule);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
              transform 0.35s var(--ease);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* Transparent over the video hero until the user scrolls */
.header--over-hero {
  background: transparent;
  border-bottom-color: transparent;
}

.header--over-hero .logo { --logo-ink: var(--white); }
.header--over-hero .nav__link { color: var(--white); }
.header--over-hero .nav-toggle__bar { background: var(--white); }

/* The hero video runs light in places, so white chrome needs its own scrim
   to stay legible over any frame. */
.header--over-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.header--over-hero .logo,
.header--over-hero .nav__link { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5); }
.header--over-hero .nav-toggle__bar { box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }

.header.is-hidden { transform: translateY(-100%); }

/* ---------- Navigation ---------- */

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-block: 0.35rem;
  transition: color 0.25s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--red); }

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

.nav-toggle__bar {
  display: block;
  width: 26px; height: 2.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7.5px) 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(-7.5px) rotate(-45deg); }

@media (max-width: 1000px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--ink);
    padding: 2rem var(--gutter) 4rem;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s var(--ease), visibility 0.4s;
  }

  .nav.is-open { transform: none; visibility: visible; }

  .nav__list { flex-direction: column; gap: 1.25rem; }
  .nav__link { font-size: 1.75rem; color: var(--white); }
  .header--over-hero .nav__link { color: var(--white); }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  padding: 1.05em 2em;
  border: 2.5px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn--red { background: var(--red); color: var(--white); border-color: var(--red); }
.btn--red:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn--green { background: var(--green); color: var(--white); border-color: var(--green); }
.btn--green:hover { background: var(--green-dark); border-color: var(--green-dark); }

.btn--ghost { background: transparent; color: var(--white); border-color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }

.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn-row--center { justify-content: center; }

/* ---------- Action tiles (the three colour blocks) ---------- */

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--ink);
}

@media (min-width: 860px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  min-height: clamp(200px, 24vw, 300px);
  padding: clamp(2rem, 4vw, 3rem) 1.5rem;
  color: var(--white);
  overflow: hidden;
  transition: filter 0.3s var(--ease);
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.14);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.tile:hover::after { opacity: 1; }

.tile > * { position: relative; z-index: 1; }

.tile__icon { width: 52px; height: 52px; margin-bottom: 0.35rem; }
.tile__icon path,
.tile__icon circle,
.tile__icon rect { stroke: currentColor; }

.tile__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.tile__sub {
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.9;
  margin: 0;
}

.tile--green { background: var(--green); }
.tile--cream { background: var(--cream); color: var(--ink); }
.tile--red { background: var(--red); }

/* ---------- Cards ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  height: 100%;
}

.section--cream .card { background: var(--white); border-color: rgba(20, 22, 26, 0.08); }

.card__icon {
  width: 46px; height: 46px;
  color: var(--red);
  margin-bottom: 1rem;
}

.card h3, .card h4 { margin-bottom: 0.5rem; }

/* ---------- Info list (hours, contact) ---------- */

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

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--rule);
}

.info-list li:last-child { border-bottom: 0; }

.info-list__label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.info-list__value { color: var(--muted); text-align: right; }
.section--dark .info-list__value { color: rgba(255, 255, 255, 0.75); }
.section--dark .info-list li { border-bottom-color: rgba(255, 255, 255, 0.16); }

.is-today { color: var(--green); font-weight: 700; }

/* ---------- Status pill ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5em 1em;
  border-radius: 100px;
  background: rgba(87, 174, 71, 0.14);
  color: var(--green-dark);
}

.status::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.status--closed { background: rgba(200, 32, 46, 0.12); color: var(--red); }

/* On dark grounds the tinted fills go muddy — lift both states instead. */
.hero .status,
.section--dark .status,
.footer .status {
  background: rgba(255, 255, 255, 0.14);
  color: #8fe07d;
}

.hero .status--closed,
.section--dark .status--closed,
.footer .status--closed { color: #ff8a8a; }

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

.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding-block: clamp(3rem, 6vw, 4.5rem) 0;
  font-size: 0.95rem;
}

.footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: 3rem;
}

@media (min-width: 820px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}

.footer h4 {
  color: var(--white);
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  margin-bottom: 1.1rem;
}

.footer a { transition: color 0.2s var(--ease); }
.footer a:hover { color: var(--white); }

.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin-bottom: 0.6rem; }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.socials { display: flex; gap: 0.75rem; }

.socials a {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.socials a:hover { background: var(--red); border-color: var(--red); }
.socials svg { width: 18px; height: 18px; }

/* ---------- Sticky mobile order bar ---------- */

.order-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  display: none;
  gap: 1px;
  background: rgba(0, 0, 0, 0.2);
}

.order-bar a {
  flex: 1;
  padding: 1rem 0.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.order-bar a:nth-child(1) { background: var(--green); }
.order-bar a:nth-child(2) { background: var(--red); }

@media (max-width: 860px) {
  .order-bar { display: flex; }
  body { padding-bottom: 56px; }
}
