/* ─────────────────────────────────────────────────────
   kin-kitchen-ui.css  —  Design system for Kin Kitchen
   Sits alongside the original styles.css.
   ───────────────────────────────────────────────────── */

:root {
  --ochre: #C8813A;
  --ochre-light: #E8A55A;
  --ochre-pale: #F2D4B0;
  --forest: #2D4A35;
  --forest-light: #3D6148;
  --cream: #F5ECD7;
  --cream-dark: #EDD9B8;
  --charcoal: #1C1C1C;
  --charcoal-soft: #2E2E2E;
  --warm-white: #FDFAF5;
  --text-muted: #7A6A55;
  --transition-screen: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.38s ease;
}

/* ── RESET & BASE ─────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--charcoal);
  color: var(--charcoal);
}

/* ── SCREEN WRAPPER ──────────────────────────────── */
.screens {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ── SCREEN (individual) ─────────────────────────── */
.screen {
  width: 100%;
  min-height: calc(100vh - 76px); /* leave room for bottom nav */
  position: absolute;
  top: 0; left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  /* hidden state */
  opacity: 0;
  pointer-events: none;
  transform: translateX(32px);
  transition: var(--transition-screen);
  display: flex;
  flex-direction: column;
}

.screen.screen--active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.screen.screen--exit {
  opacity: 0;
  transform: translateX(-32px);
  pointer-events: none;
}

/* ── SCREEN 1: SPLASH ─────────────────────────────── */
.screen-splash {
  background: var(--charcoal);
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  overflow: hidden;
}

.splash-texture {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(200,129,58,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(45,74,53,0.2) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23C8813A' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.splash-geo {
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  border: 1px solid rgba(200,129,58,0.2);
  border-radius: 50%;
  animation: rotSlow 30s linear infinite;
}
.splash-geo::before {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(200,129,58,0.1);
  border-radius: 50%;
}

@keyframes rotSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 360px;
}

.kk-wordmark {
  font-family: 'Playfair Display', serif;
  font-size: 88px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 8px;
}

.kk-subtitle {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 20px;
}

.splash-tagline {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 20px;
  color: rgba(245,236,215,0.7);
  line-height: 1.5;
  margin-bottom: 0;
}

/* ── 3D Title Card ──────────────────────────────── */
.title-card-3d {
  position: relative;
  transform-style: preserve-3d;
  border-radius: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(200,129,58,0.3);
  padding: 40px 28px 32px;
  margin-bottom: 36px;
  will-change: transform;
  cursor: default;
  overflow: hidden;
  animation: card-float 5s ease-in-out infinite;
}

.title-card-3d.is-tilting {
  animation: none;
  transition: transform 0.08s linear;
}

@keyframes card-float {
  0%, 100% { transform: perspective(800px) translateY(0px)   rotateX(0deg)   rotateY(0deg); }
  25%       { transform: perspective(800px) translateY(-5px)  rotateX(1.5deg) rotateY(-1deg); }
  75%       { transform: perspective(800px) translateY(-8px)  rotateX(-1deg)  rotateY(1.5deg); }
}

.title-card-3d__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.12) 0%, transparent 65%);
  pointer-events: none;
  transition: background 0.08s linear;
  mix-blend-mode: overlay;
  z-index: 1;
}

.title-card-3d__geo {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,129,58,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.title-card-3d .kk-wordmark,
.title-card-3d .kk-subtitle,
.title-card-3d .splash-tagline {
  position: relative;
  z-index: 2;
}

/* ── BUTTONS ─────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ochre);
  color: var(--warm-white);
  padding: 18px 36px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary:hover { background: var(--ochre-light); }

.btn-ghost {
  display: inline-block;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 20px;
  cursor: pointer;
  letter-spacing: 0.5px;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
}

.btn-secondary {
  width: 100%;
  padding: 16px;
  border: 1.5px solid var(--charcoal);
  background: transparent;
  color: var(--charcoal);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

/* ── SCREEN 2: NATION ─────────────────────────────── */
.screen-nation {
  background: var(--cream);
  padding: 40px 32px 80px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
}

.screen-header { margin-bottom: 28px; flex-shrink: 0; }

.btn-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 0;
  margin-bottom: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.btn-back:hover { color: var(--ochre); }

.step-label {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 12px;
}

.screen-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.screen-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.nation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.nation-card {
  background: var(--warm-white);
  border: 1.5px solid var(--cream-dark);
  border-radius: 16px;
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.nation-card.selected {
  border-color: var(--ochre);
  background: rgba(200,129,58,0.05);
}

.nation-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.nation-card-region {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nation-card-dot {
  position: absolute;
  top: 12px; right: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--cream-dark);
}

.nation-card.selected .nation-card-dot {
  background: var(--ochre);
  border-color: var(--ochre);
}

.skip-link {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  padding: 12px;
  background: none;
  border: none;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
}

/* ── SCREEN 3: UPLOAD ─────────────────────────────── */
.screen-upload {
  background: #0a0a0a;
  background-image: radial-gradient(circle, rgba(200,129,58,0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px 16px 80px;
  box-sizing: border-box;
}

/* ── Upload Game Card (uc-*) ──────────────────────── */
:root {
  --uc-clip: polygon(
    0 22px, 8px 8px, 22px 0,
    calc(100% - 10px) 0, 100% 10px,
    100% calc(100% - 28px),
    calc(100% - 14px) calc(100% - 14px),
    calc(100% - 28px) 100%,
    14px 100%, 0 calc(100% - 14px)
  );
}

.uc-back {
  align-self: center;
  width: 100%;
  max-width: 70vw;
  margin-top: 60px;
  position: relative;
  z-index: 2;
}

.uc-border {
  width: 100%;
  padding: 3px;
  background: linear-gradient(135deg,
    #C8813A 0%, #F5B04A 30%, #8A5520 55%, #C8813A 75%, #F5D080 100%);
  clip-path: var(--uc-clip);
  filter:
    drop-shadow(0 2px 0 #5A3010)
    drop-shadow(0 4px 0 #3A1E08)
    drop-shadow(0 6px 0 #1E0E02)
    drop-shadow(0 14px 30px rgba(0,0,0,0.85))
    drop-shadow(0  0  18px rgba(200,129,58,0.25));
}

.uc-inner {
  width: 100%;
  background: linear-gradient(160deg, #1A1006 0%, #0E0804 60%, #160F05 100%);
  clip-path: var(--uc-clip);
  padding: 28px 32px 24px;
  box-sizing: border-box;
  position: relative;
}

.uc-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,200,80,0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.uc-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200,129,58,0.85);
  background: rgba(200,129,58,0.10);
  border: 1px solid rgba(200,129,58,0.28);
  padding: 4px 10px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.uc-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: #F5E8CC;
  margin: 0 0 6px;
  position: relative;
  z-index: 1;
}

.uc-desc {
  font-size: 13px;
  color: rgba(245,232,204,0.5);
  margin: 0 0 20px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.upload-zone {
  border: 1.5px dashed rgba(200,129,58,0.4);
  border-radius: 4px;
  padding: 28px 32px;
  text-align: center;
  cursor: pointer;
  background: rgba(0,0,0,0.35);
  transition: all 0.2s;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: rgba(200,129,58,0.75);
  background: rgba(200,129,58,0.05);
}

.upload-icon {
  width: 40px; height: 40px;
  margin: 0 auto 14px;
  display: block;
}

.upload-label {
  font-size: 16px;
  font-weight: 600;
  color: #F5E8CC;
  margin-bottom: 6px;
}

.upload-sub {
  font-size: 11px;
  color: rgba(200,129,58,0.6);
  letter-spacing: 0.03em;
  margin-bottom: 14px;
  line-height: 1.5;
}

.upload-type-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.upload-type-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  background: rgba(200,129,58,0.10);
  border: 1px solid rgba(200,129,58,0.30);
  color: rgba(245,176,74,0.85);
  cursor: pointer;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.04em;
}

.upload-type-btn:hover {
  background: rgba(200,129,58,0.25);
  color: #FFD980;
}

.uc-gallery-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: rgba(200,129,58,0.08);
  border: 1px solid rgba(200,129,58,0.25);
  color: rgba(245,176,74,0.85);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background 0.15s, color 0.15s;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.uc-gallery-btn:hover {
  background: rgba(200,129,58,0.20);
  color: #FFD980;
}

.uc-tips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.uc-tips span {
  font-size: 11px;
  color: rgba(245,232,204,0.32);
  letter-spacing: 0.02em;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dark);
}

/* Progress steps (upload) */
.kk-progress {
  padding: 24px;
  background: var(--cream);
  border-radius: 4px;
  margin-bottom: 24px;
}

.kk-progress__steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kk-progress__step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.kk-progress__step.kk-progress__step--active { color: var(--charcoal); }
.kk-progress__step.kk-progress__step--done { color: var(--forest); }
.kk-progress__step.kk-progress__step--done .kk-progress__dot::after {
  content: '✓';
  font-size: 12px;
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.kk-progress__dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--cream-dark);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kk-progress__step--active .kk-progress__dot { background: var(--ochre); }

.kk-error {
  background: rgba(181,60,60,0.08);
  border: 1px solid rgba(181,60,60,0.3);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 14px;
  color: #b53c3c;
  margin-top: 16px;
}

/* ── SCREEN 4: DETECTION ───────────────────────────── */
/* ── SCREEN 4: DETECT ─────────────────────────────── */
.screen-detect {
  background: #0a0a0a;
  background-image: radial-gradient(circle, rgba(200,129,58,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 24px 40px;
  box-sizing: border-box;
  overflow-y: auto;
}

/* ── Monitor card — centered, self-contained ── */
.detect-monitor {
  width: 100%;
  max-width: 640px;
  background: #131313;
  border-radius: 18px;
  border: 1px solid rgba(200,129,58,0.25);
  box-shadow:
    0 0 0 1px rgba(200,129,58,0.08),
    0 24px 60px rgba(0,0,0,0.8),
    0 0 40px rgba(200,129,58,0.06);
  overflow: hidden;
  animation: monitorIn 0.7s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes monitorIn {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Top bar */
.monitor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.monitor-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mdot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.mdot-r { background: #ff5f57; }
.mdot-y { background: #ffbd2e; }
.mdot-g { background: #28c840; }

.monitor-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(200,129,58,0.6);
}

/* Image pane */
.detect-image-area {
  position: relative;
  width: 100%;
  height: 280px;
  background: #0d0d0d;
  overflow: hidden;
  flex-shrink: 0;
}

/* Name overlay on image bottom */
.detect-name-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  padding: 32px 20px 16px;
}

.detect-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200,129,58,0.8);
  margin: 0 0 4px;
}

.detect-name-text {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: #F5E8CC;
  margin: 0 0 2px;
  line-height: 1.15;
}

.detect-ojibwe-text {
  font-size: 13px;
  color: rgba(245,232,204,0.45);
  margin: 0;
  font-style: italic;
}

.detect-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.bbox-overlay {
  position: absolute;
  border: 2px solid var(--ochre);
  border-radius: 2px;
  animation: pulse 2s ease-in-out infinite;
  transition: all 0.4s ease;
}

.bbox-label {
  position: absolute;
  top: -28px; left: 0;
  background: var(--ochre);
  color: white;
  font-size: 11px;
  padding: 3px 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,129,58,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(200,129,58,0); }
}

.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ochre), transparent);
  animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
  0%   { top: 0%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.detect-panel {
  background: #131313;
  padding: 20px 22px 22px;
  border-top: 1px solid rgba(200,129,58,0.12);
}

.detect-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.detect-ingredient-name {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 4px;
}

.detect-ojibwe-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ochre);
  margin-bottom: 24px;
}

.detect-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.detect-ingredient-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.detect-ingredient-chip {
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  background: rgba(200,129,58,0.15);
  color: var(--ochre);
  border: 1px solid rgba(200,129,58,0.35);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.detect-ingredient-chip:hover {
  background: rgba(200,129,58,0.25);
  border-color: var(--ochre);
}

.tag {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
}

.tag-forest { background: rgba(45,74,53,0.4); color: #7BAF84; }
.tag-ochre  { background: rgba(200,129,58,0.2); color: var(--ochre-light); }
.tag-cream  { background: rgba(245,236,215,0.1); color: rgba(245,236,215,0.6); }

.audio-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 12px 20px;
  margin-bottom: 28px;
  cursor: pointer;
  transition: background 0.2s;
}

.audio-chip:hover { background: rgba(255,255,255,0.08); }

.audio-play {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ochre);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-play svg { width: 12px; height: 12px; fill: white; margin-left: 2px; }

.audio-waveform {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.wave-bar {
  flex: 1;
  background: rgba(200,129,58,0.4);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
  height: 100%;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; height: 60%; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 90%; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; height: 40%; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; height: 75%; }
.wave-bar:nth-child(6) { animation-delay: 0.5s; height: 55%; }
.wave-bar:nth-child(7) { animation-delay: 0.6s; height: 85%; }
.wave-bar:nth-child(8) { animation-delay: 0.7s; height: 45%; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%       { transform: scaleY(1); opacity: 1; }
}

.audio-label {
  font-size: 12px;
  color: rgba(245,236,215,0.5);
  letter-spacing: 0.5px;
}

.btn-full {
  width: 100%;
  padding: 18px;
  background: var(--forest);
  color: var(--cream);
  border: none;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 12px;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}

.btn-full:hover { background: var(--forest-light); }

/* ── SCREEN 5: RECIPE ─────────────────────────────── */
.screen-recipe {
  background: var(--cream);
}

.recipe-hero {
  background: var(--forest);
  padding: 60px 32px 80px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.recipe-hero-geo {
  position: absolute;
  bottom: -40px; right: -40px;
  width: 200px; height: 200px;
  border: 1px solid rgba(200,129,58,0.2);
  border-radius: 50%;
}

.recipe-hero-geo::before {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(200,129,58,0.1);
  border-radius: 50%;
}

.recipe-nation {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 16px;
}

.recipe-title-ojibwe {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 38px;
  color: var(--cream);
  line-height: 1.1;
  margin-bottom: 8px;
}

.recipe-title-english {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: rgba(245,236,215,0.6);
  font-weight: 400;
  margin-bottom: 28px;
}

.recipe-meta {
  display: flex;
  gap: 24px;
}

.recipe-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recipe-meta-val {
  font-size: 20px;
  font-weight: 300;
  color: var(--cream);
}

.recipe-meta-key {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(245,236,215,0.4);
}

.recipe-body { padding: 32px 28px; }

.recipe-section-label {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 20px;
}

.ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 36px;
}

.ingredient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-dark);
  cursor: pointer;
  transition: all 0.15s;
}

.ingredient-row:hover {
  background: rgba(200,129,58,0.05);
  margin: 0 -8px;
  padding: 14px 8px;
}

.ingredient-row-clickable {
  cursor: pointer;
}

.ingredient-row-clickable:hover {
  background: rgba(200,129,58,0.08);
}

.ingredient-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ingredient-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ochre);
  flex-shrink: 0;
}

.ingredient-name { font-size: 15px; color: var(--charcoal); }

.ingredient-ojibwe {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--text-muted);
}

.ingredient-amount { font-size: 13px; color: var(--text-muted); }

.step-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 36px;
}

.step-item { display: flex; gap: 20px; }

.step-num {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 400;
  color: var(--ochre-pale);
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
}

.step-title {
  font-weight: 500;
  font-size: 15px;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-ar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 14px;
  background: rgba(200,129,58,0.1);
  border: 1px solid rgba(200,129,58,0.3);
  border-radius: 100px;
  font-size: 11px;
  color: var(--ochre);
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  background: none;
}

.step-ar-btn:hover { background: rgba(200,129,58,0.1); }

/* Suggested recipes mini-list */
.kk-recipe-suggestions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.kk-recipe-sug {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--warm-white);
  border: 1px solid var(--cream-dark);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.kk-recipe-sug:hover { border-color: var(--ochre); background: rgba(200,129,58,0.04); }
.kk-recipe-sug--selected { border-color: var(--ochre); background: rgba(200,129,58,0.08); box-shadow: 0 0 0 2px rgba(200,129,58,0.2); }

.kk-recipe-sug__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kk-recipe-sug__build {
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 6px;
  border: 1.5px solid #C8813A;
  background: #C8813A;
  color: #FFF8EE;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.kk-recipe-sug__build:hover { background: #A06228; }
.kk-recipe-sug__build:active { transform: scale(0.94); }

.kk-recipe-sug__name { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--charcoal); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kk-recipe-sug__match { flex-shrink: 0; font-size: 11px; color: var(--ochre); letter-spacing: 1px; font-weight: 600; }

/* ── SCREEN 6: AR ─────────────────────────────────── */
.screen-ar {
  background: #0a0a0a;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 48px;
}

.ar-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: radial-gradient(circle at center, rgba(200,129,58,0.08) 0%, transparent 70%);
  overflow: hidden;
}

/* CookingAR canvas fills the viewport */
.ar-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.ar-ingredient-hint {
  position: absolute;
  font-size: 80px;
  opacity: 0.3;
  transition: opacity 0.5s;
}

/* Hide hint once 3D is ready */
.ar-viewport.ar-ready .ar-ingredient-hint { opacity: 0; }

.ar-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,129,58,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,129,58,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.ar-corner {
  position: absolute;
  width: 40px; height: 40px;
  z-index: 3;
}

.ar-corner-tl { top: 40px; left: 40px; border-top: 2px solid var(--ochre); border-left: 2px solid var(--ochre); }
.ar-corner-tr { top: 40px; right: 40px; border-top: 2px solid var(--ochre); border-right: 2px solid var(--ochre); }
.ar-corner-bl { bottom: 220px; left: 40px; border-bottom: 2px solid var(--ochre); border-left: 2px solid var(--ochre); }
.ar-corner-br { bottom: 220px; right: 40px; border-bottom: 2px solid var(--ochre); border-right: 2px solid var(--ochre); }

.ar-panel {
  position: relative;
  z-index: 4;
  width: 100%;
  padding: 0 24px;
}

.ar-card {
  background: rgba(28,28,28,0.9);
  border: 1px solid rgba(200,129,58,0.2);
  border-radius: 8px;
  padding: 20px 24px;
  backdrop-filter: blur(20px);
  margin-bottom: 16px;
}

.ar-step-label {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 8px;
}

.ar-step-text {
  font-size: 16px;
  color: var(--cream);
  line-height: 1.5;
  margin-bottom: 16px;
}

.ar-progress { display: flex; gap: 6px; }

.ar-prog-dot {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}

.ar-prog-dot.done   { background: var(--ochre); }
.ar-prog-dot.active { background: var(--ochre-light); animation: progPulse 1s ease-in-out infinite; }

@keyframes progPulse {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

.ar-controls { display: flex; gap: 12px; }

.ar-btn {
  flex: 1;
  padding: 14px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}

.ar-btn-prev { background: rgba(255,255,255,0.08); color: var(--cream); }
.ar-btn-prev:hover { background: rgba(255,255,255,0.14); }
.ar-btn-next { background: var(--ochre); color: white; }
.ar-btn-next:hover { background: var(--ochre-light); }

/* ── SCREEN: 3D KITCHEN ──────────────────────────── */
.screen-kitchen3d {
  display: flex;
  flex-direction: row;
  background: #080603;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  min-height: 100vh;
}

/* Canvas area — padded so the windowed frame floats inside */
#kitchen3d-canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 56px 52px 56px 40px;
  display: flex;
  align-items: stretch;
  background:
    radial-gradient(ellipse at 60% 40%, rgba(200,129,58,0.05) 0%, transparent 55%),
    #080603;
}

/* Outer border frame — matches uc-border, but darker/more bronze */
.k3d-window-frame {
  flex: 1;
  padding: 7px;
  background: linear-gradient(135deg,
    #7A4518 0%, #A06028 35%, #5A3010 55%, #8A5220 78%, #9A6830 100%);
  clip-path: var(--uc-clip);
  filter:
    drop-shadow(0 2px 0 #3A1C06)
    drop-shadow(0 5px 0 #200E02)
    drop-shadow(0 16px 36px rgba(0,0,0,0.95))
    drop-shadow(0  0  20px rgba(140,80,20,0.30));
  display: flex;
  align-items: stretch;
}

/* Inner canvas — matches uc-inner dark gradient + same clip-path */
#kitchen3d-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #1A1006 0%, #0E0804 60%, #160F05 100%);
  clip-path: var(--uc-clip);
}

#kitchen3d-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.kitchen3d-overlay {
  position: absolute;
  top: 56px;
  left: 40px;
  right: 52px;
  bottom: 56px;
  z-index: 10;
  pointer-events: none;
  display: none;
  clip-path: var(--uc-clip);
  overflow: hidden;
}

/* ── Sidebar (LEFT) ─────────────────────────────────── */
#kitchen3d-sidebar {
  width: 430px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #1A1006 0%, #0E0804 60%, #160F05 100%);
  border-right: 1px solid rgba(200,129,58,0.32);
  overflow: hidden;
  z-index: 20;
  position: relative;
}

/* Gold sheen along the right edge */
#kitchen3d-sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(200,129,58,0.55) 25%,
    rgba(245,176,74,0.4) 50%,
    rgba(200,129,58,0.55) 75%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.k3d-top {
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(200,129,58,0.18);
  background: linear-gradient(180deg, rgba(200,129,58,0.07) 0%, rgba(200,129,58,0.02) 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.k3d-top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.k3d-story-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--forest);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
  white-space: nowrap;
}
.k3d-story-btn:hover { background: var(--forest-light); }

/* Remove old k3d-mid — recipe info now lives inside k3d-panel-section */

/* ── Sidebar bottom panel — two clearly segmented containers ── */
.k3d-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0;
}

.k3d-panel-section {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(200,129,58,0.20);
}

/* Recipe block — compact, content height only */
.k3d-panel-section--recipe {
  flex-shrink: 0;
  padding: 0 24px 12px;
  background: linear-gradient(180deg, rgba(45,74,53,0.28) 0%, rgba(45,74,53,0.10) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
}

/* Instructions block — extends to fill all remaining sidebar height */
.k3d-panel-section--steps {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Framed panel: strong border on all sides with a bronze inset glow */
  border-top: 2px solid rgba(200,129,58,0.55);
  border-left: 1px solid rgba(200,129,58,0.25);
  border-right: 1px solid rgba(200,129,58,0.20);
  border-bottom: none;
  background:
    linear-gradient(180deg, rgba(200,129,58,0.06) 0%, rgba(0,0,0,0.30) 60px),
    rgba(8,6,3,0.70);
  box-shadow: inset 0 1px 0 rgba(245,176,74,0.18), inset 0 0 40px rgba(0,0,0,0.35);
  margin: 0 10px 0;
  border-radius: 8px 8px 0 0;
  position: relative;
}

/* Section header label row */
.k3d-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(200,129,58,0.70);
  padding: 10px 22px 8px;
  background: rgba(200,129,58,0.06);
  border-bottom: 1px solid rgba(200,129,58,0.14);
  flex-shrink: 0;
}

/* Instructions panel header — dedicated framed header */
.k3d-panel-section--steps > .k3d-section-label {
  font-size: 9.5px;
  letter-spacing: 0.20em;
  color: rgba(245,236,215,0.85);
  padding: 8px 24px 7px;
  background: rgba(200,129,58,0.14);
  border-bottom: 1px solid rgba(200,129,58,0.28);
  display: flex;
  align-items: center;
  gap: 10px;
}

.k3d-panel-section--steps > .k3d-section-label::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, #F5B04A, #C8813A);
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(245,176,74,0.50);
}

/* Recipe section label — accent bar + integrated look */
.k3d-panel-section--recipe > .k3d-section-label {
  font-size: 9.5px;
  letter-spacing: 0.20em;
  color: rgba(245,236,215,0.85);
  padding: 10px 24px 9px;
  margin: 0 -24px;
  background: rgba(200,129,58,0.08);
  border-bottom: 1px solid rgba(200,129,58,0.18);
  display: flex;
  align-items: center;
  gap: 10px;
}

.k3d-panel-section--recipe > .k3d-section-label::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: linear-gradient(180deg, #F5B04A, #C8813A);
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(245,176,74,0.50);
}

.k3d-recipe-nation {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-top: 14px;
  margin-bottom: 6px;
}

.k3d-recipe-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.25;
  margin-bottom: 6px;
}

.k3d-recipe-desc {
  font-size: 14px;
  color: rgba(245,236,215,0.65);
  line-height: 1.55;
  margin-bottom: 4px;
}

/* ── Floating stew model-viewer inside recipe section ── */
.k3d-stew-viewer-wrap {
  flex-shrink: 0;
  margin: 4px 0 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.k3d-stew-viewer {
  width: 210px;
  height: 210px;
  flex-shrink: 0;
  background: transparent;
  --poster-color: transparent;
}

.kitchen3d-ingredient-label {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(200,129,58,0.18);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(200,129,58,0.45);
  margin-top: 6px;
}

.k3d-bottom {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,129,58,0.25) transparent;
}
.k3d-bottom::-webkit-scrollbar { width: 4px; }
.k3d-bottom::-webkit-scrollbar-track { background: transparent; }
.k3d-bottom::-webkit-scrollbar-thumb { background: rgba(200,129,58,0.25); border-radius: 2px; }

/* CookingGuide card overrides when rendered inside sidebar */
#k3d-instructions #cg-root {
  position: static !important;
  inset: auto !important;
}
#k3d-instructions #cg-card {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  width: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
#k3d-instructions .cg-done-btns {
  padding-bottom: 24px;
}

/* Center step action buttons within the canvas area (sidebar is now on left, 430px wide) */
#cg-start-cutting,
#cg-start-pouring,
#cg-start-boiling,
#cg-start-veggies,
#cg-start-beans-corn,
#cg-start-stirring {
  left: calc(430px + (100vw - 430px) / 2) !important;
}

/* Mobile: canvas on top, sidebar below */
@media (max-width: 700px) {
  .screen-kitchen3d { flex-direction: column; }
  #kitchen3d-canvas-wrap {
    flex: none;
    height: 45vh;
    order: 1;
    padding: 12px;
  }
  #kitchen3d-sidebar {
    width: 100%;
    border-right: none;
    border-top: 1px solid rgba(200,129,58,0.25);
    height: 55vh;
    order: 2;
  }
  .k3d-panel-section--steps {
    margin: 0 6px 0;
  }
  .k3d-panel-section--steps > .k3d-section-label::before { display: none; }
  .k3d-window-frame {
    clip-path: var(--uc-clip);
  }
  #cg-start-cutting, #cg-start-pouring, #cg-start-boiling,
  #cg-start-veggies, #cg-start-beans-corn, #cg-start-stirring {
    left: 50% !important;
    bottom: calc(55vh + 16px) !important;
  }
}

.kitchen3d-btn {
  padding: 8px 14px;
  border: 1px solid rgba(200,129,58,0.4);
  background: rgba(28,28,28,0.85);
  color: var(--cream);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s;
}

.kitchen3d-btn:hover {
  background: rgba(200,129,58,0.25);
}

.kitchen3d-btn--active {
  background: var(--ochre);
  border-color: var(--ochre);
  color: #fff;
}

.kitchen3d-btn--active:hover {
  background: var(--ochre-light);
}

/* ── SCREEN 7: STORY ─────────────────────────────── */
.screen-story {
  background: #0a0a0a;
  background-image: radial-gradient(circle, rgba(200,129,58,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 24px 80px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.story-inner {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
}

.story-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(200,129,58,0.75);
  margin-bottom: 14px;
}

.story-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: #F5E8CC;
  line-height: 1.2;
  margin-bottom: 20px;
}

.story-body {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(245,232,204,0.55);
  margin-bottom: 28px;
  font-style: italic;
  font-family: 'Playfair Display', serif;
}

/* ── Video gold card ── */
.story-video-card {
  width: 100%;
  border: 1px solid rgba(200,129,58,0.30);
  border-radius: 14px;
  background: rgba(200,129,58,0.05);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 0 24px rgba(200,129,58,0.08);
}

.story-video-card__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: transparent;
  border: none;
  color: #C8813A;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.story-video-card__trigger:hover { background: rgba(200,129,58,0.10); color: #F5B04A; }

.story-video-wrap { width: 100%; }

.story-video {
  width: 100%;
  display: block;
  border-radius: 0 0 12px 12px;
}

.story-attribution {
  padding: 18px 0;
  border-top: 1px solid rgba(200,129,58,0.12);
  border-bottom: 1px solid rgba(200,129,58,0.12);
  margin-bottom: 24px;
}

.story-attr-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245,232,204,0.28);
  margin-bottom: 5px;
}

.story-attr-name {
  font-size: 14px;
  color: rgba(245,232,204,0.65);
}

.story-land {
  font-size: 12px;
  color: rgba(245,232,204,0.28);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 8px;
}

/* ── SCREEN 8: WORD ──────────────────────────────── */
.screen-word {
  background: var(--forest);
  padding: 60px 32px;
  justify-content: center;
}

.word-day-label {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(200,129,58,0.8);
  margin-bottom: 32px;
}

.word-ojibwe {
  font-family: 'Playfair Display', serif;
  font-size: 52px;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 12px;
}

.word-english {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 22px;
  color: rgba(245,236,215,0.5);
  margin-bottom: 32px;
}

.word-image {
  width: 100%; height: 200px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.word-image-geo {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(200,129,58,0.05) 10px,
    rgba(200,129,58,0.05) 20px
  );
}

.word-play {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  margin-bottom: 32px;
}

.word-play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ochre);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.word-play-btn svg { width: 14px; height: 14px; fill: white; margin-left: 2px; }

.word-play-text {
  font-size: 13px;
  color: rgba(245,236,215,0.6);
  letter-spacing: 0.5px;
}

/* ── ANIME TOP NAV ───────────────────────────────── */
.anime-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding-top: 14px;
  pointer-events: none;
}

.anime-nav-wrapper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

/* Mascot track — FIXED so it's never clipped by anything */
.anime-mascot-track {
  position: fixed;
  top: 14px;       /* matches .anime-nav padding-top */
  left: 0;         /* JS sets this to tab center - 30px */
  width: 60px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: left;
  z-index: 10000;
}

/* Mascot body — bobs vertically */
.anime-mascot {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: mascotBob 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.7));
  position: relative;
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0px)  scale(1); }
  50%       { transform: translateY(-6px) scale(1); }
}

/* Hover: shake + scale */
.anime-mascot.mascot--hover {
  animation: mascotShake 0.5s ease-in-out forwards;
}

@keyframes mascotShake {
  0%   { transform: scale(1)    rotate(0deg); }
  20%  { transform: scale(1.12) rotate(-6deg); }
  45%  { transform: scale(1.12) rotate(6deg); }
  65%  { transform: scale(1.06) rotate(-3deg); }
  82%  { transform: scale(1.03) rotate(2deg); }
  100% { transform: scale(1)    rotate(0deg); }
}

/* Eyes squint on hover */
#mascot-eye-l, #mascot-eye-r {
  transform-box: fill-box;
  transform-origin: center center;
  transition: transform 0.15s ease;
}
.mascot--hover #mascot-eye-l,
.mascot--hover #mascot-eye-r {
  transform: scaleY(0.18);
}

/* Sparkles */
.mascot-sparkle {
  position: absolute;
  font-size: 13px;
  opacity: 0;
  transform: scale(0) rotate(-20deg);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.2s ease;
}
.mascot-sparkle--1 { top: -4px;  right: -6px; }
.mascot-sparkle--2 { top: -10px; left: 2px;   transition-delay: 0.09s; }
.mascot--hover .mascot-sparkle {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Pointer */
.anime-mascot-pointer {
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid white;
  margin-top: -3px;
}

/* ── Progress stepper pill ── */
.anime-nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(8,8,8,0.82);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 16px;
  border-radius: 999px;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  gap: 0;
  animation: navSlideIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes navSlideIn {
  from { transform: translateY(-22px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* Connector line between steps */
.progress-connector {
  width: 36px;
  height: 2px;
  background: rgba(255,255,255,0.10);
  border-radius: 2px;
  flex-shrink: 0;
  transition: background 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Fill animation when step is completed */
.progress-connector.completed::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #C8813A, #F5B04A);
  border-radius: 2px;
  animation: connectorFill 0.4s ease forwards;
}

@keyframes connectorFill {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

/* Each step */
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: default;
  user-select: none;
  min-width: 56px;
}

.progress-step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}

.step-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.30);
  transition: opacity 0.2s;
}

.step-check {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px; height: 10px;
  opacity: 0;
  transition: opacity 0.2s 0.1s;
}

.progress-step-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.28);
  transition: color 0.3s;
  white-space: nowrap;
}

/* ── Active step ── */
.progress-step.active .progress-step-dot {
  background: rgba(200,129,58,0.25);
  border-color: #C8813A;
  box-shadow: 0 0 0 4px rgba(200,129,58,0.12),
              0 0 16px rgba(200,129,58,0.30);
  animation: stepGlow 2s ease-in-out infinite;
}

@keyframes stepGlow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(200,129,58,0.10), 0 0 14px rgba(200,129,58,0.20); }
  50%       { box-shadow: 0 0 0 6px rgba(200,129,58,0.20), 0 0 26px rgba(200,129,58,0.40); }
}

.progress-step.active .step-num { color: #F5B04A; }
.progress-step.active .progress-step-label { color: #F5B04A; font-weight: 700; }

/* ── Completed step ── */
.progress-step.completed .progress-step-dot {
  background: #C8813A;
  border-color: #C8813A;
  box-shadow: 0 0 10px rgba(200,129,58,0.40);
}

.progress-step.completed .step-num  { opacity: 0; }
.progress-step.completed .step-check { opacity: 1; }
.progress-step.completed .progress-step-label { color: rgba(245,176,74,0.65); }

/* ── SPINNER (reuse existing styles.css def if present) ── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(200,129,58,0.3);
  border-top-color: var(--ochre);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.spinner--faint {
  border-color: rgba(200,129,58,0.1);
  border-top-color: rgba(200,129,58,0.2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── LOADING BACK COMPAT (old ar-loading div) ────── */
.ar-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--cream);
  font-size: 13px;
  z-index: 5;
}

/* Register --glow-start as animatable so CSS @keyframes can drive it */
@property --glow-start {
  syntax: '<number>';
  initial-value: 0;
  inherits: false;
}

@keyframes glow-spin {
  to { --glow-start: 360; }
}

/* ─────────────────────────────────────────────────────
   GLOWING CARD EFFECT
   Tracks mouse position and renders a rotating conic-gradient
   border arc that follows the cursor.

   CSS vars set by glow.js per-frame:
     --glow-start   : current angle (degrees) of the arc start
     --glow-active  : 0 (hidden) or 1 (visible)

   Colours are Kin Kitchen-themed:
     ochre (#C8813A), ochre-light (#E8A55A),
     forest (#2D4A35), forest-light (#3D6148), cream (#F5ECD7)
   ───────────────────────────────────────────────────── */

/* The card itself just needs position:relative and overflow:visible */
.glowing-card {
  position: relative;
  isolation: isolate;
}

/* Outer glow on hover — box-shadow stays outside the card, no bleed */
.nation-card:hover {
  box-shadow:
    0 0 12px rgba(200,129,58,0.35),
    0 0 28px rgba(200,129,58,0.15),
    0 0 6px  rgba(45,74,53,0.2);
}

.nation-card.selected {
  box-shadow:
    0 0 16px rgba(200,129,58,0.5),
    0 0 36px rgba(200,129,58,0.25),
    0 0 8px  rgba(45,74,53,0.3);
}

/*
  The ::after pseudo-element renders the glow arc.
  It sits *outside* the card border (inset: -1px) and uses
  mask-composite:intersect to carve the border shape out.
*/
.glowing-card::after {
  content: '';
  position: absolute;
  /* Extend exactly 1px beyond the card edge on all sides */
  inset: -1px;
  border-radius: inherit;
  /* Transparent border so the gradient shows through only within it */
  border: 1px solid transparent;

  /* Kin Kitchen-themed gradient — matches ochre/forest/cream palette */
  background:
    radial-gradient(circle,            #C8813A 10%, #C8813A00 20%),
    radial-gradient(circle at 40% 40%, #E8A55A  5%, #E8A55A00 15%),
    radial-gradient(circle at 60% 60%, #2D4A35 10%, #2D4A3500 20%),
    radial-gradient(circle at 40% 60%, #F5ECD7  8%, #F5ECD700 18%),
    repeating-conic-gradient(
      from 236.84deg at 50% 50%,
      #C8813A  0%,
      #E8A55A  calc(25% / 5),
      #2D4A35  calc(50% / 5),
      #3D6148  calc(75% / 5),
      #C8813A  calc(100% / 5)
    );

  /* Fixed attachment so the gradient stays stable while element scrolls */
  background-attachment: fixed;

  /* Fade in/out smoothly as --glow-active changes */
  opacity: var(--glow-active, 0);
  transition: opacity 300ms ease;

  /*
    Mask technique (same as the React original):
      Layer 1: fully transparent → hides the background fill
      Layer 2: conic sweep centred at --glow-start ± --glow-spread
               → reveals only the border arc aligned to the mouse
    mask-composite:intersect means only pixels visible in BOTH layers show.
  */
  -webkit-mask-clip: padding-box, border-box;
          mask-clip: padding-box, border-box;
  -webkit-mask-composite: destination-in;
          mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(#0000, #0000),
    conic-gradient(
      from calc((var(--glow-start, 0) - 40) * 1deg),
      #00000000 0deg,
      #fff,
      #00000000 calc(40 * 2deg)
    );
  mask-image:
    linear-gradient(#0000, #0000),
    conic-gradient(
      from calc((var(--glow-start, 0) - 40) * 1deg),
      #00000000 0deg,
      #fff,
      #00000000 calc(40 * 2deg)
    );

  pointer-events: none;
  z-index: 0;
}

/* On dark-bg cards (ar-card, detect-panel) boost visibility slightly */
.screen-ar     .glowing-card::after,
.screen-detect .glowing-card::after,
.screen-story  .glowing-card::after {
  opacity: calc(var(--glow-active, 0) * 1.3);
}

/* Selected nation card — full rotating glow border, always on */
.nation-card.selected::after {
  opacity: 1 !important;
  animation: glow-spin 3s linear infinite;
}

/* Selected card — reveal full border (not just arc) */
.nation-card.selected::after {
  -webkit-mask-image:
    linear-gradient(#0000, #0000),
    linear-gradient(#fff, #fff);
  mask-image:
    linear-gradient(#0000, #0000),
    linear-gradient(#fff, #fff);
}

/* ═══════════════════════════════════════════════════════
   WebXR / Immersive Entry Styles
   ═══════════════════════════════════════════════════════ */

/* ── Immersive Entry — Primary CTA button ─────────────── */
.btn-xr-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 20px 28px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #C8813A 0%, #A05C20 100%);
  color: #FFF8EE;
  border: none;
  border-radius: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow:
    0 4px 24px rgba(200,129,58,0.50),
    0 0 0 1.5px rgba(200,129,58,0.35),
    inset 0 1px 0 rgba(255,255,255,0.15);
  animation: xr-pulse-shadow 2.6s ease-in-out infinite;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-xr-entry:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow:
    0 8px 36px rgba(200,129,58,0.65),
    0 0 0 2px rgba(200,129,58,0.6),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-xr-entry:active {
  transform: scale(0.97);
}

@keyframes xr-pulse-shadow {
  0%, 100% { box-shadow: 0 4px 24px rgba(200,129,58,0.50), 0 0 0 1.5px rgba(200,129,58,0.35), inset 0 1px 0 rgba(255,255,255,0.15); }
  50%       { box-shadow: 0 4px 40px rgba(200,129,58,0.80), 0 0 0 3px   rgba(200,129,58,0.55), inset 0 1px 0 rgba(255,255,255,0.20); }
}

/* ── XR tagline under entry button ───────────────────── */
.xr-tagline {
  font-size: 12px;
  color: rgba(245,236,215,0.45);
  text-align: center;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  font-style: italic;
}

/* ── 3D Nation Map canvas wrapper (inside .screen-nation) ─ */
.nation-map-canvas-wrap,
#nation-map-canvas-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
  background: #0D1810;
  border: 1px solid rgba(200,129,58,0.18);
  flex-shrink: 0;
}

/* Allow nation screen to scroll when 3D map + cards don't fit */
.screen-nation {
  overflow-y: auto !important;
}

/* ── XR button wrapper — pulsing SVG ring ─────────────── */
.xr-btn-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.xr-pulse-ring {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  pointer-events: none;
  opacity: 0.85;
}

/* ── kitchen3d XR button variant ─────────────────────── */
.kitchen3d-btn--xr {
  background: linear-gradient(135deg, rgba(200,129,58,0.55) 0%, rgba(160,98,40,0.55) 100%) !important;
  color: #FFF8EE !important;
  border: 1.5px solid rgba(200,129,58,0.55) !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 12px rgba(200,129,58,0.30);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  white-space: nowrap;
}

.kitchen3d-btn--xr:hover {
  background: linear-gradient(135deg, rgba(200,129,58,0.8) 0%, rgba(160,98,40,0.8) 100%) !important;
  box-shadow: 0 4px 20px rgba(200,129,58,0.55);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   HERO3D SPLASH  —  ports GrowthSync Hero3D layout to Kin Kitchen
   ═══════════════════════════════════════════════════════════ */

/* ── Splash container: full-screen, dark base ─────────────── */
.hero-splash {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0E0B07;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

#hero3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Film grain overlay ───────────────────────────────────── */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  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)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  mix-blend-mode: overlay;
}

/* ── Left content panel ───────────────────────────────────── */
.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 52px;
  width: min(520px, 52%);
  min-height: 100%;
  background: linear-gradient(
    105deg,
    rgba(14, 11, 7, 0.92) 0%,
    rgba(14, 11, 7, 0.78) 65%,
    rgba(14, 11, 7, 0.0) 100%
  );
}

/* ── Brand header ─────────────────────────────────────────── */
.hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  animation: heroFadeUp 0.7s ease both;
}

.hero-brand__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ochre);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-brand__dot { color: rgba(200,129,58,0.45); font-size: 1.1rem; }

.hero-brand__sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  color: rgba(245,236,215,0.45);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Title block ──────────────────────────────────────────── */
.hero-title-wrap {
  margin-bottom: 20px;
  animation: heroFadeUp 0.8s ease 0.1s both;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--cream);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-title--em { color: var(--ochre); font-style: italic; }

.hero-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(245,236,215,0.65);
  line-height: 1.55;
}

/* ── Sub text ─────────────────────────────────────────────── */
.hero-subtext {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: rgba(245,236,215,0.42);
  line-height: 1.6;
  margin-bottom: 32px;
  animation: heroFadeUp 0.9s ease 0.2s both;
}

/* ── CTAs ─────────────────────────────────────────────────── */
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  animation: heroFadeUp 1.0s ease 0.3s both;
}

.hero-btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1.5px solid var(--ochre);
  background: var(--ochre);
  color: #0E0B07;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.1s, color 0.25s;
  letter-spacing: 0.01em;
}

.hero-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(101%);
  transition: transform 0.38s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 0;
}
.hero-btn-primary > * { position: relative; z-index: 1; }
.hero-btn-primary:hover::after { transform: translateY(0); }
.hero-btn-primary:hover { color: var(--ochre); box-shadow: 0 6px 24px rgba(200,129,58,0.45); }
.hero-btn-primary:active { transform: scale(0.98); }

.hero-btn-secondary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1.5px solid rgba(245,236,215,0.22);
  background: rgba(245,236,215,0.07);
  color: rgba(245,236,215,0.8);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
}

.hero-btn-secondary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245,236,215,0.12);
  transform: translateY(101%);
  transition: transform 0.38s cubic-bezier(0.19, 1, 0.22, 1);
}
.hero-btn-secondary:hover::after { transform: translateY(0); }
.hero-btn-secondary:hover { border-color: rgba(245,236,215,0.45); }
.hero-btn-secondary:active { transform: scale(0.98); }

/* ── Ghost link ───────────────────────────────────────────── */
.hero-ghost {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: rgba(245,236,215,0.32);
  cursor: pointer;
  transition: color 0.2s;
  animation: heroFadeUp 1.1s ease 0.4s both;
  margin-top: 4px;
  background: none;
  border: none;
  padding: 0;
}
.hero-ghost:hover { color: rgba(245,236,215,0.65); }

/* ── Floating coords — top right ──────────────────────────── */
.hero-coords {
  position: absolute;
  top: 28px;
  right: 32px;
  z-index: 20;
  text-align: right;
  animation: heroFadeIn 1.2s ease 0.5s both;
}

.hero-coords__line {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,236,215,0.28);
  line-height: 1.8;
}

.hero-coords__line--highlight { color: var(--ochre); opacity: 0.75; }

/* ── Logo cloud — absolute at bottom ─────────────────────── */
.hero-logo-cloud {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
}

/* ── Entry animations ─────────────────────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Edge vignette — frames the 3D, adds cinematic depth ─── */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 80% at 70% 50%,
      transparent 30%,
      rgba(14, 11, 7, 0.55) 70%,
      rgba(14, 11, 7, 0.92) 100%),
    linear-gradient(to bottom,
      rgba(14, 11, 7, 0.55) 0%,
      transparent 18%,
      transparent 72%,
      rgba(14, 11, 7, 0.70) 100%);
}

/* ── Loading pulse — shown while the 34 MB GLB is fetching ── */
.hero-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  gap: 7px;
  align-items: center;
  pointer-events: none;
  opacity: 0;                /* hidden by default — JS shows it */
  transition: opacity 0.5s ease;
}

.hero-loader span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ochre);
  opacity: 0.7;
  animation: heroLoaderPulse 1.1s ease-in-out infinite;
}
.hero-loader span:nth-child(2) { animation-delay: 0.18s; }
.hero-loader span:nth-child(3) { animation-delay: 0.36s; }

@keyframes heroLoaderPulse {
  0%, 100% { transform: scale(0.6); opacity: 0.25; }
  50%       { transform: scale(1.2); opacity: 0.85; }
}

/* ── Responsive: mobile ───────────────────────────────────── */
@media (max-width: 640px) {
  .hero-content {
    width: 100%;
    padding: 36px 28px 120px;
    background: linear-gradient(
      180deg,
      rgba(14,11,7,0.95) 0%,
      rgba(14,11,7,0.85) 60%,
      rgba(14,11,7,0.0) 100%
    );
    justify-content: flex-end;
  }
  .hero-title { font-size: 2.0rem; }
  .hero-ctas  { flex-direction: column; }
  .hero-btn-primary,
  .hero-btn-secondary { width: 100%; justify-content: center; }
  .hero-coords { top: 16px; right: 16px; }
  .hero-loader { left: 50%; transform: translate(-50%, -50%); }
  .hero-vignette {
    background:
      linear-gradient(to bottom,
        rgba(14,11,7,0.7) 0%,
        transparent 25%,
        transparent 60%,
        rgba(14,11,7,0.85) 100%);
  }
}



/* ── Hero Food Card — rough game-card with angled 3D edges ───────────────── */

/* Jagged polygon shared between border shell and inner face */
/* Top-left chip, top-right notch, right-side nick, bottom-right chip, bottom-left notch */
:root {
  --hfc-clip: polygon(
    0        22px,
    8px       8px,
    22px      0,
    calc(100% - 10px) 0,
    100%      10px,
    100%      calc(100% - 28px),
    calc(100% - 14px) calc(100% - 14px),
    calc(100% - 28px) 100%,
    14px      100%,
    0         calc(100% - 14px)
  );
}

#hero-food-card {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  perspective: 1000px;
  cursor: pointer;
  --rx: 0deg;
  --ry: 0deg;
}

/* ── Outer border shell (slightly larger, gold) ── */
.hfc-border {
  padding: 3px;
  background: linear-gradient(135deg,
    #C8813A 0%, #F5B04A 30%, #8A5520 55%, #C8813A 75%, #F5D080 100%);
  clip-path: var(--hfc-clip);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.10s ease;
  will-change: transform;
  /* 3D card thickness illusion via layered shadows */
  filter:
    drop-shadow(0 2px 0 #5A3010)
    drop-shadow(0 4px 0 #3A1E08)
    drop-shadow(0 6px 0 #1E0E02)
    drop-shadow(0 14px 30px rgba(0,0,0,0.85))
    drop-shadow(0  0  18px rgba(200,129,58,0.25));
}

#hero-food-card:hover .hfc-border {
  filter:
    drop-shadow(0 2px 0 #7A4820)
    drop-shadow(0 4px 0 #5A3010)
    drop-shadow(0 6px 0 #3A1E08)
    drop-shadow(0 20px 40px rgba(0,0,0,0.9))
    drop-shadow(0  0  28px rgba(200,129,58,0.50));
}

/* ── Inner face ── */
.hfc-inner {
  width: 218px;
  background: linear-gradient(160deg, #1A1006 0%, #0E0804 60%, #160F05 100%);
  clip-path: var(--hfc-clip);
  overflow: hidden;
  padding-bottom: 18px;
  position: relative;
}

/* Bevel highlight — top-left edge catch */
.hfc-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,200,80,0.10) 0%,
    transparent 40%);
  pointer-events: none;
  z-index: 3;
}

.hfc-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse at 50% 35%, rgba(200,129,58,0.20) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hfc-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 218px;
  height: 160px;
  position: relative;
  z-index: 1;
}

.hfc-avatar svg {
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 0 16px var(--accent, #C8813A));
  transition: filter 0.3s ease, transform 0.3s ease;
}

#hero-food-card:hover .hfc-avatar svg {
  filter: drop-shadow(0 0 26px var(--accent, #C8813A));
  transform: translateY(-5px) scale(1.07);
}

.hfc-desc {
  font-size: 11px;
  color: rgba(245,232,204,0.45);
  margin: 5px 0 0;
  line-height: 1.55;
}

.hfc-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  padding: 10px 0 2px;
  position: relative;
  z-index: 2;
}

.hfc-dot {
  width: 7px;
  height: 7px;
  background: rgba(200,129,58,0.22);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.hfc-dot--active {
  background: var(--accent, #C8813A);
  transform: scale(1.5);
}

.hfc-dot:hover:not(.hfc-dot--active) {
  background: rgba(200,129,58,0.5);
}

/* Corner rune marks */
.hfc-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200,129,58,0.75);
  background: rgba(200,129,58,0.08);
  border: 1px solid rgba(200,129,58,0.22);
  padding: 3px 7px;
  /* angled badge corners */
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  z-index: 4;
}

.hfc-body {
  padding: 4px 18px 2px;
  position: relative;
  z-index: 2;
}

.hfc-ojibwe {
  font-size: 10px;
  letter-spacing: 0.10em;
  color: rgba(200,129,58,0.65);
  margin: 0 0 2px;
  font-style: italic;
}

.hfc-en {
  font-size: 19px;
  font-weight: 800;
  color: #F5E8CC;
  margin: 0;
  line-height: 1.15;
  text-shadow: 0 1px 8px rgba(200,129,58,0.4);
}

/* Angled game-style button */
.hfc-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 10px 16px 0;
  padding: 9px 0;
  background: rgba(200,129,58,0.13);
  border: none;
  color: rgba(245,176,74,0.9);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  z-index: 2;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background 0.15s, color 0.15s;
  outline: none;
}

.hfc-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(200,129,58,0.4);
  border-bottom: 1px solid rgba(200,129,58,0.4);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  pointer-events: none;
}

.hfc-btn:hover {
  background: rgba(200,129,58,0.28);
  color: #FFD980;
}

@media (max-width: 768px) {
  #hero-food-card { display: none; }
}
