/* ============================================================
   portfolio-hiring.css — bespoke aesthetic for the Hiring App
   "Dossier" editorial: cream paper, forest green, coral accent.
   Loaded only on /portfolio/hiring-application via inline <link>.
   All selectors are scoped under .page-hiring to avoid leaking
   into the global style.css design system.
   ============================================================ */

.page-hiring {
  --paper: #f4ede0;
  --paper-deep: #ebe2cf;
  --ink: #1c1a16;
  --ink-2: #5a534a;
  --ink-3: #8a8378;
  --rule: #cfc4ad;
  --forest: #294f3f;
  --forest-soft: rgba(41, 79, 63, 0.08);
  --coral: #c8553d;
  --serif: "New York", "Source Serif 4", Georgia, "Times New Roman", ui-serif, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;

  min-height: 100vh;
  background: var(--paper);
  background-image:
    radial-gradient(rgba(120, 110, 90, 0.06) 1px, transparent 1px),
    radial-gradient(rgba(120, 110, 90, 0.04) 1px, transparent 1px);
  background-size: 24px 24px, 8px 8px;
  background-position: 0 0, 4px 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* override global theme: this page is its own world */
.page-hiring,
.page-hiring * {
  box-sizing: border-box;
}

.page-hiring a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Full-bleed hero ---------- */
.hiring-hero {
  --hero-img: none;
  position: relative;
  height: 100vh;
  min-height: 600px;
  width: 100%;
  overflow: hidden;
  color: #f4ede0;
  isolation: isolate;
}

.hiring-hero-bg {
  position: absolute;
  inset: -4%;
  z-index: -3;
  background-color: #1a2820;
  background-image:
    linear-gradient(135deg, rgba(20, 35, 28, 0.7) 0%, rgba(40, 55, 40, 0.3) 50%, rgba(80, 60, 35, 0.55) 100%),
    var(--hero-img);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  animation: hiring-kenburns 32s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes hiring-kenburns {
  0%   { transform: scale(1.02) translate3d(0, 0, 0); }
  100% { transform: scale(1.08) translate3d(1.2%, -0.8%, 0); }
}

/* Slow vertical sweep — a light "sheen" passing through */
.hiring-hero-scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 48%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.05) 52%,
    transparent 100%
  );
  transform: translateY(-100%);
  animation: hiring-sheen 11s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hiring-sheen {
  0%, 100% { transform: translateY(-100%); }
  50%      { transform: translateY(100%); }
}

/* Fallback texture when no image present — paper grain on top of gradient */
.hiring-hero-grain {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(rgba(244, 237, 224, 0.06) 1px, transparent 1px),
    radial-gradient(rgba(244, 237, 224, 0.04) 1px, transparent 1px);
  background-size: 28px 28px, 9px 9px;
  background-position: 0 0, 4px 4px;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hiring-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 18%, transparent 70%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, transparent 22%, transparent 78%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

/* Corner: top-left — logo + identifier (igloo.inc-style) */
.hiring-hero-tl {
  position: absolute;
  top: clamp(24px, 4vw, 48px);
  left: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(244, 237, 224, 0.85);
  text-transform: uppercase;
  max-width: 320px;
}

.hiring-hero-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(244, 237, 224, 0.85);
  font-weight: 500;
  transition: color 200ms ease;
  align-self: flex-start;
}

.hiring-hero-home:hover { color: #fff; }

.hiring-hero-mark {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hiring-hero-mark-name {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: #fff;
  font-weight: 500;
  text-transform: none;
}

.hiring-hero-mark-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(244, 237, 224, 0.55);
  line-height: 1.5;
}

/* Corner: top-right — manifesto */
.hiring-hero-tr {
  position: absolute;
  top: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(244, 237, 224, 0.85);
  max-width: 260px;
  line-height: 1.5;
}

.hiring-hero-tr-tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(244, 237, 224, 0.55);
  margin-bottom: 14px;
}

.hiring-hero-tr-line {
  display: block;
}

/* Floating data annotations — crosshair + number */
.hiring-hero-annotations {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hiring-hero-ann {
  position: absolute;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.06em;
  transform: translate(-50%, -50%);
}

.hiring-hero-ann-x {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 300;
}

.hiring-hero-ann-num {
  font-feature-settings: "tnum";
}

.hiring-hero-ann {
  animation: hiring-ann-pulse 4.5s ease-in-out infinite;
}

.hiring-hero-ann:nth-child(2) { animation-delay: -1.6s; animation-duration: 5.3s; }
.hiring-hero-ann:nth-child(3) { animation-delay: -2.9s; animation-duration: 6.1s; }

@keyframes hiring-ann-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* Corner: bottom-left — scroll prompt */
.hiring-hero-bl {
  position: absolute;
  bottom: clamp(24px, 4vw, 48px);
  left: clamp(24px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 237, 224, 0.7);
}

.hiring-hero-arrow {
  font-size: 18px;
  display: inline-block;
  animation: hiring-hero-bob 2.2s ease-in-out infinite;
}

@keyframes hiring-hero-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* Corner: bottom-right — live badge */
.hiring-hero-br {
  position: absolute;
  bottom: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 48px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 200ms ease, border-color 200ms ease;
  text-decoration: none !important;
}

.hiring-hero-br:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.7);
}

.hiring-hero-br-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5eff8a;
  box-shadow: 0 0 8px rgba(94, 255, 138, 0.55);
}

@media (max-width: 720px) {
  .hiring-hero-tr { max-width: 180px; font-size: 11px; }
  .hiring-hero-mark-name { font-size: 2.5rem; }
  .hiring-hero-annotations { display: none; }
  .hiring-hero-br { padding: 6px 10px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .hiring-hero-arrow,
  .hiring-hero-bg,
  .hiring-hero-ann,
  .hiring-hero-scrim::after { animation: none !important; }
  .hiring-hero-bg { inset: 0; transform: none; }
  .hiring-hero-scrim::after { display: none; }
}

/* ---------- Top bar ---------- */
.hiring-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(244, 237, 224, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.hiring-topbar-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
}

.hiring-topbar-back {
  justify-self: center;
  color: var(--ink-3);
}

.hiring-topbar-back:hover { color: var(--forest); }

.hiring-topbar-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-weight: 500;
  border: 1px solid var(--forest);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--forest-soft);
  transition: background 200ms ease, color 200ms ease;
}

.hiring-topbar-live:hover {
  background: var(--forest);
  color: var(--paper);
}

.hiring-topbar-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 0 currentColor;
  animation: hiring-pulse 1.8s ease-out infinite;
}

@keyframes hiring-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(41, 79, 63, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(41, 79, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(41, 79, 63, 0); }
}

/* ---------- Cover ---------- */
.hiring-cover {
  padding: clamp(72px, 12vw, 160px) clamp(20px, 5vw, 56px) clamp(56px, 8vw, 96px);
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.hiring-cover::before {
  /* faint case-file watermark */
  content: "DOSSIER";
  position: absolute;
  top: 36px;
  right: clamp(20px, 5vw, 56px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--ink-3);
  opacity: 0.6;
}

.hiring-cover-grid {
  max-width: 1080px;
  margin: 0 auto;
}

.hiring-cover-label {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 40px;
}

.hiring-cover-label span:first-child::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--coral);
  margin-left: 16px;
  vertical-align: middle;
}

.hiring-cover-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 32px;
  color: var(--ink);
  max-width: 14ch;
}

.hiring-cover-deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.4;
  color: var(--ink-2);
  margin: 0 0 64px;
  max-width: 32ch;
}

.hiring-cover-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin: 0;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.hiring-cover-meta > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hiring-cover-meta dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

.hiring-cover-meta dd {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}

/* ---------- Metrics ---------- */
.hiring-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--rule);
}

.hiring-metric {
  padding: 8px clamp(16px, 3vw, 32px);
  border-left: 1px solid var(--rule);
}

.hiring-metric:first-child { border-left: none; padding-left: 0; }

.hiring-metric-value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--forest);
  margin-bottom: 12px;
  font-weight: 500;
}

.hiring-metric-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Pull quote ---------- */
.hiring-pullquote {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) clamp(20px, 5vw, 56px);
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--rule);
}

.hiring-pullquote::before {
  content: "“";
  display: block;
  font-family: var(--serif);
  font-size: 7rem;
  line-height: 1;
  color: var(--coral);
  margin-bottom: -32px;
}

.hiring-pullquote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.hiring-pullquote cite {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-style: normal;
}

/* ---------- Story ---------- */
.hiring-story {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 56px);
}

.hiring-chapter {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(32px, 5vw, 72px);
  padding: 56px 0;
  border-bottom: 1px solid var(--rule);
}

.hiring-chapter:last-child { border-bottom: none; }

.hiring-chapter-marker {
  position: sticky;
  top: 88px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.hiring-chapter-num {
  font-family: var(--serif);
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--coral);
  font-weight: 500;
}

.hiring-chapter-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hiring-chapter-body {
  max-width: 60ch;
}

.hiring-chapter-heading {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 24ch;
}

.hiring-chapter-para {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 1em;
}

.hiring-chapter-para:last-child { margin-bottom: 0; }

/* The very first paragraph of each chapter gets a drop cap */
.hiring-chapter-body .hiring-chapter-para:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.5em;
  float: left;
  line-height: 0.85;
  padding: 4px 12px 0 0;
  color: var(--forest);
  font-weight: 500;
}

/* ---------- Coda ---------- */
.hiring-coda {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) clamp(20px, 5vw, 56px) clamp(48px, 6vw, 80px);
  text-align: center;
}

.hiring-coda-rule {
  height: 1px;
  width: 80px;
  background: var(--coral);
  margin: 0 auto 32px;
}

.hiring-coda-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 40px;
}

.hiring-coda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.hiring-coda-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: 999px;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.hiring-coda-btn-primary {
  background: var(--forest);
  color: var(--paper);
  border: 1px solid var(--forest);
}

.hiring-coda-btn-primary:hover {
  background: var(--coral);
  border-color: var(--coral);
}

.hiring-coda-btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--rule);
}

.hiring-coda-btn-ghost:hover {
  border-color: var(--forest);
  color: var(--forest);
}

/* ---------- Footer ---------- */
.hiring-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 32px 24px 48px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
}

.hiring-footer a:hover { color: var(--forest); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hiring-topbar {
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 14px 20px;
  }
  .hiring-topbar-back { display: none; }
  .hiring-cover::before { display: none; }
  .hiring-chapter {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 40px 0;
  }
  .hiring-chapter-marker {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .hiring-chapter-num { font-size: 2rem; }
  .hiring-chapter-body .hiring-chapter-para:first-of-type::first-letter {
    font-size: 2.75em;
  }
  .hiring-metric { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 32px; }
  .hiring-metric:first-child { border-top: none; padding-top: 0; }
}

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hiring-topbar-live-dot { animation: none; }
}
