/* ============================================================
   The Waffle Taco – Global Stylesheet
   /assets/css/global.css
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --cream:     #faf6f0;
  --warm:      #f3ece0;
  --sand:      #e8ddd0;
  --brown:     #3d2b1f;
  --rust:      #c0392b;
  --rust-dark: #a93226;
  --gold:      #e8a020;
  --text:      #2a1f17;
  --muted:     #7a6255;
  --white:     #ffffff;

  --radius-sm: 8px;
  --radius:    16px;
  --radius-lg: 24px;

  --nav-h:     72px;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-card: 0 4px 24px rgba(61, 43, 31, 0.08), 0 1px 2px rgba(61, 43, 31, 0.04);
  --shadow-lift: 0 12px 40px rgba(61, 43, 31, 0.12);
}

/* ── Base ───────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

/* ── Keyframe Animations ────────────────────────────────────── */
@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Scroll-reveal base state ───────────────────────────────── */
/* Elements start invisible; JS adds .visible to trigger animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
}

.reveal.visible {
  animation: floatIn 0.7s var(--ease-spring) forwards;
}

.reveal-delay-1 { animation-delay: 0.08s; }
.reveal-delay-2 { animation-delay: 0.18s; }
.reveal-delay-3 { animation-delay: 0.28s; }

/* ── Navigation ─────────────────────────────────────────────── */
#mainNav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}

/* Transparent over hero — white text/icons */
#mainNav .nav-links a,
#mainNav .nav-brand {
  color: rgba(255, 255, 255, 0.92);
}

#mainNav .nav-links a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

#mainNav .nav-links a.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

#mainNav .nav-cart {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

#mainNav .nav-cart svg {
  color: var(--white);
}

#mainNav .nav-hamburger span {
  background: var(--white);
}

/* Scrolled state — warm/dark text */
#mainNav.scrolled {
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(61, 43, 31, 0.08);
}

#mainNav.scrolled .nav-links a,
#mainNav.scrolled .nav-brand {
  color: var(--brown);
}

#mainNav.scrolled .nav-links a:hover {
  background: var(--warm);
  color: var(--brown);
}

#mainNav.scrolled .nav-links a.active {
  background: var(--brown);
  color: var(--white);
}

#mainNav.scrolled .nav-cart {
  border-color: var(--sand);
  background: var(--white);
}

#mainNav.scrolled .nav-cart svg {
  color: var(--brown);
}

#mainNav.scrolled .nav-hamburger span {
  background: var(--brown);
}

/* Logo + brand name */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.4s;
}

/* Centre nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

/* Right-side actions group */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-cart {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav-cart:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-cart svg {
  width: 20px;
  height: 20px;
  transition: color 0.4s;
}

/* Hamburger (mobile only) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.4s;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--cream);
  z-index: 190;
  padding: 32px 24px;
  border-top: 1px solid var(--sand);
  animation: fadeIn 0.2s ease;
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer a {
  display: block;
  padding: 14px 18px;
  font-size: 18px;
  font-weight: 500;
  color: var(--brown);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.mobile-drawer a:hover,
.mobile-drawer a.active {
  background: var(--warm);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--rust);
  color: var(--white);
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 4px 20px rgba(192, 57, 43, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192, 57, 43, 0.4);
  background: var(--rust-dark);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: rgba(61, 43, 31, 0.06);
  color: var(--brown);
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border: 1.5px solid rgba(61, 43, 31, 0.15);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.btn-outline:hover {
  transform: translateY(-2px);
  background: rgba(61, 43, 31, 0.1);
  border-color: rgba(61, 43, 31, 0.25);
}

/* btn-outline variant for dark backgrounds */
.btn-outline--light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline--light:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ── Section shared ─────────────────────────────────────────── */
.section {
  padding: 100px 40px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--rust);
  border-radius: 2px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--brown);
  margin-bottom: 20px;
}

.section-sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
  margin-bottom: 52px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  padding: 60px 40px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--sand);
}

.footer-brand img {
  height: 64px;
  width: auto;
  margin-bottom: 18px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col li,
.footer-col a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--rust);
}

.footer-bottom {
  padding: 24px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  #mainNav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-brand {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .section {
    padding: 60px 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer {
    padding: 48px 20px 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
