/* ==========================================================================
   brettdavis.ai - Components
   Reusable pieces: eyebrow labels, hero, buttons, project rows,
   article lists, stat lines, and the scroll-reveal utility.
   ========================================================================== */

/* ---- Eyebrow -------------------------------------------------------------
   Small uppercase label that opens every section. The structural voice
   of the site.                                                            */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: var(--space-3);
}

/* ---- Hero ----------------------------------------------------------------
   The thesis of the site. Name at maximum size, positioning line beneath,
   one accent word. Nothing else competes.                                  */
.hero {
  padding-block: var(--space-8) var(--space-section);
}

.hero__name {
  font-size: var(--text-hero);
  font-weight: 650;
  line-height: var(--leading-tight);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero__position {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: 1.12;
  max-width: 18ch;
  margin-top: var(--space-4);
}

/* The one accented word per page. Used once in the hero, never again. */
.accent-word {
  color: var(--color-accent);
}

.hero__support {
  margin-top: var(--space-4);
  font-size: var(--text-lede);
  color: var(--color-secondary);
  max-width: 36rem;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

/* ---- Buttons -------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 500;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-ink);
  transition: background var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease),
              border-color var(--duration-fast) var(--ease);
}

.button--primary {
  background: var(--color-ink);
  color: var(--color-bg);
}
.button--primary:hover {
  background: transparent;
  color: var(--color-ink);
}

.button--ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-hairline-strong);
}
.button--ghost:hover { border-color: var(--color-ink); }

.button .arrow {
  transition: transform var(--duration-fast) var(--ease);
}
.button:hover .arrow { transform: translateX(3px); }

/* ---- Section header -------------------------------------------------------
   Eyebrow + large title + optional standfirst, shared across sections.   */
.section-header { margin-bottom: var(--space-6); }

.section-header h2 { font-size: var(--text-h2); }

.section-header .standfirst {
  margin-top: var(--space-3);
  font-size: var(--text-lede);
  color: var(--color-secondary);
  max-width: 38rem;
}

/* ---- The gap statement ----------------------------------------------------
   Signature element of the home page: a full-width editorial statement
   about the knowing/doing gap, with a single hairline rule that fills
   green as it scrolls into view (see main.js).                            */
.gap-statement {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: 1.25;
  max-width: 26ch;
}

.gap-statement .muted { color: var(--color-secondary); }

.gap-rule {
  height: 1px;
  background: var(--color-hairline);
  margin-block: var(--space-5);
  position: relative;
  overflow: hidden;
}
.gap-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1200ms var(--ease);
}
.gap-rule.is-visible::after { transform: scaleX(1); }

/* ---- Project index ---------------------------------------------------------
   Featured work as an editorial index, not cards. Each row: number-free
   meta column + title + summary. Whole row is the link target.            */
.project-index {
  list-style: none;
  border-top: 1px solid var(--color-hairline);
}

.project-index__item { border-bottom: 1px solid var(--color-hairline); }

.project-index__link {
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-4);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease);
}

.project-index__link:hover { background: var(--color-ink-faint); }

.project-index__meta {
  font-size: var(--text-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--color-secondary);
}

.project-index__title {
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.project-index__summary {
  margin-top: var(--space-1);
  color: var(--color-secondary);
  font-size: var(--text-body);
  max-width: 46rem;
}

.project-index__arrow {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--color-secondary);
  transition: transform var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease);
}

.project-index__link:hover .project-index__arrow {
  transform: translateX(4px);
  color: var(--color-accent);
}

@media (max-width: 720px) {
  .project-index__link { grid-template-columns: 1fr auto; }
  .project-index__meta { grid-column: 1 / -1; }
}

/* ---- Article list ----------------------------------------------------------- */
.article-list { list-style: none; }

.article-list__item {
  border-top: 1px solid var(--color-hairline);
}

.article-list__link {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: var(--space-4);
  padding-block: var(--space-4);
  text-decoration: none;
  align-items: baseline;
  transition: background var(--duration-fast) var(--ease);
}
.article-list__link:hover { background: var(--color-ink-faint); }

.article-list__date {
  font-size: var(--text-micro);
  letter-spacing: var(--tracking-micro);
  text-transform: uppercase;
  color: var(--color-secondary);
}

.article-list__title {
  font-size: var(--text-h3);
  font-weight: 600;
}

.article-list__excerpt {
  margin-top: var(--space-1);
  color: var(--color-secondary);
}

@media (max-width: 720px) {
  .article-list__link { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* ---- Closing CTA -------------------------------------------------------------- */
.closing-cta h2 {
  font-size: var(--text-display);
  font-weight: 550;
  max-width: 16ch;
}

.closing-cta .hero__actions { margin-top: var(--space-4); }

/* ---- Scroll reveal --------------------------------------------------------------
   Elements with [data-reveal] fade and rise ~12px on first entry.
   main.js flips .is-visible; reduced-motion users get content instantly. */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--duration-slow) var(--ease),
              transform var(--duration-slow) var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}
