/* ===================================================
   ASTA · Old Money Olive
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500&display=swap');

:root {
  /* Cream surfaces — aged paper */
  --cream:       #f0e8d5;
  --cream-soft:  #e6dcc2;
  --cream-deep:  #d4c5a3;
  --parchment:   #f6efde;

  /* Navy blues — matching the ASTA seal */
  --navy:        #1a3a6b;
  --navy-deep:   #0f2444;
  --navy-soft:   #2d5285;
  --navy-muted:  #5a7ba8;
  --navy-pale:   #a8bcd6;

  /* Antique golds */
  --gold:        #a8884a;
  --gold-bright: #c4a368;
  --gold-pale:   #d4ba85;

  /* Inks */
  --ink:       #1f1d1a;
  --ink-soft:  #3a3833;
  --graphite:  #5a564d;
  --silver:    #8a8276;
  --whisper:   #b8b0a0;

  /* Functional */
  --line:        rgba(26, 58, 107, 0.12);
  --line-soft:   rgba(26, 58, 107, 0.06);
  --shadow-warm: rgba(26, 58, 107, 0.08);

  /* Easing */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--cream);
  color: var(--ink-soft);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Barely-there paper grain */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: multiply;
}

::selection { background: var(--navy); color: var(--cream); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--cream-soft); }
::-webkit-scrollbar-thumb { background: var(--navy-muted); }
::-webkit-scrollbar-thumb:hover { background: var(--navy); }

:focus-visible {
  outline: 2px solid var(--navy-pale);
  outline-offset: 4px;
}

/* ===== Typography primitives ===== */
.display, .serif {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

.orn { color: var(--navy); font-size: 0.85rem; line-height: 1; }
.orn-gold { color: var(--gold); font-size: 0.85rem; line-height: 1; }
.tnum { font-variant-numeric: tabular-nums; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }

/* ===== Page loader (thin olive line) ===== */
.page-loader {
  position: fixed; top: 0; left: 0; right: 0;
  height: 1px; z-index: 99999;
  background: transparent;
  transition: opacity 0.5s var(--ease);
}
.page-loader-line {
  display: block; height: 100%;
  background: var(--navy);
  width: 0;
  animation: loaderSlide 1.2s var(--ease) infinite;
}
.page-loader.hide { opacity: 0; pointer-events: none; }
@keyframes loaderSlide {
  0%   { width: 0;   margin-left: 0; }
  50%  { width: 40%; margin-left: 30%; }
  100% { width: 0;   margin-left: 100%; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 1.75rem;
  background: var(--navy-deep); color: var(--cream);
  border: none; border-radius: 2px;
  font-family: 'Inter', sans-serif; font-weight: 500;
  font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: lowercase;
  cursor: pointer;
  transition: all 0.5s var(--ease);
}
.btn:hover { background: var(--navy); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent; color: var(--navy);
  border: 1px solid var(--navy-pale);
}
.btn-ghost:hover {
  color: var(--navy-deep); border-color: var(--navy);
  background: transparent;
}

.btn-text {
  background: transparent; color: var(--silver);
  height: auto; padding: 0;
  font-size: 11px;
}
.btn-text:hover { color: var(--navy); background: transparent; box-shadow: none; }

/* ===== Inputs (borderless, bottom-line only) ===== */
.input, .select, .textarea {
  width: 100%;
  padding: 0.65rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--navy-pale);
  font-family: 'Inter', sans-serif; font-weight: 400;
  font-size: 15px; color: var(--ink);
  outline: none;
  transition: border-color 0.5s var(--ease);
  border-radius: 0;
}
.input::placeholder, .textarea::placeholder { color: var(--silver); }
.input:focus, .select:focus, .textarea:focus { border-bottom-color: var(--navy); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

label {
  display: block;
  font-family: 'Inter', sans-serif; font-weight: 500;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.45rem;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center;
  font-family: 'Inter', sans-serif; font-weight: 500;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.badge.live  { color: var(--navy);    border-color: var(--navy); }
.badge.draft { color: var(--silver);   border-color: var(--whisper); }
.badge.sold,
.badge.acquired { color: var(--graphite); text-decoration: line-through; text-decoration-thickness: 1px; border-color: transparent; padding-left: 0; padding-right: 0; }
.badge.reserved { color: var(--gold); border-color: var(--gold-pale); }

/* ===== Toast ===== */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 10000;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--navy-deep); color: var(--cream);
  padding: 0.85rem 1.15rem;
  border-left: 3px solid var(--gold);
  min-width: 260px;
  font-family: 'Inter', sans-serif; font-size: 13px;
  pointer-events: all;
  animation: toastIn 0.5s var(--ease) forwards;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
.toast.success { border-left-color: var(--gold-bright); }
.toast.error   { border-left-color: var(--navy-pale); }
.toast-title {
  font-family: 'Inter', sans-serif; font-weight: 500;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-pale); margin-bottom: 2px;
}
@keyframes toastIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 36, 68, 0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--parchment);
  width: 90%; max-width: 460px;
  padding: 2.5rem;
  border: 1px solid var(--navy-pale);
  border-radius: 2px;
  transform: translateY(8px);
  transition: transform 0.5s var(--ease);
}
.modal-backdrop.open .modal { transform: none; }
.modal-title {
  font-family: 'Instrument Serif', serif; font-weight: 400;
  font-size: 1.6rem; letter-spacing: -0.03em;
  color: var(--ink); margin-bottom: 0.5rem;
}
.modal-subtitle { color: var(--graphite); font-size: 14px; margin-bottom: 2rem; }

/* ===== Reveal ===== */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
