/* The Dry Bar — Citrus Fresh design system.
   Tokens and component values are pulled verbatim from the reference
   mockup linked in .claude/rules/design-system.md; see that file for the
   spec these implement. */

:root {
  --bg: #fbf6ec;
  --surface: #ffffff;
  --ink: #2b241c;
  --ink-dim: rgba(43, 36, 28, 0.72);
  --ink-faint: rgba(43, 36, 28, 0.5);
  --orange: #e8813f;
  --rust: #b5461f;
  --teal: #3f7d6c;
  --pink: #c13d75;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--rust);
  text-decoration: none;
}

a:hover {
  color: #8f3717;
}

a:focus-visible,
button:focus-visible,
.chip:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

.display {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-style: italic;
  text-wrap: balance;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  nav.site-nav {
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
  }
  .navlinks {
    gap: 16px;
    justify-content: flex-start;
  }
  .wrap {
    padding: 0 20px;
  }
  .hero {
    flex-direction: column-reverse !important;
  }
  .grid2 {
    grid-template-columns: 1fr !important;
  }
}

/* Nav */

nav.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 2px solid var(--ink);
}

.navlinks {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navlinks a {
  color: var(--ink-faint);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.navlinks a.active {
  color: var(--ink);
  border-bottom: 2px solid var(--orange);
}

.logo {
  font-size: 22px;
  color: var(--rust);
  /* The wordmark must never break across lines — with five nav items it
     otherwise wraps to "The / Dry / Bar" at intermediate widths. */
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hero */

.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 56px 0 48px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  margin: 0 0 20px;
  max-width: 11ch;
  color: var(--ink);
}

.hero p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 44ch;
  margin: 0 0 28px;
}

.hero-copy {
  flex: 1 1 auto;
}

.hero-art {
  flex: 0 0 220px;
}

/* Buttons */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: var(--orange);
  border: none;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.cta:hover {
  background: #d6712f;
  color: #fff;
}

.cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 26px;
  background: transparent;
  border: 2px solid var(--rust);
  border-radius: 999px;
  color: var(--rust);
  font: inherit;
  cursor: pointer;
}

/* Sections */

.section {
  padding-top: 40px;
  padding-bottom: 8px;
}

.section-label {
  color: var(--rust);
  margin-bottom: 18px;
}

/* Grid + cards */

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 14px rgba(43, 36, 28, 0.08);
  display: flex;
  flex-direction: column;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-brand {
  color: var(--rust);
  font-weight: 700;
  /* Up from 11.5px, and the tracking is eased slightly: at this size the
     0.1em from .label starts to look airy rather than deliberate. */
  font-size: 13px;
  letter-spacing: 0.07em;
}

.card-title {
  /* Down from 22px. The drink name still leads the card, but at 22px against
     an 11.5px brand it dominated to the point where the brand read as a
     caption. 20px against 13px keeps the hierarchy and closes the gap. */
  font-size: 20px;
  color: var(--ink);
  margin: 2px 0 8px;
}

.card-copy {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
  margin: 0 0 16px;
}

a.card {
  color: inherit;
}

a.card:hover .card-title {
  color: var(--rust);
}

a.card:hover {
  color: inherit;
}

.stars {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.05em;
  font-size: 15px;
}

.stars-bg {
  color: rgba(43, 36, 28, 0.15);
}

.stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: var(--teal);
}

/* Tags */

.tag {
  border-radius: 999px;
  padding: 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10.5px;
  display: inline-block;
}

.tag-rust {
  background: #fde3cf;
  color: var(--rust);
}

.tag-teal {
  background: #e6f0ec;
  color: var(--teal);
}

.tag-pink {
  background: #fce4ef;
  color: var(--pink);
}

.taglist {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Filter chips (real <button> elements, per visual-style.md) */

.chip {
  border-radius: 999px;
  padding: 6px 14px;
  border: 1px solid var(--ink-faint);
  background: var(--surface);
  color: var(--ink-dim);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chip.is-active {
  border-color: var(--orange);
  color: var(--rust);
  background: #fde3cf;
}

/* Single-page layout */

.single-header {
  padding: 40px 0 8px;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.single-body {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-dim);
  padding-bottom: 56px;
}

.single-body p {
  margin: 0 0 1.2em;
}

.ingredients {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ingredients li {
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--ink-dim);
  box-shadow: 0 1px 6px rgba(43, 36, 28, 0.06);
}

.source-note {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 24px;
}

/* Footer */

footer.site-footer {
  border-top: 2px solid var(--ink);
  padding: 32px 0 40px;
  margin-top: 56px;
}

footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer.site-footer a {
  color: var(--ink-faint);
}

footer.site-footer a:hover {
  color: var(--rust);
}

/* Reduced motion */

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    animation: dry-bar-fade-in 0.4s ease-out both;
  }
}

@keyframes dry-bar-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 404 page */

.not-found {
  padding: 96px 0;
  text-align: center;
}

.not-found h1 {
  font-size: 64px;
}

/* Search and faceted filtering
   ---------------------------------------------------------------
   Built entirely from the existing Citrus Fresh tokens and component
   styles (design-system.md): no new colours, no second button tier.
   Facet chips reuse the .tag pill shapes — tag-rust for unselected,
   tag-teal for selected, which is the palette's existing
   descriptive-vs-data distinction rather than a new signal. */

.search-form {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search-input {
  flex: 1 1 320px;
  min-width: 0;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.search-input::placeholder {
  color: var(--ink-faint);
}

.search-select {
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}

.search-input:focus-visible,
.search-select:focus-visible,
.facet-chip:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.facets {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.facet-group .section-label {
  margin-bottom: 6px;
}

/* Chips are links, not buttons: a submit button can only add a value to the
   form, which made removing a selected filter impossible. Keeping them
   keyboard-focusable and clearly interactive matters either way. */
.facet-chip {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  display: inline-block;
}

.facet-chip:hover {
  filter: brightness(0.95);
}

.search-summary {
  color: var(--ink-faint);
}

.search-result {
  display: flex;
  flex-direction: column;
}

/* "Why did this match" — the point of showing it is that filtering should
   teach the reader how the tool thinks, not silently subtract. */
.match-why {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-left: 4px;
}

.match-badge {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.match-yes {
  color: var(--teal);
}

.match-no {
  color: var(--ink-faint);
}

.no-results {
  padding: 48px 0 96px;
}

.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;
}

@media (max-width: 720px) {
  .search-form {
    gap: 10px;
  }

  .search-input,
  .search-select {
    flex: 1 1 100%;
  }
}

/* Clickable tags
   ---------------------------------------------------------------
   Cards used to be one big <a>. Tag links cannot nest inside an anchor —
   that is invalid HTML and browsers mangle it — so the card is now a
   <div>, the title carries the link, and .card-link::after stretches an
   invisible overlay across the whole card to keep it entirely clickable.
   Tag links then need to sit ABOVE that overlay to be reachable. */

.card {
  position: relative;
}

.card-link {
  color: var(--ink);
  text-decoration: none;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  z-index: 0;
}

.card .taglist {
  position: relative;
  z-index: 1;
}

.tag-clickable {
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.12s ease;
}

.tag-clickable:hover {
  filter: brightness(0.94);
}

.card-link:focus-visible,
.tag-clickable:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Sort controls on section pages */

.sort-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 24px;
}

.sort-form .label {
  color: var(--ink-faint);
}

.sort-form .search-select {
  padding: 8px 14px;
  font-size: 13px;
}
