/* ─────────────────────────────────────────────────────────────
   CRUMBS — shared web system (Atelier / Remix direction)
   Apothecary-editorial. Cormorant Garamond + Archivo. Paper / sage / ink.
   Used by the public profile page and the share-plan page.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper:      #ebe5d7;
  --paper-hi:   #f1ece0;
  --paper-warm: #e4ddcc;
  --putty:      #d4cdb8;
  --putty-soft: #dfd8c4;
  --sage:       #7e8a76;
  --sage-deep:  #4f5a4a;
  --sage-pale:  #b9c0ad;
  --ink:        #26241f;
  --ink-soft:   #5c5750;
  --ink-mute:   #8a8378;
  --ink-deep:   #16140f;
  --rule:       rgba(38,36,31,.14);
  --rule-mid:   rgba(38,36,31,.22);
  --rule-hard:  rgba(38,36,31,.34);
  --ember:      #a35a3a;

  --serif: "Cormorant Garamond","EB Garamond",serif;
  --sans:  "Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Layout helpers ─────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.hairline { height: 1px; background: var(--rule); border: 0; margin: 0; }
.hairline--ink { background: var(--ink); }

/* ── Spaced-caps label ──────────────────────────────────────── */
.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.label--sage { color: var(--sage-deep); }
.label--mute { color: var(--ink-mute); }
.label--paper { color: rgba(235,229,215,.72); }
.label--sm { font-size: 9.5px; letter-spacing: 0.22em; }

/* ── Serif display ──────────────────────────────────────────── */
.serif {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.0;
  margin: 0;
}
.serif--it { font-style: italic; }

/* Editorial score — italic serif numeral, sage */
.score {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--sage-deep);
  line-height: 1;
}

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar {
  border-radius: 999px;
  background: var(--sage);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--ring { box-shadow: 0 0 0 3px var(--paper); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--ink  { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #322f28; }
.btn--sage { background: var(--sage-deep); color: var(--paper); }
.btn--sage:hover { background: #3f493b; }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: rgba(38,36,31,.06); transform: translateY(-1px); }
.btn--ghost { border-color: var(--rule-hard); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn svg { width: 15px; height: 15px; }

/* ── Chip / pill ────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 7px 13px 6px;
  background: var(--putty);
  border-radius: 2px;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--sage-deep);
  padding: 5px 10px 4px;
  border-radius: 2px;
}

/* ── Meta dot-separated row ─────────────────────────────────── */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.meta .dot { width: 3px; height: 3px; border-radius: 999px; background: var(--rule-hard); }
.price b { font-weight: 600; color: var(--ink); }
.price span { opacity: .32; }

/* ── Photo frame (warm restaurant imagery) ──────────────────── */
.photo {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--putty);
  border-radius: 2px;
  overflow: hidden;
}
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(195deg, rgba(22,20,15,0) 42%, rgba(22,20,15,.06) 100%);
  pointer-events: none;
}
.photo--dark::after {
  background: linear-gradient(192deg, rgba(20,18,14,0) 30%, rgba(20,18,14,.86) 100%);
}

/* ── Wax-stamp seal (the quarterly / year mark) ─────────────── */
.seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-family: var(--serif);
  flex-shrink: 0;
}
.seal .seal-top {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 2px;
}

/* ── Masthead ───────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(235,229,215,.86);
  backdrop-filter: saturate(1.1) blur(10px);
  -webkit-backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead .row {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  font-size: 15px;
  color: var(--ink);
}
.wordmark--sm { font-size: 12px; letter-spacing: 0.34em; padding-left: 0.34em; }

/* ── Footer / powered-by ────────────────────────────────────── */
.footer {
  background: var(--ink-deep);
  color: var(--paper);
}
.footer a { color: var(--paper); }
.footer .label { color: rgba(235,229,215,.6); }

/* powered-by inline lockup */
.poweredby {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.poweredby b {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
}
.footer .poweredby { color: rgba(235,229,215,.55); }
.footer .poweredby b { color: var(--paper); }

/* ── Reveal-on-scroll ───────────────────────────────────────── */
/* Default: fully visible (so print, export & no-JS always show content).
   Only when JS is present (html.js) do we hide-then-reveal on scroll. */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Section scaffolding ────────────────────────────────────── */
.sec { padding-block: clamp(44px, 7vw, 96px); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(22px, 3vw, 40px); }
.sec-title { font-family: var(--serif); font-style: italic; font-weight: 400; line-height: 1; font-size: clamp(30px, 4.4vw, 50px); margin: 0; }
.kicker { margin-bottom: 12px; }

/* ── Profile page scope (crumbs.css + Tailwind on same route) ─ */
.profile-page {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.profile-page h1,
.profile-page h2,
.profile-page p {
  margin: 0;
}
.profile-page .btn,
.profile-page .label {
  font-family: var(--sans);
}
.profile-page .btn--ink {
  background: var(--ink);
  color: var(--paper);
}
.profile-page .btn--ink:hover {
  background: #322f28;
  color: var(--paper);
}
.profile-page a {
  color: inherit;
  text-decoration: none;
}

/* ── Profile-specific layout ─────────────────────────────── */
.pf-hero { padding-top: clamp(28px, 4vw, 52px); padding-bottom: clamp(36px, 5vw, 64px); }
.pf-id {
  display: flex; align-items: center; gap: 18px;
  padding-bottom: 22px;
}
.pf-id .avatar { width: 68px; height: 68px; font-size: 22px; box-shadow: 0 0 0 1px var(--rule); }
.pf-id-name { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3.4vw, 34px); line-height: 1; }
.pf-id-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 7px; }
.pf-id-counts { margin-left: auto; flex-shrink: 0; }

.pf-read {
  padding-top: clamp(26px, 3.5vw, 40px);
  border-top: 1px solid var(--ink);
}
.pf-read-head {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(50px, 9.4vw, 128px); line-height: 0.9;
  letter-spacing: -0.012em; color: var(--ink);
  margin: 0;
}
.pf-evidence {
  font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2.1vw, 25px);
  color: var(--ink-soft); line-height: 1.4; margin-top: 24px; max-width: 42ch;
}
.pf-counts { display: flex; gap: 22px; }
.pf-counts .c b { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 24px; color: var(--ink); }
.pf-counts .c { display: flex; flex-direction: column; gap: 4px; }

/* Stats ribbon */
.pf-ribbon { background: var(--putty-soft); border-block: 1px solid var(--rule); }
.pf-ribbon-inner {
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: var(--maxw); margin: 0 auto; padding: clamp(22px,3vw,34px) var(--pad);
}
.pf-stat { padding-inline: clamp(8px, 1.6vw, 22px); }
.pf-stat + .pf-stat { border-left: 1px solid var(--rule); }
.pf-stat b { display: block; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(36px, 5vw, 58px); line-height: .9; color: var(--ink); }
.pf-stat .label { margin-top: 10px; }
.pf-stat small { display:block; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-soft); margin-top: 6px; }

/* Hall of Fame */
.pf-hof { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(16px, 2.4vw, 30px); }
.hof-feature { display: flex; flex-direction: column; }
.hof-feature .photo { aspect-ratio: 4 / 3.4; width: 100%; }
.hof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 26px); }
.hof-card .photo { aspect-ratio: 4 / 4.4; width: 100%; }
.hof-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; }
.hof-meta .label { white-space: nowrap; }
.hof-name { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 27px); line-height: 1.04; margin-top: 4px; }
.hof-feature .hof-name { font-size: clamp(28px, 3.4vw, 42px); }
.hof-note { font-family: var(--serif); font-style: italic; font-size: clamp(16px,1.7vw,19px); color: var(--ink-soft); line-height: 1.45; margin-top: 12px; max-width: 40ch; }
.hof-score { font-size: clamp(18px, 2vw, 26px); }
.hof-feature .hof-score { font-size: clamp(30px, 3.4vw, 44px); }

/* Taste DNA */
.pf-dna { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 5vw, 80px); align-items: start; }
.bar-row { margin-bottom: 18px; }
.bar-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.bar-name { font-family: var(--serif); font-size: 22px; line-height: 1; white-space: nowrap; }
.bar-top .label { flex-shrink: 0; }
.bar-track { height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--ink-mute); border-radius: 2px; transform-origin: left; transform: scaleX(0); transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.bar-row--lead .bar-name { font-style: italic; }
.bar-row--lead .bar-fill { background: var(--sage-deep); }
.in .bar-fill { transform: scaleX(1); }

/* Distribution */
.dist { display: flex; align-items: flex-end; gap: 5px; height: 150px; }
.dist-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.dist-bar { width: 100%; background: var(--ink-soft); opacity: .55; border-radius: 1px; }
.dist-col--med .dist-bar { background: var(--sage-deep); opacity: 1; }
.dist-axis { display: flex; justify-content: space-between; margin-top: 8px; }
.dist-axis span { font-family: var(--sans); font-size: 9px; letter-spacing: 0.16em; color: var(--ink-mute); }

/* Regulars */
.reg-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(12px, 1.6vw, 20px); }
.reg-card .photo { aspect-ratio: 1 / 1; width: 100%; }
.reg-name { font-family: var(--serif); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.05; margin-top: 11px; }
.reg-sub { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; }
.reg-visits { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--sage-deep); flex-shrink: 0; }

/* Recent + neighbourhoods */
.pf-recent { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(34px, 5vw, 72px); align-items: start; }
.rec-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.rec-row:first-of-type { border-top: 1px solid var(--rule); }
.rec-row .photo { width: 56px; height: 56px; flex-shrink: 0; }
.rec-name { font-family: var(--serif); font-size: clamp(19px,2vw,23px); line-height: 1.05; }
.rec-score { margin-left: auto; font-size: 24px; }
.hoods { display: flex; flex-direction: column; gap: 14px; }
.hood { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.hood b { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--ink); }
.radar-card { background: var(--ink-deep); color: var(--paper); border-radius: 3px; padding: 22px; margin-top: 6px; }
.radar-card .serif { color: var(--paper); }

/* Closing */
.pf-cta { text-align: center; padding-block: clamp(54px, 8vw, 110px); }
.pf-cta h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(38px, 6.4vw, 88px); line-height: .95; letter-spacing: -0.01em; margin: 0 auto; max-width: 16ch; }
.pf-cta p { font-family: var(--serif); font-size: clamp(18px, 2vw, 24px); color: var(--ink-soft); max-width: 42ch; margin: 22px auto 0; line-height: 1.5; }
.pf-cta .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 30px; flex-wrap: wrap; }

/* ── Profile responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .pf-hof { grid-template-columns: 1fr; }
  .pf-dna { grid-template-columns: 1fr; gap: 40px; }
  .reg-grid { grid-template-columns: repeat(3, 1fr); }
  .pf-recent { grid-template-columns: 1fr; gap: 36px; }
  .pf-ribbon-inner { grid-template-columns: repeat(3, 1fr); gap: 22px 0; }
  .pf-stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .pf-stat:nth-child(n+4) { padding-top: 18px; }
}
@media (max-width: 560px) {
  .pf-id { flex-wrap: wrap; align-items: flex-start; }
  .pf-id-counts { margin-left: 0; width: 100%; flex-basis: 100%; padding-top: 6px; }
  .hof-grid { grid-template-columns: 1fr 1fr; }
  .reg-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-ribbon-inner { grid-template-columns: repeat(2, 1fr); }
  .pf-stat { border-left: 0 !important; padding-left: 0; }
  .pf-stat:nth-child(n+3) { padding-top: 20px; }
  .pf-counts { flex-wrap: wrap; gap: 16px; }
}
