/* ========================================================
   Grace Cai — High Point Homes Realty Brokerage
   ======================================================== */

:root {
  --black: #0b0b0c;
  --black-2: #151517;
  --black-3: #1e1e21;
  --gold: #d4af37;
  --gold-light: #f1d98c;
  --gold-dark: #a9812c;
  --white: #f7f6f2;
  --gray: #b7b6bc;
  --gray-dim: #85848c;
  --border: rgba(212, 175, 55, 0.25);
  --radius: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font-head: 'Playfair Display', 'Noto Sans SC', 'Noto Sans TC', serif;
  --font-body: 'Inter', 'Noto Sans SC', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--gray); }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--black);
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  color: #1a1400;
}
.btn-gold:hover { filter: brightness(1.08); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(247, 246, 242, 0.4);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 9px 18px; font-size: 0.82rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 11, 12, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.is-scrolled {
  background: rgba(11, 11, 12, 0.94);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark { color: var(--gold); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; letter-spacing: 1.5px; font-size: 1.05rem; color: var(--white); }
.brand-sub { font-size: 0.58rem; letter-spacing: 2px; color: var(--gold); font-weight: 600; }

.main-nav { display: flex; gap: 30px; }
.main-nav a { font-size: 0.92rem; font-weight: 500; color: var(--gray); transition: color 0.2s ease; }
.main-nav a:hover { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 16px; }

.lang-switch { display: flex; gap: 4px; background: rgba(255,255,255,0.06); border-radius: 999px; padding: 3px; }
.lang-btn {
  border: none; background: transparent; color: var(--gray);
  font-size: 0.78rem; font-weight: 600; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-btn.is-active { background: var(--gold); color: var(--black); }
.lang-btn:not(.is-active):hover { color: var(--white); }

.nav-cta { display: inline-flex; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--gold); margin: 0 auto; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 72px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(212,175,55,0.14), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(212,175,55,0.08), transparent 60%),
    var(--black);
  z-index: -1;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff, var(--gold-light) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle { font-size: 1.15rem; color: var(--white); font-weight: 500; margin-bottom: 18px; }
.hero-desc { font-size: 1.05rem; max-width: 46ch; margin-bottom: 30px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-photo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  justify-self: center;
  max-width: 420px;
  width: 100%;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--white); }
.section-head .eyebrow { margin-bottom: 10px; }

/* About */
.about { background: var(--black-2); }
.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.about-photo {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--white); }
.badge-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.06);
}

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-card {
  padding: 32px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(212,175,55,0.05), transparent);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.why-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.why-icon { font-size: 1.8rem; margin-bottom: 14px; }
.why-card h3 { font-size: 1.1rem; color: var(--white); margin-bottom: 8px; }
.why-card p { margin: 0; font-size: 0.92rem; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
}
.gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}
.gallery-item-tall {
  grid-row: 1 / 3;
  aspect-ratio: auto;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
}

/* Services */
.services { background: var(--black-2); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.service-card {
  padding: 34px;
  border-radius: var(--radius);
  background: var(--black-3);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
}
.service-card h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 10px; }
.service-card p { margin: 0; }

/* Areas */
.areas { position: relative; overflow: hidden; }
.areas-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  z-index: 0;
}
.areas::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--black) 0%, rgba(11,11,12,0.55) 40%, var(--black) 100%);
  z-index: 0;
}
.areas .container { position: relative; z-index: 1; }
.area-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.area-chips li {
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--white);
  background: rgba(212, 175, 55, 0.05);
}

/* Contact */
.contact { background: var(--black-2); }
.contact-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-form-wrap h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--white); margin-bottom: 30px; }

form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-row-half > div { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 0.85rem; font-weight: 600; color: var(--white); }
input, textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid rgba(247,246,242,0.18);
  background: var(--black-3);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); }
input.is-invalid, textarea.is-invalid { border-color: #e0654c; }
textarea { resize: vertical; min-height: 120px; }
.field-error { font-size: 0.78rem; color: #e0654c; min-height: 1em; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: 0.9rem; min-height: 1.4em; }
.form-status.is-success { color: #7fd6a0; }
.form-status.is-error { color: #e0654c; }

.contact-direct {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--black-3);
}
.contact-direct h3 { color: var(--white); font-size: 1.15rem; margin-bottom: 20px; }
.direct-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.direct-list li { display: flex; flex-direction: column; gap: 3px; }
.direct-label { font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.direct-list a { color: var(--white); font-weight: 500; }
.direct-list a:hover { color: var(--gold); }

.wechat-card {
  text-align: center;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.wechat-card img { width: 140px; height: 140px; margin: 0 auto 12px; border-radius: 8px; }
.wechat-card p { margin: 0; font-size: 0.85rem; }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-embed iframe { display: block; filter: grayscale(0.3) invert(0.92) contrast(0.9); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  text-align: center;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.footer-brand .brand-name { letter-spacing: 2px; }
.footer-address, .footer-disclaimer { font-size: 0.8rem; color: var(--gray-dim); max-width: 720px; margin: 0 auto 10px; }
.footer-copy { font-size: 0.78rem; color: var(--gray-dim); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-photo { order: -1; max-width: 300px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; margin: 0 auto; }
  .about-copy { text-align: center; }
  .badge-list { justify-content: center; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .gallery-item-tall { grid-row: auto; aspect-ratio: 4 / 3; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(11,11,12,0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav a { font-size: 1.05rem; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .brand-sub { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .form-row-half { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

@media (max-width: 420px) {
  .hero { padding-top: calc(var(--header-h) + 32px); }
  .btn { padding: 13px 22px; font-size: 0.88rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
