/* =========================================================================
   WAMBAI BESPOKE — design tokens & shared styles
   Palette: night-market indigo, thread-gold, unbleached-cotton, rust.
   Signature: the "running stitch" divider — a gold dashed rule styled
   like hand-stitching, used as the structural device between sections.
   ========================================================================= */

:root {
  /* --- Color -------------------------------------------------------- */
  --ink-indigo:      #1B2A4A;   /* primary — dyed agbada fabric */
  --ink-indigo-deep: #101B33;   /* headers, footer, deep panels */
  --thread-gold:     #C89B3C;   /* embroidery gold — accents, links, cta */
  --thread-gold-light:#E2B85A;
  --cotton:          #F7F4EC;   /* page background — unbleached cotton, not stark white */
  --cotton-dim:       #EDE7D8;  /* card/section backgrounds on cotton */
  --rust:            #7A4A2B;   /* leather/fabric accent, secondary cta */
  --charcoal:        #12151C;  /* body text */
  --charcoal-soft:   #40465A;  /* secondary text */
  --line:            #D8CFB8;  /* hairline borders on cotton */
  --line-dark:       rgba(247,244,236,0.16); /* hairline borders on indigo */

  /* Status colors (dashboard) */
  --status-pending:   #B5872E;
  --status-progress:  #3C6E9C;
  --status-ready:     #3E7A4E;
  --status-delivered: #55607A;
  --status-cancelled: #A24A3E;

  /* --- Type ----------------------------------------------------------- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* --- Scale ------------------------------------------------------------ */
  --space-1: 0.4rem;
  --space-2: 0.8rem;
  --space-3: 1.4rem;
  --space-4: 2.2rem;
  --space-5: 3.6rem;
  --space-6: 5.6rem;
  --space-7: 8.4rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-card: 0 2px 4px rgba(16,27,51,0.06), 0 12px 28px rgba(16,27,51,0.08);
  --shadow-lift: 0 8px 16px rgba(16,27,51,0.10), 0 24px 48px rgba(16,27,51,0.14);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cotton);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; line-height: 1.15; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--thread-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (max-width: 640px) {
  .container { padding: 0 var(--space-3); }
}

/* --- Type scale ----------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--thread-gold);
}
h1, .h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.01em; }
h2, .h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3, .h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.lede { font-size: 1.2rem; color: var(--charcoal-soft); max-width: 62ch; }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--thread-gold);
  color: var(--ink-indigo-deep);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { background: var(--thread-gold-light); box-shadow: var(--shadow-lift); }

.btn-outline {
  background: transparent;
  border-color: var(--line-dark);
  color: var(--cotton);
}
.btn-outline:hover { border-color: var(--thread-gold); color: var(--thread-gold); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--ink-indigo);
  color: var(--ink-indigo);
}
.btn-outline-dark:hover { background: var(--ink-indigo); color: var(--cotton); }

.btn-whatsapp {
  background: #25D366;
  color: #ffffff;
}
.btn-whatsapp:hover { background: #1FBD5A; }

.btn-call {
  background: var(--rust);
  color: var(--cotton);
}
.btn-call:hover { background: #8C5834; }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 0.55em 1.1em; font-size: 0.88rem; }

/* --- Site header ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink-indigo-deep);
  border-bottom: 1px solid var(--line-dark);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  gap: var(--space-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7em;
  color: var(--cotton);
}
.brand__mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--thread-gold);
  color: var(--ink-indigo-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.brand__name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.brand__tagline { display: block; font-size: 0.72rem; color: var(--thread-gold-light); font-weight: 400; }

.main-nav { display: flex; align-items: center; gap: var(--space-4); }
.main-nav__list { display: flex; gap: var(--space-3); }
.main-nav__list a {
  color: var(--cotton);
  opacity: 0.78;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.main-nav__list a:hover,
.main-nav__list a[aria-current="page"] { opacity: 1; border-color: var(--thread-gold); }

.nav-toggle {
  display: none;
  background: none; border: none; color: var(--cotton);
  padding: 0.4em;
}

@media (max-width: 900px) {
  .main-nav__list { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: block; }
  .main-nav.is-open .main-nav__list {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink-indigo-deep);
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2);
    border-bottom: 1px solid var(--line-dark);
  }
}

/* --- Stitch divider (signature element) ---------------------------------- */
.stitch-divider {
  height: 2px;
  width: 100%;
  background-image: repeating-linear-gradient(
    90deg, var(--thread-gold) 0 10px, transparent 10px 20px
  );
  border: none;
  opacity: 0.85;
}
.stitch-divider--dark {
  background-image: repeating-linear-gradient(
    90deg, var(--thread-gold-light) 0 10px, transparent 10px 20px
  );
}

.stitch-animate {
  background-size: 0% 100%;
  background-repeat: no-repeat;
  animation: stitch-draw 1.4s ease forwards;
  animation-delay: 0.3s;
}
@keyframes stitch-draw {
  to { background-size: 100% 100%; }
}

/* --- Sections ------------------------------------------------------- */
.section { padding: var(--space-6) 0; }
.section--tight { padding: var(--space-5) 0; }
.section--indigo { background: var(--ink-indigo); color: var(--cotton); }
.section--indigo h2, .section--indigo h3 { color: var(--cotton); }
.section--indigo .lede { color: rgba(247,244,236,0.78); }
.section--dim { background: var(--cotton-dim); }
.section-head { max-width: 640px; margin-bottom: var(--space-5); }
.section-head .eyebrow { display: block; margin-bottom: var(--space-2); }

/* --- Cards --------------------------------------------------------------- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.grid { display: grid; gap: var(--space-4); min-width: 0; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr));} }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); } }

/* --- Style card ------------------------------------------------------ */
.style-card__image {
  aspect-ratio: 4 / 5;
  background: var(--cotton-dim) center/cover no-repeat;
  position: relative;
}
.style-card__image--placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-indigo);
  opacity: 0.35;
}
.style-card__body { padding: var(--space-3) var(--space-3) var(--space-4); }
.style-card__cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rust); font-weight: 700; }
.style-card__title { font-size: 1.2rem; margin: 0.3em 0 0.4em; }
.style-card__desc { color: var(--charcoal-soft); font-size: 0.95rem; margin-bottom: 0; }

/* --- Hero ------------------------------------------------------------ */
.hero {
  background: var(--ink-indigo);
  color: var(--cotton);
  position: relative;
  overflow: hidden;
  padding: var(--space-4) 0 var(--space-6);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(200,155,60,0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 5% 90%, rgba(122,74,43,0.20), transparent 55%);
  pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--space-5); align-items: center; }
@media (max-width: 900px) { .hero__inner { grid-template-columns: minmax(0, 1fr); } }
.hero__eyebrow { color: var(--thread-gold-light); }
.hero__title { margin: var(--space-2) 0 var(--space-3); }
.hero__title em { font-style: normal; color: var(--thread-gold-light); }
.hero__lede { color: rgba(247,244,236,0.82); font-size: 1.15rem; max-width: 52ch; }
.hero__cta { display: flex; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; }
.hero__stitch { margin: var(--space-4) 0; max-width: 340px; }
.hero__portrait {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  aspect-ratio: 3/4;
  background: var(--ink-indigo-deep) center/cover no-repeat;
}

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--ink-indigo-deep); color: rgba(247,244,236,0.72); padding: var(--space-6) 0 var(--space-4); }
.site-footer a:hover { color: var(--thread-gold-light); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-col h4 { color: var(--cotton); font-size: 0.95rem; margin-bottom: var(--space-2); font-family: var(--font-body); font-weight: 700; letter-spacing: 0.03em; }
.footer-col ul li { margin-bottom: 0.55em; font-size: 0.92rem; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2);
  margin-top: var(--space-5); padding-top: var(--space-3);
  border-top: 1px solid var(--line-dark);
  font-size: 0.85rem;
}

/* --- Floating WhatsApp button ---------------------------------------- */
.float-whatsapp {
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 50;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(16,27,51,0.28);
  color: #fff;
  transition: transform 0.15s ease;
}
.float-whatsapp:hover { transform: scale(1.06); }

/* --- Forms ------------------------------------------------------------ */
.field { margin-bottom: var(--space-3); }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4em; }
.field--hint { font-size: 0.82rem; color: var(--charcoal-soft); margin-top: 0.3em; }
input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--charcoal);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--thread-gold);
  box-shadow: 0 0 0 3px rgba(200,155,60,0.22);
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }

.form-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}

/* --- Alerts / messages --------------------------------------------------- */
.alert {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  font-size: 0.95rem;
  border-left: 4px solid var(--thread-gold);
  background: var(--cotton-dim);
}
.alert--success { border-color: var(--status-ready); }
.alert--error { border-color: var(--status-cancelled); }

/* --- Badges (order/booking status) ---------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.badge--pending { background: var(--status-pending); }
.badge--in_progress { background: var(--status-progress); }
.badge--ready { background: var(--status-ready); }
.badge--delivered { background: var(--status-delivered); }
.badge--cancelled { background: var(--status-cancelled); }
.badge--confirmed { background: var(--status-progress); }
.badge--completed { background: var(--status-ready); }

/* --- Utility --------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* --- Style gallery (public site) — images only, no names/categories --- */
.style-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-2);
}
.style-gallery-item {
  display: block;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background: var(--cotton-dim);
}
.style-gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.style-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-gallery-item__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-indigo);
  opacity: 0.35;
}

/* --- Tap-to-view style modal ------------------------------------------ */
.style-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}
.style-modal.is-open { display: block; }
.style-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16,27,51,0.82);
}
.style-modal__panel {
  position: relative;
  z-index: 1;
  max-width: min(520px, 92vw);
  max-height: 92vh;
  margin: 4vh auto;
  background: var(--cotton);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lift);
}
.style-modal__close {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(16,27,51,0.65);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.style-modal__panel img {
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  background: var(--ink-indigo-deep);
}
.style-modal__actions {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  flex-wrap: wrap;
}
.style-modal__actions .btn { flex: 1; justify-content: center; min-width: 140px; }
