/* Jummah Bakery — Design System
   Palette: cream, deep forest, burnt saffron, berry red, charcoal
   This file is the single source of truth for global layout (header, footer,
   buttons, type, reveal animations). Page-specific styles live inline.
*/

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --cream: #F5EFE0;
  --cream-2: #EBE2CD;
  --cream-3: #E3D7B9;
  --forest: #1F3A2E;
  --forest-deep: #152720;
  --saffron: #D97A2B;
  --saffron-hot: #C5621A;
  --berry: #A03236;
  --berry-deep: #7B2227;
  --ink: #1A1612;
  --ink-soft: #3A342C;
  --line: rgba(26,22,18,0.12);
  --sand: #D0B87C;
  --hover-rust: #AB4905;

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--header-h, 0px);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* === Type scale === */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 0.95; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--saffron);
}
.eyebrow::before { content: "◆ "; opacity: 0.6; }

h1.display { font-family: var(--serif); font-size: clamp(72px, 14vw, 220px); line-height: 0.88; letter-spacing: -0.03em; }
h2.display { font-family: var(--serif); font-size: clamp(52px, 8vw, 128px); line-height: 0.9; letter-spacing: -0.02em; }
h3.display { font-family: var(--serif); font-size: clamp(32px, 4vw, 56px); line-height: 1; letter-spacing: -0.01em; }

.italic { font-style: italic; }

/* === Header / Nav ===
   Background is full-bleed (edge-to-edge). Inner content is centered
   in a max-width container that matches the body grid below. */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--sand);
  border-bottom: 1px solid rgba(26,22,18,0.08);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 14px 44px -22px rgba(26,22,18,0.35);
}
.site-header .header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 16px;
  line-height: 1;
  flex-shrink: 0;
  padding-left: 75px;
}
.site-header .header-end {
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-header .brand .logo {
  display: block;
  width: 300px;
  height: 300px;
  max-width: 100%;
  object-fit: contain;
}
.nav {
  display: flex; align-items: center; gap: 6px;
}
.nav a {
  padding: 14px 22px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 999px;
  position: relative;
  color: var(--forest);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  letter-spacing: -0.005em;
}
.nav a:hover { background: var(--hover-rust); color: #ffffff; }
.nav a.active { color: var(--sand); background: var(--forest); }
.nav-cta {
  padding: 16px 28px !important;
  background: var(--forest) !important;
  color: #F5EFE0 !important;
  font-weight: 700 !important;
  font-size: 18px !important;
}
.nav-cta:hover { background: var(--hover-rust) !important; color: #ffffff !important; }

/* Cart icon in nav */
.nav-cart {
  position: relative;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--forest);
  color: #ffffff;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-cart:hover { background: var(--hover-rust); color: #ffffff; transform: translateY(-2px); }
.nav-cart.active { background: var(--hover-rust); color: #ffffff; }
.nav-cart svg { width: 22px; height: 22px; }
.nav-cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px;
  background: var(--saffron);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid var(--sand);
  animation: badge-pop 0.4s var(--ease);
}
@keyframes badge-pop {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.menu-toggle { display: none; }

@media (max-width: 1180px) {
  .site-header .header-inner { padding: 16px 32px; gap: 16px; }
  .site-header .brand .logo { width: 210px; height: 210px; }
  .nav a { padding: 11px 16px; font-size: 15px; }
  .nav-cta { padding: 13px 20px !important; font-size: 15px !important; }
}
@media (max-width: 860px) {
  .site-header .header-inner { padding: 8px 18px 8px 0; }
  .site-header .brand { padding-left: 12px; }
  .site-header .brand .logo { width: 180px; height: 180px; }
  .nav { position: fixed; inset: 0 0 0 auto; width: 80%; max-width: 340px; background: var(--forest); flex-direction: column; align-items: stretch; padding: 96px 20px 32px; transform: translateX(100%); transition: transform 0.4s var(--ease); gap: 4px; z-index: 99; }
  .nav.open { transform: translateX(0); }
  .nav a { color: var(--cream); font-size: 20px; padding: 14px 20px; border-radius: 12px; }
  .nav a:hover { background: var(--hover-rust); color: #ffffff; }
  .nav a.active { background: rgba(245,239,224,0.12); color: var(--cream); }
  .nav-cta { background: var(--saffron) !important; color: var(--cream) !important; }
  .nav-cart { width: 29px; height: 29px; margin-right: 25px; }
  .nav-cart svg { width: 13px; height: 13px; }
  .nav-cart-badge {
    border-color: var(--sand);
    border-width: 1px;
    top: -8px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    min-width: 13px;
    height: 13px;
    padding: 0 3px;
    font-size: 7px;
  }
  .menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--forest); color: var(--cream); z-index: 101; position: relative; }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--saffron); color: var(--cream); }
.btn-primary:hover { background: var(--saffron-hot); }
.btn-forest { background: var(--forest); color: var(--cream); }
.btn-forest:hover { background: var(--forest-deep); }
.btn-ghost { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--cream); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* === Marquee === */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  animation: marquee 40s linear infinite;
  padding-right: 48px;
}
.marquee-track.reverse { animation-direction: reverse; }
.marquee-track.fast { animation-duration: 22s; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* === Reveal on scroll ===
   Default: rise from below with a touch of blur for a modern feel.
   Add modifier classes for direction & timing. */
.reveal {
  opacity: 0;
  transform: translateY(56px);
  filter: blur(6px);
  transition:
    opacity 1.1s var(--ease-out),
    transform 1.1s var(--ease-out),
    filter 1.1s var(--ease-out);
  will-change: opacity, transform, filter;
}
.reveal.from-left { transform: translateX(-80px); }
.reveal.from-right { transform: translateX(80px); }
.reveal.from-bottom { transform: translateY(80px); }
.reveal.from-top { transform: translateY(-60px); }
.reveal.scale-in { transform: scale(0.86); }
.reveal.rotate-in { transform: translateY(60px) rotate(-3deg); transform-origin: left center; }
.reveal.in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
/* Staggered children: .reveal-stagger > * each get a small delay */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0.00s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 0.56s; }

/* Word-level rise: wrap text in spans via JS, then each word lifts in. */
.word-rise { display: inline-block; overflow: hidden; vertical-align: bottom; line-height: 1; }
.word-rise > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: transform;
}
.word-rise.in > span { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .word-rise > span { transition: none !important; transform: none !important; filter: none !important; opacity: 1 !important; }
}

/* === Page hero === */
.page-hero {
  padding: 340px 32px 64px;
  background: var(--forest);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.page-hero .eyebrow { color: var(--saffron); }
.page-hero h1 { font-family: var(--serif); font-size: clamp(72px, 12vw, 180px); line-height: 0.9; letter-spacing: -0.02em; margin-top: 16px; max-width: 1200px; }
.page-hero .sub { max-width: 640px; margin-top: 24px; font-size: 18px; opacity: 0.8; }
.page-hero::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 48px;
  background: radial-gradient(circle at 50% 0, var(--cream) 0, var(--cream) 24px, transparent 24px) 0 0 / 48px 48px;
}

/* === Footer === */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 96px 32px 32px;
  position: relative;
  overflow: hidden;
}
.footer-huge {
  font-family: var(--serif);
  font-size: clamp(80px, 16vw, 240px);
  line-height: 0.88;
  letter-spacing: -0.03em;
}
.footer-huge .italic { color: var(--saffron); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1440px;
  margin: 80px auto 0;
  padding-top: 48px;
  border-top: 1px solid rgba(245,239,224,0.15);
}
.footer-grid h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--saffron); margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a:hover { color: var(--saffron); }
.footer-grid p { opacity: 0.75; font-size: 14px; line-height: 1.6; }
.footer-bottom {
  max-width: 1440px; margin: 64px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0.6;
  padding-top: 24px;
  border-top: 1px solid rgba(245,239,224,0.1);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* === Utility === */
.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.section { padding: 120px 32px; }
.section-dark { background: var(--forest); color: var(--cream); }
.section-ink { background: var(--ink); color: var(--cream); }
.section-saffron { background: var(--saffron); color: var(--cream); }
.section-cream2 { background: var(--cream-2); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--cream-2); color: var(--ink);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
}

/* === Product card === */
.product-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(26,22,18,0.25); }
.product-card .image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--cream-2);
  position: relative;
}
.product-card .image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.product-card:hover .image img { transform: scale(1.06); }
.product-card .price-tag {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--saffron);
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
}
.product-card .body { padding: 22px 24px 28px; }
.product-card h4 { font-family: var(--serif); font-size: 28px; line-height: 1; margin-bottom: 10px; letter-spacing: -0.01em; }
.product-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.product-card .coming-soon {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  background: var(--forest);
  color: var(--cream);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* === Scrollbar hide for chip rows === */
.chip-row { overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }

/* === Noise texture overlay for warmth === */
.noise { position: relative; }
.noise::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
