/* ============================================================
   BRANDISBY — GLOBAL STYLESHEET
   Mobile-first, fully responsive, premium aesthetic
   ============================================================ */

/* ── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── CSS VARIABLES ────────────────────────────────────────── */
:root {
  /* Brand Palette */
  --brown:        #5a3c30;
  --brown-light:  #7a5446;
  --brown-dark:   #3d2820;
  --dark:         #1b1513;
  --dark-2:       #251e1b;
  --cream:        #f7f3ef;
  --cream-2:      #ede7e1;
  --cream-3:      #e2d9d1;
  --white:        #ffffff;
  --gold:         #c9a96e;
  --gold-light:   #e8d5b0;
  --muted:        #9c8880;
  --muted-2:      #c4b5ad;
  --text:         #1b1513;
  --text-soft:    #5c4a42;

  /* Status */
  --green:  #2d9c6e;
  --amber:  #e08c2a;
  --red:    #c0392b;
  --blue:   #2980b9;

  /* Spacing */
  --gap-xs:  0.25rem;
  --gap-sm:  0.5rem;
  --gap-md:  1rem;
  --gap-lg:  1.5rem;
  --gap-xl:  2rem;
  --gap-2xl: 3rem;
  --gap-3xl: 5rem;

  /* Radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-pill: 100px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(27,21,19,0.08);
  --shadow-md: 0 4px 20px rgba(27,21,19,0.12);
  --shadow-lg: 0 12px 48px rgba(27,21,19,0.16);
  --shadow-xl: 0 24px 80px rgba(27,21,19,0.22);

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-base:   0.25s cubic-bezier(0.4,0,0.2,1);
  --t-slow:   0.4s cubic-bezier(0.4,0,0.2,1);

  /* Layout */
  --nav-h:    64px;
  --sidebar-w: 240px;
  --max-w:    1200px;
  --max-w-sm: 720px;
  --pad-x:    5%;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; }
ul { list-style: none; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
.font-display { font-family: 'Cormorant Garamond', Georgia, serif; }

h1, h2, h3, .h1, .h2, .h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}
h1, .h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2, .h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3, .h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

/* ── LOGO ─────────────────────────────────────────────────── */
.logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo img { display: block; width: auto; }
.logo-nav  img { height: 30px; }
.logo-sm   img { height: 24px; }
.logo-lg   img { height: 40px; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.75rem 1.75rem;
  font-size: 0.9rem; font-weight: 500; font-family: inherit;
  line-height: 1; letter-spacing: 0.02em;
  border-radius: var(--r-pill); border: none;
  text-decoration: none; cursor: pointer;
  transition: all var(--t-base);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brown); color: var(--white);
  box-shadow: 0 4px 16px rgba(90,60,48,0.28);
}
.btn-primary:hover {
  background: var(--brown-dark); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(90,60,48,0.36);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent; color: var(--brown);
  border: 1.5px solid var(--brown);
}
.btn-outline:hover { background: var(--brown); color: var(--white); }

.btn-ghost {
  background: transparent; color: var(--text);
  border: 1.5px solid rgba(90,60,48,0.2);
}
.btn-ghost:hover { border-color: var(--brown); color: var(--brown); }

.btn-dark {
  background: var(--dark); color: var(--white);
}
.btn-dark:hover { background: var(--brown-dark); }

.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.8rem; }
.btn-full { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--r-md); }

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group:last-child { margin-bottom: 0; }

label, .label {
  display: block; font-size: 0.82rem; font-weight: 500;
  color: var(--text); margin-bottom: 0.4rem; letter-spacing: 0.02em;
}

.input {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--cream-3);
  border-radius: var(--r-md);
  font-size: 0.9rem; color: var(--text);
  background: var(--white); outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  -webkit-appearance: none; appearance: none;
}
.input:focus {
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(90,60,48,0.1);
}
.input::placeholder { color: var(--muted-2); }
.input.error { border-color: var(--red); }

textarea.input { resize: vertical; min-height: 90px; line-height: 1.6; }
select.input { cursor: pointer; }

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
}

/* ── BADGE / PILL ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.65rem; border-radius: var(--r-pill);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em;
}
.badge-brown  { background: rgba(90,60,48,0.1); color: var(--brown); }
.badge-green  { background: rgba(45,156,110,0.1); color: var(--green); }
.badge-amber  { background: rgba(224,140,42,0.1); color: var(--amber); }
.badge-red    { background: rgba(192,57,43,0.1); color: var(--red); }
.badge-blue   { background: rgba(41,128,185,0.1); color: var(--blue); }

/* ── DIVIDER ──────────────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.8rem; color: var(--muted); margin: 1.5rem 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--cream-3);
}

/* ── TOAST ────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  padding: 0.85rem 1.4rem; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 400; color: var(--white);
  box-shadow: var(--shadow-lg); pointer-events: all;
  animation: toastIn 0.3s var(--t-base);
  max-width: 320px;
}
.toast-success { background: var(--green); }
.toast-error   { background: var(--red); }
.toast-info    { background: var(--dark); }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── SKELETON ─────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--cream-2) 0%, var(--cream-3) 50%, var(--cream-2) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-md);
  animation: shimmer 1.6s infinite linear;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── UTILITIES ────────────────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: var(--gap-sm); }
.gap-md { gap: var(--gap-md); }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cream-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ── MOBILE OVERRIDES ─────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --pad-x: 1.25rem; }
  .input-row { grid-template-columns: 1fr; }
  .btn-lg { padding: 0.9rem 1.75rem; font-size: 0.95rem; }
}
