/* ==========================================================================
   Grill & More — Shared Brand & Photo Design System (assets/site.css)
   Static HTML + Tailwind Play CDN + Alpine.js @3.14.9 (Zero build step)
   ========================================================================== */

:root {
  /* Core Palette Tokens */
  --bg-iron: #111113;
  --bg-charcoal: #18181B;
  --bg-slate: #27272A;
  --bg-alabaster: #FAFAF9;
  --bg-limestone: #F5F5F4;

  /* Ink Tokens (WCAG 2.1 AA Calibrated) */
  --ink-primary: #1C1917;
  --ink-secondary: #57534E;
  --ink-light: #F5F5F4;
  --ink-muted-dark: #A8A29E;
  --ink-muted-photo: #D6D3D1; /* stone-300: >=7:1 over dark photo scrims */

  /* Ember Brand Tokens */
  --ember-300: #FDBA74;
  --ember-400: #FB923C;
  --ember-600: #EA580C;
  --ember-700: #C2410C;
  --ember-800: #9A3412;

  /* Radii, Shadows & Motion */
  --radius-card: 1rem;
  --radius-frame: 1rem;
  --radius-btn: 0.625rem;
  --shadow-card: 0 1px 2px rgba(28, 25, 23, 0.04), 0 4px 12px -6px rgba(28, 25, 23, 0.06);
  --shadow-card-hover: 0 16px 34px -16px rgba(28, 25, 23, 0.16), 0 4px 12px -4px rgba(194, 65, 12, 0.08);
  --shadow-photo: 0 24px 50px -20px rgba(17, 17, 19, 0.45);
  --ease-brand: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   1. Fluid Brand Typography (clamp() scales)
   -------------------------------------------------------------------------- */
.display-hero {
  font-family: 'Barlow', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.25rem, 4.8vw, 4.125rem); /* 36px -> 66px */
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.display-hero-sub {
  font-family: 'Barlow', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.375rem); /* 32px -> 54px */
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-weight: 800;
}

.display-section {
  font-family: 'Barlow', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.75rem); /* 28px -> 44px */
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.display-card {
  font-family: 'Barlow', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.15rem, 1.5vw, 1.375rem); /* 18.4px -> 22px */
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.lead-copy {
  font-size: clamp(1.03125rem, 1.25vw, 1.1875rem); /* 16.5px -> 19px */
  line-height: 1.62;
}

/* Signature Brand Eyebrow with Leading Ember Accent Rule */
.eyebrow-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.eyebrow-brand::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  border-radius: 9999px;
  background-color: var(--ember-600);
  flex-shrink: 0;
}
.eyebrow-brand-dark {
  color: var(--ember-400);
}
.eyebrow-brand-dark::before {
  background-color: var(--ember-400);
}

.ember-rule {
  display: block;
  width: 48px;
  height: 3px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--ember-600), var(--ember-400));
}

/* --------------------------------------------------------------------------
   2. Section Rhythm Utilities
   -------------------------------------------------------------------------- */
.section-pad {
  padding-block: clamp(4.25rem, 7vw, 6.5rem); /* 68px -> 104px */
}
.section-pad-compact {
  padding-block: clamp(2.5rem, 4.5vw, 3.75rem); /* 40px -> 60px */
}

/* --------------------------------------------------------------------------
   3. Full-Bleed Photo Heroes, Photo Bands & Directional Scrims
   -------------------------------------------------------------------------- */
.photo-hero,
.photo-band {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-iron);
  color: var(--ink-light);
  isolation: isolate;
}

.photo-hero-home {
  min-height: clamp(580px, 76vh, 760px);
  display: flex;
  align-items: center;
}

.photo-hero-sub {
  min-height: clamp(380px, 46vh, 500px);
  display: flex;
  align-items: center;
}

.photo-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}

/* Right-anchored studio pane for product.html wide studio shot */
.photo-studio-pane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: -2;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .photo-studio-pane {
    left: auto;
    right: 0;
    width: 60%;
    object-position: 42% center;
  }
}

/* Scrim 1: Left-weighted directional scrim (lifestyle/factory heroes) */
.photo-scrim-left {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 85%, rgba(194, 65, 12, 0.20), transparent 52%),
    linear-gradient(180deg, rgba(17, 17, 19, 0.84) 0%, rgba(17, 17, 19, 0.74) 55%, rgba(17, 17, 19, 0.90) 100%);
}
@media (min-width: 1024px) {
  .photo-scrim-left {
    background:
      radial-gradient(ellipse at 14% 82%, rgba(194, 65, 12, 0.18), transparent 50%),
      linear-gradient(90deg,
        rgba(17, 17, 19, 0.94) 0%,
        rgba(17, 17, 19, 0.84) 42%,
        rgba(17, 17, 19, 0.34) 72%,
        rgba(17, 17, 19, 0.18) 100%);
  }
}

/* Scrim 2: Studio right-pane feather (product.html hero) */
.photo-scrim-studio-right {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(17, 17, 19, 0.82);
}
@media (min-width: 1024px) {
  .photo-scrim-studio-right {
    background: linear-gradient(90deg,
      #111113 0%,
      #111113 40%,
      rgba(17, 17, 19, 0.84) 52%,
      rgba(17, 17, 19, 0.20) 70%,
      rgba(17, 17, 19, 0.28) 100%);
  }
}

/* Scrim 3: Flame / CTA horizontal band scrim */
.photo-scrim-band {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 50%, rgba(194, 65, 12, 0.24), transparent 55%),
    linear-gradient(90deg,
      rgba(17, 17, 19, 0.92) 0%,
      rgba(17, 17, 19, 0.78) 55%,
      rgba(17, 17, 19, 0.56) 100%);
}

/* Scrim 4: Heavy scrim for card/spec-dense dark photo bands */
.photo-scrim-heavy {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(17, 17, 19, 0.90) 0%,
    rgba(17, 17, 19, 0.82) 50%,
    rgba(17, 17, 19, 0.92) 100%);
}

/* --------------------------------------------------------------------------
   4. Editorial Photo Frames, Badges & Frosted Glass Surfaces
   -------------------------------------------------------------------------- */
.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-frame);
  background-color: var(--bg-charcoal);
  border: 1px solid rgba(63, 63, 70, 0.75);
  box-shadow: var(--shadow-photo);
}

.photo-frame-light {
  border-color: #E7E5E4;
  box-shadow: 0 20px 44px -22px rgba(28, 25, 23, 0.28);
}

.photo-frame-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease-brand);
}

@media (hover: hover) {
  .photo-frame:hover .photo-frame-img {
    transform: scale(1.035);
  }
}

.visual-badge {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ember-400);
  background: rgba(17, 17, 19, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 4px 8px;
}

.visual-badge-subtle {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted-photo);
  background: rgba(17, 17, 19, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 8px;
}

.glass-dark {
  background: rgba(24, 24, 27, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-pill {
  background: rgba(17, 17, 19, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* --------------------------------------------------------------------------
   5. Card Polish, Buttons & Gallery Thumbnails
   -------------------------------------------------------------------------- */
.card-brand {
  background-color: #FFFFFF;
  border: 1px solid #E7E5E4;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s var(--ease-brand), box-shadow 0.24s var(--ease-brand), border-color 0.24s ease;
}
@media (hover: hover) {
  .card-brand:hover {
    transform: translateY(-3px);
    border-color: var(--ember-300);
    box-shadow: var(--shadow-card-hover);
  }
}

.card-accent-top {
  border-top: 2px solid var(--ember-600);
}

.btn-ember {
  background-color: var(--ember-700);
  color: #FFFFFF;
  border-radius: var(--radius-btn);
  box-shadow: 0 8px 20px -8px rgba(194, 65, 12, 0.65);
  transition: background-color 0.18s ease, transform 0.18s var(--ease-brand), box-shadow 0.18s ease;
}
.btn-ember:hover {
  background-color: var(--ember-800);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(154, 52, 18, 0.7);
}

.btn-glass-dark {
  background: rgba(24, 24, 27, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--ink-light);
  border-radius: var(--radius-btn);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.btn-glass-dark:hover {
  background: rgba(39, 39, 42, 0.90);
  border-color: rgba(251, 146, 60, 0.65);
}

.gallery-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid transparent;
  background-color: var(--bg-charcoal);
  transition: border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

/* --------------------------------------------------------------------------
   6. Accessibility (Reduced Motion) & Print Normalization
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .photo-frame-img,
  .card-brand,
  .btn-ember {
    transition: none !important;
    transform: none !important;
  }
  .photo-hero img {
    transition: none !important;
  }
}

@media print {
  .photo-bg-img,
  .photo-studio-pane,
  .photo-scrim-left,
  .photo-scrim-studio-right,
  .photo-scrim-band,
  .photo-scrim-heavy,
  .visual-badge,
  .visual-badge-subtle {
    display: none !important;
  }
  .photo-hero,
  .photo-band {
    min-height: 0 !important;
    background: #FFFFFF !important;
    color: #1C1917 !important;
    padding-block: 1.5rem !important;
  }
  .photo-hero *,
  .photo-band * {
    color: #1C1917 !important;
  }
  .glass-dark,
  .glass-pill {
    background: #F5F5F4 !important;
    border-color: #D6D3D1 !important;
    backdrop-filter: none !important;
  }
  .photo-hero .btn-ember,
  .photo-hero .btn-glass-dark {
    background: #FFFFFF !important;
    color: #1C1917 !important;
    border: 1px solid #D6D3D1 !important;
    box-shadow: none !important;
  }
  /* NOTE: Never add [x-cloak] { display: block !important; } here */
}

/* ==========================================================================
   7. v2 iteration — scroll reveal, header/hero polish, component micro-polish
   (all new visual rules live in this single block)
   ========================================================================== */

/* --- 7.1 Scroll reveal (only active when the head script set .js-reveal) --- */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.js-reveal [data-reveal-delay="1"] { transition-delay: .08s; }
.js-reveal [data-reveal-delay="2"] { transition-delay: .16s; }
.js-reveal [data-reveal-delay="3"] { transition-delay: .24s; }

/* Scrolled header fallback (mirrors the Alpine Tailwind classes; safe if JIT misses them). */
.header-scrolled {
  background-color: rgba(255, 255, 255, .85);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* --- 7.2 Grain overlay on dark photo heroes / bands (SVG feTurbulence) --- */
.photo-hero::after,
.photo-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
}

/* Oversize the hero image while desktop parallax is active (±40px travel). */
.photo-hero .photo-bg-img.has-parallax,
.photo-hero .photo-studio-pane.has-parallax {
  top: -40px;
  height: calc(100% + 80px);
}

/* --- 7.3 Section hairline utility (1px ember gradient, light-section joins) --- */
.divider-ember {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(234, 88, 11, .35), transparent);
}

/* --- 7.4 Typography / prose polish --- */
.display-hero,
.display-section {
  text-wrap: balance;
}
.lead-copy a {
  text-underline-offset: 3px;
  text-decoration-color: var(--ember-400);
}
.lead-copy a:hover {
  text-decoration-color: var(--ember-700);
}

/* --- 7.5 Card, button and gallery-thumb micro-polish --- */
@media (hover: hover) {
  .card-brand {
    transition: transform .25s var(--ease-brand), box-shadow .25s var(--ease-brand), border-color .25s ease;
  }
  .card-brand:hover {
    transform: translateY(-4px);
    border-color: var(--ember-300);
    box-shadow: inset 0 1px 0 rgba(234, 88, 11, .45), var(--shadow-card-hover);
  }
  /* Reveal must not cancel the card hover lift once the card is visible. */
  .js-reveal .card-brand.reveal.is-visible:hover {
    transform: translateY(-4px);
  }
}
.btn-ember:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px -8px rgba(194, 65, 12, .65);
}
.btn-glass-dark {
  transition: background-color .18s ease, border-color .18s ease, transform .18s var(--ease-brand), box-shadow .18s ease;
}
.btn-glass-dark:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45);
}
.btn-glass-dark:active {
  transform: translateY(0);
  box-shadow: none;
}
.gallery-thumb:focus-visible {
  outline: 2px solid var(--ember-600);
  outline-offset: 2px;
}

/* --- 7.6 Scenario gallery card hover --- */
.scenario-title {
  transition: color .25s ease;
}
@media (hover: hover) {
  .scenario-card:hover .scenario-title { color: var(--ember-700); }
}

/* --- 7.7 Reduced-motion + print resets (new effects never hide content) --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scenario-card:hover .scenario-img { transform: none !important; }
  .photo-hero .photo-bg-img.has-parallax,
  .photo-hero .photo-studio-pane.has-parallax { top: 0; height: 100%; }
  .btn-glass-dark { transition: none !important; transform: none !important; }
}
@media print {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .photo-hero::after,
  .photo-band::after { display: none !important; }
}

/* ==========================================================================
   8. Hero Crossfade (4-photo slideshow)
   ========================================================================== */

/* Slides 2-4 stay transparent until Alpine activates one, so the pre-Alpine
   first paint shows slide 1 only (no stacked-image flash). */
:where(.photo-hero) img + img {
  opacity: 0;
}
