/* ===================================================================
   Japan Fall Foliage Map — style
   Palette: warm cream base, deep momiji red accents, ink-black text.
   Type: Shippori Mincho for display (Japanese serif), Inter for UI.
   =================================================================== */

:root {
  --bg:            #F7F0E5;   /* washi cream */
  --bg-alt:        #EFE4D2;   /* darker cream */
  --ink:           #1A1210;   /* near-black */
  --ink-soft:      #4A3A34;
  --ink-mute:      #7A6A62;
  --line:          #D8C6AC;

  --momiji:        #B23A1E;   /* deep maple red */
  --momiji-2:      #E85D33;   /* orange-red */
  --ginkgo:        #C9A227;   /* ginkgo gold */
  --moss:          #5A6E3D;

  --peak:          #E85D33;
  --near:          #C9A227;
  --far:           #B7A99A;

  --radius:        14px;
  --shadow-sm:     0 1px 2px rgba(26,18,16,0.06), 0 2px 8px rgba(26,18,16,0.05);
  --shadow-md:     0 4px 12px rgba(26,18,16,0.10), 0 12px 32px rgba(26,18,16,0.08);

  --serif:         "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --sans:          "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--momiji); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============= TOPBAR ============= */
.topbar {
  position: sticky; top: 0; z-index: 500;
  background: rgba(247, 240, 229, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.logo { color: var(--momiji); width: 32px; height: 32px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-title { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--momiji); letter-spacing: 0.03em; }
.brand-sub { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-top: 3px; }

.nav { display: flex; gap: 1.4rem; }
.nav a {
  font-size: 0.9rem; color: var(--ink-soft); font-weight: 500;
  padding: 0.4rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--momiji); border-bottom-color: var(--momiji); text-decoration: none; }

@media (max-width: 640px) {
  .nav { display: none; }
  .topbar-inner { padding: 0.75rem 1rem; }
}

/* ============= HERO ============= */
.hero {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 900px; margin: 0 auto;
  position: relative; z-index: 2;
}
.eyebrow {
  font-family: var(--serif);
  color: var(--momiji);
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  margin: 0 0 1rem;
  text-transform: none;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
  color: var(--ink);
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 0 2rem;
}
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn.primary {
  background: var(--momiji); color: #fff;
  box-shadow: 0 2px 8px rgba(178, 58, 30, 0.25);
}
.btn.primary:hover {
  background: #9a2f16; text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(178, 58, 30, 0.35);
}
.btn.ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover { background: rgba(178, 58, 30, 0.06); border-color: var(--momiji); text-decoration: none; }

/* Decorative torn-paper foliage silhouette */
.hero-decor {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(1000px 400px at 90% 20%, rgba(232, 93, 51, 0.18), transparent 60%),
    radial-gradient(700px 300px at 10% 90%, rgba(201, 162, 39, 0.15), transparent 60%),
    radial-gradient(500px 250px at 60% 100%, rgba(178, 58, 30, 0.10), transparent 60%);
  pointer-events: none;
}

/* ============= SECTION HEADS ============= */
.section-head {
  max-width: 900px;
  margin: 0 auto 2rem;
  text-align: center;
  padding: 0 1rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}
.section-head p {
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ============= MAP ============= */
.map-section {
  padding: 4.5rem 1rem 3rem;
  border-bottom: 1px solid var(--line);
}
.map-shell {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.25rem;
}
#leaflet-map {
  height: 620px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  background: #EEE6D7;
}
.map-controls {
  display: flex; flex-direction: column;
  gap: 1.25rem;
}
.date-control, .filter-control {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.date-control label {
  display: block; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.7rem;
}
.date-control strong {
  font-family: var(--serif); font-size: 1.15rem; color: var(--momiji); margin-left: 0.3rem;
}
input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(90deg, var(--moss) 0%, var(--ginkgo) 45%, var(--momiji) 100%);
  border-radius: 999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--momiji);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--momiji);
  cursor: pointer;
}
.date-ticks {
  display: flex; justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.7rem; color: var(--ink-mute); letter-spacing: 0.05em;
}

.filter-title {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 0.6rem;
}
.region-chips, .leaf-chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.chip {
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--momiji); color: var(--momiji); }
.chip.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.leaf-chip.active { background: var(--momiji); border-color: var(--momiji); }

.legend-note {
  max-width: 1200px; margin: 1rem auto 0;
  color: var(--ink-mute); font-size: 0.85rem;
  display: flex; gap: 1.2rem; flex-wrap: wrap;
  padding: 0 0.5rem;
}
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 0.35rem; vertical-align: middle;
}
.dot-peak { background: var(--peak); }
.dot-near { background: var(--near); }
.dot-far  { background: var(--far); }

@media (max-width: 900px) {
  .map-shell { grid-template-columns: 1fr; }
  #leaflet-map { height: 480px; }
}

/* Leaflet marker overrides — custom leaf-shaped markers via CSS */
.leaf-marker {
  width: 22px; height: 22px;
  border-radius: 50% 0 50% 50%;
  transform: rotate(45deg);
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: transform 0.15s;
}
.leaf-marker.peak { background: var(--peak); }
.leaf-marker.near { background: var(--near); }
.leaf-marker.far  { background: var(--far); opacity: 0.55; }
.leaf-marker:hover { transform: rotate(45deg) scale(1.25); z-index: 1000; }

.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}
.leaflet-popup-content {
  margin: 12px 14px; font-family: var(--sans);
  min-width: 220px; max-width: 280px;
}
.popup-title {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.05rem; color: var(--ink);
  margin: 0 0 0.15rem;
}
.popup-meta {
  font-size: 0.78rem; color: var(--ink-mute);
  margin-bottom: 0.5rem;
  display: flex; gap: 0.4rem; flex-wrap: wrap;
}
.popup-meta .tag {
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-alt); color: var(--ink-soft);
  font-size: 0.72rem;
}
.popup-peak {
  font-size: 0.85rem; color: var(--momiji);
  font-weight: 600; margin-bottom: 0.4rem;
}
.popup-desc { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.45; margin: 0; }

/* ============= TIMELINE ============= */
.timeline-section {
  padding: 4.5rem 1rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.timeline {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.tl-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line);
}
.tl-city { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.tl-city .tl-region { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.72rem; color: var(--ink-mute); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 2px; }
.tl-bar {
  position: relative; height: 24px;
  background: linear-gradient(90deg, transparent 0%, rgba(216, 198, 172, 0.35) 5%, rgba(216, 198, 172, 0.35) 95%, transparent 100%);
  border-radius: 999px;
}
.tl-peak {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 3px 10px;
  background: var(--momiji);
  color: #fff;
  font-size: 0.72rem; font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.tl-peak.yellow { background: var(--ginkgo); }
.tl-date { font-size: 0.85rem; color: var(--ink-mute); text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .tl-row { grid-template-columns: 90px 1fr; }
  .tl-date { display: none; }
}

/* ============= SPOTS ============= */
.spots-section {
  padding: 4.5rem 1rem 3rem;
  border-bottom: 1px solid var(--line);
}
.spots-toolbar {
  max-width: 1200px; margin: 0 auto 2rem;
  display: flex; gap: 0.8rem;
  padding: 0 0.5rem;
}
.spots-toolbar input, .spots-toolbar select {
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.9rem;
  background: #fff;
  color: var(--ink);
}
.spots-toolbar input { flex: 1; }
.spots-toolbar input:focus, .spots-toolbar select:focus {
  outline: none; border-color: var(--momiji);
  box-shadow: 0 0 0 3px rgba(178, 58, 30, 0.15);
}
.spots-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 0 0.5rem;
}
.spot-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.spot-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--momiji);
}
.spot-card-head {
  display: flex; justify-content: space-between; align-items: start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.spot-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  color: var(--ink);
}
.spot-leaf { font-size: 1.15rem; }
.spot-region {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.6rem;
}
.spot-peak {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--momiji);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.spot-desc {
  font-size: 0.87rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* ============= TIPS ============= */
.tips-section {
  padding: 4.5rem 1rem 5rem;
}
.tips-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.tip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--momiji);
}
.tip h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.tip p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* ============= FOOTER ============= */
.footer {
  background: var(--ink);
  color: #C6B7A9;
  padding: 2.5rem 1.5rem;
  font-size: 0.85rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer a { color: #E8C99A; }
.footer p { margin: 0.4rem 0; }
.footer .small { font-size: 0.78rem; color: #8C7B6E; }

/* Utility: subtle fade-in on scroll */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner, .section-head, .spot-card, .tip, .tl-row {
    animation: fadeUp 0.7s ease both;
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
