/* ==========================================================================
   home.css -- Editorial homepage modules (namespace: hg-)
   Uses the site design tokens so it adapts to light/dark automatically.
   ========================================================================== */

:root { --hg-border: rgba(15, 17, 23, 0.10); --hg-shade: rgba(15, 17, 23, 0.03); }
@media (prefers-color-scheme: dark) {
  :root { --hg-border: rgba(255, 255, 255, 0.12); --hg-shade: rgba(255, 255, 255, 0.03); }
}

/* ---------- shared bits ---------- */
.hg-kicker {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--c, var(--color-accent));
}
.hg-kicker--light { color: rgba(255, 255, 255, 0.85); }

.hg-meta { font-size: 0.8rem; color: var(--color-text-light); }
.hg-meta--sm { font-size: 0.72rem; }
.hg-meta--light { color: rgba(255, 255, 255, 0.6); }

.hg-block { padding-block: clamp(2.5rem, 5vw, 4.25rem); }
.hg-block--tint { background: var(--hg-shade); }

/* section header */
.hg-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 3px solid var(--c, var(--color-accent));
}
.hg-head__eyebrow {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.hg-head__intro {
  margin-top: 0.4rem;
  max-width: 46ch;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.hg-head__all {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--c, var(--color-accent));
  text-decoration: none;
  white-space: nowrap;
  transition: gap 0.15s ease;
}
.hg-head__all:hover { text-decoration: underline; }

/* ---------- card ---------- */
.hg-card { display: flex; flex-direction: column; }
.hg-card__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.hg-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hg-card:hover .hg-card__media img { transform: scale(1.05); }
.hg-card__body { padding-top: var(--space-md); }
.hg-card__title {
  margin: 0.35rem 0 0.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.075rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hg-card__title a { color: var(--color-text); text-decoration: none; }
.hg-card__title a:hover { color: var(--color-accent); }
.hg-card__dek {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: 0.55rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hg-grid { display: grid; gap: var(--space-lg); }
.hg-grid--4 { grid-template-columns: repeat(4, 1fr); }
.hg-grid--3 { grid-template-columns: repeat(3, 1fr); }
.hg-grid--tall .hg-card__media { aspect-ratio: 4 / 5; }

/* ---------- wide (horizontal) card ---------- */
.hg-wide { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-lg); align-items: center; }
.hg-wide__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-surface); }
.hg-wide__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.hg-wide:hover .hg-wide__media img { transform: scale(1.04); }
.hg-wide__title { margin: 0.4rem 0 0.5rem; font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.15; letter-spacing: -0.02em; }
.hg-wide__title a { color: var(--color-text); text-decoration: none; }
.hg-wide__title a:hover { color: var(--color-accent); }
.hg-wide__dek { font-size: 0.95rem; line-height: 1.55; color: var(--color-text-muted); margin-bottom: 0.6rem; }

/* ---------- cover ---------- */
.hg-cover { padding-top: var(--space-xl); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.hg-cover__grid { display: grid; grid-template-columns: 1.62fr 1fr; gap: var(--space-lg); }
.hg-lead__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-xl); }
.hg-lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.hg-lead:hover .hg-lead__media img { transform: scale(1.03); }
.hg-lead__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 12, 18, 0.92) 0%, rgba(10, 12, 18, 0.5) 38%, rgba(10, 12, 18, 0) 70%); }
.hg-lead__overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(1.1rem, 2.5vw, 2rem); }
.hg-lead__overlay .hg-kicker { background: var(--c); color: #fff; padding: 0.32em 0.7em; border-radius: var(--radius-full); }
.hg-lead__title { margin: 0.7rem 0 0.5rem; font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.7rem); line-height: 1.05; letter-spacing: -0.03em; color: #fff; }
.hg-lead__dek { font-size: 1rem; line-height: 1.5; color: rgba(255, 255, 255, 0.82); max-width: 52ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hg-cover__side { display: grid; grid-template-rows: repeat(3, 1fr); gap: var(--space-md); }
.hg-thumb { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-md); align-items: center; padding-bottom: var(--space-md); border-bottom: 1px solid var(--hg-border); }
.hg-cover__side .hg-thumb:last-child { border-bottom: none; padding-bottom: 0; }
.hg-thumb__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-md); background: var(--color-surface); }
.hg-thumb__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.hg-thumb:hover .hg-thumb__media img { transform: scale(1.06); }
.hg-thumb__title { margin: 0.35rem 0 0; font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem; line-height: 1.2; }
.hg-thumb__title a { color: var(--color-text); text-decoration: none; }
.hg-thumb__title a:hover { color: var(--color-accent); }

/* ---------- explore strip ---------- */
.hg-explore { padding-block: clamp(1.5rem, 3vw, 2.25rem); border-block: 1px solid var(--hg-border); }
.hg-explore__lead { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--color-text); margin-bottom: var(--space-md); }
.hg-explore__row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hg-chip { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.9rem; border: 1px solid var(--hg-border); border-radius: var(--radius-full); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.hg-chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.hg-chip__name { font-family: var(--font-heading); font-weight: 700; font-size: 0.86rem; color: var(--color-text); }
.hg-chip__count { font-size: 0.72rem; font-weight: 600; color: var(--color-text-light); }
.hg-chip:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ---------- news split ---------- */
.hg-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--space-xl); align-items: start; }
.hg-split__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hg-split__list li { border-bottom: 1px solid var(--hg-border); }
.hg-split__list li:last-child { border-bottom: none; }
.hg-mini { display: flex; gap: 0.85rem; align-items: baseline; padding: 0.8rem 0; text-decoration: none; }
.hg-mini__num { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; color: var(--c); min-width: 1.2em; }
.hg-mini__text { display: flex; flex-direction: column; gap: 0.2rem; }
.hg-mini__title { font-family: var(--font-heading); font-weight: 700; font-size: 0.98rem; line-height: 1.25; color: var(--color-text); }
.hg-mini:hover .hg-mini__title { color: var(--color-accent); }
.hg-mini .hg-meta--sm { text-transform: capitalize; }

/* ---------- spotlight (electric) ---------- */
.hg-spotlight { background:
  radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 12%, transparent) 0%, transparent 55%),
  var(--hg-shade);
}

/* ---------- learner hub ---------- */
.hg-hub { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.hg-hub__panel { padding: var(--space-xl); border-radius: var(--radius-xl); background: color-mix(in srgb, var(--c) 7%, var(--color-surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.hg-hub__intro { margin-top: 0.5rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; line-height: 1.3; color: var(--color-text); }
.hg-hub__list { list-style: none; margin: var(--space-md) 0; padding: 0; }
.hg-hub__list li { border-bottom: 1px solid var(--hg-border); }
.hg-hub__list li:last-child { border-bottom: none; }

/* ---------- road safety (dark break) ---------- */
.hg-safety { background: var(--c); color: #fff; padding-block: clamp(2.5rem, 5vw, 4rem); }
.hg-safety__inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--space-xl); align-items: center; }
.hg-safety__lead { margin: 0.6rem 0 1rem; font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; }
.hg-safety__all { font-family: var(--font-heading); font-weight: 700; font-size: 0.85rem; color: #fff; text-decoration: none; border-bottom: 2px solid rgba(255, 255, 255, 0.5); padding-bottom: 2px; }
.hg-safety__list { display: grid; gap: 0.4rem; }
.hg-safety__item { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-md); padding: 0.9rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.15); text-decoration: none; }
.hg-safety__item h3 { font-family: var(--font-heading); font-weight: 700; font-size: 1.02rem; color: #fff; margin: 0; transition: color 0.15s ease; }
.hg-safety__item:hover h3 { color: rgba(255, 255, 255, 0.75); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hg-cover__grid { grid-template-columns: 1fr; }
  .hg-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hg-split { grid-template-columns: 1fr; gap: var(--space-lg); }
  .hg-wide { grid-template-columns: 1fr; }
  .hg-hub { grid-template-columns: 1fr; }
  .hg-safety__inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hg-grid--3, .hg-grid--4 { grid-template-columns: 1fr; }
  .hg-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .hg-thumb { grid-template-columns: 84px 1fr; }
}
