/* Static city mirror stylesheet. Notes: ../../NOTES.md */

@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  --ink-900: #070d1a;
  --ink-800: #0d1730;
  --night: #0a1730;
  --twilight-indigo: #2a3b6b;
  --twilight-ember: #c96b3a;
  --horizon-umber: #8a5a36;
  --arc-amber: #e08d3c;
  --sun-gold: #f3c56a;
  --paper: #f6f2e9;
  --paper-dim: #b9b3a4;

  --display: 'Fraunces Variable', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-pill: 999px;
  --radius-control: 8px;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* A short page must still put the footer on the bottom edge, or the twilight band
   floats mid-screen with ink below it. */
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--arc-amber);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------------- header ---------------- */

/* Values taken from .topbar in web/src/app/Shell.css. Full width, no centred
   container: brand hard left, the single action hard right. */
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: var(--ink-900);
  border-bottom: 1px solid rgba(246, 242, 233, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand-lockup {
  display: block;
  height: 28px;
  width: auto;
  flex: 0 0 auto;
}

/* The same pill as the app's location button: .btn + .btn-secondary. */
.btn {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1;
  background: transparent;
  color: var(--paper);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  text-decoration: none;
}

.btn-secondary {
  border-color: rgba(246, 242, 233, 0.22);
  color: var(--paper);
}

.btn-secondary:hover {
  border-color: var(--arc-amber);
  color: var(--sun-gold);
}

.btn:focus-visible {
  outline: 2px solid var(--arc-amber);
  outline-offset: 2px;
}

/* Owns the push to the right edge, exactly as .place-button does in the app. */
.bar-action {
  margin-left: auto;
  flex: 0 0 auto;
}

/* ---------------- page ---------------- */

/* Values taken from .view in web/src/views/views.css. */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 34px 26px 48px;
}

.hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-control);
  background: var(--night);
}

/* .view-title, verbatim. */
h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--paper);
}

.where {
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

/* The question IS the heading now, so it carries the h1. Sized as a question, not
   as a display title — a slab would fight the city name in the hero above it. */
h1.hook {
  margin: 1.6rem 0 0;
  font-size: clamp(22px, 3.2vw, 31px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.005em;
  max-width: 34ch;
}

.cta {
  display: inline-block;
  margin: 2.1rem 0 0;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--sun-gold);
  color: var(--ink-900);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.cta:hover {
  background: #ffd77e;
}

.more {
  margin: 3rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid rgba(246, 242, 233, 0.12);
}

.more h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.more ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.05rem;
  color: var(--paper);
}

.more li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(246, 242, 233, 0.07);
}

/* Inside the h1, so the city name is part of the heading a crawler reads while
   sitting above the question as an eyebrow. */
.place {
  display: block;
  margin: 0 0 9px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

/* ---------------- city index ---------------- */

main.wide {
  max-width: 64rem;
}

/* .view-blurb, verbatim — mono, not the display face. */
.blurb {
  margin: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--paper-dim);
  max-width: 74ch;
}

.aside {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--paper-dim);
  max-width: 74ch;
}

.aside a {
  color: var(--arc-amber);
  text-decoration: none;
}

.aside a:hover {
  text-decoration: underline;
}

.country {
  margin: 2.75rem 0 0;
}

.country h2 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.9rem;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid rgba(246, 242, 233, 0.12);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
}

.country .count {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--paper-dim);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.15rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.98rem;
}

.city-grid a {
  display: block;
  padding: 0.2rem 0;
  color: var(--paper);
  text-decoration: none;
}

.city-grid a:hover {
  color: var(--sun-gold);
}

/* ---------------- footer ---------------- */

/* Values taken from web/src/app/Footer.module.css. Full width, no centred
   container: identity hard left, the byline hard right. */
.site-footer {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(246, 242, 233, 0.12);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--paper-dim);
}

/* The twilight band: two glow pools rising from the bottom edge, not a hard line.
   Vertical radius in multiples of the strip height so the shape reads in ~45px. */
.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 150% at 16% 100%, var(--twilight-indigo) 0%, transparent 72%),
    radial-gradient(64% 150% at 88% 100%, var(--twilight-ember) 0%, transparent 68%);
  opacity: 0.3;
}

/* ::after paints over in-flow content, so the text has to be lifted above it. */
.site-footer > * {
  position: relative;
  z-index: 1;
}

.site-footer strong {
  color: var(--paper);
  font-weight: 500;
}

.site-footer a {
  color: var(--arc-amber);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--arc-amber);
  outline-offset: 2px;
}

.footer-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
