:root {
  --ink: #101214;
  --ink-soft: #24292d;
  --paper: #f7f7f2;
  --paper-strong: #ffffff;
  --muted: #667077;
  --line: #d9ddd6;
  --red: #b82531;
  --red-dark: #8e1620;
  --gold: #c7962d;
  --green: #197a68;
  --blue: #315f8c;
  --shadow: 0 24px 60px rgba(16, 18, 20, 0.18);
  --radius: 8px;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px 34px;
  color: #fff;
  background: rgba(16, 18, 20, 0.54);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  background: rgba(16, 18, 20, 0.93);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.brand strong,
.brand em {
  display: block;
  line-height: 1;
}

.brand strong {
  font-size: 1rem;
}

.brand em {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-style: normal;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
}

.site-nav a {
  padding: 8px 0;
}

.site-nav a:hover {
  color: #fff;
}

.site-nav a[aria-current="page"] {
  color: #fff;
  font-weight: 850;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  background: var(--red);
  border-radius: var(--radius);
  font-weight: 800;
  white-space: nowrap;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.language-switch,
.nav-language,
.footer-language {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
}

.language-switch a,
.nav-language a,
.footer-language a {
  min-width: 34px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.language-switch a[aria-current="page"],
.nav-language a[aria-current="page"],
.footer-language a[aria-current="page"] {
  color: var(--ink);
  background: #fff;
}

.nav-language {
  display: none;
}

.footer-language {
  margin-top: 18px;
  color: var(--ink-soft);
  background: #f0f2ed;
  border-color: var(--line);
}

.footer-language a[aria-current="page"] {
  color: #fff;
  background: var(--ink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
}

.hero {
  min-height: 82vh;
  display: flex;
  align-items: end;
  padding: 142px 34px 54px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16, 18, 20, 0.88), rgba(16, 18, 20, 0.54) 48%, rgba(16, 18, 20, 0.18)),
    linear-gradient(180deg, rgba(16, 18, 20, 0.28), rgba(16, 18, 20, 0.76)),
    url("../images/barberrank-hero.png") center / cover no-repeat;
}

.hero-content {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero .eyebrow,
.cta-section .eyebrow {
  color: #ffd36a;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.4rem;
  line-height: 0.98;
  font-weight: 900;
}

h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.7rem;
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.22;
}

.hero-copy {
  max-width: 670px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
  line-height: 1.65;
}

.hero-actions,
.button-row,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.button-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.button-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.34);
}

.button-outline {
  color: var(--ink);
  background: transparent;
  border-color: var(--ink);
}

.cta-section .button-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.48);
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  max-width: 910px;
  margin-top: 34px;
}

.hero-proof span {
  min-height: 68px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
}

.hero-proof b {
  display: block;
  color: #fff;
  font-size: 1.25rem;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(100% - 68px), var(--max));
  margin: -26px auto 0;
  position: relative;
  z-index: 3;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.strip-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 18px 20px;
}

.strip-item + .strip-item {
  border-left: 1px solid var(--line);
}

.strip-item span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius);
  font-weight: 900;
}

.strip-item p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

.section {
  width: min(calc(100% - 68px), var(--max));
  margin: 0 auto;
  padding: 92px 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 54px;
  align-items: center;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.7;
}

.winner-copy .lead {
  max-width: 720px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 28px 0;
}

.metric-grid div {
  min-height: 96px;
  padding: 16px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric-grid strong {
  display: block;
  color: var(--red);
  font-size: 1.7rem;
  line-height: 1.1;
}

.metric-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.check-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
}

.winner-media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.winner-media img {
  width: 100%;
  height: 610px;
  object-fit: cover;
}

.winner-media figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  color: #fff;
  background: rgba(16, 18, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

.winner-media figcaption img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius);
}

.winner-media figcaption span {
  font-weight: 850;
  line-height: 1.2;
}

.reasons-section {
  width: 100%;
  max-width: none;
  padding: 92px max(34px, calc((100% - var(--max)) / 2));
  color: #fff;
  background: var(--ink);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.align-left {
  margin-left: 0;
  text-align: left;
}

.section-heading p {
  color: var(--muted);
  line-height: 1.7;
}

.reasons-section .section-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.reason-grid article,
.method-grid article,
.city-card {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.reason-grid article {
  min-height: 270px;
  padding: 22px;
  color: var(--ink);
}

.reason-grid span,
.city-tag,
.rank-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 14px;
  padding: 0 10px;
  color: #fff;
  background: var(--blue);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reason-grid article:nth-child(2) span {
  background: var(--green);
}

.reason-grid article:nth-child(3) span {
  background: var(--red);
}

.reason-grid article:nth-child(4) span {
  background: var(--gold);
}

.reason-grid p,
.method-grid p,
.city-card p {
  color: var(--muted);
  line-height: 1.6;
}

.ranking-table {
  overflow: hidden;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(16, 18, 20, 0.08);
}

.ranking-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #f7f8f4;
}

.ranking-filter {
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.ranking-filter.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.ranking-empty {
  margin: 0;
  padding: 22px;
  color: var(--muted);
}

.table-row {
  display: grid;
  grid-template-columns: 86px 250px minmax(0, 1fr) 110px;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
}

.table-row:first-child {
  border-top: 0;
}

.table-head {
  color: #fff;
  background: var(--ink);
  border-top: 0;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.table-row > span:first-child {
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 900;
}

.table-head > span:first-child {
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
}

.table-row strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.table-row strong a {
  color: inherit;
  text-decoration: none;
}

.table-row strong a:hover {
  color: var(--red);
}

.table-row small {
  color: var(--muted);
  line-height: 1.35;
}

.shop-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.shop-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: var(--ink-soft);
  background: #eef2ed;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
}

.table-row p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.table-row > span:last-child {
  justify-self: end;
  color: var(--ink);
  font-weight: 950;
}

.table-row.featured {
  background: #fff9ed;
}

.cities-section {
  width: 100%;
  max-width: none;
  padding: 92px max(34px, calc((100% - var(--max)) / 2));
  background: #eef2ed;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}

.filter-button {
  min-height: 42px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 850;
}

.filter-button.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.city-card {
  display: grid;
  gap: 16px;
  min-height: 342px;
  padding: 22px;
}

.city-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.city-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
}

.city-card .score {
  display: inline-grid;
  min-width: 76px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.city-card ol,
.city-card ul {
  display: grid;
  gap: 9px;
  padding-left: 18px;
  margin: 0;
}

.city-card li {
  color: var(--ink-soft);
  line-height: 1.35;
}

.city-card li::marker {
  color: var(--red);
  font-weight: 900;
}

.city-card footer {
  display: grid;
  gap: 8px;
  align-self: end;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.city-card h3 a:hover,
.city-card__link:hover {
  color: var(--red);
}

.city-card__link {
  color: var(--ink);
  font-weight: 900;
}

.city-link-section {
  padding-top: 44px;
}

.city-link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.city-link-grid a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  color: var(--ink-soft);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 850;
}

.city-link-grid a:hover {
  color: var(--red);
  border-color: var(--red);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.method-grid article {
  min-height: 196px;
  padding: 20px;
}

.method-grid strong {
  display: block;
  margin-bottom: 16px;
  color: var(--red);
  font-size: 1.9rem;
}

.cta-section {
  width: 100%;
  max-width: none;
  padding: 92px max(34px, calc((100% - var(--max)) / 2));
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16, 18, 20, 0.92), rgba(16, 18, 20, 0.7)),
    url("../images/barberrank-hero.png") center / cover no-repeat;
}

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: end;
}

.cta-panel p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  padding: 44px max(34px, calc((100% - var(--max)) / 2));
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
}

.site-footer p {
  max-width: 520px;
  margin: 18px 0 0;
  line-height: 1.6;
}

.site-footer .footer-meta {
  display: grid;
  gap: 6px;
  min-width: 280px;
}

.site-footer strong {
  color: #fff;
}

.site-footer a:hover {
  color: #fff;
}

.seo-page {
  background: var(--paper);
}

.seo-main {
  padding-top: 76px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(calc(100% - 68px), var(--max));
  margin: 0 auto;
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--ink);
  font-weight: 850;
}

.seo-hero {
  width: min(calc(100% - 68px), var(--max));
  margin: 0 auto;
  padding: 64px 0 74px;
}

.seo-hero h1 {
  max-width: 900px;
  color: var(--ink);
}

.seo-hero p {
  max-width: 780px;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.7;
}

.seo-hero .button-light {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper-strong);
}

.seo-article {
  padding-top: 60px;
}

.seo-article p {
  color: var(--ink-soft);
  line-height: 1.7;
}

.faq-section {
  padding-top: 60px;
}

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.faq-list details {
  padding: 18px 20px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.faq-list p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

@media (max-width: 1060px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav,
  .header-actions {
    display: none;
  }

  .site-nav.is-open {
    position: absolute;
    top: 77px;
    left: 18px;
    right: 18px;
    display: grid;
    gap: 0;
    padding: 10px;
    color: var(--ink);
    background: var(--paper-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open a {
    padding: 14px;
    color: var(--ink);
    border-radius: var(--radius);
  }

  .site-nav.is-open a:hover {
    background: #eef2ed;
  }

  .site-nav.is-open .nav-language {
    display: inline-flex;
    justify-self: start;
    margin: 8px 14px 6px;
    color: var(--ink-soft);
    background: #f0f2ed;
    border-color: var(--line);
  }

  .site-nav.is-open .nav-language a {
    padding: 7px 9px;
  }

  .site-nav.is-open .nav-language a[aria-current="page"] {
    color: #fff;
    background: var(--ink);
  }

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

  .winner-media img {
    height: 520px;
  }

  .reason-grid,
  .city-grid,
  .city-link-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .method-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .table-row {
    grid-template-columns: 70px minmax(160px, 230px) minmax(0, 1fr) 96px;
  }

}

@media (max-width: 760px) {
  .site-header {
    padding: 12px 18px;
  }

  .hero {
    min-height: 84vh;
    padding: 112px 18px 38px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-proof,
  .intro-strip,
  .metric-grid,
  .reason-grid,
  .city-grid,
  .city-link-grid,
  .method-grid,
  .cta-panel,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .intro-strip,
  .section,
  .seo-hero,
  .breadcrumb {
    width: min(calc(100% - 36px), var(--max));
  }

  .seo-main {
    padding-top: 68px;
  }

  .seo-hero {
    padding-top: 48px;
    padding-bottom: 52px;
  }

  .intro-strip {
    margin-top: -18px;
  }

  .strip-item + .strip-item {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .section,
  .reasons-section,
  .cities-section,
  .cta-section {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .reasons-section,
  .cities-section,
  .cta-section,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .winner-media img {
    height: 390px;
  }

  .table-head {
    display: none;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
  }

  .table-row > span:last-child {
    justify-self: start;
  }

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

  .site-footer .footer-meta {
    min-width: 0;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.88rem;
  }

  .brand strong {
    font-size: 0.92rem;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}
