/* Theatrium by Filho — tablet-first digital wine list */
:root {
  --bg: #161513;
  --bg-raised: #1f1d1a;
  --bg-card: #242220;
  --line: #35322d;
  --gold: #c9a961;
  --gold-soft: #b39655;
  --text: #efe9dd;
  --text-dim: #a89f8f;
  --text-faint: #7c7466;
  --serif: "Markazi Text", Georgia, serif;
  --sans: "Raleway", "Open Sans", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 17px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
}
.hidden { display: none !important; }

/* ---------- Start / language screen ---------- */
.start {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2.2rem; padding: 2rem;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(201,169,97,.13), transparent 55%),
    var(--bg);
}
.start-logo { width: min(340px, 70vw); height: auto; animation: logo-breathe 7s ease-in-out infinite; }
@keyframes logo-breathe {
  0%, 100% { opacity: .82; filter: drop-shadow(0 0 0 rgba(201,169,97,0)); }
  50% { opacity: 1; filter: drop-shadow(0 0 22px rgba(201,169,97,.28)); }
}
.start-title {
  font-family: var(--serif);
  font-size: 1.7rem; color: var(--gold);
  letter-spacing: .04em;
}
.lang-buttons {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1rem; max-width: 640px;
}
.lang-btn {
  display: flex; align-items: center; gap: .8rem;
  min-width: 210px; min-height: 64px;
  padding: .8rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--sans); font-size: 1.1rem; font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.lang-btn:active { transform: scale(.97); }
.lang-btn:hover, .lang-btn:focus-visible { border-color: var(--gold); outline: none; }
.lang-btn svg { width: 42px; height: 28px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(22,21,19,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.2rem 0;
  text-align: center;
}
.header-logo { width: 190px; height: auto; cursor: pointer; }
.header-subtitle {
  font-family: var(--serif);
  color: var(--gold); font-size: 1.25rem;
  margin-top: .1rem; letter-spacing: .06em;
}
.header-tools {
  display: flex; gap: .8rem; align-items: center;
  max-width: 900px; margin: .8rem auto 0;
}
.search {
  flex: 1; min-height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text);
  font-family: var(--sans); font-size: 1rem;
  padding: 0 1rem;
}
.search:focus { outline: none; border-color: var(--gold); }
.search::placeholder { color: var(--text-faint); }
.tool-btn {
  display: flex; align-items: center; gap: .45rem;
  min-height: 48px; padding: 0 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text-dim);
  font-family: var(--sans); font-size: .92rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.tool-btn:hover { border-color: var(--gold-soft); color: var(--text); }
.tool-btn.active { background: var(--gold); border-color: var(--gold); color: #171512; font-weight: 600; }
.tool-btn.helper { border-color: var(--gold-soft); color: var(--gold); }
.tool-btn.helper:hover { background: rgba(201,169,97,.12); }
.lang-switch { display: flex; gap: .35rem; }
.lang-switch button {
  background: none; border: 1px solid transparent; border-radius: 6px;
  padding: 4px; cursor: pointer; line-height: 0;
  opacity: .5; transition: opacity .15s;
}
.lang-switch button svg { width: 30px; height: 20px; border-radius: 2px; }
.lang-switch button.active { opacity: 1; border-color: var(--gold); }
.lang-switch button:hover { opacity: 1; }

/* ---------- Nav ---------- */
.nav {
  display: flex; gap: .5rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: .8rem .2rem;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav button {
  flex: none;
  min-height: 48px;
  padding: .5rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-dim);
  font-family: var(--sans); font-size: .95rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.nav button.active {
  background: var(--gold); border-color: var(--gold);
  color: #171512; font-weight: 600;
}
.nav button:not(.active):hover { border-color: var(--gold-soft); color: var(--text); }

/* ---------- Content ---------- */
.content { max-width: 900px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
@keyframes content-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.content-fade { animation: content-fade .25s ease-out; }
.cat { margin-bottom: 2.4rem; }
.cat-title {
  font-family: var(--serif);
  font-size: 2rem; font-weight: 500;
  color: var(--gold);
  letter-spacing: .03em;
}
.ornament {
  display: flex; align-items: center; gap: .8rem;
  color: var(--gold-soft); font-size: .5rem;
  margin: .3rem 0 .9rem;
}
.ornament::before, .ornament::after {
  content: ""; flex: 1; height: 1px;
}
.ornament::before { background: linear-gradient(to right, transparent, rgba(179,150,85,.5)); }
.ornament::after { background: linear-gradient(to left, transparent, rgba(179,150,85,.5)); }
.cat-serving { color: var(--text-faint); font-size: .9rem; margin-bottom: .6rem; }
.price-note { color: var(--text-faint); font-style: italic; font-size: .92rem; margin: .3rem 0 .8rem; }
.country {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--serif);
  font-size: 1.35rem; color: var(--text);
  margin: 1.3rem 0 .4rem; letter-spacing: .08em;
  text-transform: uppercase;
}
.country-flag { line-height: 0; }
.country-flag svg { width: 27px; height: 18px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.country::after { content: ""; display: inline-block; width: 40px; height: 1px; background: var(--gold); margin-left: .8rem; vertical-align: middle; }

.item {
  display: block;
  width: 100%;
  padding: .78rem .6rem;
  background: none; border: none; border-radius: 10px;
  color: inherit; text-align: left;
  font-family: var(--sans);
  cursor: default;
}
.item-row { display: flex; align-items: baseline; gap: .55rem; }
.dots {
  flex: 1; min-width: 1.5rem;
  border-bottom: 1px dotted rgba(168, 159, 143, .3);
  transform: translateY(-.28em);
}
.vintage { color: var(--text-dim); font-size: .82em; }
.item.clickable { cursor: pointer; transition: background .15s; }
.item.clickable:hover, .item.clickable:focus-visible { background: var(--bg-raised); outline: none; }
.item-name {
  font-family: var(--serif);
  font-size: 1.3rem; font-weight: 500; color: var(--text);
  line-height: 1.25;
}
.item-producer {
  display: block;
  font-size: .82rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .1em; margin-top: .05rem;
}
.item-price {
  font-family: var(--serif);
  font-size: 1.35rem; color: var(--gold);
  white-space: nowrap;
}
.item-chevron { color: var(--text-faint); font-size: 1.1rem; align-self: center; }
.item-flag { margin-left: .55rem; line-height: 0; display: inline-block; vertical-align: -3px; }
.item-flag svg { width: 19px; height: 13px; border-radius: 2px; opacity: .9; box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.search-context { display: block; color: var(--text-faint); font-size: .8rem; margin-top: .15rem; }
.no-results { color: var(--text-dim); text-align: center; padding: 3rem 0; font-size: 1.05rem; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal-sheet {
  position: relative;
  width: 100%; max-width: 700px;
  max-height: 86vh; overflow-y: auto;
  background: var(--bg-raised);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 1.6rem 1.6rem 2.2rem;
  animation: sheet-up .22s ease-out;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: .8rem; right: .9rem;
  width: 44px; height: 44px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 50%;
  color: var(--text-dim); font-size: 1.5rem; line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); border-color: var(--gold); }
.detail-name {
  font-family: var(--serif);
  font-size: 2.1rem; font-weight: 500; color: var(--text);
  line-height: 1.15; padding-right: 6.5rem;
}
.detail-glass {
  position: absolute; top: 4.4rem; right: 2rem;
  color: var(--gold); opacity: .8; line-height: 0;
}
.detail-glass svg {
  height: 96px; width: auto;
  fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.detail-note {
  font-family: var(--serif); font-style: italic;
  font-size: 1.18rem; color: var(--gold);
  line-height: 1.45; margin: .1rem 0 1rem;
  max-width: 30rem;
}
.detail-note-sig { font-style: normal; font-size: .85em; color: var(--gold-soft); white-space: nowrap; }
.detail-producer {
  color: var(--gold); font-size: .95rem;
  text-transform: uppercase; letter-spacing: .12em; margin-top: .2rem;
}
.detail-price {
  font-family: var(--serif); font-size: 1.7rem; color: var(--gold);
  margin: .6rem 0 1rem;
}
.detail-style { color: var(--text-dim); font-style: italic; margin-bottom: 1.1rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.4rem; }
.detail-field { min-width: 0; }
.detail-field.wide { grid-column: 1 / -1; }
.detail-label {
  color: var(--gold-soft); font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: .15rem;
}
.detail-value { color: var(--text); font-size: .98rem; }

/* ---------- Recommendation badge & story ---------- */
.rec-badge { color: var(--gold); font-size: .95em; }
.new-badge {
  display: inline-block; vertical-align: middle;
  padding: .05rem .55rem; margin-left: .15rem;
  border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold);
  font-family: var(--sans); font-size: .62em; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  transform: translateY(-.15em);
}
.detail-new { margin-left: .5rem; }
.detail-rec {
  display: inline-block;
  margin-top: .55rem;
  padding: .22rem .8rem;
  border: 1px solid var(--gold); border-radius: 999px;
  color: var(--gold); font-size: .82rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.story-screen { justify-content: flex-start; padding-top: 3rem; gap: 1.4rem; min-height: 100vh; }
.start-logo.small { width: min(220px, 55vw); }
.enter-btn {
  min-height: 60px; min-width: 240px;
  padding: .8rem 2.4rem; margin-bottom: 2.5rem;
  background: var(--gold); border: none; border-radius: 999px;
  color: #171512; font-family: var(--sans); font-size: 1.15rem; font-weight: 600;
  letter-spacing: .04em; cursor: pointer;
  transition: transform .1s, filter .15s;
}
.enter-btn:hover { filter: brightness(1.08); }
.enter-btn:active { transform: scale(.97); }
.detail-ratings {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: .2rem 0 1rem;
}
.detail-ratings .detail-label { margin: 0 .3rem 0 0; }
.rating-chip {
  padding: .25rem .7rem;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-dim); font-size: .85rem;
}
.rating-chip b { color: var(--gold); font-weight: 600; }
.story { max-width: 640px; margin: 0 auto; padding: 1rem 0 2rem; }
.story-title {
  font-family: var(--serif);
  font-size: 2.2rem; font-weight: 500; color: var(--gold);
  text-align: center; margin-bottom: 1.4rem; letter-spacing: .03em;
}
.story p { color: var(--text); margin-bottom: 1.1rem; line-height: 1.75; font-weight: 300; }
.story p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 2.6em; float: left;
  line-height: .85; padding-right: .12em; color: var(--gold);
}
.story-legend {
  margin-top: 1.8rem; padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--text-dim) !important; font-size: .9rem; text-align: center;
}

/* ---------- Helper wizard ---------- */
.helper-title {
  font-family: var(--serif);
  font-size: 1.7rem; color: var(--gold);
  margin-bottom: 1rem; letter-spacing: .03em;
}
.helper-q { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; color: var(--text); margin-bottom: .9rem; }
.helper-opts { display: flex; flex-direction: column; gap: .6rem; }
.helper-opt {
  min-height: 54px; padding: .7rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); text-align: left;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.helper-opt:hover, .helper-opt:focus-visible { border-color: var(--gold); outline: none; }
.helper-again { margin-top: 1.1rem; text-align: center; color: var(--text-dim); }
.helper-course {
  font-family: var(--serif); color: var(--gold-soft);
  font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase;
  margin: 1.1rem 0 .5rem;
}
.helper-course:first-of-type { margin-top: .3rem; }
.helper-fordish {
  font-family: var(--serif); font-style: italic; color: var(--gold);
  font-size: 1.15rem; margin-bottom: 1rem;
}
.helper .item { border-radius: 12px; background: var(--bg-card); margin-bottom: .6rem; border: 1px solid var(--line); }
.helper .item + .item { border-top: 1px solid var(--line); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  color: var(--text-faint); font-size: .8rem;
  max-width: 900px; margin: 0 auto;
  padding: 1.4rem 1.2rem 2.6rem; text-align: center;
}
.footer p + p { margin-top: .4rem; }

@media (max-width: 560px) {
  html { font-size: 16px; }
  .header-tools { flex-wrap: wrap; }
  .detail-grid { grid-template-columns: 1fr; }
  .lang-btn { min-width: 46%; }
}
