/* ==========================================================
   Design tokens
   Palette drawn from henna itself: deep ink outline, warm
   ivory ground (like a bridal dupatta), maroon-stain accent
   (the color henna actually oxidizes to), and a muted gold
   for festive moments -- not a generic AI palette default.
   ========================================================== */
:root {
  --ink: #2B1B17;
  --ivory: #FBF3E7;
  --ivory-deep: #F1E4D0;
  --stain: #8B3A3A;
  --stain-dark: #6E2C2C;
  --gold: #B8892B;
  --line: rgba(43, 27, 23, 0.12);

  --font-display: 'Marcellus', serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.5;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark { color: var(--stain); font-size: 1rem; }
.logo-accent { color: var(--stain); }
.site-nav { display: flex; gap: 28px; }
.nav-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.65;
  transition: opacity 0.15s;
}
.nav-link:hover, .nav-link.active { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
}
.hero-inner { max-width: 620px; position: relative; z-index: 2; }
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stain);
  font-weight: 600;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 20px;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(43,27,23,0.75);
  margin: 0 0 32px;
  max-width: 480px;
}

/* Signature decorative element: a faint henna-vine line
   trailing across the hero, evoking an actual mehandi line
   without being a literal illustration */
.hero-motif {
  position: absolute;
  right: -60px;
  top: 0;
  width: 480px;
  height: 100%;
  background:
    radial-gradient(circle at 70% 30%, rgba(139,58,58,0.08), transparent 60%),
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(184,137,43,0.10) 22px 24px);
  mask-image: radial-gradient(ellipse at 60% 50%, black 40%, transparent 75%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--stain); color: var(--ivory); }
.btn-primary:hover { background: var(--stain-dark); }
.btn-secondary { background: var(--ink); color: var(--ivory); }
.btn-secondary:hover { opacity: 0.85; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(43,27,23,0.04); }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Panels ---------- */
.panel { padding: 72px 0; }
.panel-alt { background: var(--ivory-deep); }
.panel-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0 0 36px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.panel-num {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--stain);
  border: 1px solid var(--stain);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Generator ---------- */
.generator-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
}
.generator-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.85rem; font-weight: 600; color: rgba(43,27,23,0.7); }
select {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
select:focus-visible, .btn:focus-visible, .filter-chip:focus-visible {
  outline: 2px solid var(--stain);
  outline-offset: 2px;
}
.quota-note { font-size: 0.8rem; color: rgba(43,27,23,0.5); text-align: center; margin: 0; }

.generator-result {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.result-placeholder, .result-loading, .result-error {
  text-align: center;
  color: rgba(43,27,23,0.45);
}
.hidden { display: none !important; }

/* Signature element: a hand-outline silhouette as the empty
   canvas -- directly tied to the subject, and doubles as a
   preview of the future "try-on your own hand" feature. */
.palm-outline {
  width: 120px;
  height: 140px;
  margin: 0 auto 16px;
  opacity: 0.25;
  background: none;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  position: relative;
}
.palm-outline::before {
  content: '';
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 40% 40%;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--stain);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-image img {
  max-width: 100%;
  max-height: 340px;
  border-radius: 6px;
  display: block;
  margin: 0 auto 20px;
}
.result-actions { display: flex; gap: 12px; justify-content: center; }
.result-error p { color: var(--stain); }

/* ---------- Gallery ---------- */
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--ink);
}
.filter-chip.active, .filter-chip:hover { background: var(--stain); color: var(--ivory); border-color: var(--stain); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.gallery-item {
  background: var(--ivory);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery-item-title { padding: 12px 14px; font-size: 0.88rem; font-weight: 500; }
.gallery-empty { text-align: center; color: rgba(43,27,23,0.5); padding: 40px 0; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.about-note {
  background: var(--ivory-deep);
  border-left: 3px solid var(--gold);
  padding: 20px 24px;
  font-size: 0.95rem;
  border-radius: 4px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; font-size: 0.85rem; color: rgba(43,27,23,0.6); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .generator-grid, .about-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
  .hero { padding: 56px 0 48px; }
  .hero-motif { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; border-top-color: var(--line); }
}
