/* ============================================================================
   joshuaalbanese.com - stamped design system
   ----------------------------------------------------------------------------
   Ported from the Next.js prototype's globals.css, which encoded a full Apple
   design language: a stack of edge-to-edge tiles, a single accent, a single
   shadow, no gradients on type, generous negative space.

   This file is the ONLY stylesheet. Nothing adds CSS outside it.
   ========================================================================== */

:root {
  /* ---- Surfaces ---- */
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --pearl: #fafafc;
  --tile-dark: #1d1d1f;
  --tile-darker: #000000;
  --portrait-dark: #0d0a15;

  /* ---- Ink ---- */
  --ink: #1d1d1f;
  --ink-soft: #3a3a3c;
  --ink-muted: #6e6e73;
  --on-dark: #ffffff;
  --on-dark-muted: #a1a1a6;

  /* ---- Accent (single) ---- */
  --action: #0066cc;
  --action-hover: #0071e3;
  --action-on-dark: #2997ff;

  /* ---- Lines ---- */
  --hairline: #d2d2d7;
  --hairline-soft: #e8e8ed;
  --hairline-on-dark: rgba(255, 255, 255, 0.18);

  /* ---- Type ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Helvetica Neue", system-ui, sans-serif;

  /* ---- Rhythm ---- */
  --gutter: clamp(20px, 5vw, 80px);
  --section-y: clamp(72px, 10vw, 140px);
  --measure: 68ch;
  --max: 1440px;

  /* ---- Radii ---- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 9999px;

  /* ---- One shadow ---- */
  --shadow-product: 3px 5px 30px 0 rgba(0, 0, 0, 0.22);

  /* ---- One easing ---- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------------------------------------------------------- reset -- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

/* THE image veto: a global rule plus a real per-slot rule on every slot below. */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--action);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--action-hover);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Apple's system-wide press micro-interaction. */
[data-press]:active {
  transform: scale(0.96);
  transition: transform 120ms var(--ease);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- type --- */
.t-hero {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.t-display {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.t-section {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.t-lead {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
  font-weight: 400;
  color: var(--ink-soft);
}

.t-body {
  font-size: 1.0625rem;
  line-height: 1.6;
}

.t-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.t-caption {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.t-fine {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------- dark tiles --- */
.on-dark {
  color: var(--on-dark);
}
.on-dark .t-lead,
.on-dark .t-caption,
.on-dark .t-fine,
.on-dark .t-eyebrow {
  color: var(--on-dark-muted);
}
.on-dark a {
  color: var(--action-on-dark);
}

/* ------------------------------------------------------------- layout ---- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-text {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.tile {
  padding-block: var(--section-y);
}
.tile-canvas {
  background: var(--canvas);
}
.tile-parchment {
  background: var(--parchment);
}
.tile-dark {
  background: var(--tile-dark);
}
.tile-black {
  background: var(--tile-darker);
}

/* ---------------------------------------------------------------- nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 52px;
}

.nav-brand {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-brand:hover {
  text-decoration: none;
  opacity: 0.7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 32px);
  list-style: none;
}

.nav-links a {
  font-size: 0.8125rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  padding-block: 6px;
}
.nav-links a:hover {
  text-decoration: none;
  color: var(--action);
}
.nav-links a[aria-current="page"] {
  color: var(--action);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 700px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 52px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline-soft);
    padding: 8px var(--gutter) 20px;
  }
  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--hairline-soft);
  }
  .nav-links li:last-child {
    border-bottom: 0;
  }
  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
  }
  /* No-JS fallback: without the script the menu is always open, never trapped shut. */
  html.js .nav-links[data-collapsed="true"] {
    display: none;
  }
}

/* -------------------------------------------------------------- button --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease),
    border-color 200ms var(--ease);
}
.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--action);
  color: #fff;
}
.btn-primary:hover {
  background: var(--action-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--action);
  border-color: var(--action);
}
.btn-secondary:hover {
  background: var(--action);
  color: #fff;
}

.btn-on-dark {
  background: #fff;
  color: var(--ink);
}
.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.86);
}

.btn-ghost-on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-ghost-on-dark:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.link-arrow {
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.link-arrow::after {
  content: "\203A";
  font-size: 1.15em;
  line-height: 1;
  transition: transform 200ms var(--ease);
}
.link-arrow:hover {
  text-decoration: none;
}
.link-arrow:hover::after {
  transform: translateX(3px);
}

/* ---------------------------------------------------------------- hero --- */
.hero {
  position: relative;
  background: var(--portrait-dark);
  color: #fff;
  overflow: hidden;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
}

/* PER-SLOT image rule (never a bare unstyled img). */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  aspect-ratio: 16 / 9;
}

/* Legibility scrim: the left column must stay dark enough for AA text. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      100deg,
      rgba(13, 10, 21, 0.97) 0%,
      rgba(13, 10, 21, 0.92) 34%,
      rgba(13, 10, 21, 0.55) 55%,
      rgba(13, 10, 21, 0.1) 74%,
      rgba(13, 10, 21, 0) 100%
    ),
    linear-gradient(180deg, rgba(13, 10, 21, 0.55) 0%, rgba(13, 10, 21, 0) 28%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(80px, 12vw, 140px);
}

.hero-copy {
  max-width: 30ch;
}

.hero .t-lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 42ch;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}
.hero-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--action-on-dark);
}

@media (max-width: 860px) {
  .hero-media img {
    object-position: 62% top;
    aspect-ratio: 3 / 4;
  }
  .hero-media::after {
    background: linear-gradient(
      180deg,
      rgba(13, 10, 21, 0.45) 0%,
      rgba(13, 10, 21, 0.6) 42%,
      rgba(13, 10, 21, 0.95) 72%,
      rgba(13, 10, 21, 0.99) 100%
    );
  }
  .hero {
    align-items: flex-end;
    min-height: min(92vh, 760px);
  }
  .hero-copy,
  .hero .t-lead {
    max-width: none;
  }
}

/* ------------------------------------------------------------ sections --- */
.section-head {
  max-width: 24ch;
}
.section-head.wide {
  max-width: 34ch;
}

.stack > * + * {
  margin-top: 20px;
}
.stack-sm > * + * {
  margin-top: 12px;
}
.stack-lg > * + * {
  margin-top: 32px;
}

.split {
  display: grid;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 880px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split.text-first > .split-media {
    order: 2;
  }
  .split.media-first > .split-media {
    order: -1;
  }
}

/* PER-SLOT image rule. */
.split-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-product);
}

/* --------------------------------------------------------- stat band ----- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 40px) 16px;
  list-style: none;
}
@media (min-width: 760px) {
  .stats {
    grid-template-columns: repeat(5, 1fr);
  }
}
.stat {
  text-align: center;
}
.stat-n {
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-l {
  margin-top: 10px;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.on-dark .stat-l {
  color: var(--on-dark-muted);
}

/* -------------------------------------------------------- company card --- */
.company {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(40px, 6vw, 64px);
}
.on-dark .company {
  border-color: var(--hairline-on-dark);
}
.company:first-of-type {
  border-top: 0;
}

.company-name {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.company-role {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.on-dark .company-role {
  color: var(--on-dark-muted);
}

.company-offer {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--parchment);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.on-dark .company-offer {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* ------------------------------------------------------------- proof ----- */
.proof {
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  background: var(--canvas);
}
.on-dark .proof {
  border-color: var(--hairline-on-dark);
  background: rgba(255, 255, 255, 0.04);
}

.proof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.proof-table caption {
  text-align: left;
  padding-bottom: 14px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}
.on-dark .proof-table caption {
  color: var(--on-dark-muted);
}
.proof-table th,
.proof-table td {
  text-align: left;
  padding: 12px 10px 12px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.on-dark .proof-table th,
.on-dark .proof-table td {
  border-color: var(--hairline-on-dark);
}
.proof-table th {
  font-weight: 600;
}
.proof-table td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.proof-table tr:last-child th,
.proof-table tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------- pull quote ---- */
/* NOTE: the measure lives on the <p>, not on the wrapper. `ch` resolves against the
   element's OWN font-size, so a ch max-width on the wrapper (17px body text) collapses
   the column to about 180px while the quote inside renders at 3rem. */
.pullquote {
  margin-inline: auto;
  text-align: center;
}
/* Scoped to its own class, not to `.pullquote p`: an element selector there beats
   the .t-eyebrow class on the caption underneath and blows it up to quote size. */
.pullquote-q {
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 19ch;
  margin-inline: auto;
}

/* --------------------------------------------------------------- prose --- */
.prose {
  max-width: var(--measure);
}
.prose > * + * {
  margin-top: 1.15em;
}
.prose h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-top: 2.2em;
}
.prose h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-top: 1.8em;
}
.prose p,
.prose li {
  font-size: 1.0625rem;
  line-height: 1.65;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 0.45em;
}
.prose strong {
  font-weight: 600;
}
.prose blockquote {
  border-left: 3px solid var(--action);
  padding-left: 20px;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  text-align: left;
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.prose th {
  font-weight: 600;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin-block: 2.4em;
}

.table-scroll {
  overflow-x: auto;
}

/* ---------------------------------------------------------------- form --- */
.form {
  max-width: 560px;
}
.field + .field {
  margin-top: 20px;
}
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 13px 15px;
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--action);
  outline: 2px solid var(--action-hover);
  outline-offset: 1px;
}
.field-hint {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -------------------------------------------------------------- footer --- */
.site-footer {
  background: var(--parchment);
  border-top: 1px solid var(--hairline-soft);
  padding-block: clamp(48px, 7vw, 72px) 32px;
  font-size: 0.875rem;
}
.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}
.footer-h {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.footer-list {
  list-style: none;
}
.footer-list li + li {
  margin-top: 10px;
}
.footer-list a {
  color: var(--ink-soft);
}
.footer-list a:hover {
  color: var(--action);
}
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

/* -------------------------------------------------------------- reveal --- */
/* Progressive enhancement only: without JS the class is never added and
   everything is visible by default. */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}
html.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal,
  html.js .reveal.in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
