/* ==========================================================================
   KOCHUMAGIQUE — Cinematic Canvas Stylesheet
   Integrated Hero Animation & Preloader
   ========================================================================== */

:root {
  --color-cream: #F6F3E9;
  --color-green: #405751;
  --color-green-light: #526f67;
  --color-gold: #C5A059;
  --color-gold-glow: rgba(197, 160, 89, 0.35);
  --color-cinematic-bg: #162420;
  --color-cinematic-dark: #0f1916;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Preloader Screen (Full Experience Entry Gate)
   ========================================================================== */
html.is-preloading,
html.is-preloading body {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--color-cinematic-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.55s ease;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-emblem {
  width: 56px;
  height: 56px;
  color: var(--color-gold);
  margin-bottom: 24px;
  animation: preloader-pulse 2s ease-in-out infinite;
}

@keyframes preloader-pulse {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.preloader-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: 10px;
}

.preloader-subtitle {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-gold);
  opacity: 0.85;
  margin-bottom: 30px;
}

.preloader-track {
  width: 180px;
  height: 2px;
  background: rgba(197, 160, 89, 0.15);
  position: relative;
  overflow: hidden;
  border-radius: 9999px;
}

.preloader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-gold);
  transition: width 0.2s ease-out;
  box-shadow: 0 0 8px var(--color-gold-glow);
}

.preloader-percent {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--color-cream);
  opacity: 0.6;
  margin-top: 14px;
}

/* ==========================================================================
   Cinematic Hero Container (#home)
   ========================================================================== */
.hero-scroll-container {
  position: relative;
  width: 100%;
  background-color: var(--color-cinematic-bg);
}

.hero-pinned-viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--color-cinematic-bg);
}

/* Canvas element */
.cinematic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Atmospheric Vignette Overlay */
.cinematic-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(15, 25, 22, 0.45) 85%, rgba(15, 25, 22, 0.85) 100%),
              linear-gradient(to bottom, rgba(22, 36, 32, 0.6) 0%, transparent 20%, transparent 80%, rgba(22, 36, 32, 0.8) 100%);
}

/* Subtle background origami motifs */
.cinematic-origami-bg {
  position: absolute;
  pointer-events: none;
  opacity: 0.05;
  color: var(--color-gold);
  z-index: 2;
}

.cinematic-origami-bg.top-left {
  top: 40px;
  left: 40px;
  width: 180px;
  height: 180px;
}

.cinematic-origami-bg.bottom-right {
  bottom: 40px;
  right: 40px;
  width: 220px;
  height: 220px;
}

/* ==========================================================================
   Editorial Typography Overlays
   ========================================================================== */
.cinematic-overlays {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.narrative-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 24px));
  text-align: center;
  width: 90%;
  max-width: 900px;
  padding: 0 20px;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  pointer-events: none;
}

.narrative-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
  display: inline-block;
}

.narrative-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.15;
  font-style: italic;
  color: var(--color-cream);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
  margin-bottom: 18px;
}

.narrative-headline.roman {
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  font-weight: 400;
}

.narrative-subtext {
  font-family: var(--font-sans);
  font-size: clamp(11px, 1.2vw, 13px);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(246, 243, 233, 0.85);
  line-height: 1.8;
  max-width: 650px;
  margin: 0 auto;
}

.narrative-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px auto 0;
  width: 120px;
}

.narrative-divider .line {
  height: 1px;
  flex: 1;
  background: rgba(197, 160, 89, 0.4);
}

.narrative-divider .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-gold);
}

/* Scroll Prompt */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.5s ease;
}

.scroll-indicator.faded {
  opacity: 0;
}

.scroll-text {
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.scroll-pill {
  width: 18px;
  height: 30px;
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: 9999px;
  position: relative;
}

.scroll-pill::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background-color: var(--color-gold);
  border-radius: 9999px;
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
  70% {
    transform: translate(-50%, 10px);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 0;
  }
}

/* Safety clearance for desktop content so fixed left navigation never overlaps */
@media (min-width: 1024px) {
  .editorial-gutter {
    padding-left: 72px;
    padding-right: 72px;
  }
}


/* ==========================================================================
   Floating Glass Brand Elements (Phase 5 Refined)
   Top-Left Logo/Wordmark Pill & Bottom-Left Tagline Pill
   Ultra-Clear Transparent White Glass Design
   ========================================================================== */
.brand-pill-top {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.06) 100%);
  backdrop-filter: blur(24px) saturate(190%) brightness(108%);
  -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(108%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 
    0 12px 28px -4px rgba(0, 0, 0, 0.35),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 1px 0 rgba(255, 255, 255, 0.15);
  text-decoration: none;
  cursor: pointer;
  outline: none;
  transition: 
    transform 0.25s var(--nav-ease, cubic-bezier(0.16, 1, 0.3, 1)),
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.4s ease;
  will-change: transform, opacity;
  animation: brandPillFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.brand-pill-top:hover {
  background: rgba(255, 255, 255, 0.24);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.12) 100%);
  border-color: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
  box-shadow: 
    0 16px 36px -4px rgba(0, 0, 0, 0.45),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.95);
}

.brand-pill-top:focus-visible {
  box-shadow: 0 0 0 2px var(--color-gold);
}

.brand-avatar-box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #FFFFFF;
  line-height: 1;
  padding-top: 1px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.brand-pill-bottom {
  position: absolute;
  bottom: 28px;
  left: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(20px) saturate(190%) brightness(108%);
  -webkit-backdrop-filter: blur(20px) saturate(190%) brightness(108%);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 
    0 10px 24px -4px rgba(0, 0, 0, 0.30),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 1px 0 rgba(255, 255, 255, 0.10);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  pointer-events: none;
  user-select: none;
  animation: brandPillFadeIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  /* Liquid Glass tint variables */
  --glass-tint: rgba(20, 15, 10, 0.28);
  --glass-depth: 1.1;
  --glass-dome: 1.3;
  --glass-frost: 0.06;
}

.brand-tagline-dot {
  color: var(--color-gold);
  opacity: 0.85;
  font-size: 7px;
}

@keyframes brandPillFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Adjustments for Brand Pills */
@media (max-width: 767px) {
  .brand-pill-top {
    top: calc(14px + env(safe-area-inset-top, 0px));
    left: 16px;
    padding: 4px 11px 4px 5px;
    gap: 8px;
  }

  .brand-avatar-box {
    width: 24px;
    height: 24px;
  }

  .brand-name {
    font-size: 11.5px;
    letter-spacing: 0.22em;
  }

  .brand-pill-bottom {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    padding: 4px 10px;
    font-size: 7.5px;
    letter-spacing: 0.24em;
  }

  .scroll-indicator {
    bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Ultra-Clear White Glassmorphism System
   Transparent, crystal-clear, white-tinted glass with specular edge reflections
   ========================================================================== */
.glass-card-white,
.cake-intro-content,
.cake-scroll-card,
.cake-hero-content {
  background: rgba(255, 255, 255, 0.38);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.20) 100%);
  backdrop-filter: blur(28px) saturate(190%) contrast(102%) brightness(105%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(102%) brightness(105%);
  border: 1px solid rgba(255, 255, 255, 0.80);
  box-shadow: 
    0 20px 48px -10px rgba(40, 60, 55, 0.12),
    0 4px 16px -2px rgba(40, 60, 55, 0.05),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 1px 0 rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  transition: 
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
    box-shadow 0.35s ease, 
    border-color 0.35s ease;
}

.glass-card-white:hover {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 24px 56px -10px rgba(40, 60, 55, 0.16),
    0 6px 20px -2px rgba(40, 60, 55, 0.08),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 1px 0 rgba(255, 255, 255, 0.45);
}

/* Subtle Shimmer Sheen on Glass Cards */
.cake-scroll-card {
  position: relative;
  overflow: hidden;
  max-width: 580px;
  width: 90%;
  pointer-events: auto;
}

.cake-scroll-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 250%;
  height: 100%;
  background: linear-gradient(
    65deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  animation: glassSheen 8s infinite ease-in-out;
}

@keyframes glassSheen {
  0%, 100% {
    transform: translateX(-80%) skewX(-20deg);
    opacity: 0;
  }
  20% {
    opacity: 0.85;
  }
  45% {
    transform: translateX(80%) skewX(-20deg);
    opacity: 0;
  }
}

/* ==========================================================================
   Celebration Cakes Cinematic Showcase (#celebrations)
   ========================================================================== */
.celebrations-scroll-container {
  position: relative;
  width: 100%;
  background-color: var(--color-ivory);
}

.celebrations-pinned-viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.cake-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.celebrations-overlay {
  will-change: opacity, transform;
}

.cake-scroll-indicator.faded {
  opacity: 0 !important;
  pointer-events: none;
}

@media (max-width: 767px) {
  .cake-scroll-indicator {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  #cake-intro-overlay {
    padding-top: calc(70px + env(safe-area-inset-top, 0px));
  }
  
  #cake-scroll-message {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cake-scroll-card {
    padding: 22px 18px !important;
    border-radius: 16px !important;
  }
  
  #cake-hero-overlay {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Chef Reveal — Typography & Grand Calligraphy Brand Reveal
   Side-positioned for optimum contrast & unobstructed view of the chef's smile
   ========================================================================== */
.chef-grand-reveal {
  position: absolute;
  top: 50%;
  right: clamp(20px, 4.5vw, 64px);
  left: auto;
  transform: translateY(-50%);
  width: auto;
  max-width: clamp(340px, 36vw, 520px);
  z-index: 25;
  pointer-events: none;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

.chef-reveal-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 24px 28px;
  position: relative;
  border-radius: 20px;
  /* Ambient dark glass glow to maximize contrast against any background lighting */
  background: radial-gradient(ellipse at 30% 50%, rgba(15, 25, 22, 0.75) 0%, rgba(15, 25, 22, 0.35) 65%, transparent 100%);
}

.chef-reveal-eyebrow {
  font-family: var(--font-sans);
  font-size: clamp(9.5px, 1.0vw, 11.5px);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 6px;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.chef-cursive-brand {
  font-family: 'Pinyon Script', 'Alex Brush', cursive;
  font-size: clamp(3.2rem, 5.8vw, 5.8rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  /* Radiant Warm Liquid Gold Sheen */
  background: linear-gradient(135deg, #FFFDF8 0%, #F8ECC6 20%, #D4AF37 50%, #F5DE98 75%, #B8860B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 24px rgba(212, 175, 55, 0.45)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.95));
  margin: 0;
  padding: 0 4px 0 0;
  display: inline-block;
  will-change: transform, opacity;
  transform-origin: left center;
}

.chef-flourish-divider {
  width: 200px;
  max-width: 70%;
  margin: 6px 0 14px 0;
  color: var(--color-gold);
  opacity: 0.9;
}

.chef-flourish-svg {
  width: 100%;
  height: 22px;
  display: block;
}

.chef-flourish-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s ease-out;
}

.chef-cursive-sub {
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.4vw, 17.5px);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.16em;
  color: var(--color-cream);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
  margin-bottom: 16px;
  max-width: 460px;
  line-height: 1.4;
}

.chef-tags-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 22px;
  border-radius: 9999px;
  background: rgba(18, 30, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(197, 160, 89, 0.4);
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

.chef-tags-pill .dot {
  opacity: 0.5;
  font-size: 7px;
}

/* Brookies Scroll Container */
.brookies-scroll-container {
  position: relative;
  width: 100%;
  background-color: var(--color-cinematic-bg);
}

@media (max-width: 767px) {
  .chef-grand-reveal {
    right: auto;
    left: 50%;
    top: auto;
    bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: 92%;
    max-width: 400px;
    text-align: center;
  }

  .chef-reveal-wrapper {
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: radial-gradient(ellipse at center, rgba(15, 25, 22, 0.85) 0%, rgba(15, 25, 22, 0.45) 75%, transparent 100%);
  }

  .chef-cursive-brand {
    font-size: clamp(2.8rem, 11vw, 4.2rem);
    white-space: normal;
    transform-origin: center center;
    padding: 0;
  }

  .chef-flourish-divider {
    width: 150px;
    margin: 4px auto 10px;
  }

  .chef-cursive-sub {
    font-size: 11.5px;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    text-align: center;
  }

  .chef-tags-pill {
    padding: 5px 14px;
    font-size: 8px;
    gap: 8px;
    letter-spacing: 0.2em;
    align-self: center;
  }
}
