/* ============================================
   干支纪 · 精酿啤酒餐馆 — Stylesheet
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #F7F2EA;
  --bg-alt: #EFE7DA;
  --ink: #2A1F18;
  --ink-soft: #5C4A3A;
  --ink-mute: #9B8B7A;
  --accent: #B8732E;
  --accent-deep: #8B5420;
  --accent-light: #E8DCC8;
  --line: #D8CCB8;
  --dark: #1C1612;
  --dark-soft: #2D241D;
  --cream: #F7F2EA;
  --serif: 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', 'PingFang SC', sans-serif;
  --latin-serif: 'Cormorant Garamond', serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--cream);
}

/* ---------- NAV ---------- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 0;
  transition: all .4s ease;
  background: transparent;
}

#nav.scrolled {
  background: rgba(247, 242, 234, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  border-radius: 4px;
  flex-direction: column;
  padding: 3px 0;
}

.logo-text {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  transition: color .3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: all .3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- HERO ---------- */
#hero {
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.hero-bg-char {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bg-char {
  position: absolute;
  font-family: var(--serif);
  font-weight: 300;
  color: var(--accent);
  opacity: 0.05;
  user-select: none;
}

.bg-char.c1 { font-size: 22rem; top: -4rem; left: 2rem; }
.bg-char.c2 { font-size: 16rem; bottom: -2rem; right: 4rem; }
.bg-char.c3 { font-size: 12rem; top: 30%; right: 10%; opacity: 0.03; }
.bg-char.c4 { font-size: 14rem; bottom: 15%; left: 8%; opacity: 0.04; }
.bg-char.c5 { font-size: 9rem; top: 12%; right: 30%; opacity: 0.03; }
.bg-char.c6 { font-size: 10rem; bottom: 30%; left: 20%; opacity: 0.035; }

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 0 2rem;
}

.hero-vertical {
  position: absolute;
  left: 50%;
  top: -130px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.5em;
  color: var(--ink-mute);
  opacity: 0;
  animation: fadeDown 1s ease 0.3s forwards;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(4rem, 14vw, 10rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.title-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: charIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.title-char:nth-child(1) { animation-delay: 0.15s; }
.title-char:nth-child(2) { animation-delay: 0.35s; }
.title-char:nth-child(3) { animation-delay: 0.55s; }

.hero-subtitle {
  font-family: var(--serif);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 0.6em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
  padding-left: 0.6em;
}

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: var(--ink-mute);
  font-style: italic;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeUp 1s ease 1.1s forwards;
}

.hero-meta {
  margin-top: 2.5rem;
  font-family: var(--latin-serif);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.3s forwards;
}

.hero-meta .dot {
  color: var(--accent);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.5s forwards;
}

.hero-scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -50%;
  left: 0;
  width: 1px;
  height: 50%;
  background: var(--accent);
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { top: -50%; }
  100% { top: 100%; }
}

@keyframes charIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
  from { opacity: 0; transform: translateY(20px); }
}

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

/* ---------- SECTION LABELS ---------- */
.section-label {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1.5rem;
  padding-top: 6rem;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.3em;
  color: var(--ink);
  padding-left: 0.3em;
}

.section-desc {
  text-align: center;
  color: var(--ink-mute);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 1rem auto 0;
  line-height: 1.8;
}

/* ---------- PHILOSOPHY ---------- */
#philosophy {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 3rem;
  padding-bottom: 4rem;
}

.phil-text h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.phil-text p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 2;
  margin-bottom: 1rem;
}

.stems-branches {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stems, .branches {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sb-label {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  width: fit-content;
}

.sb-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.sb-chars span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: all .3s ease;
  cursor: default;
}

.sb-chars span:hover {
  background: var(--accent);
  color: var(--cream);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ---------- BEER MENU ---------- */
#beer {
  background: var(--bg-alt);
  padding-bottom: 5rem;
  margin-top: 3rem;
}

.beer-list {
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.beer-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line);
  transition: all .4s ease;
  cursor: default;
}

.beer-item:hover {
  padding-left: 1rem;
}

.beer-item:hover .beer-ganzi {
  background: var(--accent);
  color: var(--cream);
  border-color: var(--accent);
  transform: rotate(-3deg) scale(1.05);
}

.beer-ganzi {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--cream);
  border: 2px solid var(--accent);
  border-radius: 8px;
  transition: all .4s ease;
  font-family: var(--serif);
}

.ganzi-stem {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
}

.ganzi-branch {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
}

.beer-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.beer-head h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.05em;
}

.beer-style {
  font-family: var(--latin-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

.beer-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 0.6rem;
  max-width: 520px;
}

.beer-meta {
  display: flex;
  gap: 1.2rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  align-items: center;
}

.beer-tag {
  background: var(--accent-light);
  color: var(--accent-deep) !important;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem !important;
}

.beer-price {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

/* Flight box */
.beer-flight {
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.flight-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--dark);
  color: var(--cream);
  padding: 2rem 2.5rem;
  border-radius: 10px;
  gap: 2rem;
}

.flight-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.flight-ganzi {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 8px;
  flex-shrink: 0;
}

.flight-left h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.flight-left p {
  font-size: 0.85rem;
  color: rgba(247, 242, 234, 0.6);
}

.flight-price {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- FOOD ---------- */
#food {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 5rem;
}

.food-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
  padding: 0 2rem;
}

.food-item {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
  transition: all .3s ease;
}

.food-item:hover {
  padding-left: 0.8rem;
}

.food-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.food-head h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
}

.food-price {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.food-item p {
  font-size: 0.85rem;
  color: var(--ink-mute);
  line-height: 1.7;
}

/* ---------- LOCATION ---------- */
#location {
  background: var(--dark);
  color: var(--cream);
  padding-bottom: 5rem;
}

#location .section-label {
  color: var(--accent);
  padding-top: 6rem;
}

#location .section-heading,
#location .section-desc {
  color: var(--cream);
}

.location-grid {
  max-width: 1000px;
  margin: 3rem auto 0;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.loc-info h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 500;
  margin-bottom: 2rem;
  color: var(--cream);
}

.loc-details {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.loc-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.loc-label {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  padding-top: 2px;
}

.loc-value {
  font-size: 0.95rem;
  color: rgba(247, 242, 234, 0.75);
  line-height: 1.8;
}

/* Map placeholder */
.loc-map {
  display: flex;
  justify-content: center;
}

.map-placeholder {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  background: var(--dark-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.map-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--accent);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  border-radius: 12px;
  z-index: 3;
  position: relative;
  box-shadow: 0 4px 20px rgba(184, 115, 46, 0.4);
}

.map-pin span {
  line-height: 1.2;
}

.map-ring {
  position: absolute;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: ringPulse 3s ease-out infinite;
}

.map-ring.r1 { width: 80px; height: 80px; animation-delay: 0s; }
.map-ring.r2 { width: 80px; height: 80px; animation-delay: 1s; }
.map-ring.r3 { width: 80px; height: 80px; animation-delay: 2s; }

@keyframes ringPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3.5); opacity: 0; }
}

.map-text {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--latin-serif);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  white-space: nowrap;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(184, 115, 46, 0.15);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.footer-seal {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.footer-brand p {
  font-size: 0.75rem;
  color: var(--ink-mute);
  letter-spacing: 0.2em;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(247, 242, 234, 0.6);
  text-decoration: none;
  transition: color .3s;
  letter-spacing: 0.1em;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  text-align: right;
}

.footer-copy p {
  font-size: 0.78rem;
  color: rgba(247, 242, 234, 0.4);
  line-height: 1.6;
}

.footer-motto {
  font-family: var(--serif) !important;
  font-style: italic;
  color: var(--accent) !important;
  opacity: 0.7;
}

/* ---------- ANIMATIONS (scroll reveal) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    z-index: 101;
  }

  .hero-vertical {
    display: none;
  }

  .bg-char.c1 { font-size: 14rem; }
  .bg-char.c2 { font-size: 10rem; }
  .bg-char.c3, .bg-char.c4, .bg-char.c5, .bg-char.c6 { display: none; }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .beer-item {
    grid-template-columns: 60px 1fr;
    gap: 1.2rem;
  }

  .beer-ganzi {
    width: 60px;
    height: 60px;
  }

  .ganzi-stem, .ganzi-branch {
    font-size: 1.1rem;
  }

  .beer-price {
    grid-column: 1 / -1;
    text-align: left;
    padding-left: 72px;
    margin-top: -0.5rem;
  }

  .beer-item:hover {
    padding-left: 0.5rem;
  }

  .flight-box {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 1.8rem;
  }

  .food-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .location-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-copy {
    text-align: center;
  }

  .sb-chars span {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .section-label {
    padding-top: 4rem;
  }

  #location .section-label {
    padding-top: 4rem;
  }

  .beer-meta {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.4rem;
  }

  .hero-meta .dot { display: none; }
}
