/* ================================
   KHACHA — Shared Styles
   Aesthetic: luxurious, editorial,
   gold-on-emerald, refined serif/sans.
   ================================ */

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

:root {
  --emerald-deep: #0b1f17;
  --emerald: #11352a;
  --emerald-mid: #1a4a3a;
  --gold: #d4af37;
  --gold-bright: #f0d27a;
  --gold-muted: #8a7332;
  --cream: #f4ead5;
  --ink: #07140f;

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --max-w: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--emerald-deep);
  color: var(--cream);
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle grain overlay across the page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 31, 23, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-weight: 500;
}

.nav-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
}

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

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--cream);
  opacity: 0.75;
  transition: all 0.3s var(--ease);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--gold-bright);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
}

.nav-cta {
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.3s var(--ease);
  background: transparent;
  cursor: pointer;
}

.nav-cta:hover {
  background: var(--gold);
  color: var(--emerald-deep);
}

/* ===== HAMBURGER (mobile) ===== */
.nav-toggle {
  display: none; /* hidden on desktop, revealed in media query */
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.4);
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  z-index: 60;
}

.nav-toggle:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

.nav-toggle span {
  display: block;
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--gold);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease), top 0.4s var(--ease);
}

.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }

/* Open state: morph into an X */
.nav-toggle.is-open span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ===== MOBILE DRAWER ===== */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 360px);
  background: var(--emerald);
  border-left: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
  z-index: 55;
  display: flex;
  flex-direction: column;
  padding: 6rem 2rem 2rem;
  overflow-y: auto;
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 20, 15, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
  z-index: 54;
}

.mobile-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer .mobile-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-weight: 500;
  opacity: 0.7;
}

.mobile-drawer ul {
  list-style: none;
  margin-bottom: 2.5rem;
}

.mobile-drawer ul li {
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.mobile-drawer ul li a {
  display: block;
  padding: 1.25rem 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.mobile-drawer ul li a:hover,
.mobile-drawer ul li a.active {
  color: var(--gold-bright);
  padding-left: 0.75rem;
}

.mobile-drawer ul li a em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  font-size: 0.85rem;
  margin-right: 0.6rem;
  opacity: 0.6;
}

.mobile-drawer .drawer-cta {
  display: block;
  text-align: center;
  padding: 1rem;
  background: var(--gold);
  color: var(--emerald-deep);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: background 0.3s var(--ease);
}

.mobile-drawer .drawer-cta:hover {
  background: var(--gold-bright);
}

.mobile-drawer .drawer-foot {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  font-size: 0.78rem;
  color: rgba(244, 234, 213, 0.5);
  text-align: center;
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
  overflow: hidden;
}

/* ===== HERO / PAGE HEADER ===== */
.page-header {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(212, 175, 55, 0.12), transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(26, 74, 58, 0.5), transparent 50%);
  pointer-events: none;
}

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.02;
  color: var(--cream);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
  max-width: 1000px;
}

.page-title em {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 300;
}

.page-subtitle {
  font-size: 1.1rem;
  color: rgba(244, 234, 213, 0.7);
  max-width: 640px;
  margin: 2rem auto 0;
  position: relative;
  z-index: 1;
  font-weight: 300;
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

.section-header {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 4rem;
  align-items: end;
}

.section-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  border-top: 1px solid var(--gold);
  padding-top: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--cream);
}

.section-title em {
  font-style: italic;
  color: var(--gold-bright);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 1rem 2.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  border: 1px solid var(--gold);
}

.btn-primary {
  background: var(--gold);
  color: var(--emerald-deep);
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
}

.btn-ghost:hover {
  background: rgba(212, 175, 55, 0.1);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--emerald);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding: 4rem 2.5rem 2rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 1rem;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(244, 234, 213, 0.6);
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.65rem;
}

.footer-col a {
  font-size: 0.88rem;
  color: rgba(244, 234, 213, 0.7);
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--gold-bright); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(244, 234, 213, 0.5);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== DIVIDER ORNAMENT ===== */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 3rem auto;
  color: var(--gold);
  opacity: 0.6;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  max-width: 100px;
  height: 1px;
  background: var(--gold);
}

.ornament-mark {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ===== FADE-IN ANIMATION ===== */
@keyframes rise {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.rise { animation: rise 1s var(--ease) both; }
.rise-1 { animation-delay: 0.1s; }
.rise-2 { animation-delay: 0.25s; }
.rise-3 { animation-delay: 0.4s; }
.rise-4 { animation-delay: 0.55s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 880px) {
  .nav {
    padding: 1rem 1.25rem;
    justify-content: space-between; /* keeps brand on left, hamburger on right */
  }
  .nav-links { display: none; }
  .nav > .nav-cta { display: none; } /* desktop "Get Started" hidden on mobile */
  .nav-toggle {
    display: block; /* hamburger appears */
    flex-shrink: 0; /* never let it get squeezed off-screen */
    margin-left: auto; /* pin to the right even if siblings collapse */
  }
  .nav-brand { font-size: 1.2rem; }
  .section { padding: 4rem 1.25rem; }
  .section-header { grid-template-columns: 1fr; gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-header { padding: 7rem 1.25rem 4rem; min-height: 60vh; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
