/* ============================================================
   GILT EDGE — Design tokens, reset, typography, primitives
   Brand is LOCKED per the design contract.
   ============================================================ */

:root {
  /* --- Surfaces --- */
  --obsidian: #0B0B0D;   /* app background */
  --onyx:     #16161A;   /* surface / cards */
  --onyx2:    #1E1E24;   /* raised */
  --line:     #2A2A31;   /* hairlines */

  /* --- Gold family --- */
  --gilt:      #C6A15B;  /* primary accent / CTA */
  --champagne: #E7D3A1;  /* light gold */
  --bronze:    #8A6B2F;  /* deep gold */
  --foil-hi:   #F4E6BE;  /* inner highlight */

  /* --- Text --- */
  --ivory: #F4F1EA;      /* primary text */
  --ash:   #9A968C;      /* muted */

  /* --- State --- */
  --green: #3FA46A;      /* booked / paid */
  --amber: #D98A2B;      /* attention / notice accent */
  --red:   #C4453A;      /* cancel / danger */

  /* --- Gold-foil gradient recipe (contract) --- */
  --foil: linear-gradient(135deg, #E7D3A1 0%, #C6A15B 42%, #8A6B2F 100%);
  --foil-soft: linear-gradient(135deg, rgba(231,211,161,.16), rgba(138,107,47,.10));

  /* --- Type --- */
  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-num: 'Bebas Neue', 'Inter', sans-serif;

  /* --- Geometry / motion --- */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  --gold-glow: 0 0 0 1px rgba(198,161,91,.28), 0 8px 24px rgba(198,161,91,.12);
}

/* ---------------- Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--obsidian);
  color: var(--ivory);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(198,161,91,.35); color: var(--ivory); }

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2f2f38; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Typography helpers ---------------- */
.display {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.05;
}
.display-i { font-family: var(--f-display); font-style: italic; font-weight: 600; }
.overline {
  font-family: var(--f-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ash);
}
.muted { color: var(--ash); }
.gold {
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

/* ---------------- Gold-foil surface helper ---------------- */
.foil-fill {
  background: var(--foil);
  color: #21160a;
  box-shadow: inset 0 1px 0 rgba(244,230,190,.5), var(--shadow);
}

/* ---------------- Card ---------------- */
.card {
  background: var(--onyx);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}
.card--raised { background: var(--onyx2); box-shadow: var(--shadow); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--onyx2);
  color: var(--ivory);
  font-weight: 600;
  font-size: 14px;
  transition: transform .15s var(--ease), border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: #3a3a44; }
.btn:active { transform: scale(.97); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 7px 12px; font-size: 12.5px; }
.btn--block { width: 100%; }

/* Gold-foil primary CTA */
.btn-gold {
  position: relative;
  border: none;
  color: #21160a;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--foil);
  box-shadow: inset 0 1px 0 rgba(244,230,190,.55), 0 8px 22px rgba(198,161,91,.22);
  overflow: hidden;
}
.btn-gold::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.45) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: none;
}
.btn-gold:hover::after { animation: sheen 1.1s var(--ease); }
@keyframes sheen { to { transform: translateX(120%); } }

/* ---------------- Chip / Pill ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--onyx2);
  font-size: 12.5px; font-weight: 500;
  transition: border-color .2s, background .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.chip[aria-pressed="true"], .chip.is-active {
  border-color: var(--gilt);
  background: var(--foil-soft);
  color: var(--champagne);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid var(--line); background: var(--onyx);
}
.pill--green { color: var(--green); border-color: rgba(63,164,106,.4); background: rgba(63,164,106,.08); }
.pill--amber { color: var(--amber); border-color: rgba(217,138,43,.4); background: rgba(217,138,43,.08); }
.pill--gold  { color: var(--champagne); border-color: rgba(198,161,91,.45); background: var(--foil-soft); }

/* ---------------- Price (Bebas) ---------------- */
.price {
  font-family: var(--f-num);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1;
  color: var(--champagne);
}
.price--hero {
  font-size: 56px;
  background: var(--foil);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

/* ---------------- Monogram avatar ---------------- */
.avatar-monogram {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  font-family: var(--f-display); font-weight: 600; font-size: 17px;
  background: var(--onyx2); border: 1px solid var(--line); color: var(--champagne);
  flex: 0 0 auto; user-select: none;
}
.avatar-monogram.is-gold {
  background: var(--foil); color: #21160a; border: none;
  box-shadow: inset 0 1px 0 rgba(244,230,190,.55);
}

/* ---------------- Live dot ---------------- */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 0 rgba(63,164,106,.6);
  animation: pulse 1.8s infinite;
}
.live-dot--gold { background: var(--gilt); box-shadow: 0 0 0 0 rgba(198,161,91,.6); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(63,164,106,.55); }
  70%  { box-shadow: 0 0 0 8px rgba(63,164,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,164,106,0); }
}

/* ---------------- Sheet (bottom) ---------------- */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5,5,7,.66); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s var(--ease);
}
.sheet {
  width: 100%; max-width: 480px;
  background: var(--onyx); border: 1px solid var(--line);
  border-bottom: none;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg);
  max-height: 86%; overflow: auto;
  animation: sheetUp .3s var(--ease);
}
.sheet__grip { width: 40px; height: 4px; border-radius: 4px; background: #35353e; margin: 10px auto 4px; }
.sheet__head { padding: 6px 20px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.sheet__title { font-family: var(--f-display); font-size: 22px; font-weight: 600; }
.sheet__body { padding: 18px 20px; }
.sheet__actions { padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; gap: 10px; border-top: 1px solid var(--line); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---------------- Modal (centered) ---------------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(5,5,7,.7); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .2s var(--ease);
}
.modal {
  width: 100%; max-width: 420px;
  background: var(--onyx); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  animation: pop .26s var(--ease); overflow: hidden;
}
.modal__body { padding: 22px; }
.modal__actions { padding: 0 22px 22px; display: flex; gap: 10px; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- Toast ---------------- */
#ge-toasts {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 220px; max-width: 340px;
  padding: 12px 16px; border-radius: 12px;
  background: var(--onyx2); border: 1px solid var(--line);
  color: var(--ivory); font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .3s var(--ease);
}
.toast--gold { border-color: rgba(198,161,91,.5); background: var(--foil-soft); }
.toast--green { border-color: rgba(63,164,106,.45); }
.toast--out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(14px); opacity: 0; } }

/* ---------------- Inputs ---------------- */
.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ash); margin-bottom: 6px; }
.input {
  width: 100%; padding: 12px 14px;
  background: var(--onyx2); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--ivory);
  transition: border-color .2s;
}
.input:focus { outline: none; border-color: var(--gilt); box-shadow: 0 0 0 3px rgba(198,161,91,.14); }
.input::placeholder { color: #55555f; }

/* ============================================================
   PHONE FRAME  (client app chrome)
   ============================================================ */
.phone {
  position: relative;
  width: 390px; max-width: 100%;
  height: 100%;
  background: var(--obsidian);
  border-radius: 40px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
/* On desktop the phone gets a physical bezel + notch on a showroom bg */
.showroom .phone {
  height: 844px; max-height: calc(100vh - 48px);
  border: 10px solid #0e0e12;
  box-shadow:
    0 0 0 2px #26262d,
    var(--shadow-lg),
    0 0 120px rgba(198,161,91,.10);
}
.showroom .phone::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 150px; height: 26px; background: #0e0e12;
  border-radius: 0 0 16px 16px; z-index: 40;
}
.phone__scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}
