/* Thomas Peng · Redesign Review — styles.css */

/* ─── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── OKLCH tokens ──────────────────────────────────────────── */
:root {
  /* Neutrals */
  --ink-900:   oklch(12% 0.006 250);
  --ink-700:   oklch(28% 0.008 250);
  --ink-500:   oklch(46% 0.010 250);
  --ink-300:   oklch(66% 0.008 250);
  --ink-100:   oklch(92% 0.004 250);
  --ink-050:   oklch(97% 0.002 250);
  --white:     oklch(99% 0.000 0);

  /* Accents */
  --accent:    oklch(55% 0.18  255);   /* measured blue */
  --accent-hi: oklch(62% 0.19  255);

  /* Score badge tiers */
  --score-hi:  oklch(52% 0.16  145);   /* green */
  --score-mid: oklch(55% 0.14  80);    /* amber */

  /* Typography */
  --font-body: "General Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* Spacing scale (4px base) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Layout */
  --max-w: 1120px;
  --radius: 6px;
  --radius-lg: 12px;

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 260ms;
}

/* ─── Fonts (system fallback — no external fetch required) ──── */
/* Fontshare General Sans is loaded via <link> in HTML if available,
   system-ui is the immediate fallback so no render block occurs.   */

/* ─── Reduced-motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 999;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus {
  top: var(--sp-4);
}

/* ─── Base ──────────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--ink-050);
  color: var(--ink-900);
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Layout shell ──────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--ink-100);
  background: var(--white);
  padding-block: var(--sp-5);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.logo {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-700);
  text-decoration: none;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  background: var(--ink-100);
  border-radius: 999px;
  padding: var(--sp-1) var(--sp-3);
}

.header-badge::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--score-hi);
  flex-shrink: 0;
}

/* ─── Hero / intro ──────────────────────────────────────────── */
.hero {
  padding-block: var(--sp-16) var(--sp-10);
  border-bottom: 1px solid var(--ink-100);
  background: var(--white);
}

.hero-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  margin-bottom: var(--sp-6);
}

.hero-title span {
  color: var(--ink-300);
}

.hero-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-700);
  max-width: 660px;
}

/* ─── Section labels ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-12) var(--sp-8);
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--ink-100);
}

/* ─── Direction card grid ───────────────────────────────────── */
.directions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-12);
}

@media (min-width: 640px) {
  .directions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .directions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Direction card ────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.card:hover {
  box-shadow: 0 8px 32px oklch(12% 0.006 250 / 0.10),
              0 2px 8px  oklch(12% 0.006 250 / 0.06);
  border-color: var(--ink-300);
  transform: translateY(-2px);
}

.card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Thumbnail wrapper */
.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-100);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 400ms var(--ease);
}

.card:hover .card-thumb img {
  transform: scale(1.03);
}

/* Score badge overlay on thumb */
.score-badge {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--score-hi);
  border: 1.5px solid var(--score-hi);
  white-space: nowrap;
}

/* Card body */
.card-body {
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-3);
}

.card-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-300);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.2;
}

.card-archetype {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
}

.card-rationale {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-700);
  flex: 1;
}

.card-note {
  font-size: 0.6875rem;
  color: var(--ink-300);
  font-style: italic;
}

/* CTA link */
.card-cta {
  margin-top: var(--sp-2);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: var(--sp-2) 0;
  min-height: 44px;
  align-self: flex-start;
  border-radius: var(--radius);
  transition: color var(--dur) var(--ease),
              gap var(--dur) var(--ease);
}

.card-cta:hover {
  color: var(--accent-hi);
  gap: var(--sp-3);
}

.card-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-cta svg {
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}

.card-cta:hover svg {
  transform: translate(2px, -2px);
}

/* ─── Brand card (full-width) ───────────────────────────────── */
.brand-section {
  padding-bottom: var(--sp-12);
}

.brand-card {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  transition: box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.brand-card:hover {
  box-shadow: 0 8px 32px oklch(12% 0.006 250 / 0.10),
              0 2px 8px  oklch(12% 0.006 250 / 0.06);
  border-color: var(--ink-300);
}

.brand-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .brand-card {
    grid-template-columns: 5fr 4fr;
  }
}

.brand-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--ink-900);
}

@media (min-width: 720px) {
  .brand-thumb {
    aspect-ratio: unset;
    min-height: 280px;
  }
}

.brand-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 400ms var(--ease);
}

.brand-card:hover .brand-thumb img {
  transform: scale(1.03);
}

.brand-body {
  padding: var(--sp-8) var(--sp-8) var(--sp-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-4);
}

@media (max-width: 719px) {
  .brand-body {
    padding: var(--sp-5);
  }
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-500);
  align-self: flex-start;
}

.brand-pill::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ink-300);
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

.brand-rationale {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-700);
}

.brand-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: var(--sp-2) 0;
  min-height: 44px;
  align-self: flex-start;
  border-radius: var(--radius);
  transition: color var(--dur) var(--ease),
              gap var(--dur) var(--ease);
}

.brand-cta:hover {
  color: var(--accent-hi);
  gap: var(--sp-3);
}

.brand-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brand-cta svg {
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}

.brand-cta:hover svg {
  transform: translate(2px, -2px);
}

/* ─── Next step / closing note ──────────────────────────────── */
.closing {
  border-top: 1px solid var(--ink-100);
  background: var(--white);
  padding-block: var(--sp-12);
}

.closing-inner {
  max-width: 680px;
}

.closing-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: var(--sp-5);
}

.closing-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin-bottom: var(--sp-4);
}

.closing-body {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--ink-700);
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--ink-100);
  padding-block: var(--sp-8);
  background: var(--ink-050);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.footer-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-700);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  list-style: none;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--ink-500);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  transition: color var(--dur) var(--ease);
}

.footer-links a:hover {
  color: var(--ink-900);
}

.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.footer-meta {
  width: 100%;
  font-size: 0.6875rem;
  color: var(--ink-300);
  letter-spacing: 0.02em;
}

/* ─── Score badge variants ──────────────────────────────────── */
.score-badge.score-85 {
  color: var(--score-hi);
  border-color: var(--score-hi);
}

.score-badge.score-80 {
  color: var(--score-mid);
  border-color: var(--score-mid);
}

/* ─── Divider between sections ──────────────────────────────── */
.section-divider {
  height: 1px;
  background: var(--ink-100);
  margin: 0;
  border: none;
}

/* ─── Focus styles ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ─── Selection ─────────────────────────────────────────────── */
::selection {
  background: oklch(55% 0.18 255 / 0.15);
}
