/* Tomh Mexico — Dark Editorial Design */

:root {
  --bg: #0f0e0c;
  --bg-elevated: #1a1815;
  --bg-card: #222019;
  --border: #3a3530;
  --border-light: #4a443c;
  --text: #ede8df;
  --text-muted: #9a9288;
  --text-dim: #6b645c;
  --accent: #e85d04;
  --accent-hover: #ff6b1a;
  --accent-dim: rgba(232, 93, 4, 0.15);
  --green: #2d6a4f;
  --font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 76rem;
  --header-h: 4rem;
  --ease: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img, svg { display: block; max-width: 100%; height: auto; image-rendering: auto; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover { color: var(--accent-hover); }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.375rem); }

p { margin: 0 0 1.25rem; }
ul, ol { margin: 0 0 1.25rem; padding-left: 1.35rem; }
li { margin-bottom: 0.45rem; }

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.65rem 1.1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: 2px;
}

.skip-link:focus { top: 0.75rem; }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(15, 14, 12, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.logo img { width: 28px; height: 28px; flex-shrink: 0; }

.logo-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.logo-tagline {
  display: none;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  color: var(--text);
}

.nav-toggle svg { width: 1.25rem; height: 1.25rem; }

.main-nav { display: none; }

.main-nav.is-open {
  display: block;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  overflow-y: auto;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
}

.main-nav a {
  display: block;
  padding: 0.85rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-left: 3px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-elevated);
  border-left-color: var(--accent);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .main-nav {
    display: block;
    position: static;
    background: none;
    border: none;
    overflow: visible;
  }

  .main-nav ul {
    display: flex;
    gap: 0.15rem;
    padding: 0;
  }

  .main-nav a {
    padding: 0.45rem 0.75rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .main-nav a:hover,
  .main-nav a[aria-current="page"] {
    background: none;
    border-bottom-color: var(--accent);
  }
}

/* ── Layout ── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4.5rem 0; }

.section--dark { background: var(--bg-elevated); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-label::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: var(--accent);
}

.section-header { max-width: 38rem; margin-bottom: 2.5rem; }

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ── Hero ── */
.hero {
  display: grid;
  min-height: 100vh;
  padding-top: var(--header-h);
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; }
}

.hero-media {
  position: relative;
  min-height: 50vh;
  overflow: hidden;
}

@media (min-width: 900px) {
  .hero-media { min-height: calc(100vh - var(--header-h)); }
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent 40%,
    var(--bg) 100%
  );
}

@media (max-width: 899px) {
  .hero-media::after {
    background: linear-gradient(
      to top,
      var(--bg) 0%,
      transparent 60%
    );
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 1.25rem 3rem;
  background: var(--bg);
}

@media (min-width: 900px) {
  .hero-content {
    padding: 2rem 2.5rem 2rem 0;
  }
}

.hero-content .section-label { margin-bottom: 1.25rem; }

.hero h1 {
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 42ch;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Topic grid (bento) ── */
.topic-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
}

.topic-card {
  display: flex;
  flex-direction: column;
  min-height: auto;
  padding: 0;
  background: var(--bg-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: background var(--ease);
}

.topic-card:hover { background: var(--bg-elevated); }

.topic-card:hover .topic-card-title { color: var(--accent); }

.topic-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.topic-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.topic-card:hover .topic-card-img img {
  transform: scale(1.02);
}

.topic-card-num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 1.25rem 1.5rem 0.5rem;
}

.topic-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 1.5rem 0.4rem;
  transition: color var(--ease);
}

.topic-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 1.5rem 1.5rem;
  line-height: 1.55;
}

/* ── Feature strip ── */
.feature-strip {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .feature-strip { grid-template-columns: repeat(3, 1fr); }
}

.feature-strip-item {
  padding: 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .feature-strip-item {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .feature-strip-item:last-child { border-right: none; }
}

.feature-strip-item h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.feature-strip-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Article list ── */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.article-list li {
  display: grid;
  gap: 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

@media (min-width: 640px) {
  .article-list li {
    grid-template-columns: 10rem 1fr;
    align-items: start;
  }
}

.article-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.article-list li:hover .article-thumb img { transform: scale(1.02); }

.article-meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.article-list h2,
.article-list h3 {
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}

.article-list h2 a,
.article-list h3 a {
  color: var(--text);
  text-decoration: none;
}

.article-list h2 a:hover,
.article-list h3 a:hover { color: var(--accent); }

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Page header ── */
.page-hero {
  padding: calc(var(--header-h) + 3rem) 0 3rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.page-hero--image {
  position: relative;
  min-height: 28rem;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 2rem) 0 3rem;
  background: var(--bg);
  overflow: hidden;
}

.page-hero--image .page-hero-bg {
  position: absolute;
  inset: 0;
}

.page-hero--image .page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-hero--image .page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg) 0%,
    rgba(15, 14, 12, 0.55) 35%,
    rgba(15, 14, 12, 0.15) 65%,
    transparent 100%
  );
}

.page-hero--image .container { position: relative; }

.page-hero h1 { margin: 0 0 0.75rem; max-width: 18ch; }

.page-hero .lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 48ch;
  margin: 0;
}

/* ── Content ── */
.content { padding: 3rem 0 4.5rem; }

.content-narrow { max-width: 40rem; }
.content-wide { max-width: 50rem; }

.content h2 {
  margin: 2.5rem 0 0.85rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content h3 { margin: 1.75rem 0 0.6rem; color: var(--text-muted); font-size: 1.05rem; }

.content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 0 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}

.content figure {
  margin: 2rem 0;
  border: 1px solid var(--border);
}

.content figure img {
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.content figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "→";
  margin-left: 0.35rem;
  color: var(--text-dim);
}

.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }

/* ── Contact ── */
.contact-info {
  border: 1px solid var(--border);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.contact-info dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1.25rem;
}

.contact-info dt:first-child { margin-top: 0; }

.contact-info dd {
  margin: 0.3rem 0 0;
  color: var(--text-muted);
}

.contact-note {
  padding: 1rem 1.15rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

/* ── Related ── */
.related-box {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.related-box h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  border: none;
  padding: 0;
}

.related-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-box li { margin-bottom: 0.45rem; }

.related-box a { font-weight: 500; }

/* ── Footer ── */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0.75rem 0 0;
  max-width: 28rem;
}

.footer-heading {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 0.85rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.photo-credit {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.mt-2 { margin-top: 2rem; }
