/* ========================================
   BIJBANI Global Styles
   Shared across all pages
   ======================================== */

/* ---------- LENIS SMOOTH SCROLL ---------- */
html.lenis, html.lenis body {
  height: auto;
}
.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis-smooth [data-lenis-prevent] {
  overflow: clip;
}
.lenis-target {
  scroll-behavior: auto !important;
}

/* ---------- TOKENS ---------- */
:root {
  --bb-obsidian: #0A0A0A;
  --bb-charcoal: #141414;
  --bb-bone: #F5F1EA;
  --bb-fg-1: #F5F1EA;
  --bb-fg-2: #B8B0A4;
  --bb-fg-3: #8A8279;
  --bb-copper: #B5651D;
  --bb-copper-lo: #E89254;
  --bb-copper-hi: #D08A47;
  --bb-hairline: rgba(245,241,234,0.10);
  --bb-hairline-strong: rgba(245,241,234,0.16);
  --bb-gutter: clamp(24px, 5vw, 80px);
  --bb-container: 1280px;
  --bb-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- RESET ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  font-family: 'Inter Tight', system-ui, sans-serif;
  background: var(--bb-obsidian);
  color: var(--bb-fg-1);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--bb-copper); outline-offset: 2px; }
img { display: block; max-width: 100%; }
em { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500; }

/* ---------- TYPE ---------- */
.bb-display-xl, .bb-display-l, .bb-display-m, .bb-display-s {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
  color: var(--bb-fg-1);
}
.bb-display-xl { font-size: clamp(56px, 9vw, 140px); }
.bb-display-l  { font-size: clamp(48px, 7vw, 96px); }
.bb-display-m  { font-size: clamp(36px, 4.5vw, 64px); line-height: 1.02; }
.bb-display-s  { font-size: clamp(28px, 3vw, 44px); line-height: 1.08; }
.bb-display-xl em, .bb-display-l em, .bb-display-m em, .bb-display-s em {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600; font-style: italic;
  font-size: 1.2em;
  color: var(--bb-copper-lo);
  letter-spacing: -0.01em;
}
.bb-body-l { font-size: clamp(16px, 1.2vw, 19px); line-height: 1.55; color: var(--bb-fg-2); }
.bb-eyebrow {
  font-family: 'Inter Tight', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bb-copper-lo);
  display: inline-flex; align-items: center; gap: 10px;
}
.bb-eyebrow__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--bb-copper); display: inline-block; }
.bb-index { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500; font-size: 14px; color: var(--bb-copper); }
.bb-emrule { display: inline-block; width: 32px; height: 1px; background: var(--bb-copper); vertical-align: middle; }

/* ---------- SECTION ---------- */
.bb-section { padding: clamp(96px, 12vw, 160px) var(--bb-gutter); position: relative; scroll-margin-top: 88px; }
.bb-section__inner { max-width: var(--bb-container); margin: 0 auto; }
.bb-section__head { max-width: 820px; margin-bottom: 80px; }
.bb-section__lede { margin-top: 24px; max-width: 620px; }

/* ---------- BUTTON ---------- */
.bb-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 320ms var(--bb-ease);
  white-space: nowrap;
}
.bb-btn--primary { background: #9A4E0D; color: #FFFFFF; }
.bb-btn--primary:hover { background: #B5651D; transform: translateY(-2px); }
.bb-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.bb-btn--primary:disabled:hover { background: #9A4E0D; transform: none; }
.bb-btn--ghost { color: var(--bb-fg-1); border-color: var(--bb-hairline); }
.bb-btn--ghost:hover { border-color: var(--bb-copper); color: var(--bb-copper-lo); }
.bb-btn--outline { background: transparent; color: var(--bb-fg-1); border-color: var(--bb-hairline); padding: 12px 22px; font-size: 12px; }
.bb-btn--outline:hover { border-color: var(--bb-copper); color: var(--bb-copper-lo); }
.bb-btn__arr { transition: transform 320ms var(--bb-ease); }
.bb-btn:hover .bb-btn__arr { transform: translateX(4px); }

/* ---------- FORM STATES ---------- */
.bb-form-msg {
  padding: 16px 20px; font-size: 14px; line-height: 1.5;
  border: 1px solid transparent; margin-top: 8px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 400ms var(--bb-ease), transform 400ms var(--bb-ease);
}
.bb-form-msg.is-visible { opacity: 1; transform: translateY(0); }
.bb-form-msg--ok { border-color: rgba(76,175,80,0.4); color: #81C784; background: rgba(76,175,80,0.08); }
.bb-form-msg--err { border-color: rgba(244,67,54,0.4); color: #E57373; background: rgba(244,67,54,0.08); }
.bb-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(245,241,234,0.3); border-top-color: var(--bb-bone); border-radius: 50%; animation: bb-spin 600ms linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes bb-spin { to { transform: rotate(360deg); } }

/* Honeypot (anti-spam) */
.bb-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ---------- HEADER ---------- */
.bb-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 116px; display: flex; align-items: center;
  transition: all 600ms var(--bb-ease);
  border-bottom: 1px solid transparent;
}
.bb-header.is-scrolled {
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--bb-hairline);
  height: 88px;
}
.bb-header__inner {
  width: 100%; max-width: var(--bb-container); margin: 0 auto;
  padding: 0 var(--bb-gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.bb-header__brand { display: inline-flex; align-items: center; }
.bb-header__mark {
  height: 96px; width: auto; display: block;
  transition: height 600ms var(--bb-ease);
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}
.bb-header.is-scrolled .bb-header__mark { height: 70px; }

/* Navigation */
.bb-nav {
  display: flex; align-items: center; gap: 24px;
  overflow: visible;
}
.bb-nav__link {
  font-family: 'Inter Tight', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bb-fg-2);
  text-decoration: none;
  transition: color 300ms var(--bb-ease);
  white-space: nowrap;
}
.bb-nav__link:hover { color: var(--bb-copper-lo); }
.bb-nav__link.is-active { color: var(--bb-copper-lo); }

/* Hamburger toggle - hidden on desktop */
.bb-nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative; z-index: 102;
  flex-direction: column; justify-content: space-between;
}
.bb-nav-toggle span {
  display: block; width: 100%; height: 2px;
  background: var(--bb-fg-1); border-radius: 2px;
  transition: all 300ms var(--bb-ease);
}
.bb-nav-toggle.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.bb-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.bb-nav-toggle.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 900px) {
  .bb-nav {
    position: fixed; inset: 0; z-index: 101;
    flex-direction: column; justify-content: center; align-items: center; gap: 28px;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    opacity: 0; pointer-events: none;
    transition: opacity 400ms var(--bb-ease);
  }
  .bb-nav.is-open { opacity: 1; pointer-events: auto; }
  .bb-nav__link { font-size: 16px; letter-spacing: 0.16em; }
  .bb-nav-toggle { display: flex; }
}

/* ---------- CURSOR SPOTLIGHT ---------- */
.bb-cursor-spot {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 9999; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(232,146,84,0.14) 0%, rgba(232,146,84,0.04) 25%, transparent 60%);
  mix-blend-mode: screen;
  transition: opacity 600ms var(--bb-ease);
}

/* ---------- MARQUEE ---------- */
.bb-marquee {
  position: relative; padding: 28px 0; overflow: hidden;
  margin: 28px 0;
}
.bb-marquee::before, .bb-marquee::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none;
}
.bb-marquee::before { left: 0; background: linear-gradient(90deg, var(--bb-obsidian), transparent); }
.bb-marquee::after  { right: 0; background: linear-gradient(270deg, var(--bb-obsidian), transparent); }
.bb-marquee__track {
  display: flex; gap: 40px; white-space: nowrap;
  animation: bb-marquee 18s linear infinite;
}
.bb-marquee__row {
  display: inline-flex; align-items: center; gap: 40px;
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500;
  font-size: clamp(17px, 2vw, 26px); color: var(--bb-fg-2);
  letter-spacing: -0.01em; padding-right: 40px;
}
.bb-marquee__dot { color: var(--bb-copper); font-size: 10px; }
@keyframes bb-marquee { to { transform: translateX(-33.333%); } }

/* ---------- RISE (scroll reveal) ---------- */
.bb-rise { opacity: 0; transform: translateY(50px); transition: opacity 1300ms var(--bb-ease), transform 1300ms var(--bb-ease); }
.bb-rise.is-in { opacity: 1; transform: translateY(0); }

/* ---------- PRIVACY CHECKBOX ---------- */
.bb-field--checkbox { flex-direction: row; align-items: center; gap: 0; }
.bb-field--checkbox label { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--bb-fg-2); cursor: pointer; }
.bb-field--checkbox input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--bb-copper);
  cursor: pointer; flex-shrink: 0;
}
.bb-field--checkbox a { color: var(--bb-copper-lo); text-decoration: underline; transition: color 320ms var(--bb-ease); }
.bb-field--checkbox a:hover { color: var(--bb-copper); }

/* ---------- FOOTER ---------- */
.bb-footer { padding: 80px var(--bb-gutter) 40px; }
.bb-footer__inner { max-width: var(--bb-container); margin: 0 auto; }
.bb-footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 60px; flex-wrap: wrap; padding-bottom: 60px; border-bottom: 1px solid var(--bb-hairline); }
.bb-footer__brand { display: flex; flex-direction: column; gap: 16px; max-width: 360px; }
.bb-footer__mark { width: 180px; height: auto; display: block; margin-left: -10px; }
.bb-footer__brand-tag { color: var(--bb-fg-2); font-size: 14px; }
.bb-footer__cols { display: flex; gap: 60px; flex-wrap: wrap; }
.bb-footer__col h4 { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bb-fg-3); margin-bottom: 16px; }
.bb-footer__col a { display: block; font-size: 14px; color: var(--bb-fg-2); margin-bottom: 8px; transition: color 320ms var(--bb-ease); }
.bb-footer__col a:hover { color: var(--bb-copper-lo); }
.bb-footer__bottom { padding-top: 32px; display: flex; justify-content: space-between; color: var(--bb-fg-3); font-size: 12px; letter-spacing: 0.08em; }
.bb-footer__privacy { color: var(--bb-fg-3); transition: color 320ms var(--bb-ease); }
.bb-footer__privacy:hover { color: var(--bb-copper-lo); }

/* ---------- PAGE TRANSITION ---------- */
.bb-page-transition {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bb-obsidian);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 400ms var(--bb-ease);
  pointer-events: none;
}
.bb-page-transition.is-out {
  opacity: 0;
}
.bb-page-transition__logo {
  opacity: 0.3;
  width: 80px; height: 80px;
}

/* ---------- PAGE HEADER (sub-pages) ---------- */
.bb-page-hero {
  padding: 180px var(--bb-gutter) 80px;
  position: relative;
}
.bb-page-hero__inner {
  max-width: var(--bb-container);
  margin: 0 auto;
}

/* ---------- MOBILE PERFORMANCE ---------- */
@media (max-width: 768px) {
  .bb-header.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10,10,10,0.95); }
  .bb-cursor-spot { display: none; }
  .bb-eyebrow__dot { animation: none; }
  .bb-footer__top { flex-direction: column; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .bb-rise { opacity: 1; transform: none; }
  .bb-marquee__track { animation: none; }
  .bb-cursor-spot { display: none; }
}
