:root {
  --espresso: #1b120e;
  --coffee: #3a241b;
  --roast: #6f4935;
  --cream: #f7efe3;
  --foam: #fffaf1;
  --sage: #8c9a7b;
  --brass: #c59d5f;
  --ink: #251916;
  --muted: #76655c;
  --line: rgba(58, 36, 27, 0.16);
  --shadow: 0 24px 70px rgba(27, 18, 14, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 5%, rgba(197, 157, 95, 0.18), transparent 28rem),
    linear-gradient(180deg, #fffaf1 0%, #f3eadc 48%, #efe4d3 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 4rem);
  background: rgba(255, 250, 241, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--foam);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.4rem);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a:hover {
  color: var(--espresso);
}

.hero {
  position: relative;
  min-height: calc(100svh - 4rem);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--foam);
  background: var(--espresso);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 11, 8, 0.92) 0%, rgba(18, 11, 8, 0.7) 35%, rgba(18, 11, 8, 0.2) 72%),
    linear-gradient(0deg, rgba(18, 11, 8, 0.5), rgba(18, 11, 8, 0.05)),
    url("assets/coffee-hero.png") center / cover;
}

.hero-content {
  position: relative;
  width: min(720px, 100%);
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1rem, 7vw, 6rem);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
}

.hero-copy {
  max-width: 39rem;
  color: rgba(255, 250, 241, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions,
.button {
  display: inline-flex;
  align-items: center;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.button {
  min-height: 3rem;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font-weight: 900;
  cursor: pointer;
}

.button.primary {
  background: var(--brass);
  color: var(--espresso);
}

.button.secondary {
  border-color: rgba(255, 250, 241, 0.3);
  color: var(--foam);
}

.button.full {
  width: 100%;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 34rem;
  margin: 2rem 0 0;
}

.hero-stats div {
  padding: 1rem;
  border: 1px solid rgba(255, 250, 241, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.08);
}

.hero-stats dt {
  font-size: 1.5rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 0.86rem;
}

.section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.8rem;
}

.section-heading p:not(.eyebrow),
.language-section p {
  color: var(--muted);
  font-size: 1.05rem;
}

.intro-grid,
.coffee-grid,
.guide-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.intro-grid article,
.coffee-card,
.guide-columns article,
.result-card,
.picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.78);
  box-shadow: var(--shadow);
}

.intro-grid article {
  padding: 1.25rem;
}

.card-icon {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--sage);
  font-weight: 900;
}

.picker-section {
  width: min(1260px, calc(100% - 2rem));
}

.picker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 1rem;
  align-items: stretch;
}

.picker,
.result-card {
  padding: clamp(1rem, 3vw, 2rem);
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

fieldset {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.2rem;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 0.65rem;
  font-weight: 900;
}

label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--foam);
  cursor: pointer;
}

input {
  accent-color: var(--roast);
}

.search-box {
  display: grid;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.search-box span {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.search-box input {
  width: min(460px, 100%);
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--foam);
  color: var(--ink);
  font: inherit;
  box-shadow: 0 12px 36px rgba(27, 18, 14, 0.08);
}

.catalog-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.pill {
  min-height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 250, 241, 0.76);
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.pill.active,
.pill:hover {
  border-color: var(--coffee);
  background: var(--coffee);
  color: var(--foam);
}

.result-card {
  background:
    linear-gradient(135deg, rgba(27, 18, 14, 0.96), rgba(58, 36, 27, 0.92)),
    var(--espresso);
  color: var(--foam);
}

.result-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1;
  margin-bottom: 0.45rem;
}

.result-card p:not(.eyebrow) {
  color: rgba(255, 250, 241, 0.78);
}

.match-score {
  display: inline-flex;
  margin-bottom: 1rem;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(197, 157, 95, 0.16);
  color: var(--brass);
  font-size: 0.86rem;
  font-weight: 900;
}

.ratio-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.ratio-list span {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  padding: 0.8rem;
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.1);
}

.ratio-list span::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  background: rgba(197, 157, 95, 0.28);
  content: "";
}

.ratio-list span > * {
  position: relative;
}

.match-panel {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 250, 241, 0.14);
}

.match-panel h4 {
  margin: 0 0 0.75rem;
  color: var(--brass);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-panel ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
  color: rgba(255, 250, 241, 0.78);
}

.alternative-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.alternative-list span {
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: 999px;
  padding: 0.42rem 0.62rem;
  background: rgba(255, 250, 241, 0.08);
  color: rgba(255, 250, 241, 0.82);
  font-size: 0.86rem;
  font-weight: 900;
}

.coffee-card {
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  min-height: 20rem;
  padding: 1.15rem;
  overflow: hidden;
}

.coffee-card p,
.coffee-card small,
.guide-columns li {
  color: var(--muted);
}

.coffee-card .source-note {
  margin: 0.85rem 0 0;
  border-left: 3px solid rgba(197, 157, 95, 0.72);
  padding: 0.55rem 0 0.55rem 0.65rem;
  background: rgba(197, 157, 95, 0.09);
  color: var(--muted);
  font-size: 0.8rem;
}

.coffee-card .source-note b {
  color: var(--coffee);
}

.coffee-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.coffee-card header > div:first-child {
  min-width: 0;
}

.coffee-card h3 {
  margin-bottom: 0.25rem;
  overflow-wrap: anywhere;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-self: end;
  margin: 0.85rem 0 0;
  min-width: 0;
}

.tag {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid rgba(111, 73, 53, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.46rem;
  background: rgba(197, 157, 95, 0.12);
  color: var(--coffee);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.detail-button {
  align-self: end;
  justify-self: start;
  margin-top: 0.9rem;
  border: 1px solid var(--coffee);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  background: transparent;
  color: var(--coffee);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.detail-button:hover {
  background: var(--coffee);
  color: var(--foam);
}

.intensity {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.32rem 0.6rem;
  background: var(--espresso);
  color: var(--foam);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.card-badges {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.35rem;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(58, 36, 27, 0.16);
  border-radius: 999px;
  padding: 0.26rem 0.55rem;
  background: rgba(255, 250, 241, 0.8);
  color: var(--coffee);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.trust-badge.standard {
  background: #e7f0df;
}

.trust-badge.common {
  background: #f2e4c7;
}

.trust-badge.regional {
  background: #e7ece0;
}

.trust-badge.variable {
  background: #f1ded1;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.catalog-more {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.catalog-more p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.catalog-more .button[hidden] {
  display: none;
}

.visual-guide {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.section-heading.compact {
  margin-bottom: 1.2rem;
}

.drink-visual-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.drink-visual {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 21rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.82);
  text-align: center;
  box-shadow: 0 18px 48px rgba(27, 18, 14, 0.1);
}

.drink-visual.is-cold {
  background: linear-gradient(180deg, rgba(247, 250, 248, 0.92), rgba(237, 246, 244, 0.86));
}

.drink-badge {
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: #b9d4d0;
  color: var(--espresso);
  font-size: 0.68rem;
  font-weight: 900;
}

.visual-badges {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 3;
}

.visual-badges .trust-badge {
  padding: 0.2rem 0.45rem;
  font-size: 0.64rem;
}

.drink-visual h3 {
  margin: 0.9rem 0 0.25rem;
}

.drink-visual p {
  max-width: 13rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.cup-diagram {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  width: 5.7rem;
  height: 8.3rem;
  border: 4px solid rgba(58, 36, 27, 0.72);
  border-top-width: 2px;
  border-radius: 0.8rem 0.8rem 2.2rem 2.2rem;
  background: rgba(255, 250, 241, 0.4);
  box-shadow: inset 0 0 0 5px rgba(255, 250, 241, 0.34);
}

.cup-diagram.iced-cup {
  width: 5.3rem;
  height: 9.2rem;
  border-radius: 0.45rem 0.45rem 1.45rem 1.45rem;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 22%),
    rgba(235, 248, 246, 0.42);
}

.cup-diagram.iced-cup::before {
  position: absolute;
  inset: 0.45rem 0.55rem auto auto;
  width: 0.34rem;
  height: 7.4rem;
  border-radius: 999px;
  background: rgba(58, 36, 27, 0.42);
  transform: rotate(8deg);
  content: "";
  z-index: 2;
}

.cup-diagram.iced-cup::after {
  top: 2.8rem;
  right: -1.08rem;
}

.cup-diagram::after {
  position: absolute;
  top: 2.3rem;
  right: -1.25rem;
  width: 1.8rem;
  height: 2.3rem;
  border: 4px solid rgba(58, 36, 27, 0.56);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  content: "";
}

.layer {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  min-height: 0.8rem;
  border-top: 1px solid rgba(58, 36, 27, 0.16);
  color: rgba(27, 18, 14, 0.86);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 250, 241, 0.52);
}

.layer b,
.layer small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding: 0 0.18rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer small {
  font-size: 0.62rem;
  opacity: 0.84;
}

.layer.compact {
  font-size: 0.56rem;
}

.layer.compact b {
  display: none;
}

.layer.espresso,
.swatch.espresso {
  background: #5a2f1f;
  color: #fff8ea;
  text-shadow: none;
}

.layer.coffee,
.swatch.coffee {
  background: #6b3b25;
  color: #fff8ea;
  text-shadow: none;
}

.layer.crema,
.swatch.crema {
  background: #c99250;
}

.layer.milk,
.swatch.milk {
  background: #eadcc4;
}

.layer.foam,
.layer.microfoam,
.swatch.foam {
  background: #fff8ea;
}

.layer.water,
.swatch.water {
  background: #b9d4d0;
}

.layer.ice,
.swatch.ice {
  background: repeating-linear-gradient(135deg, #dcebe9 0 8px, #f7fbfa 8px 16px);
}

.layer.cold {
  background: #6b3b25;
}

.layer.chocolate,
.swatch.chocolate {
  background: #3b2119;
  color: #fff8ea;
  text-shadow: none;
}

.layer.dessert,
.swatch.dessert {
  background: #f4ddb4;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
  color: var(--muted);
  font-weight: 800;
}

.trust-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: -0.25rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.trust-legend span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: rgba(255, 250, 241, 0.68);
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid rgba(58, 36, 27, 0.14);
  border-radius: 50%;
}

.meter {
  display: flex;
  overflow: hidden;
  height: 0.72rem;
  margin: 1.1rem 0 0.75rem;
  border-radius: 999px;
  background: #e4d7c4;
}

.meter span {
  display: block;
  background: var(--coffee);
}

.meter i {
  display: block;
  background: var(--sage);
}

.meter b {
  display: block;
  background: var(--brass);
}

.meter.triple span,
.meter.triple i,
.meter.triple b {
  width: 33.33%;
}

.guide-section {
  width: 100%;
  max-width: none;
  padding-inline: max(1rem, calc((100% - 1180px) / 2));
  background: rgba(27, 18, 14, 0.96);
  color: var(--foam);
}

.guide-section .section-heading,
.guide-columns {
  width: min(1180px, 100%);
}

.guide-columns article {
  background: rgba(255, 250, 241, 0.06);
  border-color: rgba(255, 250, 241, 0.14);
  box-shadow: none;
  padding: 1.25rem;
}

.guide-columns ul {
  margin: 0;
  padding-left: 1.2rem;
}

.guide-columns li {
  color: rgba(255, 250, 241, 0.76);
  margin: 0.55rem 0;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.blog-list a {
  min-height: 8.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--foam);
  color: var(--coffee);
  font-weight: 900;
}

.seo-section {
  width: 100%;
  max-width: none;
  padding-inline: max(1rem, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.72), rgba(247, 232, 211, 0.72));
}

.seo-section .section-heading,
.seo-topic-grid,
.seo-content-grid,
.keyword-cloud {
  width: min(1180px, 100%);
}

.seo-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.seo-topic-grid article,
.faq-panel,
.ai-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--foam);
  box-shadow: 0 14px 36px rgba(58, 36, 27, 0.08);
}

.seo-topic-grid article {
  padding: 1rem;
}

.seo-topic-grid h3,
.faq-panel h3,
.ai-panel h3 {
  margin: 0 0 0.5rem;
  color: var(--coffee);
  font-size: 1rem;
}

.seo-topic-grid p,
.ai-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.seo-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 1rem;
  margin-top: 1rem;
}

.faq-panel,
.ai-panel {
  padding: 1.1rem;
}

.faq-list {
  display: grid;
  gap: 0.55rem;
}

.faq-list details {
  border: 1px solid rgba(111, 78, 55, 0.14);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  background: rgba(197, 157, 95, 0.08);
}

.faq-list summary {
  color: var(--coffee);
  cursor: pointer;
  font-weight: 900;
}

.faq-list p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.ai-panel {
  align-self: start;
}

.ai-panel .card-icon {
  margin-bottom: 0.75rem;
}

.ai-status {
  margin-top: 1rem !important;
  border: 1px solid rgba(111, 78, 55, 0.14);
  border-radius: 8px;
  padding: 0.75rem;
  background: rgba(111, 78, 55, 0.08);
  color: var(--coffee) !important;
  font-weight: 800;
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.keyword-cloud span {
  border: 1px solid rgba(111, 78, 55, 0.16);
  border-radius: 999px;
  padding: 0.38rem 0.62rem;
  background: rgba(255, 250, 241, 0.78);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.language-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  gap: 2rem;
  align-items: center;
}

.translation-status {
  display: inline-flex;
  align-items: center;
  max-width: 680px;
  margin: 0.35rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(111, 78, 55, 0.16);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.72);
  color: var(--coffee);
  font-weight: 700;
  line-height: 1.45;
}

.language-picker {
  display: grid;
  width: min(360px, 100%);
  min-height: auto;
  margin-top: 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.language-picker span {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.language-picker select {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: var(--foam);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.language-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.language-cloud span {
  display: grid;
  width: 3.1rem;
  height: 3.1rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--foam);
  color: var(--coffee);
  font-weight: 900;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 4vw, 4rem);
  background: var(--espresso);
  color: rgba(255, 250, 241, 0.78);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--brass);
  font-weight: 900;
}

.coffee-modal {
  width: min(920px, calc(100% - 2rem));
  max-height: min(840px, calc(100svh - 2rem));
  border: 1px solid rgba(58, 36, 27, 0.18);
  border-radius: 8px;
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--foam);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(27, 18, 14, 0.34);
}

.coffee-modal::backdrop {
  background: rgba(27, 18, 14, 0.62);
  backdrop-filter: blur(6px);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--foam);
  color: var(--coffee);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 1.5rem;
}

.modal-grid h2 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.modal-grid h3 {
  margin-top: 1.15rem;
  font-size: 1rem;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.modal-meta span {
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  background: rgba(197, 157, 95, 0.15);
  color: var(--coffee);
  font-size: 0.78rem;
  font-weight: 900;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.detail-facts article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: rgba(197, 157, 95, 0.08);
}

.detail-facts b,
.detail-facts span {
  display: block;
}

.detail-facts b {
  margin-bottom: 0.25rem;
  color: var(--coffee);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.detail-facts span {
  color: var(--muted);
  font-size: 0.9rem;
}

.howto-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.alternative-list.light span {
  border-color: var(--line);
  background: rgba(197, 157, 95, 0.12);
  color: var(--coffee);
}

.modal-cup {
  display: grid;
  justify-items: center;
  margin-bottom: 1rem;
}

.modal-ratios span {
  background: rgba(58, 36, 27, 0.08);
}

.ml-note {
  margin: 0.75rem 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  background: rgba(197, 157, 95, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.ml-note b {
  color: var(--coffee);
}

.source-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.source-list a {
  color: var(--coffee);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    background:
      linear-gradient(90deg, rgba(18, 11, 8, 0.92) 0%, rgba(18, 11, 8, 0.76) 55%, rgba(18, 11, 8, 0.36) 100%),
      url("assets/coffee-hero.png") center / cover;
  }

  .intro-grid,
  .guide-columns,
  .picker-layout,
  .question-grid,
  .blog-list,
  .seo-topic-grid,
  .seo-content-grid,
  .language-section {
    grid-template-columns: 1fr;
  }

  .coffee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drink-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .catalog-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-pills {
    justify-content: flex-start;
  }

  .search-box input {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .brand {
    align-items: flex-start;
  }

  .hero-content {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.6rem, 17vw, 4rem);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }

  .coffee-grid {
    grid-template-columns: 1fr;
  }

  .coffee-card {
    min-height: auto;
    padding: 0.95rem;
  }

  .coffee-card header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .card-badges {
    align-items: flex-start;
    flex-flow: row wrap;
  }

  .coffee-card .source-note {
    font-size: 0.76rem;
  }

  .drink-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .drink-visual {
    min-height: 16.8rem;
    padding: 0.8rem;
  }

  .cup-diagram {
    width: 4.8rem;
    height: 7.4rem;
  }

  .cup-diagram.iced-cup {
    width: 4.6rem;
    height: 8rem;
  }

  .drink-visual p {
    font-size: 0.74rem;
  }

  .visual-badges {
    position: static;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 0.45rem;
  }

  .visual-badges .trust-badge,
  .drink-badge {
    font-size: 0.58rem;
  }
}
