/* bestrestaurant.io — style.css */
/* Zero dependencies. No frameworks. Pure speed. */

:root {
  --bg: #FAFAF9;
  --text: #1A1A19;
  --text-muted: #6B6B69;
  --accent: #9B2335;
  --border: #E8E6E3;
  --row-hover: #F5F3F0;
  --star: #D4A017;
  --tag-bg: #F0EDEA;
  --tag-text: #5C5C5A;
  --max-w: 1120px;
  --font: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-brand {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

/* ---- HERO (landing page) ---- */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px 60px;
}
.hero h1 {
  font-family: var(--font);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 680px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
}

/* ---- CITY GRID (landing page) ---- */
.city-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.city-grid h2 {
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 24px;
  color: var(--text-muted);
}
.cities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.city-card {
  display: block;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.city-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.city-card .city-name {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 500;
}
.city-card .city-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- CITY PAGE HEADER ---- */
.city-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 32px;
}
.city-header h1 {
  font-family: var(--font);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.city-header .city-meta {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---- TABLE ---- */
.table-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 2px solid var(--text);
  white-space: nowrap;
  position: sticky;
  top: 56px; /* below nav */
  background: var(--bg);
  z-index: 10;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
tbody tr:hover {
  background: var(--row-hover);
}
td {
  padding: 11px 12px;
  vertical-align: top;
}
td a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
td a:hover {
  color: var(--accent);
}

/* Rating column */
.rating {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rating .star {
  color: var(--star);
  margin-left: 2px;
  font-size: 0.78rem;
}

/* Reviews column */
.reviews {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Price column */
.price {
  white-space: nowrap;
  color: var(--text-muted);
}

/* Cuisine tag */
.cuisine {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.78rem;
  white-space: nowrap;
}

/* Awards */
.awards {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
}

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
footer a {
  color: var(--text-muted);
  text-decoration: none;
}
footer a:hover {
  color: var(--text);
}

/* ---- ABOUT PAGE ---- */
.about-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.about-content h1 {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.about-content p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.about-content strong {
  color: var(--text);
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  .nav-inner { height: 48px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.75rem; }

  .hero { padding: 48px 20px 40px; }
  .city-header { padding: 32px 20px 20px; }
  .table-wrap { padding: 0 0 60px; }

  /* Horizontal scroll table on mobile */
  table { min-width: 640px; }
  .table-wrap { margin: 0 -0px; padding-left: 0; padding-right: 0; }

  thead th { top: 48px; } /* shorter mobile nav */
  thead th:first-child,
  td:first-child { padding-left: 20px; }
  thead th:last-child,
  td:last-child { padding-right: 20px; }

  .cities { grid-template-columns: repeat(2, 1fr); }
  .city-grid { padding: 0 20px 60px; }

  footer { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .cities { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
}
