/* ============================================================
   BeyondBazi Design System
   Palette: Ink charcoal + antique gold + jade + warm paper
   Type: Playfair Display (headings) + Inter (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* --- Tokens --- */
:root {
  --ink:       #1a1814;
  --charcoal:  #2d2b27;
  --gold:      #c9a84c;
  --gold-light:#e8c97a;
  --gold-dim:  #7a6330;
  --jade:      #3d7d6b;
  --jade-light:#5aab94;
  --paper:     #f5f0e8;
  --paper-dark:#ede7d9;
  --cream:     #faf7f2;
  --muted:     #6b6560;
  --border:    rgba(201,168,76,0.25);
  --border-soft:rgba(201,168,76,0.12);

  --serif:  'Playfair Display', Georgia, serif;
  --sans:   'Inter', system-ui, sans-serif;

  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 16px rgba(26,24,20,0.08);
  --shadow-md: 0 4px 32px rgba(26,24,20,0.12);
  --shadow-gold: 0 4px 24px rgba(201,168,76,0.18);

  --max-width: 1100px;
  --nav-h: 64px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,24,20,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold) !important;
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--paper); font-weight: 400; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity .2s, color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); opacity: 1; }
.nav-cta {
  background: var(--gold);
  color: var(--ink) !important;
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 600 !important;
  opacity: 1 !important;
}
.nav-cta:hover { background: var(--gold-light); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform .3s, opacity .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); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(26,24,20,0.98);
    flex-direction: column;
    gap: 0;
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 12px 24px;
    font-size: 0.9rem;
  }
  .nav-cta { margin: 8px 24px 0; text-align: center; border-radius: var(--radius); }
}

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  margin-top: 80px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}
.footer-brand p { font-size: 0.85rem; color: rgba(245,240,232,0.6); line-height: 1.6; }
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(245,240,232,0.65); font-size: 0.875rem; transition: color .2s; }
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(201,168,76,0.15);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(245,240,232,0.4); }
.footer-bottom a { color: rgba(245,240,232,0.4); font-size: 0.8rem; }
.footer-bottom a:hover { color: var(--gold); }
.disclaimer {
  font-size: 0.78rem;
  color: rgba(245,240,232,0.35);
  margin-top: 6px;
  width: 100%;
  text-align: center;
  line-height: 1.5;
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 40px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover { background: var(--gold-light); color: var(--ink); box-shadow: var(--shadow-gold); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--ink); }
.btn-jade {
  background: var(--jade);
  color: #fff;
}
.btn-jade:hover { background: var(--jade-light); color: #fff; }
.btn-sm { padding: 9px 20px; font-size: 0.825rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* --- Section headings --- */
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
h1, h2, h3, h4, h5 { font-family: var(--serif); line-height: 1.25; color: var(--ink); }
.section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 16px; }
.section-sub { font-size: 1.05rem; color: var(--muted); max-width: 560px; line-height: 1.7; }

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card-gold {
  background: linear-gradient(135deg, #fffdf7 0%, #fdf6e3 100%);
  border-color: var(--border);
}

/* --- Divider ornament --- */
.ornament {
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.5em;
  margin: 40px 0;
  opacity: 0.6;
}

/* --- Tag / badge --- */
.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag-gold { background: rgba(201,168,76,0.12); color: var(--gold-dim); border: 1px solid var(--border); }
.tag-jade { background: rgba(61,125,107,0.1); color: var(--jade); border: 1px solid rgba(61,125,107,0.2); }

/* --- Form elements --- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--paper-dark);
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--charcoal);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
select.form-control { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6560' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.toggle-row { display: flex; align-items: center; gap: 12px; }
.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--paper-dark);
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--jade); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* --- Utility --- */
.text-gold { color: var(--gold); }
.text-jade { color: var(--jade); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }

/* Print */
@media print { .site-header, .site-footer, .btn, .nav-toggle { display: none !important; } }
