/* =====================================================================
   AMERICAN BURGER TRAIL — styles.css
   Design language: 1930s WPA national-park travel poster, reimagined
   as a diner road-trip map. Flat shapes, thick outlines, stamped labels.
   ===================================================================== */

:root {
  --paper:      #EDE1C4;
  --paper-lt:   #F7F1DE;
  --ink:        #1E3D32;
  --ink-soft:   #3C5B4E;
  --rust:       #A63D2F;
  --rust-dark:  #7E2D22;
  --mustard:    #D6A339;
  --teal:       #3E6E6B;
  --line:       rgba(30,61,50,0.18);

  --font-display: 'Alfa Slab One', serif;
  --font-body: 'Archivo', sans-serif;
  --font-mono: 'Courier Prime', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(30,61,50,0.06) 1px, transparent 0);
  background-size: 22px 22px;
}

a { color: var(--teal); }

/* ---------- focus visibility ---------- */
:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
}

/* ---------- route-line divider (signature structural motif) ---------- */
.route-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  width: min(1100px, 92%);
  color: var(--ink-soft);
}
.route-line::before,
.route-line::after {
  content: "";
  flex: 1;
  height: 0;
  border-top: 3px dashed var(--ink-soft);
  opacity: 0.35;
}
.route-line .dot { font-size: 18px; letter-spacing: 6px; }

/* ---------- header / hero ---------- */
header.hero {
  padding: 56px 5vw 36px;
  text-align: center;
  position: relative;
  z-index: 1; /* 疑似要素を後ろに敷くための起点 */
}

/* 💡 新設：文字の読みやすさを邪魔せず、画像だけを20%の薄さで裏に敷く設定 */
header.hero::before {
  content: '';
  position: absolute;
  inset: 0; /* ヘッダー全体に広げる */
  z-index: -1; /* 文字の後ろに配置 */
  
  /* 画像の読み込み（※index.htmlから見た画像へのパス） */
  background-image: url('img/Louisiana_bg.png'); 
  background-size: contain; /* 画像が切れないように綺麗に収める（全体に広げたい場合は cover にしてください） */
  background-position: center;
  background-repeat: no-repeat;
  
  /* 💡 ここで透過度（薄さ）を自由に調整できます（0.1〜0.25が文字が読めておすすめです） */
  opacity: 0.18; 
}

.hero-eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.35em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--rust-dark);
  margin: 0 0 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 8vw, 84px);
  line-height: 0.95;
  margin: 0;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-shadow: 3px 3px 0 var(--mustard);
}

.hero h1 .highlight {
  color: var(--rust);
  text-shadow: 3px 3px 0 var(--mustard);
}

.hero p.sub {
  max-width: 640px;
  margin: 22px auto 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
}
.hero-stats span b {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--rust);
}

/* ---------- controls (search / ticket bar) ---------- */
.controls {
  width: min(1100px, 92%);
  margin: 34px auto 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.ticket-search {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.ticket-search input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border: 2px solid var(--ink);
  background: var(--paper-lt);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  border-radius: 3px;
  outline-offset: 3px;
}
.ticket-search input::placeholder { color: var(--ink-soft); opacity: 0.7; }
.ticket-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--ink-soft);
}

.region-select {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 13px 14px;
  border: 2px solid var(--ink);
  background: var(--paper-lt);
  color: var(--ink);
  border-radius: 3px;
}

/* ---------- main layout ---------- */
main.layout {
  width: min(1200px, 94vw);
  margin: 30px auto 80px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 26px;
  align-items: start;
}

@media (max-width: 880px) {
  main.layout { grid-template-columns: 1fr; }
}

/* ---------- map panel ---------- */
.map-panel {
  background: var(--paper-lt);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 18px;
  position: relative;
  box-shadow: 6px 6px 0 var(--line);
}

.map-panel h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  margin: 0 0 4px;
  color: var(--ink);
}
.map-panel .map-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

#us-map {
  width: 100%;
  height: auto;
  display: block;
}

#us-map .state {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.1;
  cursor: pointer;
  transition: fill 0.15s ease, transform 0.15s ease;
  transform-origin: center;
}
#us-map .state:hover { fill: var(--mustard); }
#us-map .state.is-active { fill: var(--rust); }
#us-map .state:focus-visible { outline: none; fill: var(--mustard); }

#us-map .state-label {
  font-family: var(--font-mono);
  font-size: 7.5px;
  fill: var(--ink);
  pointer-events: none;
  opacity: 0.85;
}

.dc-callout {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--rust-dark);
  pointer-events: none;
}

/* ---------- postcard / detail panel (signature element) ---------- */
.postcard {
  background: var(--paper-lt);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 26px;
  position: sticky;
  top: 20px;
  min-height: 420px;
  box-shadow: 6px 6px 0 var(--line);
  display: flex;
  flex-direction: column;
}

.postcard.is-empty {
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
}
.postcard.is-empty .empty-icon { margin-bottom: 14px; }

.postcard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 2px dashed var(--line);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.postcard-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust-dark);
  margin: 0 0 6px;
}

.postcard-top h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  margin: 0;
  line-height: 1.1;
  color: var(--ink);
}

/* the rubber-stamp badge */
.stamp {
  flex-shrink: 0;
  width: 78px;
  height: 78px;
  border: 3px solid var(--rust);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-9deg);
  color: var(--rust);
  position: relative;
}
.stamp::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--rust);
  border-radius: 50%;
}
.stamp span {
  font-family: var(--font-display);
  font-size: 20px;
}

.burger-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--rust);
  margin: 0 0 4px;
  line-height: 1.25;
}

.burger-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 1.7;
}
.burger-meta b { color: var(--ink); }

.burger-desc {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0;
}

.postcard-footer {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 9px 14px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.pill-btn:hover { background: var(--mustard); }

/* ---------- state list (accessibility + mobile alt to tiny map targets) ---------- */
.state-list-wrap {
  width: min(1200px, 94vw);
  margin: 0 auto 60px;
}
.state-list-wrap h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 14px;
}
.state-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.state-list button {
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  background: var(--paper-lt);
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink);
}
.state-list button b {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--rust-dark);
  letter-spacing: 0.08em;
}
.state-list button:hover,
.state-list button.is-active {
  background: var(--mustard);
  border-color: var(--ink);
}
.state-list button[hidden] { display: none; }

/* ---------- footer ---------- */
footer {
  padding: 30px 5vw 60px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}
footer p { max-width: 560px; margin: 14px auto 0; line-height: 1.8; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #us-map .state { transition: none; }
}
