/* ELVORA COLLECTION — Herbarium Vault · Design System */

:root {
  /* ── Brand accents (primary + secondary only) ── */
  --vault: #4A1C32;
  --vault-deep: #2E0F1F;
  --vault-soft: #6B3450;
  --ochre: #D4A24C;
  --ochre-deep: #A67B2E;
  --accent: var(--ochre);
  --accent-deep: var(--ochre-deep);

  /* ── Neutral surfaces (clean stone palette) ── */
  --surface-0: #F5F5F4;
  --surface-1: #FAFAF9;
  --surface-2: #FFFFFF;
  --surface-muted: #E7E5E4;
  --ledger: var(--surface-1);
  --parchment: var(--surface-2);
  --paper: var(--parchment);

  /* ── Text hierarchy ── */
  --ink: #1C1917;
  --ink-soft: #292524;
  --slate: #57534E;
  --slate-soft: #6B6560;
  --muted: var(--slate);
  --text-secondary: #3f3a36;
  --text-muted: #504a45;
  --surface: var(--surface-1);

  /* ── Semantic ── */
  --moss: #2D5016;
  --moss-soft: #4A7A32;
  --success: #15803d;
  --on-dark: #FAFAF9;
  --on-dark-muted: rgba(250, 250, 249, 0.88);
  --on-dark-subtle: rgba(250, 250, 249, 0.72);

  /* ── Borders & dividers (soft, not harsh) ── */
  --line: rgba(28, 25, 23, 0.08);
  --line-soft: rgba(28, 25, 23, 0.05);
  --line-strong: rgba(74, 28, 50, 0.14);

  /* ── Typography ── */
  --serif: "Cormorant Garamond", "Palatino Linotype", Georgia, serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.55;
  --leading-relaxed: 1.65;
  --leading-loose: 1.75;

  /* ── Spacing scale ── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-section: clamp(3rem, 7vw, 5.5rem);
  --space-container: clamp(1.25rem, 4vw, 2.5rem);

  /* ── Radius (modern, soft) ── */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ── Ambient shadows (multi-layer) ── */
  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.05), 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 4px 16px rgba(28, 25, 23, 0.06), 0 2px 6px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 12px 32px rgba(28, 25, 23, 0.08), 0 4px 12px rgba(28, 25, 23, 0.04);
  --shadow-xl: 0 20px 48px rgba(46, 15, 31, 0.1), 0 8px 20px rgba(28, 25, 23, 0.05);
  --shadow-glow: 0 8px 28px rgba(74, 28, 50, 0.18);
  --shadow: var(--shadow-lg);

  /* ── Motion ── */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;

  /* ── Glass ── */
  --glass-bg: rgba(250, 250, 249, 0.82);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-blur: 16px;

  /* Legacy aliases */
  --ts-charcoal: var(--vault-deep);
  --ts-ink: var(--ink);
  --ts-paper: var(--parchment);
  --ts-surface: var(--ledger);
  --ts-surface-2: var(--surface-muted);
  --ts-muted: var(--slate);
  --ts-line: var(--line);
  --ts-wine: var(--vault);
  --ts-wine-dark: var(--vault-deep);
  --ts-gold: var(--ochre);
  --ts-gold-pale: #F2E4C8;
  --ts-grove: var(--moss);
  --ts-grove-deep: #1E3610;
  --ts-mist: var(--surface-muted);
  --ts-success: var(--success);
  --font-body: var(--sans);
  --font-display: var(--serif);
  --night: var(--vault-deep);
  --plum: var(--vault);
  --saffron: var(--ochre);
  --saffron-deep: var(--ochre-deep);
  --sand: var(--ledger);
  --mist: var(--surface-muted);
  --clay: var(--vault-soft);
  --clay-ink: var(--vault-deep);
  --fog: var(--surface-muted);
  --saffron-ink: var(--ochre-deep);
  --blueprint: var(--vault);
  --blueprint-deep: var(--vault-deep);
  --signal: var(--ochre);
  --signal-deep: var(--ochre-deep);
  --kraft-deep: var(--ochre-deep);
  --chalk: var(--surface-1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body.a56-store {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: var(--leading-relaxed);
  color: var(--ink);
  background-color: var(--surface-0);
  background-image:
    radial-gradient(900px 520px at 92% -8%, rgba(212, 162, 76, 0.07), transparent 58%),
    radial-gradient(700px 420px at 4% 100%, rgba(45, 80, 22, 0.05), transparent 55%),
    linear-gradient(180deg, var(--surface-1) 0%, var(--surface-0) 100%);
  min-height: 100vh;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
::placeholder { color: var(--slate-soft); opacity: 1; }

p, li, dd, label, .a56-lede {
  line-height: var(--leading-relaxed);
}

small, .text-sm {
  font-size: 0.875rem;
  line-height: var(--leading-normal);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.container {
  width: min(1180px, calc(100% - var(--space-container) * 2));
  margin-inline: auto;
}

.page-wrap { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.page-main { flex: 1; padding-bottom: var(--space-4); }

/* ── Typography hierarchy ── */
h1, h2, h3, h4, .a56-serif {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: var(--leading-tight);
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.125rem, 2vw, 1.35rem); font-weight: 600; line-height: var(--leading-snug); }

body, input, select, textarea, button {
  font-weight: 400;
}

strong, b, dt, .font-semibold { font-weight: 600; }

.a56-kicker {
  margin: 0 0 var(--space-3);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss-soft);
  line-height: var(--leading-normal);
}

.a56-lede {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: var(--leading-loose);
  color: var(--slate);
  max-width: 52ch;
  font-weight: 400;
}

/* ── Buttons (global) ── */
.a56-btn, .ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-full);
  background: var(--vault);
  color: var(--on-dark);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background var(--duration-normal) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.a56-btn:hover, .ts-btn:hover {
  background: var(--vault-deep);
  color: var(--on-dark);
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.a56-btn:active, .ts-btn:active {
  transform: translateY(0) scale(0.98);
}

.a56-btn:focus-visible, .ts-btn:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 3px;
}

.a56-btn-ghost, .ts-btn-outline {
  background: var(--surface-2);
  color: var(--vault);
  border: 1.5px solid var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.a56-btn-ghost:hover, .ts-btn-outline:hover {
  background: var(--vault);
  color: var(--on-dark);
  border-color: var(--vault);
}

.a56-btn-ochre, .a56-btn-saffron {
  background: linear-gradient(135deg, var(--ochre), var(--ochre-deep));
  color: var(--vault-deep);
  box-shadow: 0 4px 20px rgba(212, 162, 76, 0.35);
}

.a56-btn-ochre:hover, .a56-btn-saffron:hover {
  background: linear-gradient(135deg, #e8b85a, var(--ochre));
  color: var(--vault-deep);
}

.a56-btn-glow {
  background: linear-gradient(135deg, #e8a838, var(--ochre));
  color: var(--vault-deep);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 24px rgba(212, 162, 76, 0.4);
}

.a56-btn-glow:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px rgba(212, 162, 76, 0.5);
}

.a56-btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.a56-btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px) scale(1.02);
}

/* ── Form controls (global baseline) ── */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border: 1.5px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: var(--leading-normal);
  caret-color: var(--vault);
  transition:
    border-color var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out),
    background var(--duration-normal) var(--ease-out);
}

textarea { min-height: 120px; resize: vertical; line-height: var(--leading-relaxed); }

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--vault);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(74, 28, 50, 0.1);
}

/* ── Product grid & cards ── */
.a56-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-5);
}

.a56-section-head { margin-bottom: var(--space-8); }
.a56-section-head p {
  margin: 0 0 var(--space-2);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre-deep);
}
.a56-section-head h2 { margin: 0; }

.a56-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    transform var(--duration-normal) var(--ease-out),
    box-shadow var(--duration-normal) var(--ease-out);
}

.a56-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.a56-card-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-0);
}

.a56-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

.a56-card:hover .a56-card-media img { transform: scale(1.04); }

.a56-card-seal {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--vault);
  color: var(--on-dark);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.a56-card-body {
  padding: var(--space-4) var(--space-5) var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.a56-card-aisle {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss-soft);
}

.a56-card-body h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: var(--leading-snug);
}

.a56-card-foot {
  margin-top: auto;
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line-soft);
}

.a56-card-price {
  font-weight: 800;
  color: var(--vault);
  font-size: 1.0625rem;
}

.a56-card-sku {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--slate-soft);
  text-transform: uppercase;
}

/* ── Empty / notice states ── */
.empty-state, .notice {
  padding: var(--space-12) var(--space-6);
  text-align: center;
  border-radius: var(--radius-xl);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.empty-state .sub { color: var(--slate); font-size: 0.9375rem; line-height: var(--leading-relaxed); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
