/* ===================================================
   SAMARIA JUDEA — Ancient Ground Design System v18
   CesiumJS + Google Photorealistic 3D Tiles + Regions
   =================================================== */

:root {
  --bg: #FAF6EF;
  --bg-warm: #F2EDE4;
  --stone-warm: #E8D9C4;
  --stone-deep: #C9AD86;
  --stone-aged: #A89272;
  --text: #2A2520;
  --text-warm: #3D352E;
  --text-secondary: #6E6459;
  --terracotta: #6B4C3B;
  --gold: #C9A96E;
  --gold-dark: #A88B50;
  --gold-light: #E8D9B0;
  --green: #5C7A56;
  --green-light: #7A9A6E;
  --alert: #A63D40;
  --sea: #A8C5D4;
  --black: #1C1810;
  --white: #FFFFFF;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui: 'Inter', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* =========== RESET =========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-ui); cursor: pointer; border: none; background: none; }

/* =========== FOCUS INDICATORS =========== */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.map-filter-btn:focus-visible, #tour-btn:focus-visible, #map-search:focus-visible { outline-color: #FFE8B0; }

/* =========== SKIP LINK =========== */
.skip-link {
  position: fixed; top: -100%; left: 50%; transform: translateX(-50%);
  z-index: 100001; padding: 12px 24px; border-radius: 0 0 8px 8px;
  background: var(--gold); color: var(--black);
  font-family: var(--font-ui); font-size: 13px; font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* =========== FILM GRAIN =========== */
#grain { position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.03; mix-blend-mode: multiply; }

/* =========== SCROLL PROGRESS =========== */
#scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 10002; }
#scroll-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--gold), var(--terracotta)); }

/* =========== SCROLL REVEALS =========== */
@supports (animation-timeline: view()) {
  .reveal { animation: revealUp linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  @keyframes revealUp { from { opacity: 0; transform: translateY(50px); filter: blur(3px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
}
@supports not (animation-timeline: view()) {
  .reveal { opacity: 0; transform: translateY(50px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
  .reveal.visible { opacity: 1; transform: translateY(0); }
}

/* =========== ENTRANCE — Cinematic Video =========== */
#entrance {
  position: fixed; inset: 0; z-index: 10000; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 1.2s var(--ease-out), visibility 1.2s;
}
#entrance.done { opacity: 0; visibility: hidden; pointer-events: none; }
#entrance-line { width: 0; height: 1px; background: var(--gold); transition: width 1.5s var(--ease-out); margin-bottom: 28px; }
#entrance.typing #entrance-line { width: 80px; }
#entrance-text {
  font-family: var(--font-display); font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--text); letter-spacing: 0.01em; min-height: 2em;
  text-align: center; padding: 0 24px; position: relative; z-index: 3;
}
#entrance-cursor {
  display: inline-block; width: 2px; height: 1.1em; background: var(--gold);
  margin-left: 2px; animation: cursorBlink 0.8s infinite; vertical-align: text-bottom;
}
@keyframes cursorBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
#entrance-skip {
  position: absolute; bottom: 48px; font-size: 13px; color: var(--text-secondary);
  letter-spacing: 0.1em; text-transform: uppercase;
  opacity: 0.6; transition: opacity 0.5s; padding: 12px 20px; z-index: 5;
}
#entrance-skip:hover { opacity: 1; }
#entrance-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1; opacity: 0; transition: opacity 1.5s var(--ease-out); pointer-events: none;
}
#entrance-title {
  position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none; opacity: 0; transition: opacity 1.8s var(--ease-out);
}
.entrance-pre {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,232,176,0.7); margin-bottom: 16px;
}
#entrance-title h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 6rem); color: var(--gold-light);
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  text-shadow: 0 4px 60px rgba(0,0,0,0.6), 0 2px 20px rgba(0,0,0,0.3);
}
#entrance.filming #entrance-video { opacity: 1; }
#entrance.filming #entrance-text, #entrance.filming #entrance-line { opacity: 0; transition: opacity 0.8s; }
#entrance.filming #entrance-skip { color: rgba(255,232,176,0.6); z-index: 5; }
#entrance.filming { background: var(--black); }
#entrance.titled #entrance-title { opacity: 1; }
#entrance.film-done { opacity: 0; transition: opacity 2.5s var(--ease-in-out); }
#entrance.film-done #entrance-video { filter: brightness(0.85) saturate(1.1); }
#entrance.film-done #entrance-skip { opacity: 0; transition: opacity 0.3s; }

/* =========== HERO — Photo Split =========== */
#hero { position: relative; height: 300vh; width: 100%; }
#hero-sticky { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; background: var(--black); }
.split-half { position: absolute; left: 0; width: 100%; height: 100%; overflow: hidden; will-change: transform, opacity; }
#sp-top { top: 0; clip-path: inset(0 0 50% 0); }
#sp-bot { top: 0; clip-path: inset(50% 0 0 0); }
.split-half img {
  width: 100%; height: 100%; object-fit: cover; will-change: transform;
  filter: saturate(1.15) brightness(0.92) sepia(0.08);
}
#hero-glow {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 2px; height: 100vh;
  background: linear-gradient(180deg, transparent, rgba(201,169,110,0.6) 30%, rgba(232,217,196,0.9) 50%, rgba(201,169,110,0.6) 70%, transparent);
  opacity: 0; pointer-events: none; z-index: 3; will-change: opacity, width, filter;
}
#hero-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: clamp(180px, 30vw, 320px); height: clamp(180px, 30vw, 320px);
  color: var(--gold); opacity: 0; will-change: opacity; pointer-events: none;
}
#hero-title {
  position: absolute; z-index: 4; left: 50%; top: 50%;
  transform: translate(-50%, -50%); text-align: center; width: 100%; padding: 0 24px;
  opacity: 0; will-change: opacity;
}
#hero-title .pre {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 20px;
}
#hero-title h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(52px, 11vw, 130px); letter-spacing: 0.06em; line-height: 0.95; margin-bottom: 20px;
  background: linear-gradient(180deg, var(--text) 20%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#hero-title .g-line { width: 72px; height: 3px; background: var(--gold); margin: 0 auto 20px; border-radius: 2px; }
#hero-title .tagline {
  font-family: var(--font-body); font-size: clamp(14px, 2vw, 20px);
  color: var(--text-secondary); font-style: italic; font-weight: 400;
}
#journey {
  position: absolute; right: clamp(16px, 2.5vw, 36px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 20;
  opacity: 0; transition: opacity 0.5s ease;
}
#journey.visible { opacity: 1; }
.journey-label {
  font-family: var(--font-ui); font-size: 9px; letter-spacing: 0.25em;
  color: rgba(42,37,32,0.3); text-transform: uppercase; writing-mode: vertical-rl;
}
.journey-track { width: 2px; height: 80px; border-radius: 1px; background: rgba(201,169,110,0.12); overflow: hidden; }
#journey-fill { width: 100%; height: 0%; background: var(--gold); border-radius: 1px; transition: height 0.1s linear; }
#hero-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 2px; z-index: 25;
  pointer-events: none; background: rgba(201,169,110,0.06); opacity: 0; transition: opacity 0.3s ease;
}
#hero-progress.visible { opacity: 1; }
#hero-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(201,169,110,0.4), var(--gold));
  box-shadow: 0 0 10px rgba(201,169,110,0.3); transition: width 0.08s linear;
}
#scroll-hint {
  position: absolute; bottom: clamp(24px, 5vh, 48px); left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; flex-direction: column; align-items: center;
  gap: 12px; opacity: 1; transition: opacity 0.5s ease;
}
#scroll-hint.gone { opacity: 0; pointer-events: none; }
.scroll-line { width: 1px; height: 36px; background: linear-gradient(to bottom, transparent, var(--gold)); opacity: 0.5; }
#scroll-hint span {
  font-family: var(--font-ui); font-size: 10px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: rgba(42,37,32,0.35);
}
.scroll-chevron { animation: scroll-bounce 2.2s ease-in-out infinite; }
@keyframes scroll-bounce { 0%,100%{transform:translateY(0);opacity:0.5} 50%{transform:translateY(6px);opacity:0.9} }

/* =========== NAVIGATION =========== */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  padding: 0 clamp(16px, 3vw, 40px); height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(250,246,239,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(201,169,110,0.12);
  transform: translateY(-100%); transition: transform 0.6s var(--ease-out);
}
#nav.visible { transform: translateY(0); }
.nav-logo { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-family: var(--font-ui); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); transition: color 0.3s; }
.nav-links a:hover { color: var(--terracotta); }
.nav-date { font-family: var(--font-ui); font-size: 11px; color: var(--text-secondary); letter-spacing: 0.04em; }
.nav-hamburger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 10px; }
.nav-hamburger span { display: block; width: 20px; height: 1.5px; background: var(--text); transition: transform 0.3s, opacity 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 768px) { .nav-links,.nav-date { display: none; } .nav-hamburger { display: flex; } }
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 280px; z-index: 10001;
  background: var(--bg); transform: translateX(100%); transition: transform 0.4s var(--ease-out);
  box-shadow: -8px 0 40px rgba(0,0,0,0.1);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-inner { padding: 80px 32px 40px; display: flex; flex-direction: column; gap: 28px; }
.nav-drawer-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-bottom: 16px; }
.nav-drawer-brand span { color: var(--gold); }
.nav-drawer a { font-family: var(--font-ui); font-size: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); transition: color 0.3s; }
.nav-drawer a:hover { color: var(--terracotta); }

/* =========== MAP SECTION — CesiumJS + Google 3D Tiles =========== */
#map-section { position: relative; width: 100%; background: var(--black); }
#map-header { padding: 48px clamp(16px,4vw,48px) 24px; text-align: center; background: var(--black); }
#map-header h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--gold-light); letter-spacing: 0.06em; }
#map-header p { font-family: var(--font-ui); font-size: 12px; color: rgba(255,232,176,0.45); margin-top: 8px; letter-spacing: 0.15em; text-transform: uppercase; }
#map-wrap { position: relative; width: 100%; height: clamp(500px, 85vh, 900px); }

/* CesiumJS container */
#cesium-container { width: 100%; height: 100%; filter: saturate(1.3) contrast(1.05) sepia(0.08); }
#cesium-container canvas { outline: none !important; }
.cesium-widget, .cesium-widget canvas { outline: none !important; }
.cesium-viewer .cesium-widget-credits, .cesium-viewer .cesium-viewer-toolbar, .cesium-viewer-bottom { display: none !important; }
.cesium-viewer .cesium-viewer-navigationContainer { opacity: 0.4; transition: opacity 0.3s; }
.cesium-viewer .cesium-viewer-navigationContainer:hover { opacity: 0.8; }

/* HTML marker layer (positioned over CesiumJS canvas) */
#marker-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }

/* Community HTML markers */
.cm {
  --sz: 28px;
  position: absolute; display: flex; flex-direction: column; align-items: center;
  transform: translate(-50%, -50%); pointer-events: all; cursor: pointer;
  transition: transform 0.2s;
}
.cm:hover { transform: translate(-50%, -50%) scale(1.12); z-index: 5; }
.cm.city { --sz: 40px; }
.cm.town { --sz: 32px; }
.cm.small { --sz: 24px; }
.cm-core {
  width: var(--sz); height: var(--sz); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,240,200,0.95), rgba(201,169,110,0.8));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(201,169,110,0.4), 0 0 30px rgba(201,169,110,0.15);
  border: 1.5px solid rgba(255,232,176,0.6);
}
.cm-core svg { width: 55%; height: 55%; }
.cm-ring {
  position: absolute; top: 50%; left: 50%;
  width: calc(var(--sz) + 20px); height: calc(var(--sz) + 20px);
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,220,150,0.3); border-radius: 50%;
  animation: cmPulse 3s ease-in-out infinite;
}
@keyframes cmPulse { 0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 0.4; } 50% { transform: translate(-50%,-50%) scale(1.15); opacity: 0.1; } }
.cm-lbl {
  margin-top: 4px; text-align: center; font-family: var(--font-ui); font-size: 10px;
  font-weight: 600; color: #FFE8B0; letter-spacing: 0.04em; text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 0 12px rgba(0,0,0,0.4);
  white-space: nowrap; line-height: 1.3;
}
.cm.city .cm-lbl { font-size: 12px; }
.cm-pop { font-weight: 400; font-size: 9px; color: rgba(255,232,176,0.5); text-transform: none; }

/* Warm vignette overlay on map */
#map-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px rgba(0,0,0,0.5); z-index: 3; }

/* Map loading with progress bar */
#map-loading {
  position: absolute; inset: 0; z-index: 10; background: var(--black);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity 1s var(--ease-out);
}
#map-loading.out { opacity: 0; pointer-events: none; }
.map-loader { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(201,169,110,0.15); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ml-text { font-family: var(--font-ui); font-size: 12px; color: rgba(255,232,176,0.5); letter-spacing: 0.1em; }
.ml-bar { width: 120px; height: 2px; background: rgba(201,169,110,0.15); border-radius: 1px; overflow: hidden; }
.ml-fill { height: 100%; width: 0%; background: var(--gold); transition: width 0.5s var(--ease-out); border-radius: 1px; }

/* Cinema overlay */
#cinema-overlay { position: absolute; inset: 0; z-index: 8; background: rgba(28,24,16,0.6); display: flex; align-items: center; justify-content: center; transition: opacity 1.5s var(--ease-out); pointer-events: none; }
#cinema-overlay.hidden { opacity: 0; }
#cinema-text { text-align: center; transition: opacity 0.6s; }
#cinema-text.fade { opacity: 0; }
#cinema-loc { font-family: var(--font-display); font-size: clamp(1.8rem,4vw,3.2rem); font-weight: 700; color: var(--gold-light); letter-spacing: 0.1em; }
#cinema-sub { font-family: var(--font-ui); font-size: clamp(0.65rem,1.2vw,0.85rem); color: rgba(255,232,176,0.5); margin-top: 8px; letter-spacing: 0.2em; text-transform: uppercase; }

/* Map controls */
#map-controls { position: absolute; top: 12px; left: 12px; right: 60px; z-index: 6; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.map-filter-btn { font-family: var(--font-ui); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border-radius: 20px; background: rgba(28,24,16,0.65); color: rgba(255,232,176,0.7); border: 1px solid rgba(201,169,110,0.15); backdrop-filter: blur(8px); transition: all 0.3s; cursor: pointer; }
.map-filter-btn:hover { background: rgba(201,169,110,0.2); color: #FFE8B0; }
.map-filter-btn.active { background: rgba(201,169,110,0.25); color: #FFE8B0; border-color: rgba(201,169,110,0.4); }

/* Map search */
.map-search-wrap { position: relative; flex: 0 0 auto; margin-left: auto; }
#map-search { font-family: var(--font-ui); font-size: 12px; padding: 6px 12px 6px 28px; width: 180px; border-radius: 20px; border: 1px solid rgba(201,169,110,0.15); background: rgba(28,24,16,0.65); color: #FFE8B0; backdrop-filter: blur(8px); outline: none; transition: border-color 0.3s, width 0.3s; }
#map-search:focus { border-color: rgba(201,169,110,0.4); width: 220px; }
#map-search::placeholder { color: rgba(255,232,176,0.35); }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; opacity: 0.4; }
#search-results { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; border-radius: 8px; background: rgba(28,24,16,0.92); border: 1px solid rgba(201,169,110,0.2); backdrop-filter: blur(12px); max-height: 240px; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
#search-results.open { opacity: 1; visibility: visible; }
.search-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; transition: background 0.2s; }
.search-item:hover { background: rgba(201,169,110,0.12); }
.search-item-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.search-item-name { font-family: var(--font-ui); font-size: 12px; color: #FFE8B0; flex: 1; }
.search-item-meta { font-family: var(--font-ui); font-size: 10px; color: rgba(255,232,176,0.4); }

/* Community card */
#ccard { position: absolute; z-index: 7; bottom: 20px; right: 20px; width: 320px; max-height: calc(100% - 80px); background: rgba(28,24,16,0.88); backdrop-filter: blur(20px); border: 1px solid rgba(201,169,110,0.12); border-radius: 12px; overflow: hidden; transform: translateX(120%); transition: transform 0.5s var(--ease-out); }
#ccard.open { transform: translateX(0); }
#ccard-accent { height: 3px; }
#ccard-header { padding: 16px 16px 12px; display: flex; justify-content: space-between; align-items: flex-start; }
#ccard-badge { font-family: var(--font-ui); font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; color: var(--black); }
#ccard-close { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: rgba(255,232,176,0.4); font-size: 18px; cursor: pointer; transition: color 0.2s; border-radius: 4px; }
#ccard-close:hover { color: #FFE8B0; }
#ccard-content { padding: 0 16px 16px; }
#ccard-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #FFE8B0; line-height: 1.2; }
#ccard-heb { font-size: 1rem; color: rgba(255,232,176,0.5); margin-top: 2px; direction: rtl; }
#ccard-coords { font-family: var(--font-ui); font-size: 10px; color: rgba(255,232,176,0.3); margin-top: 6px; letter-spacing: 0.04em; }
#ccard-stats { display: flex; gap: 20px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(201,169,110,0.1); }
.ccard-stat-num { font-family: var(--font-ui); font-size: 14px; font-weight: 600; color: var(--gold-light); display: block; }
.ccard-stat-lbl { font-family: var(--font-ui); font-size: 9px; color: rgba(255,232,176,0.35); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-top: 2px; }
#ccard-desc { font-family: var(--font-body); font-size: 13px; color: rgba(255,232,176,0.6); line-height: 1.6; margin-top: 12px; }
#ccard-region { font-family: var(--font-ui); font-size: 10px; color: rgba(201,169,110,0.5); margin-top: 10px; letter-spacing: 0.04em; }
@media (max-width: 640px) {
  #ccard { bottom: 0; right: 0; left: 0; width: 100%; border-radius: 12px 12px 0 0; max-height: 55%; transform: translateY(110%); }
  #ccard.open { transform: translateY(0); }
}

/* Map HUD */
#map-hud { position: absolute; bottom: 0; left: 0; right: 0; z-index: 5; padding: 10px 16px; background: linear-gradient(transparent, rgba(28,24,16,0.7)); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.hud-item { font-family: var(--font-ui); font-size: 10px; color: rgba(255,232,176,0.45); letter-spacing: 0.1em; text-transform: uppercase; }
.hud-val { color: var(--gold-light); font-weight: 600; font-size: 12px; margin-left: 4px; }
#tour-btn { font-family: var(--font-ui); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 14px; border-radius: 20px; background: rgba(201,169,110,0.15); color: var(--gold-light); border: 1px solid rgba(201,169,110,0.25); cursor: pointer; pointer-events: all; transition: all 0.3s; }
#tour-btn:hover { background: rgba(201,169,110,0.3); }
#tour-btn.active { background: var(--gold); color: var(--black); }

/* Tour/tooltip overlays */
#tour-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9; text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
#tour-overlay.visible { opacity: 1; }
#tour-name { font-family: var(--font-display); font-size: clamp(1.5rem,3.5vw,2.5rem); font-weight: 700; color: #FFE8B0; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
#tour-desc { font-family: var(--font-body); font-size: 14px; color: rgba(255,232,176,0.65); max-width: 400px; margin: 8px auto 0; line-height: 1.5; text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
#tour-counter { font-family: var(--font-ui); font-size: 10px; color: rgba(201,169,110,0.5); margin-top: 12px; letter-spacing: 0.15em; }
#map-tooltip { position: absolute; z-index: 8; pointer-events: none; background: rgba(28,24,16,0.9); backdrop-filter: blur(8px); border: 1px solid rgba(201,169,110,0.15); border-radius: 6px; padding: 8px 12px; transform: translate(-50%, -100%); margin-top: -12px; opacity: 0; transition: opacity 0.15s; white-space: nowrap; }
#map-tooltip.visible { opacity: 1; }
#tt-name { font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: #FFE8B0; }
#tt-heb { font-size: 11px; color: rgba(255,232,176,0.45); direction: rtl; margin-top: 1px; }
#tt-pop { font-family: var(--font-ui); font-size: 10px; color: rgba(255,232,176,0.35); margin-top: 4px; }

/* =========== EDITORIAL SECTIONS =========== */
.section { padding: clamp(48px,8vw,96px) clamp(16px,4vw,48px); max-width: 1200px; margin: 0 auto; }
.section-label { font-family: var(--font-ui); font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--gold); }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.5vw, 2.8rem); color: var(--text); line-height: 1.15; letter-spacing: -0.01em; }
.section-desc { font-family: var(--font-body); font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--text-secondary); line-height: 1.7; max-width: 600px; margin-top: 12px; }
.tag-farm { background: rgba(92,122,86,0.85); color: white; }
.tag-vine { background: rgba(107,76,59,0.15); color: var(--terracotta); }
.tag-heritage { background: rgba(201,169,110,0.15); color: var(--gold-dark); }
.tag-community { background: rgba(110,100,89,0.12); color: var(--text-secondary); }

/* Today grid */
.today-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.story-lead { position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; aspect-ratio: 16/10; }
.story-lead img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); filter: saturate(1.1) brightness(0.95) sepia(0.05); }
.story-lead:hover img { transform: scale(1.04); }
.story-lead-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(28,24,16,0.88)); display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; }
.story-tag { font-family: var(--font-ui); font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 10px; border-radius: 3px; display: inline-block; width: fit-content; margin-bottom: 10px; }
.story-lead h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem, 2.2vw, 1.7rem); color: white; line-height: 1.25; }
.story-lead p { font-family: var(--font-body); font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 8px; line-height: 1.55; }
.story-meta { font-family: var(--font-ui); font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 10px; letter-spacing: 0.04em; }
.story-sidebar { display: flex; flex-direction: column; gap: 16px; }
.story-side { display: flex; gap: 14px; padding: 14px; border-radius: 8px; cursor: pointer; background: var(--bg-warm); transition: all 0.4s var(--ease-out); border: 1px solid transparent; }
.story-side:hover { background: var(--stone-warm); transform: translateX(6px); border-color: rgba(201,169,110,0.1); }
.story-side-img { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.story-side-body { display: flex; flex-direction: column; justify-content: center; }
.story-side .story-tag { margin-bottom: 4px; font-size: 8px; padding: 2px 6px; }
.story-side h4 { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--text); line-height: 1.3; }
.story-side .story-meta { color: var(--text-secondary); margin-top: 4px; }
@media (max-width: 768px) {
  .today-grid { grid-template-columns: 1fr; }
  .story-sidebar { flex-direction: row; overflow-x: auto; gap: 12px; padding-bottom: 8px; }
  .story-side { min-width: 280px; flex-shrink: 0; }
}

/* Farm */
#farm { position: relative; width: 100%; min-height: 520px; overflow: hidden; display: flex; align-items: center; }
#farm-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: brightness(0.45) saturate(1.2) sepia(0.1); transition: transform 12s linear; }
#farm:hover #farm-bg { transform: scale(1.04); }
#farm-content { position: relative; z-index: 2; max-width: 560px; padding: clamp(40px,6vw,80px) clamp(24px,5vw,64px); }
#farm-content .section-label { color: var(--green-light); }
#farm-content .section-label::before { background: var(--green-light); }
.farm-quote { font-family: var(--font-body); font-style: italic; font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255,255,255,0.75); line-height: 1.75; margin-top: 16px; padding-left: 16px; border-left: 2px solid var(--green); }
.cta-btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px 24px; border-radius: 24px; margin-top: 28px; transition: all 0.4s var(--ease-out); }
.cta-btn svg { width: 14px; height: 14px; transition: transform 0.3s; }
.cta-btn:hover svg { transform: translateX(3px); }
.cta-farm { color: white; background: rgba(92,122,86,0.4); border: 1px solid rgba(92,122,86,0.5); }
.cta-farm:hover { background: rgba(92,122,86,0.65); }

/* Winery */
.winery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 32px; border-radius: 12px; overflow: hidden; background: var(--bg-warm); }
.winery-img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; filter: saturate(1.1) sepia(0.05); }
.winery-body { padding: clamp(28px,4vw,48px); display: flex; flex-direction: column; justify-content: center; }
.winery-body h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 2.5vw, 1.8rem); color: var(--text); line-height: 1.2; }
.winery-body p { font-family: var(--font-body); font-size: 15px; color: var(--text-secondary); line-height: 1.75; margin-top: 12px; }
.winery-detail { font-family: var(--font-ui); font-size: 11px; color: var(--terracotta); margin-top: 16px; letter-spacing: 0.04em; }
.cta-wine { color: var(--terracotta); border: 1px solid rgba(107,76,59,0.3); }
.cta-wine:hover { background: rgba(107,76,59,0.08); }
@media (max-width: 768px) { .winery-grid { grid-template-columns: 1fr; } .winery-img { min-height: 240px; } }

/* Heritage */
#heritage { position: relative; width: 100%; min-height: 450px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
#heritage-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: brightness(0.38) saturate(1.1); }
#heritage-content { position: relative; z-index: 2; max-width: 600px; padding: 48px 24px; }
#heritage-content .section-label { color: var(--gold-light); justify-content: center; }
#heritage-content .section-label::before { display: none; }
.cta-heritage { color: var(--gold-light); border: 1px solid rgba(201,169,110,0.35); }
.cta-heritage:hover { background: rgba(201,169,110,0.15); }

/* Tracker */
.tracker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.tracker-card { text-align: center; padding: 36px 16px; border-radius: 12px; background: var(--bg-warm); border: 1px solid rgba(201,169,110,0.06); transition: transform 0.4s var(--ease-out), box-shadow 0.4s; }
.tracker-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(201,169,110,0.08); }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 4.5vw, 3.2rem); color: var(--text); line-height: 1; }
.stat-label { font-family: var(--font-ui); font-size: 11px; font-weight: 500; color: var(--text-secondary); margin-top: 8px; letter-spacing: 0.08em; text-transform: uppercase; }
.stat-sub { font-family: var(--font-ui); font-size: 10px; color: var(--gold); margin-top: 6px; }
@media (max-width: 640px) { .tracker-grid { grid-template-columns: 1fr 1fr; } }

/* Newsletter */
#newsletter { background: var(--text); padding: clamp(56px,8vw,100px) clamp(16px,4vw,48px); }
.newsletter-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.newsletter-inner .section-label { color: var(--gold); justify-content: center; }
.newsletter-inner .section-label::before { display: none; }
.newsletter-inner h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--bg); line-height: 1.2; }
.newsletter-inner p { font-family: var(--font-body); font-size: 15px; color: var(--stone-aged); line-height: 1.75; margin-top: 12px; }
.nl-f { display: flex; gap: 8px; margin-top: 28px; max-width: 420px; margin-left: auto; margin-right: auto; }
.nl-f input { flex: 1; padding: 12px 16px; border-radius: 8px; border: 1px solid rgba(201,169,110,0.2); background: rgba(255,255,255,0.05); color: var(--bg); font-family: var(--font-ui); font-size: 14px; outline: none; transition: border-color 0.3s; }
.nl-f input::placeholder { color: var(--stone-aged); }
.nl-f input:focus { border-color: var(--gold); }
.nl-f button { padding: 12px 24px; border-radius: 8px; background: var(--gold); color: var(--black); font-family: var(--font-ui); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; transition: background 0.3s, transform 0.3s; }
.nl-f button:hover { background: var(--gold-dark); transform: translateY(-1px); }
.nl-msg { font-family: var(--font-ui); font-size: 14px; color: var(--green-light); padding: 1.5rem; }
.nl-error { font-family: var(--font-ui); font-size: 13px; color: var(--alert); margin-top: 12px; }

/* Footer */
#footer { padding: 48px clamp(16px,4vw,48px) 32px; border-top: 1px solid rgba(201,169,110,0.08); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.footer-brand span { color: var(--gold); }
.footer-tagline { font-family: var(--font-body); font-style: italic; font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.footer-links { display: flex; gap: 24px; font-family: var(--font-ui); font-size: 11px; color: var(--text-secondary); letter-spacing: 0.04em; }
.footer-links a { transition: color 0.3s; }
.footer-links a:hover { color: var(--terracotta); }
.footer-copy { width: 100%; text-align: center; font-family: var(--font-ui); font-size: 10px; color: var(--stone-deep); margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(201,169,110,0.06); }

/* =========== ARTICLE PREVIEW MODAL =========== */
.article-modal { position: fixed; inset: 0; z-index: 10010; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s; }
.article-modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(28,24,16,0.75); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: 90%; max-width: 520px; background: var(--bg); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.3); transform: translateY(24px) scale(0.97); transition: transform 0.5s var(--ease-out); }
.article-modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--text); cursor: pointer; transition: background 0.3s; }
.modal-close:hover { background: white; }
.modal-img-wrap { width: 100%; height: 240px; overflow: hidden; }
.modal-img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) sepia(0.05); }
.modal-body { padding: 28px 28px 32px; }
.modal-tag { font-family: var(--font-ui); font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; display: inline-block; }
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 3vw, 1.8rem); color: var(--text); line-height: 1.2; margin-top: 14px; }
.modal-excerpt { font-family: var(--font-body); font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-top: 14px; }
.modal-divider { width: 40px; height: 1px; background: var(--gold); margin: 24px 0; }
.modal-soon { text-align: center; }
.modal-soon-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 8px; }
.modal-soon-icon svg { width: 24px; height: 24px; color: var(--gold); }
.modal-soon-text { font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.04em; }
.modal-subscribe-btn { display: inline-block; margin-top: 14px; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 10px 24px; border-radius: 20px; background: var(--gold); color: var(--black); transition: background 0.3s, transform 0.3s; }
.modal-subscribe-btn:hover { background: var(--gold-dark); transform: translateY(-1px); }

/* =========== REDUCED MOTION =========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  #hero { height: 100vh; }
  #hero-title { opacity: 1 !important; }
  .split-half { clip-path: none !important; transform: none !important; }
  #sp-bot { display: none; }
  #hero-glow, #scroll-hint { display: none; }
}

/* =========== MOBILE — SMALL =========== */
@media (max-width: 480px) {
  #hero { height: 200vh; }
  .modal-img-wrap { height: 180px; }
  .modal-body { padding: 20px 20px 28px; }
  .nl-f { flex-direction: column; }
  .nl-f button { width: 100%; }
  #journey { display: none; }
}
