/* FineArtUnderfoot — shared tokens + base + nav + inquiry components.
   Visual language adopted from the approved v29 demo (Cormorant Garamond
   display, Inter UI, dusty clay/sage palette). Loaded on every page. */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=Mulish:wght@300;400&family=Mr+De+Haviland&display=swap");

:root {
  /* grounds */
  --paper:        #ebe5db;
  --paper-2:      #f6f1e9;
  --bone:         #fbf8f2;
  --surface:      #f5f2ec;
  --surface-2:    #f8f5ef;
  --surface-sink: #e3dccf;

  /* ink (v29 values; -2/-3 kept as aliases for lifted rules) */
  --ink:          #312d28;
  --ink-soft:     #5f574e;
  --ink-faint:    #8a8175;
  --ink-2:        #5f574e;
  --ink-3:        #8a8175;
  --dark:         #3a352f;
  --dark-soft:    #504a42;

  --line:         #cfc7b9;
  --line-soft:    #ddd6c9;
  --line-faint:   #e6e0d4;

  /* accents */
  --clay:         #a57c5b;
  --clay-deep:    #7d5a3e;
  --clay-wash:    rgba(165, 124, 91, 0.12);
  --sage:         #828b78;
  --sage-deep:    #65705d;
  --rose:         #b98a86;

  --shadow-xs: 0 1px 2px rgba(49, 45, 40, 0.05);
  --shadow-sm: 0 2px 8px rgba(49, 45, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(49, 45, 40, 0.09);
  --shadow-lg: 0 24px 60px rgba(49, 45, 40, 0.15);

  --serif: "Cormorant Garamond", "Georgia", serif;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mulish: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* type scale (one size per role, shared across sections) */
  --fs-meta:    .62rem;
  --fs-label:   .70rem;
  --fs-ui:      .82rem;
  --fs-tag:     clamp(.95rem, 1.15vw, 1.1rem);
  --fs-copy-sm: 1.05rem;
  --fs-copy:    1.18rem;
  --fs-lede:    clamp(1.15rem, 1.6vw, 1.45rem);
  --fs-accent:  1.3rem;
  --fs-quote:   1.6rem;
  --fs-stat:    2rem;
  --fs-modal-h: 2.4rem;
  --fs-section: clamp(2.6rem, 6vw, 5rem);
  --fs-hero:    clamp(4.6rem, 10vw, 9rem);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  font-size: 110%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(165,124,91,.10), transparent 58%),
    radial-gradient(760px 540px at 90% 6%, rgba(130,139,120,.09), transparent 56%),
    linear-gradient(180deg, #e4ded2 0%, var(--paper) 26%, #f4efe7 100%);
  background-attachment: fixed;
}

a { color: var(--clay-deep); }
button, input, textarea { font: inherit; }

/* ---------- Fixed nav (v29) ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(18px, 4vw, 52px);
  color: var(--bone);
  border-bottom: 1px solid rgba(251,248,242,.18);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.nav.is-scrolled,
.nav.solid {
  background: rgba(246,241,233,.86);
  color: var(--ink);
  border-bottom: 1px solid transparent;
  box-shadow: 0 10px 34px rgba(49,45,40,.06);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.nav-brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: inherit;
}
.nav-center {
  justify-self: center;
  display: flex;
  gap: 3px;
  border: 1px solid rgba(255,255,255,.28);
  padding: 3px;
  background: rgba(49,45,40,.10);
}
.nav.is-scrolled .nav-center,
.nav.solid .nav-center {
  border-color: rgba(49,45,40,.18);
  background: rgba(255,255,255,.26);
}
.nav-center a {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 12px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  opacity: .74;
  transition: background .25s var(--ease), color .25s var(--ease), opacity .25s var(--ease);
}
.nav-center a:hover { opacity: 1; background: rgba(255,255,255,.12); }
.nav-center a.is-active {
  opacity: 1;
  background: rgba(251,248,242,.46);
  color: var(--ink);
}
.nav.is-scrolled .nav-center a.is-active,
.nav.solid .nav-center a.is-active {
  background: rgba(165,124,91,.12);
  color: var(--ink);
}
.nav.is-scrolled .nav-center a:hover,
.nav.solid .nav-center a:hover { background: rgba(49,45,40,.05); }
.nav-note {
  justify-self: end;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 300;
  letter-spacing: .20em;
  text-transform: uppercase;
  opacity: .70;
  white-space: nowrap;
}

/* ---------- Shared buttons (dark, for light backgrounds) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid var(--ink);
  color: var(--bone);
  background: var(--ink);
  text-decoration: none;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: #24211d; }
.btn:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface-sink); }

/* ---------- Floating inquiry button (shared) ---------- */

.floating-btn {
  position: fixed;
  right: clamp(16px, 4vw, 28px);
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 24px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone);
  background: rgba(49,45,40,.94);
  border: 1px solid rgba(251,248,242,.22);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.floating-btn:hover { transform: translateY(-3px); background: #24211d; }
.floating-btn:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

.count-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bone);
  color: var(--ink);
  font-size: var(--fs-label);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Inquiry modal (shared) ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28,25,22,.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bone);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 6px;
  box-shadow: 0 34px 90px rgba(0,0,0,.32);
  padding: 38px 34px 30px;
}
.modal h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-modal-h);
  line-height: .95;
  color: var(--ink);
}
.modal-subtitle {
  margin: 24px 0 10px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.modal-close:hover { transform: rotate(90deg); background: var(--surface-sink); color: var(--ink); }
.modal-close:focus-visible { outline: 2px solid var(--clay); }

.selected-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.selected-list li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #efe8dd;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: var(--serif);
  font-size: 1.02rem;
}
.selected-list .remove-sku {
  width: 18px; height: 18px;
  background: none; border: none;
  color: var(--ink-faint);
  font-size: 1.05rem; line-height: 1;
  cursor: pointer; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.selected-list .remove-sku:hover { color: var(--rose); background: rgba(185,138,134,.14); }

.modal-empty { margin: 0 0 20px; color: var(--ink-faint); font-family: var(--serif); font-style: italic; font-size: 1.05rem; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-label {
  display: block;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.form-label input,
.form-label textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: .95rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color .2s, box-shadow .2s;
}
.form-label textarea { resize: vertical; min-height: 74px; }
.form-label input:focus-visible,
.form-label textarea:focus-visible {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(165,124,91,.16);
}

.form-message { font-family: var(--sans); font-size: .88rem; font-weight: 500; margin: 0 0 14px; color: var(--clay-deep); }
.form-message.success { color: var(--sage-deep); }
.form-message ul { margin: 6px 0 0; padding-left: 18px; }

.submit-btn { width: 100%; margin-top: 6px; }

/* ---------- Toast (shared) ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--sage-deep);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--fs-ui);
  padding: 14px 26px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 40px);
  text-align: center;
}

@media (max-width: 640px) {
  .nav { padding: 8px 12px; grid-template-columns: 1fr auto; }
  .nav-note { display: none; }
  .nav-brand { font-size: .9rem; }
  .floating-btn { left: 16px; right: 16px; justify-content: center; }
  .modal { padding: 30px 22px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
