/* ════════════════════════════════════════════════════════════════════════
   Hiremé v2 artifact skeleton.

   Constant across every artifact. Per-recipient brand values come from
   inline :root --tb-* overrides emitted by generateStylesV2 in
   src/templates/styles-v2.ts. This file holds:
     - --hm-* skeleton tokens (constant Hiremé brand)
     - All component rules referencing both --tb-* and --hm-* tokens

   Served at /public/css/hireme-v2.css. One copy, cached. Page weight
   stays small.
   ════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════
   HIREMÉ SKELETON — constant across every artifact.
   Only locked colors: coral (#FF6B81) + ink on it.
   ════════════════════════════════════════════════════════════════════ */
:root {
  --hm-coral:          #FF6B81;
  --hm-coral-deep:     #E85470;
  --hm-coral-ink:      #ffffff;

  --hm-font-serif:     'Newsreader', Georgia, serif;

  --hm-measure:        680px;
  --hm-gutter:         clamp(1.25rem, 4vw, 2.5rem);
  --hm-space-beat:     clamp(3rem, 7vw, 5.5rem);
  --hm-space-break:    clamp(2rem, 5vw, 3.5rem);

  --hm-ease:           cubic-bezier(0.22, 0.61, 0.36, 1);
  --hm-dur-beat:       700ms;
}

/* ════════════════════════════════════════════════════════════════════════
   BASE
   ════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--tb-bg);
  color: var(--tb-ink);
  font-family: var(--tb-font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "calt";
  padding-bottom: 0;
}

a { color: var(--tb-accent); text-decoration: none; }
a:hover { color: var(--tb-primary); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--tb-primary); color: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   MEASURE — single-column 680px canvas, ~66ch line length.
   ════════════════════════════════════════════════════════════════════ */
.measure {
  max-width: var(--hm-measure);
  margin: 0 auto;
  padding: 0 var(--hm-gutter);
}

/* ════════════════════════════════════════════════════════════════════════
   TOP CHROME — reading time + target logo. Quiet, signals "letter."
   ════════════════════════════════════════════════════════════════════ */
.top-chrome {
  padding-top: clamp(1.25rem, 3vw, 2rem);
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}
.top-chrome__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.reading-time {
  font-family: var(--hm-font-serif);
  font-size: 0.875rem;
  font-style: italic;
  color: var(--tb-ink-subtle);
}
.reading-time::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tb-accent);
  margin-right: 0.5rem;
  vertical-align: 2px;
}
.target-mark {
  opacity: 0.55;
  height: 28px;
  transition: opacity 500ms var(--hm-ease);
}
.target-mark:hover { opacity: 1; }

/* ════════════════════════════════════════════════════════════════════════
   OPENING — identity first (centered headshot + name + role), then the
   editorial display statement. Identity sticks; statement makes it fancy.
   ════════════════════════════════════════════════════════════════════ */
.opening {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: var(--hm-space-beat);
  border-bottom: 1px solid var(--tb-rule);
  text-align: center;
}
.opening__headshot {
  width: clamp(120px, 14vw, 150px);
  height: clamp(120px, 14vw, 150px);
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto clamp(1.25rem, 2.5vw, 1.75rem);
  border: 4px solid var(--hm-coral);
  box-shadow: 0 4px 16px rgba(26, 22, 17, 0.08);
}
/* Initials fallback when no headshot image is provided. */
.opening__headshot--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tb-primary);
  color: #fff;
  font-weight: 700;
  font-size: 2.25rem;
  letter-spacing: 0.04em;
}
.opening__name {
  font-family: var(--tb-font-heading);
  font-weight: 700;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  color: var(--tb-ink);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.opening__role {
  font-family: var(--tb-font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tb-primary);
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}
.opening__target-logo {
  display: block;
  height: clamp(28px, 3.5vw, 36px);
  max-width: 160px;
  width: auto;
  margin: 0 auto clamp(1.25rem, 2.5vw, 1.75rem);
  opacity: 0.75;
  object-fit: contain;
}
.opening__display {
  font-family: var(--hm-font-serif);
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, 3.6vw, 2.125rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--tb-ink);
  text-wrap: balance;
  max-width: 36ch;
  margin: 0 auto clamp(1.5rem, 3vw, 2rem);
}
.opening__display em {
  font-style: italic;
  color: var(--tb-primary);
  font-weight: 500;
}
.opening__byline {
  font-family: var(--tb-font-body);
  font-size: 0.875rem;
  color: var(--tb-ink-muted);
}
.opening__byline strong {
  color: var(--tb-ink);
  font-weight: 700;
}

/* ════════════════════════════════════════════════════════════════════════
   DIRECT-ADDRESS BEAT — "Samantha, ..."
   ════════════════════════════════════════════════════════════════════ */
.direct {
  padding: var(--hm-space-beat) 0;
  border-bottom: 1px solid var(--tb-rule);
}
.direct__greeting {
  font-family: var(--hm-font-serif);
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--tb-ink);
  margin-bottom: 1.25rem;
}
.direct__greeting em {
  font-style: italic;
  color: var(--tb-primary);
}
.direct__body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--tb-ink);
  max-width: 58ch;
}
.direct__body p + p { margin-top: 1em; }

/* ════════════════════════════════════════════════════════════════════════
   MATCHES — requirement (italic serif) + proof (Inter narrative)
   ════════════════════════════════════════════════════════════════════ */
.matches { padding: var(--hm-space-beat) 0 0; }
/* Tight variant: drop the top padding when matches follows opening directly
   (no direct-address beat between them). */
.matches--tight { padding-top: 0; }
.matches__intro {
  font-family: var(--tb-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tb-primary);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
}
.matches__intro::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--tb-rule);
  transform: translateY(-3px);
}
.match { padding: 0 0 var(--hm-space-break); }
.match:last-child { padding-bottom: var(--hm-space-beat); }
.match__req {
  font-family: var(--hm-font-serif);
  font-optical-sizing: auto;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--tb-primary);
  margin-bottom: 1.25rem;
  text-wrap: balance;
  max-width: 36ch;
}
.match__narrative {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--tb-ink);
  max-width: 62ch;
}
.match__narrative p + p { margin-top: 0.875em; }
.match__narrative strong {
  font-weight: 700;
  color: var(--tb-primary);
  background: var(--tb-primary-tint);
  padding: 0.05em 0.25em;
  border-radius: 2px;
}

/* ════════════════════════════════════════════════════════════════════════
   REFERENCE BLOCK — single prominent ref, coral LinkedIn bookmark.
   ════════════════════════════════════════════════════════════════════ */
.ref {
  position: relative;
  padding: clamp(2rem, 4.5vw, 3rem) clamp(1.75rem, 4vw, 2.5rem);
  margin: var(--hm-space-break) 0;
  background: var(--tb-surface);
  border-radius: 14px;
  border: 1px solid var(--tb-rule-on-surface, var(--tb-rule));
  box-shadow:
    0 1px 2px rgba(26, 22, 17, 0.04),
    0 10px 32px rgba(26, 22, 17, 0.06);
}
.ref__kicker {
  font-family: var(--tb-font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tb-ink-on-surface-subtle, var(--tb-ink-subtle));
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.ref__kicker::before {
  content: '';
  width: 16px; height: 1px;
  background: var(--tb-ink-on-surface-subtle, var(--tb-ink-subtle));
  opacity: 0.5;
}
.ref__quote {
  font-family: var(--hm-font-serif);
  font-optical-sizing: auto;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.003em;
  color: var(--tb-ink-on-surface, var(--tb-ink));
  text-wrap: pretty;
  margin-bottom: 1.5rem;
  position: relative;
  max-width: 56ch;
}
.ref__quote::before {
  content: '\201C';
  position: absolute;
  left: -0.45em;
  top: -0.25em;
  font-size: 2.4em;
  line-height: 1;
  color: var(--tb-primary);
  opacity: 0.35;
  font-family: Georgia, serif;
  pointer-events: none;
}
.ref__quote em {
  font-style: italic;
  color: var(--tb-primary);
}
.ref__attribution {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.ref__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tb-primary);
  color: #fff;
  font-family: var(--tb-font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  line-height: 1;
}
.ref__who { flex: 1; min-width: 0; }
.ref__name {
  font-family: var(--tb-font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--tb-ink-on-surface, var(--tb-ink));
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ref__role {
  font-size: 0.8125rem;
  color: var(--tb-ink-on-surface-muted, var(--tb-ink-muted));
  line-height: 1.4;
  margin-top: 0.125rem;
}
.ref__relationship {
  font-size: 0.75rem;
  color: var(--tb-ink-on-surface-subtle, var(--tb-ink-subtle));
  line-height: 1.4;
  font-style: italic;
  margin-top: 0.125rem;
}
/* Coral signature moment #1: LinkedIn bookmark */
.ref__linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.1875rem 0.5rem 0.1875rem 0.4rem;
  font-family: var(--tb-font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--hm-coral-deep);
  background: #fde4e7;
  border-radius: 4px;
  text-decoration: none;
  line-height: 1;
  transition: background 200ms var(--hm-ease);
}
.ref__linkedin:hover {
  background: var(--hm-coral);
  color: var(--hm-coral-ink);
}
.ref__linkedin svg { width: 10px; height: 10px; flex-shrink: 0; }
.ref__more {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--tb-rule-on-surface, var(--tb-rule));
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.8125rem;
  color: var(--tb-ink-on-surface-muted, var(--tb-ink-muted));
}
.ref__avatars { display: flex; margin-right: 0.125rem; }
.ref__avatars > * {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tb-primary-tint);
  color: var(--tb-primary);
  font-family: var(--tb-font-heading);
  font-weight: 700;
  font-size: 0.6875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--tb-surface);
  margin-left: -8px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.ref__avatars > *:first-child { margin-left: 0; }

/* ════════════════════════════════════════════════════════════════════════
   VALUES PAUSE — quiet centered italic interstitial.
   ════════════════════════════════════════════════════════════════════ */
.pause {
  padding: var(--hm-space-beat) 0 calc(var(--hm-space-beat) * 1.2);
  text-align: center;
  border-bottom: 1px solid var(--tb-rule);
}
.pause__intro {
  font-family: var(--tb-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tb-primary);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  text-align: left;
}
.pause__intro::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--tb-rule);
  transform: translateY(-3px);
}
.pause__text {
  font-family: var(--hm-font-serif);
  font-optical-sizing: auto;
  font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--tb-primary);
  max-width: 48ch;
  margin: 0 auto;
  text-wrap: balance;
}
.pause__text strong {
  font-weight: 500;
  font-style: italic;
  color: var(--tb-ink);
}

/* ════════════════════════════════════════════════════════════════════════
   SIGNATURE CLOSE — handwritten-feel sign-off.
   ════════════════════════════════════════════════════════════════════ */
.close {
  padding: var(--hm-space-beat) 0 clamp(2.5rem, 5vw, 3.5rem);
}
.close__text {
  font-family: var(--hm-font-serif);
  font-optical-sizing: auto;
  font-size: clamp(1.25rem, 2.5vw, 1.4375rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--tb-ink);
  max-width: 50ch;
  text-wrap: balance;
  margin-bottom: 2.25rem;
}
.close__text em {
  font-style: italic;
  color: var(--tb-primary);
}
.close__sign {
  display: flex;
  align-items: center;
  gap: 1.125rem;
}
.close__headshot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
/* Initials fallback when no headshot image is provided. */
.close__headshot--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tb-primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.close__who { flex: 1; }
.close__name {
  font-family: var(--hm-font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: 1.125rem;
  color: var(--tb-ink);
  line-height: 1.2;
}
.close__phone {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--tb-ink-muted);
  font-variant-numeric: tabular-nums;
}
.close__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  justify-content: center;
}
.close__action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  border: 1.5px solid var(--tb-primary);
  border-radius: 9999px;
  font-family: var(--tb-font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--tb-ink);
  text-decoration: none;
  transition: background 200ms var(--hm-ease), color 200ms var(--hm-ease), transform 200ms var(--hm-ease);
  white-space: nowrap;
}
.close__action:hover {
  background: var(--tb-primary);
  color: #ffffff;
  transform: translateY(-1px);
}
.close__action.is-copied {
  background: var(--tb-primary);
  color: #ffffff;
  border-color: var(--tb-primary);
  transform: none;
}

/* ════════════════════════════════════════════════════════════════════════
   FOOTER BADGE — typeset Hiremé signature. Coral signature moment #2.
   ════════════════════════════════════════════════════════════════════ */
.hireme-badge {
  border-top: 1px solid var(--tb-rule);
  padding: clamp(1.75rem, 3.5vw, 2.25rem) 0 clamp(2.5rem, 4.5vw, 3rem);
  text-align: center;
}
.hireme-badge__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--hm-font-serif);
  font-size: 0.875rem;
  font-style: italic;
  color: var(--tb-ink-subtle);
}
.hireme-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hm-coral);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 107, 129, 0.15);
}
.hireme-badge__link {
  color: var(--tb-ink-muted);
  font-style: normal;
  font-family: var(--tb-font-body);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--hm-ease), color 200ms var(--hm-ease);
}
.hireme-badge__link:hover {
  color: var(--hm-coral-deep);
  border-bottom-color: var(--hm-coral);
}

/* ════════════════════════════════════════════════════════════════════════
   ARRIVAL MOTION — calm 700ms, one-shot.
   ════════════════════════════════════════════════════════════════════ */
.arrive {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--hm-dur-beat) var(--hm-ease),
    transform var(--hm-dur-beat) var(--hm-ease);
}
.arrive.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE + PRINT
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 560px) {
  .ref { padding: 1.75rem 1.25rem; }
  .ref__quote::before { display: none; }
  .close__sign { flex-wrap: wrap; }
}

@media print {
  html { font-size: 14px; }
  body { background: #fff; }
  .top-chrome { display: none; }
  .arrive { opacity: 1 !important; transform: none !important; }
  .ref { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}
