/* assets/style.css */
/* Core styling and design tokens for The Crooked Spoon */

@import url('https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,300..800;1,300..800&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&display=swap');

/* Design Tokens & Theme overrides */
:root {
  /* System font fallbacks */
  --font-logo: "Cooper Black", "Fraunces", "Cooper", "Georgia", serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;

  /* Color Palette (Light Mode defaults) */
  --brand-red: #C1553B;
  --brand-green: #2E3B2F;
  
  --bg-color: #FDFBF7;
  --text-color: #2E3B2F;
  --card-bg: #F5F2EA;
  --card-hover: #ECE8DD;
  --border-color: #E2DDD5;
  --accent-tint: rgba(193, 85, 59, 0.08);
  --success-color: #4A7A57;

  /* Specific map styling */
  --map-bg: #EAE8E2;
  --map-water: #B9D3C2;
  --map-street: #FDFBF7;

  /* Spacing system */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;

  --border-radius: 12px;
  --transition-fast: 0.2s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1100px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-color: #1E2520;
  --text-color: #FDFBF7;
  --card-bg: #273129;
  --card-hover: #2F3B32;
  --border-color: #38463B;
  --accent-tint: rgba(193, 85, 59, 0.15);

  --map-bg: #252A26;
  --map-water: #1C2B22;
  --map-street: #2F3831;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-padding {
  padding: var(--space-xl) 0;
}

/* Grid & Flex layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-logo);
  color: var(--text-color);
  line-height: 1.15;
  font-weight: 900;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--space-sm);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: var(--space-sm);
  position: relative;
}

h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
  font-weight: 400;
  max-width: 65ch;
}

a {
  color: var(--brand-red);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-slow), border-color var(--transition-slow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  height: 88px;
}

@media (min-width: 768px) {
  .nav-container {
    height: 96px;
  }
}

.logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  flex: 0 1 auto;
  min-width: 0;
}

.logo-svg {
  height: 52px;
  width: auto;
  max-width: 100%;
  overflow: visible;
  color: var(--text-color);
  transition: color var(--transition-slow);
}

@media (min-width: 768px) {
  .logo-svg {
    height: 62px;
  }
}

.nav-menu {
  display: none;
  list-style: none;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
    align-items: center;
  }
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: var(--text-color);
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-red);
  border-bottom-color: var(--brand-red);
  opacity: 1;
}

/* Buttons and Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  padding: 0.9rem 1.8rem;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand-red);
  color: #FDFBF7;
}

.btn-primary:hover {
  background-color: transparent;
  border-color: var(--brand-red);
  color: var(--brand-red);
  transform: translateY(-2px);
  opacity: 1;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--text-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
  transform: translateY(-2px);
  opacity: 1;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--card-bg);
  border-color: var(--text-color);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* Mobile Hamburger Trigger */
.menu-toggle-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.menu-toggle-btn svg {
  width: 28px;
  height: 28px;
}

@media (min-width: 768px) {
  .menu-toggle-btn {
    display: none;
  }
}

/* Mobile Nav Drawer overlay */
.mobile-nav {
  position: fixed;
  top: 88px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-color);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-md);
  gap: var(--space-md);
  border-top: 1px solid var(--border-color);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-nav .nav-link {
  font-size: 1.5rem;
  padding: var(--space-sm) 0;
  text-align: center;
}

/* Hero Section */
.hero {
  position: relative;
  background-color: var(--hero-tint);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  isolation: isolate;
}

.hero-content {
  max-width: 750px;
  text-align: center;
  margin: 0 auto;
  padding: var(--space-xxl) 0;
}

.hero-content p {
  font-size: 1.3rem;
  margin: var(--space-md) auto;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

/* Compact hero used for legal/short pages */
.hero-compact .hero-content {
  padding: var(--space-xl) 0 var(--space-lg) 0;
}

.hero-compact .hero-content p {
  font-size: 1.05rem;
}

/* ---------------------------------------------------------------
   Hero background patterns
   Each .hero paints a repeating pattern into ::before, plus a soft
   radial vignette in ::after so text stays readable over the top.
   Pattern colours are driven by --pattern-ink so dark mode works.
   --------------------------------------------------------------- */
:root {
  --pattern-ink: rgba(46, 59, 47, 0.10);
  --pattern-ink-soft: rgba(46, 59, 47, 0.055);
  --pattern-accent: rgba(193, 85, 59, 0.13);
  --hero-tint: var(--accent-tint);
}

[data-theme="dark"] {
  --pattern-ink: rgba(253, 251, 247, 0.11);
  --pattern-ink-soft: rgba(253, 251, 247, 0.06);
  --pattern-accent: rgba(193, 85, 59, 0.26);
  /* The dark accent tint is strong enough to read as a brown band against
     the body; dial the hero's own wash back so the section blends in. */
  --hero-tint: rgba(193, 85, 59, 0.06);
}

.hero::before {
  content: "";
  position: absolute;
  /* Oversized so neither the rotation nor the drift exposes an untiled edge */
  top: -320px;
  left: -420px;
  right: -420px;
  bottom: -320px;
  z-index: -2;
  pointer-events: none;
  /* Tilts the whole scatter off-axis so it never reads as a rigid grid */
  transform: rotate(-14deg);
}

/* Readability wash: fades the pattern out behind the copy */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 65% at 50% 50%,
    var(--bg-color) 0%,
    rgba(0, 0, 0, 0) 78%);
  opacity: 0.82;
}

/* Coffee beans — drifting scatter, used on every hero.
   Each bean is an ellipse body with a lighter crease slit laid over it,
   and the whole tile is rotated slightly so the beans sit off-axis. */
.hero-pattern-beans::before {
  background-image:
    /* creases (drawn first so they sit on top of their bodies) */
    radial-gradient(ellipse 1.5px 8px at 34px 44px, var(--bg-color) 99%, transparent 100%),
    radial-gradient(ellipse 1.5px 6px at 148px 118px, var(--bg-color) 99%, transparent 100%),
    radial-gradient(ellipse 1.5px 9px at 222px 26px, var(--bg-color) 99%, transparent 100%),
    radial-gradient(ellipse 1.5px 7px at 74px 182px, var(--bg-color) 99%, transparent 100%),
    radial-gradient(ellipse 1.5px 6px at 262px 148px, var(--bg-color) 99%, transparent 100%),
    radial-gradient(ellipse 1.5px 7px at 186px 78px, var(--bg-color) 99%, transparent 100%),
    /* bean bodies — mixed sizes and inks keep the scatter from looking stamped */
    radial-gradient(ellipse 9px 13px at 34px 44px, var(--pattern-ink) 99%, transparent 100%),
    radial-gradient(ellipse 7px 10px at 148px 118px, var(--pattern-accent) 99%, transparent 100%),
    radial-gradient(ellipse 10px 14px at 222px 26px, var(--pattern-ink) 99%, transparent 100%),
    radial-gradient(ellipse 8px 12px at 74px 182px, var(--pattern-ink-soft) 99%, transparent 100%),
    radial-gradient(ellipse 7px 10px at 262px 148px, var(--pattern-accent) 99%, transparent 100%),
    radial-gradient(ellipse 8px 11px at 186px 78px, var(--pattern-ink-soft) 99%, transparent 100%);
  background-size: 300px 210px;
  animation: hero-drift 48s linear infinite;
}

/* Drifts via background-position so it composes with the tile rotation
   on ::before (a transform-based drift would overwrite that rotate). */
@keyframes hero-drift {
  from { background-position: 0 0; }
  to   { background-position: -300px -210px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none !important;
  }
}

/* Cards & Grid elements */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-fast), background-color var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: var(--brand-red);
  background-color: var(--card-hover);
}

.card-img-wrapper {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--border-radius) - 4px);
  margin-bottom: var(--space-sm);
  background-color: var(--border-color);
}

.card-img-wrapper img, .card-img-wrapper svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Menu Page Styles */
.menu-tag {
  display: inline-block;
  background-color: var(--brand-red);
  color: #FDFBF7;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: var(--space-xs);
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-xs);
}

.menu-price {
  font-family: var(--font-logo);
  color: var(--brand-red);
  font-size: 1.3rem;
}

.menu-meta {
  font-size: 0.9rem;
  opacity: 0.7;
  font-style: italic;
}

.menu-grid-section {
  margin-bottom: var(--space-xl);
}

.menu-section-title {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: var(--space-xs);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Sold Out simulation box */
.sold-out-simulator {
  background-color: var(--accent-tint);
  border: 1px dashed var(--brand-red);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  margin-top: var(--space-xl);
  text-align: center;
}

.sold-out-badge {
  background-color: #A03D27;
  color: white;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  display: inline-block;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Testimonials / Reviews */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.testimonial-card {
  position: relative;
  padding: var(--space-lg) var(--space-md) var(--space-md) var(--space-md);
}

.quote-icon {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 32px;
  height: 32px;
  color: var(--brand-red);
  opacity: 0.15;
}

.testimonial-text {
  font-size: 1.15rem;
  font-style: italic;
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.testimonial-author {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-red);
}

.testimonial-source {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Photo Gallery on About Page */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  aspect-ratio: 1 / 1;
}

.gallery-item svg, .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover svg, .gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #FDFBF7;
  padding: var(--space-md) var(--space-sm) var(--space-sm) var(--space-sm);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Contact page map and form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
}

.form-control {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.8rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: border-color var(--transition-fast), outline var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-red);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  display: none;
  padding: var(--space-sm);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.form-status.success {
  display: block;
  background-color: var(--success-color);
  color: white;
}

.map-wrapper {
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 4 / 3;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.map-wrapper svg {
  width: 100%;
  height: 100%;
  display: block;
}

.location-sidebar-info {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sidebar-info-row {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.sidebar-info-row svg {
  width: 20px;
  height: 20px;
  color: var(--brand-red);
  flex-shrink: 0;
  margin-top: 3px;
}

/* Footer styling */
footer {
  margin-top: auto;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: var(--space-xl) 0 var(--space-md) 0;
  transition: background-color var(--transition-slow), border-color var(--transition-slow);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-logo {
  max-width: 200px;
  margin-bottom: var(--space-sm);
}

.footer-hours-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-hours-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.social-icon-btn:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background-color: var(--bg-color);
}

.social-icon-btn svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-legal-links {
  list-style: none;
  display: flex;
  gap: var(--space-md);
}

.footer-legal-links a {
  color: var(--text-color);
}

/* Style Guide swatches and displays */
.styleguide-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.swatch-card {
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.swatch-color {
  height: 100px;
  width: 100%;
}

.swatch-info {
  padding: var(--space-sm);
  background-color: var(--card-bg);
}

.swatch-info h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.swatch-info code {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Back-to-top button with Scroll progress */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-slow);
  z-index: 98;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--brand-red);
}

.back-to-top svg.arrow {
  position: absolute;
  width: 18px;
  height: 18px;
  color: var(--text-color);
  z-index: 2;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.back-to-top:hover svg.arrow {
  transform: translateY(-2px);
  color: var(--brand-red);
}

/* Progress ring overlay */
.progress-ring-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.progress-ring-circle {
  stroke: var(--brand-red);
  stroke-dasharray: 138.2; /* 2 * PI * r (r = 22) */
  stroke-dashoffset: 138.2;
  transition: stroke-dashoffset 0.1s linear;
}

/* Live indicators */
.live-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  background-color: var(--accent-tint);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.open {
  background-color: var(--success-color);
  box-shadow: 0 0 8px var(--success-color);
}

.status-dot.closed {
  background-color: var(--brand-red);
}

/* Inline icon container */
.icon-inline {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.2em;
  fill: currentColor;
  stroke: none;
}

/* Alert boxes */
.alert {
  padding: var(--space-md);
  border-left: 4px solid var(--brand-red);
  background-color: var(--accent-tint);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-bottom: var(--space-md);
}

.alert h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
  color: var(--brand-red);
}
/* ==========================================================================
   Demo banner — portfolio layer, not part of the mockup's own design.
   Sticks above the site header so the demo context stays visible on scroll.
   ========================================================================== */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 200; /* above the site header (z-index 100) */
  background: #1F2937;
  color: #F9FAFB;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.875rem;
  line-height: 1.4;
  border-bottom: 1px solid rgba(249, 250, 251, 0.15);
}
.demo-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.625rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.875rem;
  text-align: center;
}
.demo-banner__label {
  flex-shrink: 0;
  background: #F9FAFB;
  color: #1F2937;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.25rem;
}
.demo-banner__text { color: #E5E7EB; }
.demo-banner__cta {
  flex-shrink: 0;
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  border-radius: 0.25rem;
}
.demo-banner__cta:hover { color: #FCD34D; }
.demo-banner__cta:focus-visible {
  outline: 2px solid #FCD34D;
  outline-offset: 2px;
}
/* Site header sticks below the banner rather than under it */
.demo-banner ~ header { top: var(--demo-banner-h, 2.75rem); }

/* Long/short copy pairs: full sentence on desktop, terse on mobile. */
.demo-banner__short,
.demo-banner__cta-short { display: none; }

@media (max-width: 640px) {
  .demo-banner__inner {
    padding: 0.375rem 0.75rem;
    gap: 0.375rem;
    font-size: 0.75rem;
    flex-wrap: nowrap;       /* stay on one line */
    justify-content: space-between;
  }
  .demo-banner__label {
    font-size: 0.5625rem;
    padding: 0.125rem 0.375rem;
  }
  .demo-banner__text {
    min-width: 0;            /* allow ellipsis inside a flex item */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .demo-banner__long,
  .demo-banner__cta-long { display: none; }
  .demo-banner__short,
  .demo-banner__cta-short { display: inline; }
  .demo-banner__cta { font-size: 0.75rem; }
}

/* Very narrow phones: the label alone carries the "demo" signal. */
@media (max-width: 380px) {
  .demo-banner__text { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .demo-banner__cta { transition: color 0.2s ease; }
}
