/* ================================================================
   MIDAIR LOFT · 半空光映空間
   Palette: deep charcoal, brass, warm ivory, brand red accent
   ================================================================ */

:root {
  --bg: #0e0d0c;
  --bg-2: #15130f;
  --bg-3: #1d1a15;
  --ink: #efe7d8;
  --ink-muted: #a39c8f;
  --line: rgba(239, 231, 216, 0.12);
  --line-strong: rgba(239, 231, 216, 0.24);
  --brand: #b8874d;          /* brass / warm gold */
  --brand-2: #d8a96b;
  --accent: #c0392b;         /* brand red from business card */
  --accent-soft: #8b2e24;
  --success: #7cb68a;

  --f-serif-en: 'Cormorant Garamond', 'Noto Serif TC', serif;
  --f-serif-zh: 'Noto Serif TC', 'Cormorant Garamond', serif;
  --f-sans: 'Inter', 'Noto Serif TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 2px;
  --radius-lg: 6px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 60px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-weight: 300;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--brand-2); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Common Typography ---------- */

.eyebrow {
  font-family: var(--f-sans);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 1.2rem;
  display: inline-block;
  position: relative;
  padding-left: 2.5rem;
}
.eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2rem;
  height: 1px;
  background: var(--brand);
}

.heading {
  font-family: var(--f-serif-zh);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

.section {
  padding: clamp(70px, 10vw, 140px) 0;
  position: relative;
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 80px);
}

.section__desc {
  color: var(--ink-muted);
  max-width: 620px;
  margin-top: 1rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1rem 2.2rem;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all 0.35s ease;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 400;
}

.btn--primary {
  background: var(--brand);
  color: #14110c;
  border-color: var(--brand);
}
.btn--primary:hover {
  background: var(--brand-2);
  border-color: var(--brand-2);
  color: #14110c;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(184, 135, 77, 0.5);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand-2);
  transform: translateY(-2px);
}

/* ================================================================
   NAVIGATION
   ================================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 0;
  transition: all 0.4s ease;
  background: transparent;
}
.nav.is-scrolled {
  background: rgba(14, 13, 12, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
}

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav__brand-en {
  font-family: var(--f-serif-en);
  font-size: 1.4rem;
  letter-spacing: 0.25em;
  color: var(--ink);
}
.nav__brand-zh {
  font-family: var(--f-serif-zh);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: var(--brand-2);
  margin-top: 0.25rem;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2.2rem;
}
.nav__menu a {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--ink);
  position: relative;
  padding: 0.3rem 0;
}
.nav__menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--brand);
  transition: width 0.3s ease;
}
.nav__menu a:not(.nav__cta):hover::after {
  width: 100%;
}

.nav__cta {
  border: 1px solid var(--brand);
  padding: 0.6rem 1.2rem !important;
  color: var(--brand-2) !important;
  border-radius: var(--radius);
}
.nav__cta:hover {
  background: var(--brand);
  color: #14110c !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  padding: 4px;
}
.nav__toggle span {
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.3s ease;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 86%;
    max-width: 340px;
    height: 100vh;
    background: var(--bg-2);
    border-left: 1px solid var(--line);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 2.5rem;
    gap: 1.8rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__menu a { font-size: 1rem; }
}

/* ================================================================
   HERO
   ================================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.8s ease, transform 7s ease;
}
.hero__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.75) 100%),
    linear-gradient(180deg, rgba(14,13,12,0.4) 0%, rgba(14,13,12,0.85) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  padding-top: 120px;
}

.hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 2rem;
  position: relative;
  padding-left: 3rem;
  display: inline-block;
  animation: fadeUp 1s 0.2s both;
}
.hero__eyebrow::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 2.2rem; height: 1px;
  background: var(--brand);
}

.hero__title {
  font-family: var(--f-serif-zh);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.5vw, 5.2rem);
  line-height: 1.2;
  letter-spacing: 0.1em;
  margin-bottom: 1.8rem;
  color: #fdf8ec;
  text-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.hero__title span {
  display: block;
  animation: fadeUp 1.2s 0.4s both;
}
.hero__title span:nth-child(2) {
  animation-delay: 0.6s;
  color: var(--brand-2);
  font-style: italic;
}

.hero__sub {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--ink-muted);
  margin-bottom: 2.4rem;
  max-width: 520px;
  animation: fadeUp 1s 0.8s both;
}

.hero__tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
  animation: fadeUp 1s 1s both;
}
.hero__tags span {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--line-strong);
  font-size: 0.82rem;
  letter-spacing: 0.3em;
  color: var(--ink);
  border-radius: 99px;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.03);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 1s 1.2s both;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 24px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.hero__scroll span {
  width: 2px;
  height: 8px;
  background: var(--brand-2);
  border-radius: 2px;
  animation: scroll 1.8s ease-in-out infinite;
}

@keyframes scroll {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   ABOUT
   ================================================================ */

.about {
  background: var(--bg);
  position: relative;
}
.about::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 1px; height: 80px;
  background: var(--brand);
  opacity: 0.5;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.about__text p:not(.eyebrow) {
  color: var(--ink-muted);
  margin-bottom: 1.1rem;
}

.about__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.about__meta strong {
  font-family: var(--f-serif-en);
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--brand-2);
  display: block;
}
.about__meta small {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-left: 0.3rem;
  font-weight: 300;
}
.about__meta span {
  font-size: 0.8rem;
  color: var(--ink-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: block;
  margin-top: 0.2rem;
}

.about__image {
  position: relative;
}
.about__image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  filter: brightness(0.95) contrast(1.05);
}
.about__badge {
  position: absolute;
  bottom: -30px;
  left: -30px;
  background: var(--bg-3);
  border: 1px solid var(--brand);
  padding: 1.2rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.about__badge span {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--ink-muted);
}
.about__badge strong {
  font-family: var(--f-serif-en);
  font-size: 2rem;
  color: var(--brand-2);
  line-height: 1;
  margin: 0.2rem 0;
}

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__image img { aspect-ratio: 4 / 3.5; }
  .about__badge { left: 0; bottom: -20px; }
}

/* ================================================================
   FEATURES
   ================================================================ */

.features {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.feature-card {
  padding: clamp(30px, 4vw, 50px);
  background: var(--bg-2);
  transition: background 0.4s ease;
  position: relative;
}
.feature-card:hover {
  background: var(--bg-3);
}

.feature-card__icon {
  width: 54px;
  height: 54px;
  color: var(--brand);
  margin-bottom: 1.8rem;
}
.feature-card__icon svg { width: 100%; height: 100%; }

.feature-card h3 {
  font-family: var(--f-serif-zh);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
  color: var(--ink);
}
.feature-card p {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .features__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .features__grid { grid-template-columns: 1fr; }
}

/* ================================================================
   GALLERY
   ================================================================ */

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: var(--radius);
  background: var(--bg-3);
  aspect-ratio: 4 / 3;
  margin: 0;
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.8);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1s ease, filter 0.5s ease;
  filter: brightness(0.9);
}
.gallery__item:hover img {
  transform: scale(1.06);
  filter: brightness(1);
}

.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1.4rem 1.1rem;
  color: var(--ink);
  font-family: var(--f-serif-zh);
  font-size: 0.92rem;
  letter-spacing: 0.25em;
  background: linear-gradient(0deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.gallery__item::after {
  content: '';
  position: absolute;
  top: 1rem; right: 1rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(14,13,12,0.6);
  border: 1px solid var(--line-strong);
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size: 12px 1px, 1px 12px;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--brand-2);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.85);
}
.gallery__item:hover::after {
  opacity: 1;
  transform: scale(1);
}

.gallery__hint {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
}

@media (max-width: 900px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
@media (max-width: 520px) {
  .gallery__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gallery__item { aspect-ratio: 4 / 3; }
}

/* Lightbox */
.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}
.lightbox img {
  max-width: 92%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: var(--ink);
  font-size: 2.4rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.lightbox__close:hover {
  border-color: var(--brand);
  color: var(--brand-2);
  transform: rotate(90deg);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ================================================================
   SERVICES
   ================================================================ */

.services {
  background: var(--bg);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service {
  padding: clamp(30px, 4vw, 45px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.service:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
}
.service::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.5s ease;
}
.service:hover::before { width: 100%; }

.service__num {
  font-family: var(--f-serif-en);
  font-size: 0.9rem;
  letter-spacing: 0.4em;
  color: var(--brand-2);
  display: block;
  margin-bottom: 1.5rem;
}
.service h3 {
  font-family: var(--f-serif-zh);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--ink);
}
.service p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
}
.service ul {
  list-style: none;
  margin-bottom: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.service ul li {
  color: var(--ink);
  font-size: 0.92rem;
  padding: 0.5rem 0 0.5rem 1.2rem;
  position: relative;
}
.service ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--brand);
}

.service__price {
  font-family: var(--f-serif-en);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--brand-2);
  margin: 0 !important;
  letter-spacing: 0.05em;
}
.service__price small {
  font-size: 0.8rem;
  color: var(--ink-muted);
  letter-spacing: 0.15em;
  margin-left: 0.4rem;
}

.service--featured {
  background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border-color: var(--brand);
}
.service__badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: #fff;
  background: var(--accent);
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  font-weight: 500;
}

.service__price-old {
  display: block;
  font-size: 1rem;
  color: var(--ink-muted);
  text-decoration: line-through;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
  font-family: var(--f-serif-en);
  font-weight: 400;
}

.service__price--quote {
  font-size: 1.5rem !important;
}

.service__sub {
  margin: 0.8rem 0 0 !important;
  font-size: 0.85rem !important;
  color: var(--accent) !important;
  letter-spacing: 0.08em;
}

.services__note {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr; }
}

/* ================================================================
   LOCATION
   ================================================================ */

.location {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}

.location__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}

.location__list {
  list-style: none;
  margin: 1.5rem 0 2.5rem;
}
.location__list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.location__label {
  color: var(--brand-2);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.location__map {
  height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.location__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.3) contrast(1.1) brightness(0.9);
}

@media (max-width: 900px) {
  .location__grid { grid-template-columns: 1fr; }
  .location__map { height: 360px; }
}

/* ================================================================
   POLICY
   ================================================================ */

.policy {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  position: relative;
}
.policy::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 1px; height: 80px;
  background: var(--brand);
  opacity: 0.5;
}

.policy__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.policy-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 3.5vw, 44px);
  transition: border-color 0.4s ease;
}
.policy-card:hover {
  border-color: var(--line-strong);
}

.policy-card__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.policy-card__tag {
  font-family: var(--f-serif-en);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--brand-2);
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--brand);
  border-radius: 2px;
}
.policy-card__head h3 {
  font-family: var(--f-serif-zh);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.policy-list {
  list-style: none;
}
.policy-list li {
  padding: 1.1rem 0;
  border-bottom: 1px dashed var(--line);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.2rem;
  align-items: baseline;
}
.policy-list li:last-child { border-bottom: none; padding-bottom: 0; }
.policy-list li:first-child { padding-top: 0; }

.policy-list strong {
  font-family: var(--f-serif-zh);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--brand-2);
  letter-spacing: 0.15em;
  position: relative;
  padding-left: 14px;
}
.policy-list strong::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
}
.policy-list p {
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.85;
  margin: 0;
}
.policy-list em {
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0 2px;
}

@media (max-width: 900px) {
  .policy__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .policy-list li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .policy-list strong::before { top: 0.55em; }
}

/* ================================================================
   BOOKING FORM
   ================================================================ */

.booking {
  background: var(--bg);
  position: relative;
}
.booking::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: 1px; height: 80px;
  background: var(--brand);
  opacity: 0.5;
}

.form {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-2);
  padding: clamp(30px, 5vw, 60px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form__field {
  display: flex;
  flex-direction: column;
}
.form__field--full { grid-column: 1 / -1; margin-bottom: 1.5rem; }

.form__field label {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--ink);
  margin-bottom: 0.6rem;
  font-weight: 400;
}
.form__field label span {
  color: var(--accent);
  margin-left: 0.2rem;
}
.form__field label small {
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  margin-left: 0.5rem;
}

.form__field input,
.form__field select,
.form__field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #1b1813;
}
.form__field textarea { resize: vertical; min-height: 120px; }
.form__field input::placeholder,
.form__field textarea::placeholder {
  color: rgba(163, 156, 143, 0.5);
}

.form__field input[type="date"] {
  color-scheme: dark;
}

/* Time slot grid */
.slots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 0.4rem;
}
.slot {
  padding: 0.8rem 0.5rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.88rem;
  font-family: var(--f-serif-en);
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.25s ease;
  text-align: center;
}
.slot:hover {
  border-color: var(--brand);
  color: var(--brand-2);
}
.slot.is-selected {
  background: var(--brand);
  color: #14110c;
  border-color: var(--brand);
  font-weight: 500;
}
.slot[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
.slots__summary {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.slots__summary.is-filled { color: var(--brand-2); }

@media (max-width: 720px) {
  .slots { grid-template-columns: repeat(4, 1fr); }
  .form__row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .slots { grid-template-columns: repeat(3, 1fr); }
}

.form__agree label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  cursor: pointer;
}
.form__agree input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 3px;
  accent-color: var(--brand);
  cursor: pointer;
}
.form__agree a {
  color: var(--brand-2);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}
.form__agree a:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.form__captcha-notice {
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
  line-height: 1.8;
}
.form__captcha-notice a {
  color: var(--brand-2);
  border-bottom: 1px dotted var(--line-strong);
}
.form__captcha-notice a:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.form__error {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.4);
  color: #e5796c;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  letter-spacing: 0.03em;
  animation: fadeUp 0.3s ease;
}

.form__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.form__hint {
  color: var(--ink-muted);
  font-size: 0.82rem;
  margin: 0;
}

/* Submit button loading state */
#submitBtn {
  position: relative;
  min-width: 180px;
  justify-content: center;
}
#submitBtn .btn__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(20, 17, 12, 0.25);
  border-top-color: #14110c;
  border-radius: 50%;
  margin-left: 0.5rem;
  display: none;
  animation: spin 0.8s linear infinite;
}
#submitBtn.is-loading .btn__label { opacity: 0.7; }
#submitBtn.is-loading .btn__spinner { display: inline-block; }
#submitBtn[disabled] { cursor: wait; opacity: 0.85; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* reCAPTCHA v3 badge — keep visible (ToS requires either badge or notice shown) */
.grecaptcha-badge {
  z-index: 50;
  box-shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.3s ease !important;
}

/* Mobile: tuck the badge off-screen and leave only a small peek.
   Fully reveal when user taps it, focuses the booking form,
   or we explicitly mark the badge as expanded. */
@media (max-width: 820px) {
  .grecaptcha-badge {
    transform: translateX(calc(100% - 46px)) !important;
    opacity: 0.85;
  }
  .grecaptcha-badge:hover,
  .grecaptcha-badge:focus-within,
  body.is-form-active .grecaptcha-badge,
  body.is-badge-expanded .grecaptcha-badge {
    transform: translateX(0) !important;
    opacity: 1;
  }
}

.form__field input:invalid:not(:placeholder-shown),
.form__field textarea:invalid:not(:placeholder-shown) {
  border-color: var(--accent-soft);
}

/* Success panel */
.form__success {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-2);
  padding: clamp(40px, 6vw, 80px);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  text-align: center;
  animation: fadeUp 0.6s ease;
}
.form__success svg {
  width: 64px;
  height: 64px;
  color: var(--brand-2);
  margin-bottom: 1.5rem;
}
.form__success h3 {
  font-family: var(--f-serif-zh);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}
.form__success p {
  color: var(--ink-muted);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.9;
}

/* ================================================================
   FOOTER
   ================================================================ */

.footer {
  background: #0a0908;
  padding: 70px 0 30px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr auto;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.footer__logo {
  font-family: var(--f-serif-en);
  font-size: 1.6rem;
  letter-spacing: 0.3em;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.footer__zh {
  font-family: var(--f-serif-zh);
  font-size: 0.95rem;
  letter-spacing: 0.4em;
  color: var(--brand-2);
  margin-bottom: 1rem;
}
.footer__tag {
  font-size: 0.8rem;
  color: var(--ink-muted);
  letter-spacing: 0.15em;
}

.footer__contact p,
.footer__social a {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  line-height: 1.8;
}
.footer__social {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.footer__social a {
  color: var(--ink);
  display: inline-block;
  transition: color 0.3s ease;
}
.footer__social a:hover { color: var(--brand-2); }

.footer__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.footer__qr:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -12px rgba(184, 135, 77, 0.4);
}
.footer__qr a {
  display: block;
  line-height: 0;
}
.footer__qr img {
  width: 140px;
  height: auto;
  display: block;
}
.footer__qr-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0 0 0.3rem;
  text-align: center;
}
.footer__qr-label {
  font-family: var(--f-serif-en);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: #8a7a5d;
}
.footer__qr-handle {
  font-family: var(--f-serif-en);
  font-size: 0.95rem;
  font-weight: 500;
  color: #2a2820;
  letter-spacing: 0.08em;
}
.footer__qr-hint {
  font-size: 0.7rem;
  color: #8a7a5d;
  letter-spacing: 0.15em;
}

.footer__copy {
  padding: 2rem var(--gutter) 0;
  text-align: center;
}
.footer__copy p {
  color: var(--ink-muted);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
}

@media (max-width: 1000px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .footer__qr {
    grid-column: 2;
    grid-row: 1 / span 3;
    justify-self: end;
    align-self: start;
  }
}
@media (max-width: 720px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: start;
  }
  .footer__qr {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

/* ================================================================
   Reveal animations
   ================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
