/* Bhotia — editorial static site
   Warm Hong Kong neighbourhood energy: cream paper, chilli red, soy ink */

:root {
  --cream: #f7f1e8;
  --cream-dark: #ebe2d4;
  --paper: #fffdf8;
  --ink: #1c1410;
  --ink-soft: #4a3b32;
  --muted: #7a6a5e;
  --chilli: #c43c2c;
  --chilli-dark: #9a2e22;
  --saffron: #e8a317;
  --jhol: #8b4513;
  --leaf: #3d6b4f;
  --border: #d9cfc0;
  --shadow: 0 8px 24px rgba(28, 20, 16, 0.08);
  --radius: 12px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --max: 1100px;
  --nav-h: 64px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--chilli-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--chilli); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ——— Header / Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 241, 232, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  gap: 0.15rem;
}
.logo-tag {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chilli);
}
.logo:hover { color: var(--ink); }
.logo:hover .logo-tag { color: var(--chilli-dark); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--chilli);
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.75rem; }
}

/* ——— Layout ——— */
main { flex: 1; }
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chilli);
  margin-bottom: 0.5rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.draft-banner {
  background: #fff3cd;
  border: 1px solid #e6d48a;
  color: #5c4a12;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ——— Hero ——— */
.hero {
  background:
    radial-gradient(ellipse at 90% 10%, rgba(232, 163, 23, 0.25), transparent 50%),
    radial-gradient(ellipse at 10% 80%, rgba(196, 60, 44, 0.12), transparent 45%),
    linear-gradient(165deg, var(--cream) 0%, var(--cream-dark) 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.25rem 3.5rem;
}
.hero-inner { max-width: var(--max); margin: 0 auto; }
.hero h1 { max-width: 14ch; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: var(--chilli);
  color: #fff;
  border-color: var(--chilli);
}
.btn-primary:hover { background: var(--chilli-dark); border-color: var(--chilli-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

/* ——— Cards / grids ——— */
.section { margin-top: 2.75rem; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.5rem;
}
.section-head a { font-weight: 700; font-size: 0.9rem; }

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(28, 20, 16, 0.12);
}
.card a.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-photo {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, #d4a574 0%, #c43c2c 45%, #8b4513 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
}
.card-photo .badge {
  background: rgba(28, 20, 16, 0.75);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.card-body { padding: 1rem 1.1rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.card-pitch {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0.75rem;
  flex: 1;
}
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--cream-dark);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-weight: 700;
  font-size: 0.9rem;
  align-self: flex-start;
}
.score-pill strong { color: var(--chilli); font-family: var(--font-display); font-size: 1.1rem; }

/* Neighbourhood chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}
.chip:hover, .chip[aria-current="page"] {
  border-color: var(--chilli);
  color: var(--chilli);
  background: #fdf0ee;
}

/* Rank list */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.rank-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--chilli);
}
.rank-list h3 { margin: 0; font-size: 1.1rem; }
.rank-list h3 a { text-decoration: none; color: var(--ink); }
.rank-list h3 a:hover { color: var(--chilli); }
.rank-meta { font-size: 0.85rem; color: var(--muted); margin: 0.2rem 0 0; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.tab {
  border: 1.5px solid var(--border);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.tab[aria-selected="true"], .tab:hover {
  border-color: var(--chilli);
  color: var(--chilli);
  background: #fdf0ee;
}

/* Spot detail */
.spot-hero {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 720px) {
  .spot-hero { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
.spot-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, #e8b88a 0%, #c43c2c 40%, #5c2a1a 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-align: center;
  padding: 1rem;
}
.score-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}
.score-cell {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}
.score-cell .label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.score-cell .val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--chilli);
}
.score-cell.overall {
  background: var(--ink);
  border-color: var(--ink);
}
.score-cell.overall .label { color: var(--cream-dark); }
.score-cell.overall .val { color: var(--saffron); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--cream-dark);
  color: var(--jhol);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.prose { max-width: 40rem; }
.prose p { margin: 0 0 1rem; color: var(--ink-soft); }

.meta-box {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.meta-box dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  margin-top: 0.75rem;
}
.meta-box dt:first-child { margin-top: 0; }
.meta-box dd { margin: 0.2rem 0 0; }

.map-placeholder {
  margin-top: 1rem;
  height: 160px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(-45deg, var(--cream-dark), var(--cream-dark) 8px, var(--cream) 8px, var(--cream) 16px);
  border: 1px dashed var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Forms */
.form {
  max-width: 32rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.form label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 1rem 0 0.35rem;
}
.form label:first-of-type { margin-top: 0; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--cream);
  color: var(--ink);
}
.form textarea { min-height: 120px; resize: vertical; }
.form .hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
.form .actions { margin-top: 1.25rem; }
.form-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* About / rules callouts */
.callout {
  border-left: 4px solid var(--chilli);
  background: var(--paper);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout strong { color: var(--chilli-dark); }

.legend-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.legend-table th, .legend-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legend-table th {
  width: 7rem;
  font-family: var(--font-display);
  color: var(--chilli);
}
.legend-table tr:last-child th,
.legend-table tr:last-child td { border-bottom: none; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--cream-dark);
  padding: 2.5rem 1.25rem;
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer a { color: var(--cream); }
.site-footer h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--saffron);
  margin: 0 0 0.75rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  line-height: 1.15;
}
.footer-brand .logo-tag {
  color: var(--saffron);
  font-size: 0.65rem;
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1.5rem;
  grid-column: 1 / -1;
  border-top: 1px solid #3a2e28;
  padding-top: 1rem;
}

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

.brand-stylize {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--chilli-dark);
}
