/* David Smith EA — site styles. Brand values come from the shared tokens. */
@import url("../tokens/tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--container-lg); margin-inline: auto; padding-inline: var(--page-gutter); }

h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 3px; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 var(--space-3);
}
.rule { width: 56px; height: 3px; border: 0; border-radius: var(--radius-pill); background: var(--accent); margin: 0 0 var(--space-6); }

/* ---- header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.brand { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 1.05rem; color: var(--text); letter-spacing: -0.01em; }
.brand svg { display: block; flex: none; width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav a { color: var(--text-muted); font-weight: var(--weight-medium); }
.nav a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: var(--text-xs);
  padding: 0.6rem 1rem; border-radius: var(--radius-md); border: 1px solid transparent;
  letter-spacing: 0.02em; white-space: nowrap; cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-ink); color: var(--on-brand); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; }
.nav .btn-primary { color: var(--on-brand); }

/* ---- hero -------------------------------------------------------------- */
.hero { background: var(--surface-brand); color: var(--text-on-brand); overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-16); align-items: center; padding-block: var(--space-24); }
.hero .eyebrow { color: var(--sky-400); }
.hero h1 { font-size: var(--text-3xl); color: #fff; }
.hero .tagline { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-xl); color: var(--sky); margin: var(--space-3) 0 var(--space-6); letter-spacing: -0.01em; }
.hero .lede { font-size: var(--text-md); color: var(--text-on-brand-muted); max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.hero .actions .btn-ghost { color: #fff; }
.hero .social { display: flex; gap: var(--space-6); margin-top: var(--space-6); font-size: var(--text-xs); }
.hero .social a { color: var(--text-on-brand-muted); font-weight: var(--weight-medium); }
.hero .social a:hover { color: #fff; }

.portrait { position: relative; justify-self: center; width: min(340px, 78vw); aspect-ratio: 1; }
.portrait .motif { position: absolute; inset: -22% ; border: 2px solid rgba(255,255,255,0.06); border-radius: 26%; }
.portrait .motif::before { content: ""; position: absolute; inset: 14%; border: 2px solid rgba(255,255,255,0.05); border-radius: 24%; }
.portrait img { position: relative; width: 100%; height: 100%; border-radius: 50%; display: block; }
.portrait .ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 5px var(--sky), var(--shadow-lg); }

/* ---- sections -------------------------------------------------------- */
.section { padding-block: var(--space-24); }
.section--alt { background: var(--surface-alt); }
.section h2 { font-size: var(--text-2xl); color: var(--text); margin-bottom: var(--space-6); }
.section .lede { font-size: var(--text-md); color: var(--text-muted); max-width: 62ch; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-16); align-items: start; }
.about-grid p + p { margin-top: var(--space-4); }
.about-grid .about-visual { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); display: block; box-shadow: var(--shadow-md); }
.placeholder { color: var(--text-muted); background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; display: block; margin-top: var(--space-4); font-size: var(--text-xs); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); list-style: none; padding: 0; }
.chips li { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 0.35rem 0.8rem; }
.section--alt .chips li { background: var(--surface-alt); }

/* ---- videos -------------------------------------------------------- */
.channel { display: grid; grid-template-columns: 1fr auto; gap: var(--space-8); align-items: center; padding: var(--space-8); background: var(--surface-brand); color: var(--text-on-brand); border-radius: var(--radius-lg); }
.channel h3 { font-size: var(--text-xl); color: #fff; }
.channel p { color: var(--text-on-brand-muted); margin-top: var(--space-3); max-width: 52ch; }
.channel .handle { font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--sky); margin-bottom: var(--space-2); }

.episodes { list-style: none; margin: var(--space-12) 0 0; padding: 0; counter-reset: ep; }
.episode { display: grid; grid-template-columns: 2.5rem 128px 1fr auto; gap: var(--space-6); align-items: center; padding: var(--space-6) 0; border-top: 1px solid var(--border); }
.episode:last-child { border-bottom: 1px solid var(--border); }
.episode .num { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--text-lg); color: var(--border-strong); font-variant-numeric: tabular-nums; }
.episode .thumb { width: 128px; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); background: var(--surface-brand); display: grid; place-items: center; }
.episode .thumb svg { width: 34px; height: 26px; opacity: 0.9; }
.episode .meta .title, .episode .meta .sub { display: block; }
.episode .meta .title { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-md); color: var(--text); }
.episode .meta .sub { font-size: var(--text-xs); color: var(--text-muted); margin-top: 0.2rem; font-variant-numeric: tabular-nums; }
.episode .watch { font-weight: var(--weight-semibold); font-size: var(--text-xs); color: var(--brand); white-space: nowrap; }
.episode .watch:hover { color: var(--brand-ink); }
.episodes-note { margin-top: var(--space-6); font-size: var(--text-xs); color: var(--text-muted); }

/* ---- contact ------------------------------------------------------ */
.channels { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: grid; gap: var(--space-1); max-width: 40rem; }
.channels li { display: grid; grid-template-columns: 8rem 1fr; gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--border); align-items: baseline; }
.channels dt, .channels .k { font-size: var(--text-xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); font-weight: var(--weight-semibold); }
.channels .v { font-size: var(--text-md); font-family: var(--font-display); font-weight: var(--weight-semibold); }

/* ---- footer ------------------------------------------------------ */
.site-footer { background: var(--surface-brand); color: var(--text-on-brand-muted); padding-block: var(--space-12); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: var(--space-6) var(--space-16); align-items: center; justify-content: space-between; }
.site-footer .brand { color: #fff; }
.site-footer .brand svg { border-radius: 8px; }
.site-footer nav { display: flex; gap: var(--space-6); font-size: var(--text-xs); }
.site-footer nav a { color: var(--text-on-brand-muted); }
.site-footer nav a:hover { color: #fff; }
.site-footer .fine { width: 100%; font-size: var(--text-2xs); color: rgba(255,255,255,0.45); }

/* ---- responsive ------------------------------------------------- */
@media (max-width: 860px) {
  .nav { gap: var(--space-4); }
  .nav a:not(.btn) { display: none; }
  .hero .container { grid-template-columns: 1fr; gap: var(--space-16); padding-block: var(--space-16); text-align: left; }
  .portrait { order: -1; width: min(240px, 62vw); }
  .about-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .about-grid .about-visual { max-width: 360px; }
  .channel { grid-template-columns: 1fr; text-align: left; }
  .episode { grid-template-columns: 1.75rem 1fr; grid-template-areas: "num meta" "num sub"; row-gap: var(--space-2); }
  .episode .thumb { display: none; }
  .episode .watch { grid-column: 2; justify-self: start; }
  .channels li { grid-template-columns: 1fr; gap: var(--space-1); }
  .channels .v { overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  .site-header .brand-text { line-height: 1.15; }
  .site-header .brand-role { display: block; font-size: var(--text-2xs); font-weight: var(--weight-semibold); color: var(--text-muted); letter-spacing: 0; }
  .site-header .brand-sep { display: none; }
}
