/* Do Better Legal -- Jazz-Noir design tokens, lifted verbatim from the original
   coming-soon index.html, plus new component styles for the header/footer/atlas/
   home layouts built on top of them. */

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

:root {
  --coal:      #0c0b09;
  --obsidian:  #111008;
  --slate:     #1a1915;
  --iron:      #282520;
  --ash:       #8a8070;
  --parchment: #f0e8d6;
  --cream:     #faf5ea;
  --gold:      #c8a84b;
  --gold-dim:  #7a6430;
  --red:       #c0281a;
  --red-glow:  #e03020;

  --f-display: 'Anton', sans-serif;
  --f-body:    'Cormorant Garamond', Georgia, serif;
  --f-mono:    'IBM Plex Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--coal);
  color: var(--parchment);
  font-family: var(--f-body);
  font-size: 19px;
  line-height: 1.72;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Film grain, matches the original coming-soon page */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
  z-index: 9999;
}

a { color: inherit; }

h1, h2, h3 { font-family: var(--f-display); color: var(--cream); text-transform: uppercase; letter-spacing: 0.02em; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem;
  background: rgba(12,11,9,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--iron);
}
.site-header .brand {
  font-family: var(--f-display);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--cream);
  text-transform: uppercase;
}
.site-header .brand .legal { color: var(--gold); }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ash);
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--gold); }
.lang-switch { display: flex; gap: 0.5rem; }
.lang-switch a {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--ash);
  border: 1px solid var(--iron);
  padding: 0.2rem 0.55rem;
}
.lang-switch a.active { color: var(--gold); border-color: var(--gold-dim); }

/* ---- Shared page shell ---- */
main.page {
  position: relative;
  flex: 1;
  padding: 4rem 2rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.page-kicker {
  display: inline-flex;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.4rem;
}
.page h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 0.98; margin-bottom: 1rem; }
.page .lede { color: var(--ash); max-width: 60ch; margin-bottom: 2.4rem; }

/* ---- Homepage hero (reuses the coming-soon centered layout) ---- */
.hero {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 5rem 2rem 3rem; position: relative; overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 42%, rgba(200,168,75,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(192,40,26,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { font-size: clamp(3rem, 10vw, 6rem); text-transform: uppercase; }
.hero h1 .legal { color: var(--gold); display: block; }
.hero .tagline { font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-style: italic; margin: 1.4rem auto 0; max-width: 40ch; }

.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem; margin: 3rem auto 0; max-width: 900px;
}
.stat-tile { text-align: center; padding: 1.2rem 0.5rem; border-top: 1px solid var(--iron); }
.stat-tile .num { font-family: var(--f-display); font-size: 2.2rem; color: var(--gold); display: block; }
.stat-tile .label { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }

/* ---- Atlas grid (homepage preview + list page) ---- */
.atlas-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px; background: var(--iron); border: 1px solid var(--iron); margin-top: 2rem;
}
.atlas-tile {
  background: var(--obsidian); padding: 1.3rem; text-decoration: none; color: var(--parchment);
  transition: background 0.2s;
}
.atlas-tile:hover { background: var(--slate); }
.atlas-tile .iso3 {
  font-family: var(--f-mono); font-size: 0.65rem; letter-spacing: 0.1em;
  color: var(--gold); border: 1px solid var(--gold-dim); display: inline-block;
  padding: 0.15rem 0.5rem; margin-bottom: 0.6rem;
}
.atlas-tile .name { font-family: var(--f-display); font-size: 1.15rem; text-transform: uppercase; color: var(--cream); }
.atlas-tile .counts { font-family: var(--f-mono); font-size: 0.72rem; color: var(--ash); margin-top: 0.5rem; }

/* ---- Atlas list table ---- */
.atlas-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.atlas-table th, .atlas-table td {
  text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--iron);
  font-size: 0.92rem;
}
.atlas-table th {
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ash);
}
.atlas-table td.num { font-family: var(--f-mono); color: var(--gold); }
.atlas-table tr:hover { background: var(--obsidian); }
.atlas-table a { text-decoration: none; color: var(--cream); }
.atlas-table a:hover { color: var(--gold); }

/* ---- Country detail ---- */
.metrics-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px; background: var(--iron); border: 1px solid var(--iron); margin: 2rem 0;
}
.metric { background: var(--obsidian); padding: 1.1rem; }
.metric .num { font-family: var(--f-display); font-size: 1.7rem; color: var(--gold); display: block; }
.metric .label { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); }

.case-list { margin-top: 2.5rem; }
.case-row { padding: 1.3rem 0; border-bottom: 1px solid var(--iron); }
.case-row .appno { font-family: var(--f-mono); font-size: 0.7rem; color: var(--gold); text-decoration: none; }
.case-row .docname { font-family: var(--f-display); font-size: 1.05rem; text-transform: uppercase; color: var(--cream); margin: 0.4rem 0; }
.case-row .meta { font-family: var(--f-mono); font-size: 0.68rem; color: var(--ash); letter-spacing: 0.04em; }
.case-row .conclusion { color: var(--ash); margin-top: 0.5rem; }

.notice {
  border: 1px solid var(--gold-dim); color: var(--gold); padding: 1rem 1.3rem;
  font-family: var(--f-mono); font-size: 0.8rem; margin: 1.5rem 0;
}

/* ---- Footer ---- */
.site-footer {
  position: relative; z-index: 2; text-align: center; padding: 2rem;
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-dim); border-top: 1px solid var(--iron);
}
.site-footer a { color: var(--ash); text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--gold); }

.contact-chip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--f-mono); font-size: 0.82rem; letter-spacing: 0.06em;
  color: var(--coal); background: var(--gold);
  padding: 0.85rem 1.6rem; text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.contact-chip:hover { background: var(--cream); transform: translateY(-1px); }
button.contact-chip { border: none; cursor: pointer; font-family: var(--f-mono); }

/* ---- Search ---- */
.search-form {
  display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: end;
  margin: 1.5rem 0 1rem; padding: 1.3rem; border: 1px solid var(--iron);
}
.search-form label {
  display: flex; flex-direction: column; gap: 0.4rem;
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ash);
}
.search-form input[type="text"], .search-form select {
  background: var(--obsidian); border: 1px solid var(--iron); color: var(--cream);
  font-family: var(--f-body); font-size: 1rem; padding: 0.55rem 0.7rem; min-width: 10rem;
}
.search-form input[type="text"]:focus, .search-form select:focus {
  outline: none; border-color: var(--gold-dim);
}
.case-row .meta a { color: var(--gold-dim); text-decoration: none; }
.case-row .meta a:hover { color: var(--gold); }
.search-pagination {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  margin: 2rem 0; font-family: var(--f-mono); font-size: 0.85rem; color: var(--ash);
}
.search-pagination a { color: var(--gold); text-decoration: none; font-size: 1.2rem; }
.search-pagination a:hover { color: var(--cream); }
