/* ============================================================
   SAHARA BAKERS — styles.css
   Desert-luxury aesthetic: deep warm blacks, saffron gold, cream.
   Font pairing: Cormorant Garamond (display) + DM Sans (body).
   ============================================================ */


/* ============================================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   Change these to reskin the entire site in one place.
   ============================================================ */
:root {
  /* Backgrounds */
  --bg:         #080604;      /* Near-black with a warm tint */
  --bg-2:       #100b06;      /* Slightly lighter panel background */
  --bg-card:    rgba(20, 13, 7, 0.88);

  /* Brand colors */
  --gold:       #c9a96e;      /* Main saffron-gold accent */
  --gold-light: #e8d0a0;      /* Lighter gold for hover states */
  --gold-glow:  rgba(201, 169, 110, 0.35);
  --amber:      #8b5e3c;      /* Deep warm amber */
  --cream:      #f2ead8;      /* Off-white headline color */

  /* Text */
  --text:       #e0d4c0;      /* Body text */
  --text-muted: #897868;      /* Secondary / supporting text */

  /* Borders & overlays */
  --border:     rgba(201, 169, 110, 0.18);
  --nav-glass:  rgba(8, 6, 4, 0.65);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Easing curves */
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-expo: cubic-bezier(0.87, 0, 0.13, 1);
}


/* ============================================================
   GLOBAL RESET & BASE STYLES
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: auto; /* Lenis handles smooth scroll, not the browser */
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none; /* Hide browser cursor — our custom one takes over */
  -webkit-font-smoothing: antialiased;
}

a       { text-decoration: none; color: inherit; }
ul      { list-style: none; }
img     { display: block; max-width: 100%; }
button  { cursor: none; font-family: var(--font-body); }


/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--amber); border-radius: 2px; }


/* ============================================================
   CUSTOM CURSOR
   .cursor-dot  — tiny 6px dot, tracks mouse immediately
   .cursor-ring — larger ring, follows with a GSAP lag (set in script.js)
   ============================================================ */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s;
}

.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 38px; height: 38px;
  border: 1.5px solid rgba(201, 169, 110, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width 0.35s var(--ease),
              height 0.35s var(--ease),
              border-color 0.3s;
}

/* Cursor state when hovering interactive elements (toggled by JS) */
body.cursor-hover .cursor-dot  { width: 10px; height: 10px; background: var(--gold-light); }
body.cursor-hover .cursor-ring { width: 68px; height: 68px; border-color: rgba(201, 169, 110, 0.85); }


/* ============================================================
   NAVIGATION — Sticky glassmorphism bar
   JS adds/removes .hidden to hide on scroll-down (Section 3 in script.js)
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 4rem;
  background: var(--nav-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: transform 0.5s var(--ease-out), opacity 0.5s;
}

.navbar.hidden {
  transform: translateY(-105%);
  opacity: 0;
}

/* Logo */
.nav-logo    { display: flex; flex-direction: column; line-height: 1; }

.logo-text {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.03em;
}

.logo-sub {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Nav links */
.nav-links  { display: flex; gap: 2.5rem; }

.nav-link {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.38s var(--ease);
}

.nav-link:hover            { color: var(--gold); }
.nav-link:hover::after     { width: 100%; }

/* CTA pill button */
.nav-cta {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.6rem 1.6rem;
  border: 1px solid var(--gold);
  border-radius: 100px;
  color: var(--gold);
  transition: background 0.3s, color 0.3s;
}

.nav-cta:hover { background: var(--gold); color: var(--bg); }


/* ============================================================
   HERO SECTION — Full-screen, Three.js canvas + typography
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Three.js canvas — fills the entire hero, sits above the gradient bg */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none; /* Let clicks pass through to page elements */
}

/* Slow-shifting gradient that gives the hero its warm desert glow */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 85% 70% at 68% 55%, #2d1c09 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 15% 85%, #1a0d05 0%, transparent 70%),
    #080604;
  animation: bgBreath 14s ease-in-out infinite alternate;
}

@keyframes bgBreath {
  0%   { filter: brightness(1)    hue-rotate(0deg); }
  50%  { filter: brightness(1.1)  hue-rotate(6deg);  }
  100% { filter: brightness(0.95) hue-rotate(-4deg); }
}

/* Grain/noise texture overlay for tactile, premium feel */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* Hero text — on the left side */
.hero-content {
  position: relative;
  z-index: 4;
  padding: 0 4rem;
  max-width: 680px;
}

.hero-label {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.75rem;
  /* GSAP sets opacity to 0 initially and animates to 1 */
  opacity: 0;
  transform: translateY(15px);
}

/* Large display headline */
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8.5vw, 8.5rem);
  font-weight: 300;
  line-height: 0.92;
  color: var(--cream);
  margin-bottom: 1.75rem;
  letter-spacing: -0.01em;
}

.hero-headline em { font-style: italic; color: var(--gold); }

/* Clip-reveal wrapper: overflow hidden clips the text as it slides up */
.line-wrap  { display: block; overflow: hidden; padding-bottom: 0.08em; }

/* The actual text starts below and GSAP animates it upward */
.line-inner { display: block; transform: translateY(110%); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-cta-group {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
}

/* Filled pill button */
.btn-primary {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 100px;
  border: none;
  transition: background 0.3s, transform 0.35s var(--ease-out), box-shadow 0.3s;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: scale(1.05);
  box-shadow: 0 0 28px rgba(201, 169, 110, 0.4);
}

/* Ghost / text link button */
.btn-ghost {
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  transition: color 0.3s, letter-spacing 0.3s var(--ease);
}

.btn-ghost:hover { color: var(--gold); letter-spacing: 0.1em; }

/* Animated scroll nudge */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 4rem;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  opacity: 0.45;
}

.scroll-line {
  width: 44px; height: 1px;
  background: var(--gold);
  transform-origin: left center;
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleX(1);   opacity: 1; }
  50%       { transform: scaleX(0.25); opacity: 0.4; }
}

.scroll-indicator span {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
}


/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
section { padding: 9rem 4rem; }

.section-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--cream);
  margin-bottom: 2rem;
}

.section-headline em { font-style: italic; color: var(--gold); }

.body-text {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.82;
  max-width: 520px;
  margin-bottom: 1.25rem;
}

/* GSAP scroll-reveal initial states — JS animates these to opacity:1 / y:0 */
.reveal-up   { opacity: 0; transform: translateY(42px); }
.reveal-text { opacity: 0; transform: translateY(18px); }


/* ============================================================
   OUR STORY SECTION
   ============================================================ */
.story       { background: var(--bg-2); }

.story-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.story-image-wrap { position: relative; }

.parallax-image   { overflow: hidden; border-radius: 3px; }

/* ---- PLACEHOLDER IMAGES ----
   Replace the gradient backgrounds below with real image URLs.
   Example: background: url('images/bakery-story.jpg') center/cover;
   ---------------------------------------------------------------- */
.story-placeholder {
  width: 100%;
  height: 580px;
  background: linear-gradient(
    148deg,
    #3d2410 0%,
    #1a0d05 30%,
    #2a1608 60%,
    #1a0d05 100%
  );
  /* TO REPLACE: background: url('images/story.jpg') center/cover no-repeat; */
}

/* Gold circle badge overlaid on the photo */
.story-badge {
  position: absolute;
  bottom: -1.75rem;
  right: -1.75rem;
  width: 92px; height: 92px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.05em;
  box-shadow: 0 0 32px var(--gold-glow);
}

.story-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid rgba(201, 169, 110, 0.45);
  padding-bottom: 3px;
  transition: letter-spacing 0.38s var(--ease), border-color 0.3s;
}

.story-link:hover { letter-spacing: 0.2em; border-color: var(--gold); }


/* ============================================================
   MENU SECTION — 3D Tilt Cards
   ============================================================ */
.menu        { background: var(--bg); }

.menu-header { text-align: center; margin-bottom: 4.5rem; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Individual card */
.menu-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transform-style: preserve-3d; /* Enables 3D tilt depth */
  transition: box-shadow 0.4s;
}

.menu-card:hover {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* Glowing border that fades in on hover */
.card-glow {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid var(--gold);
  box-shadow: 0 0 22px var(--gold-glow), inset 0 0 22px var(--gold-glow);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.45s;
}

.menu-card:hover .card-glow { opacity: 1; }

/* Card image area — gradient placeholder.
   Replace each background with: url('your-photo.jpg') center/cover */
.card-img {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s var(--ease);
}

.menu-card:hover .card-img { transform: scale(1.04); }

/* TO REPLACE: Change the gradient to your real food photo URL.
   Example: .card-img--1 { background: url('images/croissant.jpg') center/cover; } */
.card-img--1 { background: linear-gradient(148deg, #8b5e3c 0%, #3d2410 55%, #1a0d05 100%); }
.card-img--2 { background: linear-gradient(148deg, #6b3535 0%, #2e1515 55%, #1a0d05 100%); }
.card-img--3 { background: linear-gradient(148deg, #3a5e3c 0%, #1a3010 55%, #0a1a0a 100%); }
.card-img--4 { background: linear-gradient(148deg, #5e5535 0%, #2e2a10 55%, #1a1a05 100%); }

.card-content { padding: 1.5rem 1.5rem 1.75rem; }

.card-tag {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

.card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.4rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--gold);
}

.card-btn {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  border: none;
  padding: 0.48rem 1.1rem;
  border-radius: 100px;
  transition: background 0.3s, transform 0.3s var(--ease-out);
}

.card-btn:hover { background: var(--gold-light); transform: scale(1.06); }


/* ============================================================
   CRAFT SECTION — Stats + parallax image
   ============================================================ */
.craft       { background: var(--bg-2); }

.craft-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.craft-stats {
  display: flex;
  gap: 3.5rem;
  margin-top: 3.5rem;
}

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 30px var(--gold-glow);
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.craft-placeholder {
  width: 100%;
  height: 620px;
  background: linear-gradient(
    148deg,
    #1a0d05 0%,
    #3d2410 40%,
    #2a1608 70%,
    #1a0d05 100%
  );
  border-radius: 3px;
  /* TO REPLACE: background: url('images/craft.jpg') center/cover no-repeat; */
}


/* ============================================================
   CTA / NEWSLETTER SECTION
   ============================================================ */
.cta-section {
  position: relative;
  text-align: center;
  padding: 11rem 4rem;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 80% at 50% 50%, #2d1c09 0%, transparent 70%),
    var(--bg);
  z-index: 0;
}

.cta-inner   { position: relative; z-index: 1; }

.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 5.8rem);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.08;
  margin-bottom: 1.5rem;
}

.cta-headline em { color: var(--gold); font-style: italic; }

.cta-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.25rem;
}

.cta-input {
  padding: 0.88rem 1.6rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 290px;
  outline: none;
  transition: border-color 0.35s, box-shadow 0.35s;
}

.cta-input::placeholder { color: var(--text-muted); }

.cta-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #040302;
  border-top: 1px solid var(--border);
  padding: 5.5rem 4rem 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto 4rem;
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}

.footer-brand p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.9; }

.footer-links,
.footer-social { display: flex; flex-direction: column; gap: 0.7rem; }

.footer-links h4,
.footer-social h4 {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.footer-links a,
.footer-social a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-links a:hover,
.footer-social a:hover { color: var(--cream); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 1400px;
  margin: 0 auto;
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1200px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .story-inner,
  .craft-inner { grid-template-columns: 1fr; gap: 4rem; }

  .craft-stats { gap: 2.5rem; }
}

@media (max-width: 768px) {
  section        { padding: 5rem 1.5rem; }
  .navbar        { padding: 1rem 1.5rem; }
  .nav-links     { display: none; }
  .hero-content  { padding: 0 1.5rem; }
  .hero-headline { font-size: clamp(3.2rem, 11vw, 5rem); }
  .menu-grid     { grid-template-columns: 1fr; }
  .footer-inner  { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
  .cta-form      { flex-direction: column; align-items: center; }
  .craft-stats   { flex-direction: column; gap: 2rem; }
  .scroll-indicator { left: 1.5rem; }
}
