/*
Theme Name: Zhenghe Directory Theme
Theme URI: https://ktv.rxbp.top/
Author: Codex
Description: Mobile-first nightlife directory for verified venues.
Version: 0.3.0
License: GPL-2.0-or-later
Text Domain: zhed-theme
*/

:root {
  color-scheme: dark;
  --page-bg: #07080d;
  --panel: #0f111a;
  --panel-soft: #151722;
  --text: #fff6df;
  --muted: #aaa9b4;
  --line: rgba(255, 255, 255, 0.11);
  --gold: #e0bc70;
  --gold-soft: #f8df9d;
  --cyan: #17d9c7;
  --magenta: #c32279;
}

* { box-sizing: border-box; }

html {
  background: var(--page-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(circle at 100% 0, rgba(11, 113, 110, 0.18), transparent 28rem),
    linear-gradient(180deg, #07080d 0%, #090a10 100%);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 280px;
  overflow-x: hidden;
}

a { color: inherit; }

a,
button,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  font-family: inherit;
}

img {
  height: auto;
  max-width: 100%;
}

.site-header {
  background: rgba(7, 8, 13, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  padding-top: env(safe-area-inset-top);
  top: 0;
  z-index: 30;
}

.site-header-inner,
.site-main,
.site-footer-inner {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, var(--gold-soft), #b98938);
  border-radius: 12px 5px 12px 5px;
  box-shadow: 0 0 24px rgba(224, 188, 112, 0.16);
  color: #111015;
  display: inline-flex;
  font-size: 19px;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 15px; letter-spacing: 0.06em; }
.brand-copy small { color: #8f8e98; font-size: 9px; letter-spacing: 0.14em; margin-top: 4px; }

.header-note {
  align-items: center;
  color: #b8b6be;
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
}

.header-note i {
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(23, 217, 199, 0.72);
  height: 6px;
  width: 6px;
}

.site-main { padding-bottom: 70px; }

.hero-panel {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(5, 6, 10, 0.25), transparent 54%),
    radial-gradient(ellipse at 31% 48%, rgba(199, 34, 116, 0.62), transparent 31%),
    radial-gradient(ellipse at 92% 36%, rgba(13, 151, 144, 0.34), transparent 31%),
    linear-gradient(125deg, #090a11 8%, #311127 48%, #062c2d 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 28px 28px;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) 340px;
  margin-bottom: 0;
  min-height: 530px;
  overflow: hidden;
  padding: 74px 64px 58px;
  position: relative;
}

.hero-panel::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(90deg, #000, transparent 75%);
  opacity: 0.6;
  position: absolute;
}

.hero-panel::after {
  background: linear-gradient(180deg, transparent 35%, rgba(5, 6, 10, 0.72));
  content: "";
  inset: 0;
  position: absolute;
}

.hero-copy,
.hero-metrics { position: relative; z-index: 1; }

.eyebrow {
  align-items: center;
  color: var(--cyan);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.12em;
  margin: 0 0 22px;
}

.eyebrow span {
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--cyan);
  height: 6px;
  width: 6px;
}

.page-title {
  color: var(--text);
  font-size: clamp(44px, 6.4vw, 74px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.08;
  margin: 0 0 20px;
  max-width: 760px;
  text-wrap: balance;
}

.page-intro {
  color: #c4bdc8;
  font-size: 16px;
  margin: 0 0 30px;
  max-width: 600px;
}

.hero-cta {
  align-items: center;
  border-bottom: 1px solid rgba(224, 188, 112, 0.68);
  color: var(--gold-soft);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 12px;
  padding-bottom: 5px;
  text-decoration: none;
}

.hero-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.hero-metrics span {
  background: rgba(9, 10, 16, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  color: #9d9ba4;
  font-size: 11px;
  padding: 16px 12px;
}

.hero-metrics strong {
  color: var(--text);
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
}

.notice-band {
  align-items: flex-start;
  color: #777681;
  display: flex;
  font-size: 12px;
  gap: 9px;
  margin: 34px 0 0;
  padding: 16px 4px;
}

.notice-band > span {
  align-items: center;
  border: 1px solid #5f5e69;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: Georgia, serif;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.venue-detail {
  padding-top: 28px;
}

.venue-back {
  color: #8f8e98;
  display: inline-flex;
  font-size: 12px;
  margin-bottom: 18px;
  text-decoration: none;
}

.venue-detail-hero {
  background: #0f111a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  overflow: hidden;
}

.venue-detail-cover {
  min-height: 480px;
  overflow: hidden;
  position: relative;
}

.venue-detail-cover::after {
  background: linear-gradient(180deg, transparent 55%, rgba(7, 8, 13, 0.68));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.venue-detail-cover img,
.venue-detail-cover > span {
  background: radial-gradient(circle at 30% 60%, #8c174d, transparent 35%), linear-gradient(130deg, #16131b, #073a3b);
  display: block;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  width: 100%;
}

.venue-detail-cover-tags {
  bottom: 18px;
  display: flex;
  gap: 7px;
  left: 18px;
  position: absolute;
  z-index: 2;
}

.venue-detail-cover-tags span {
  background: rgba(7, 8, 13, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e7dfce;
  font-size: 10px;
  padding: 6px 9px;
}

.venue-detail-copy {
  align-self: center;
  padding: 40px;
}

.venue-detail-copy .page-title {
  font-size: clamp(34px, 4vw, 52px);
}

.venue-detail-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  margin: 26px 0 18px;
}

.venue-detail-metrics span {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  display: grid;
  padding: 12px;
}

.venue-detail-metrics small {
  color: #7f7d88;
  font-size: 9px;
}

.venue-detail-metrics strong {
  color: #f4d78e;
  font-size: 14px;
  margin-top: 3px;
}

.venue-detail-address,
.venue-detail-description {
  color: #9997a0;
  font-size: 12px;
}

.venue-detail-description p { margin-bottom: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  color: #6f6e78;
  padding: 34px 0;
}

.site-footer p { font-size: 11px; margin: 10px 0 0; max-width: 820px; }
.footer-brand { color: #a6a3a9; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
.footer-brand span { color: var(--gold); }
.mobile-sticky-cta { display: none; }

@media (max-width: 820px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

  .site-header-inner,
  .site-main,
  .site-footer-inner {
    padding-left: calc(18px + env(safe-area-inset-left));
    padding-right: calc(18px + env(safe-area-inset-right));
  }

  .site-header-inner { min-height: 66px; }
  .brand-mark { border-radius: 10px 4px 10px 4px; height: 34px; width: 34px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { display: none; }
  .header-note { font-size: 11px; }

  .site-main {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .site-main > section { overflow: hidden; }

  .hero-panel {
    border-left: 0;
    border-radius: 0 0 28px 28px;
    border-right: 0;
    grid-template-columns: 1fr;
    min-height: 420px;
    padding: 54px calc(22px + env(safe-area-inset-right)) 28px calc(22px + env(safe-area-inset-left));
  }

  .hero-copy,
  .hero-metrics {
    margin-left: auto;
    margin-right: auto;
    max-width: 540px;
    width: 100%;
  }

  .hero-panel::before { background-size: 30px 30px; }
  .eyebrow { font-size: 11px; margin-bottom: 18px; }

  .page-title {
    font-size: clamp(37px, 11.2vw, 48px);
    letter-spacing: -0.06em;
    margin-bottom: 18px;
  }

  .page-intro {
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 22px;
    max-width: 330px;
  }

  .hero-cta { display: none; }
  .hero-metrics { gap: 8px; margin-top: 2px; }
  .hero-metrics span { border-radius: 12px; padding: 11px 9px; }
  .hero-metrics strong { font-size: 14px; }

  .notice-band {
    margin: 22px calc(18px + env(safe-area-inset-right)) 0 calc(18px + env(safe-area-inset-left));
    padding-left: 2px;
    padding-right: 2px;
  }
  .site-footer { padding-bottom: 24px; }

  .mobile-sticky-cta {
    align-items: center;
    background: linear-gradient(100deg, #d4ad5e, #f2d991);
    border-radius: 17px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.58);
    color: #111016;
    display: flex;
    font-size: 14px;
    font-weight: 900;
    justify-content: space-between;
    left: calc(14px + env(safe-area-inset-left));
    min-height: 58px;
    padding: 0 20px;
    position: fixed;
    right: calc(14px + env(safe-area-inset-right));
    text-decoration: none;
    z-index: 40;
  }

  .mobile-sticky-cta b { font-size: 21px; font-weight: 400; }

  .venue-detail {
    padding-top: 14px;
  }

  .venue-back {
    margin-left: calc(18px + env(safe-area-inset-left));
  }

  .venue-detail-hero {
    border-left: 0;
    border-radius: 0 0 24px 24px;
    border-right: 0;
    display: block;
  }

  .venue-detail-cover,
  .venue-detail-cover img,
  .venue-detail-cover > span {
    min-height: 250px;
  }

  .venue-detail-cover { height: 48vw; max-height: 340px; }

  .venue-detail-copy {
    padding: 26px calc(20px + env(safe-area-inset-right)) 28px calc(20px + env(safe-area-inset-left));
  }

  .venue-detail-copy .page-title { font-size: clamp(30px, 9vw, 42px); }
  .venue-detail-metrics { margin-top: 20px; }
  .venue-detail-metrics span { padding: 10px 8px; }
  .venue-detail-metrics strong { font-size: 12px; }
}

@media (max-width: 359px) {
  .site-header-inner { min-height: 60px; }
  .brand-mark { height: 31px; width: 31px; }
  .brand-copy strong { font-size: 12px; }
  .header-note { font-size: 10px; gap: 5px; }

  .hero-panel {
    min-height: 390px;
    padding-top: 42px;
  }

  .page-title {
    font-size: clamp(32px, 10.8vw, 38px);
    line-height: 1.1;
  }

  .page-intro { font-size: 13px; }
  .hero-metrics { gap: 6px; }
  .hero-metrics span { font-size: 10px; padding: 9px 7px; }
  .hero-metrics strong { font-size: 13px; }
}

@media (min-width: 430px) and (max-width: 820px) {
  .page-title { font-size: 48px; }
  .page-intro { max-width: 390px; }
  .hero-panel { min-height: 455px; }
}

@media (max-width: 940px) and (max-height: 520px) and (orientation: landscape) {
  body { padding-bottom: 68px; }
  .site-header { position: relative; }
  .hero-panel {
    align-items: center;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 250px;
    min-height: 310px;
    padding-bottom: 26px;
    padding-top: 26px;
  }
  .eyebrow { margin-bottom: 10px; }
  .page-title { font-size: 35px; margin-bottom: 10px; }
  .page-intro { font-size: 12px; line-height: 1.5; margin-bottom: 0; }
  .hero-metrics { grid-template-columns: 1fr; }
  .hero-metrics span { padding: 8px 11px; }
  .hero-metrics strong { display: inline; font-size: 13px; margin-right: 5px; }
  .mobile-sticky-cta { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 821px) {
  .hero-panel { margin-top: 28px; }
}
