:root {
  --bg: #f5f0e8;
  --bg-deep: #ede5d8;
  --paper: #fbf8f3;
  --ink: #1f1b16;
  --ink-soft: #4a4239;
  --muted: #7a6f62;
  --line: #d9cfbf;
  --brass: #9c7c4c;
  --brass-soft: #c9ad7f;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 1px solid var(--brass); outline-offset: 4px; }

/* Header */
.site-header {
  max-width: var(--max); margin: 0 auto; padding: 28px 28px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  font-family: var(--serif); font-size: 26px; letter-spacing: 0.02em; text-decoration: none; font-weight: 500;
}
.wordmark span { font-style: italic; color: var(--brass); font-weight: 400; }
.wordmark.small { font-size: 22px; margin-bottom: 6px; }
.header-nav { display: flex; gap: 28px; }
.header-nav a {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
}
.header-nav a:hover { color: var(--ink); }

main { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

.view { display: none; }
.view.is-active { display: block; animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass); font-weight: 400; margin-bottom: 22px;
}
.lede { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.fine { font-size: 13px; color: var(--muted); margin-top: 18px; }
.center { text-align: center; }

/* Hero */
.hero { padding: 120px 0 100px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-size: clamp(46px, 7.4vw, 92px); max-width: 11em; margin-bottom: 28px; }
.hero h1 em { font-style: italic; color: var(--brass); }
.hero .lede { margin-bottom: 44px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px; border-radius: 0;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 400;
  padding: 18px 38px; border: 1px solid var(--ink); transition: background .3s var(--ease), color .3s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 6px 0; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.link-btn:hover { color: var(--ink); }

.rule { display: flex; justify-content: center; }
.rule span { width: 1px; height: 80px; background: var(--line); }

/* Principles */
.principles { padding: 80px 0 120px; }
.section-title { text-align: center; font-size: 40px; margin-bottom: 64px; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.principle-grid article { border-top: 1px solid var(--line); padding-top: 28px; }
.numeral { font-family: var(--serif); font-style: italic; color: var(--brass); font-size: 22px; display: block; margin-bottom: 14px; }
.principle-grid h3 { font-size: 28px; margin-bottom: 12px; }
.principle-grid p { color: var(--ink-soft); }

/* Quiz */
.view-quiz { padding: 64px 0 120px; max-width: 820px; margin: 0 auto; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.step-count { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.progress { height: 1px; background: var(--line); margin-bottom: 72px; }
.progress span { display: block; height: 1px; background: var(--ink); width: 0; transition: width .6s var(--ease); }
.question h2 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 14px; }
.question h2:focus { outline: none; }
.question .hint { color: var(--muted); margin-bottom: 44px; font-size: 16px; }
.question.enter { animation: rise .6s var(--ease) both; }

.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.option {
  text-align: left; background: var(--paper); border: 1px solid var(--line); padding: 24px 26px;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
  display: flex; flex-direction: column; gap: 4px;
}
.option:hover { border-color: var(--ink-soft); transform: translateY(-1px); }
.option[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.option[aria-pressed="true"] .option-desc { color: var(--brass-soft); }
.option-label { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.option-desc { font-size: 14px; color: var(--muted); }

.text-field { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.text-field input {
  font-family: var(--serif); font-size: 34px; background: transparent; border: 0; border-bottom: 1px solid var(--ink-soft);
  padding: 8px 0; color: var(--ink); border-radius: 0;
}
.text-field input::placeholder { color: #b5a996; font-style: italic; }
.text-field input:focus { outline: none; border-bottom-color: var(--brass); }

.question-actions { margin-top: 48px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.question-actions .fine { margin: 0; }

/* Results */
.view-results { padding: 72px 0 100px; }
.results-head { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: 80px; }
.results-head h1 { font-size: clamp(42px, 6.4vw, 76px); margin-bottom: 26px; }
.results-head h1 em { font-style: italic; color: var(--brass); }
.results-head h1:focus { outline: none; }

.gift-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.gift {
  background: var(--paper); padding: 44px 40px 40px; display: flex; flex-direction: column;
  animation: rise .7s var(--ease) both;
}
.gift-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
.gift-num { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--brass); }
.gift-cat { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.gift h3 { font-size: 32px; margin-bottom: 16px; }
.gift p.why { color: var(--ink-soft); margin-bottom: 26px; flex: 1; }
.gift-price { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 22px; }
.gift-links { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; border-top: 1px solid var(--line); padding-top: 22px; }
.gift-links a { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; }
.gift-links a.primary { color: var(--ink); border-bottom: 1px solid var(--brass); padding-bottom: 3px; }
.gift-links a.secondary { color: var(--muted); }
.gift-links a:hover { color: var(--brass); }

.note-card { margin: 90px auto 0; max-width: 760px; text-align: center; padding: 64px 48px; background: var(--ink); color: var(--paper); }
.note-card .eyebrow { color: var(--brass-soft); }
.note-card h2 { font-size: 40px; margin-bottom: 34px; }
.note-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.note-card li { font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.4; color: #efe6d6; }
.note-card li::before { content: "“"; color: var(--brass-soft); }
.note-card li::after { content: "”"; color: var(--brass-soft); }

.timing-note { max-width: 640px; margin: 56px auto 0; text-align: center; font-size: 14px; color: var(--muted); }
.results-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 48px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); margin-top: 40px; }
.footer-grid { max-width: var(--max); margin: 0 auto; padding: 64px 28px 40px; display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: 56px; }
.footer-grid h2 { font-family: var(--sans); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 400; margin-bottom: 12px; color: var(--ink); }
.footer-grid p { font-size: 14px; color: var(--ink-soft); }
.copyright { max-width: var(--max); margin: 0 auto; padding: 0 28px 40px; font-size: 12px; color: var(--muted); }

@media (max-width: 820px) {
  body { font-size: 16px; }
  .site-header { padding: 20px 20px 0; }
  .header-nav { display: none; }
  main { padding: 0 20px; }
  .hero { padding: 80px 0 72px; }
  .principle-grid, .gift-list, .footer-grid { grid-template-columns: 1fr; }
  .principle-grid { gap: 40px; }
  .options { grid-template-columns: 1fr; }
  .view-quiz { padding-top: 40px; }
  .progress { margin-bottom: 48px; }
  .gift { padding: 34px 26px; }
  .note-card { padding: 48px 24px; }
  .note-card h2 { font-size: 32px; }
  .footer-grid { gap: 32px; padding: 48px 20px 32px; }
  .copyright { padding: 0 20px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

/* ---------- Header with category menu ---------- */
.site-header { display: block; padding-bottom: 0; }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-cta {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--ink); padding: 10px 18px; transition: background .3s var(--ease), color .3s var(--ease);
}
.header-cta:hover { background: var(--ink); color: var(--paper); }
.category-nav {
  display: flex; justify-content: center; gap: 34px; margin-top: 22px; padding: 16px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft);
  padding-bottom: 3px; border-bottom: 1px solid transparent;
}
.category-nav a:hover { color: var(--ink); }
.category-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }

/* ---------- Browse tiles on the home page ---------- */
.browse { padding: 80px 0 100px; }
.browse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.browse-grid a {
  background: var(--paper); padding: 36px 28px; text-decoration: none; display: flex; flex-direction: column; gap: 6px;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.browse-label { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.browse-note { font-size: 14px; color: var(--muted); transition: color .3s var(--ease); }
.browse-grid a:hover { background: var(--ink); color: var(--paper); }
.browse-grid a:hover .browse-note { color: var(--brass-soft); }

/* ---------- Gift pages ---------- */
.category-head { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 88px 0 56px; }
.category-head h1 { font-size: clamp(46px, 7vw, 84px); margin-bottom: 26px; }
.category-tools { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.category-tools .fine { margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: transparent; border: 1px solid var(--line); padding: 9px 16px; font-size: 13px; color: var(--ink-soft);
  transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.chip:hover { border-color: var(--ink-soft); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.gift.empty { grid-column: 1 / -1; text-align: center; }
.finder-band { text-align: center; padding: 110px 0 60px; display: flex; flex-direction: column; align-items: center; }
.finder-band h2 { font-size: clamp(32px, 4.4vw, 48px); max-width: 14em; margin-bottom: 36px; }

@media (max-width: 820px) {
  .category-nav { justify-content: flex-start; gap: 26px; margin: 18px -20px 0; padding: 14px 20px; }
  .header-cta { padding: 8px 14px; font-size: 11px; }
  .browse-grid { grid-template-columns: repeat(2, 1fr); }
  .browse-grid a { padding: 26px 18px; }
  .browse-label { font-size: 23px; }
  .category-head { padding: 56px 0 40px; }
}
