/* ==========================================================================
   Ashby Henning — northofashby.com
   Style system: Vivid+Co ("prismatic light through obsidian")
   Typeface: Schibsted Grotesk variable, standing in for Neue Montreal.
   Weight 400 is the default everywhere; 700 is reserved for 36px subheads.
   ========================================================================== */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('../fonts/schibsted-var.woff2') format('woff2-variations'),
       url('../fonts/schibsted-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Colors */
  --color-bone-white: #fffdf9;
  --color-obsidian: #101010;
  --color-graphite-veil: #495764;
  --color-ash-border: #403f3f;
  --color-fog-blue: #6f879c;

  /* ---- Type */
  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system,
          BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-weight-regular: 400;
  --font-weight-bold: 700;

  --text-caption: 15px;
  --text-body-sm: 18px;
  --text-body: 20px;
  --text-body-lg: 22px;
  --text-heading-sm: clamp(24px, 2.7vw, 33px);
  --text-heading: clamp(27px, 2.9vw, 36px);
  --text-heading-lg: clamp(30px, 4.1vw, 56px);
  --text-display-sm: clamp(40px, 7.4vw, 105px);
  --text-display: clamp(46px, 9.5vw, 136px);

  /* ---- Spacing */
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-40: 40px;
  --spacing-56: 56px;
  --spacing-60: 60px;
  --spacing-64: 64px;
  --spacing-72: 72px;
  --spacing-108: 108px;

  /* ---- Layout */
  --page-max-width: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-gap: clamp(64px, 9vw, 108px);
  --measure: 440px;

  /* ---- Radius */
  --radius-nav: 5px;
  --radius-cards: 15px;
  --radius-tags: 9999px;
  --radius-buttons: 0px;

  /* ---- Motion — the signature curve: slow start, decisive stop */
  --ease: cubic-bezier(0.52, 0.01, 0, 1);
  --dur: 0.5s;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--color-obsidian);
  color: var(--color-bone-white);
  font-family: var(--font);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-body-sm);
  line-height: 1.5;
  font-feature-settings: 'ss01' on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, dl, dd, dt, figure, blockquote {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 1px solid var(--color-bone-white);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  border: 1px solid var(--color-bone-white);
  background: var(--color-obsidian);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 16px; }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

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

.section {
  padding-block: var(--section-gap);
}

.section--contact {
  padding-bottom: clamp(48px, 6vw, 72px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-block: var(--spacing-20);
  transition: background-color var(--dur) var(--ease),
              padding-block var(--dur) var(--ease);
}

/* Once scrolled past the hero, the bar earns a faint obsidian bed so type
   never sits directly on the neon terrain. No shadow — the system is flat. */
.nav.is-stuck {
  background: color-mix(in srgb, var(--color-obsidian) 88%, transparent);
  backdrop-filter: blur(10px);
  padding-block: 14px;
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--spacing-40);
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.nav__mark {
  margin-right: auto;
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

.nav__links {
  display: flex;
  gap: clamp(18px, 2.4vw, 40px);
}

/* Ghost nav button — letterforms alone carry identification */
.nav__links a {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: color var(--dur) var(--ease);
}

.nav__mark:hover,
.nav__links a:hover { color: var(--color-fog-blue); }

/* Outlined Contact button — the only bordered element in the header */
.btn-outline {
  padding: 9px 15px;
  border: 1px solid var(--color-bone-white);
  border-radius: var(--radius-nav);
  background: transparent;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn-outline:hover {
  color: var(--color-fog-blue);
  border-color: var(--color-fog-blue);
}

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding-block: clamp(120px, 16vh, 200px) clamp(40px, 6vh, 72px);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  background: var(--color-obsidian) center/cover no-repeat;
  background-image: url('../media/hero-poster.jpg');
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero__video.is-ready { opacity: 1; }

/* Scrim: keeps #fffdf9 type legible without lightening the canvas.
   Darkens the lower half where the headline sits, leaves the terrain's
   chromatic peaks visible up top. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      var(--color-obsidian) 0%,
      color-mix(in srgb, var(--color-obsidian) 82%, transparent) 34%,
      color-mix(in srgb, var(--color-obsidian) 28%, transparent) 66%,
      color-mix(in srgb, var(--color-obsidian) 55%, transparent) 100%);
}

.hero__content {
  position: relative;
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.hero__lead {
  max-width: var(--measure);
  margin-top: var(--spacing-40);
  font-size: var(--text-body-lg);
  line-height: 1.5;
  letter-spacing: -0.22px;
}

.hero__foot {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
  width: 100%;
  max-width: var(--page-max-width);
  margin: clamp(40px, 7vh, 72px) auto 0;
  padding-inline: var(--gutter);
  color: var(--color-fog-blue);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero__rule {
  flex: 1;
  height: 1px;
  background: var(--color-ash-border);
}

/* ==========================================================================
   Typography roles
   ========================================================================== */

/* Display Headline Block — scale alone creates hierarchy, never weight */
.display {
  font-size: var(--text-display);
  font-weight: var(--font-weight-regular);
  line-height: 1;
  letter-spacing: -0.02em;
}

.display-sm {
  font-size: var(--text-display-sm);
  font-weight: var(--font-weight-regular);
  line-height: 1.01;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: var(--text-heading-lg);
  font-weight: var(--font-weight-regular);
  line-height: 1.13;
  letter-spacing: -0.01em;
}

/* The one place weight 700 is allowed: 36px subheads */
.subhead {
  font-size: var(--text-heading);
  font-weight: var(--font-weight-bold);
  line-height: 1.5;
}

/* Eyebrow Label — all-caps restraint, never bold */
.eyebrow {
  margin-bottom: var(--spacing-40);
  font-size: clamp(14px, 3.4vw, 17px);
  font-weight: var(--font-weight-regular);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-fog-blue);
}

/* Section Heading — sits above the larger display headline that follows */
.statement {
  max-width: 620px;
  margin-bottom: var(--spacing-72);
  font-size: var(--text-body-lg);
  font-weight: var(--font-weight-regular);
  line-height: 1.5;
  letter-spacing: -0.22px;
}

.statement--tight {
  max-width: var(--measure);
  margin-block: var(--spacing-56) var(--spacing-40);
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 12px 3px;
  border: 1px solid var(--color-ash-border);
  border-radius: var(--radius-tags);
  color: var(--color-fog-blue);
  font-size: 14px;
  letter-spacing: 0.02em;
  vertical-align: 2px;
}

/* ==========================================================================
   Scale — stat rows separated by hairlines, never a card matrix
   ========================================================================== */

.scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-72) var(--spacing-64);
}

.scale__label,
.cap__label,
.cred__label,
.scale__group > h3 {
  margin-bottom: var(--spacing-20);
  padding-bottom: var(--spacing-16);
  border-bottom: 1px solid var(--color-ash-border);
  color: var(--color-fog-blue);
  font-size: 17px;
  font-weight: var(--font-weight-regular);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stat {
  padding-block: var(--spacing-20) 30px;
  border-bottom: 1px solid var(--color-ash-border);
}
.stats > .stat:last-child { border-bottom: 0; }

.stat__k {
  font-size: var(--text-heading-lg);
  font-weight: var(--font-weight-regular);
  line-height: 1.13;
  letter-spacing: -0.01em;
  /* Fixed-width digits so a counting number does not reflow the line it
     sits on — 1 and 7 otherwise occupy different widths mid-count. */
  font-variant-numeric: tabular-nums;
}

.stat__unit {
  color: var(--color-fog-blue);
  font-size: 0.5em;
  letter-spacing: 0;
}

/* Ghost service label — de-emphasized taxonomy */
.stat__v {
  max-width: var(--measure);
  margin-top: 7px;
  color: var(--color-fog-blue);
  font-size: var(--text-body);
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.stats--row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 var(--spacing-64);
  margin-bottom: var(--spacing-72);
  border-top: 1px solid var(--color-ash-border);
}
.stats--row > .stat { border-bottom: 0; }

/* ==========================================================================
   Case studies
   ========================================================================== */

.cases {
  margin-top: var(--spacing-72);
  border-top: 1px solid var(--color-ash-border);
}

.case {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--spacing-40);
  padding-block: var(--spacing-40) var(--spacing-56);
  border-bottom: 1px solid var(--color-ash-border);
}

/* Case Study Title Link — 33px, no underline, hover shifts to fog blue */
.case__title {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-regular);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.case__meta {
  padding-top: var(--spacing-20);
  color: var(--color-fog-blue);
  font-size: var(--text-body);
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.case__body {
  max-width: var(--measure);
  font-size: var(--text-body-sm);
  line-height: 1.5;
}

/* Title and its ghost service label stack in the left column; the detail
   sits opposite, so the eye reads headline → category → substance. */
.case__title { grid-column: 1; grid-row: 1; }
.case__meta  { grid-column: 1; grid-row: 2; padding-bottom: 10px; }
.case__body  { grid-column: 2; grid-row: 1 / span 2; }

@media (max-width: 860px) {
  .case { grid-template-columns: 1fr; gap: 0; }
  .case__title,
  .case__meta,
  .case__body { grid-column: 1; grid-row: auto; }
  .case__body { padding-top: var(--spacing-16); }
}

/* ==========================================================================
   Systems — tools
   ========================================================================== */

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-40);
  border-top: 1px solid var(--color-ash-border);
  padding-top: var(--spacing-40);
}

.tool__title {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-regular);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.tool__body {
  margin-top: 14px;
  color: var(--color-fog-blue);
  font-size: var(--text-body);
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.billable {
  margin-top: var(--spacing-72);
  padding-top: var(--spacing-40);
  border-top: 1px solid var(--color-ash-border);
}

.billable__body {
  max-width: 560px;
  margin-top: var(--spacing-20);
  font-size: var(--text-body-lg);
  line-height: 1.5;
  letter-spacing: -0.22px;
}

/* ==========================================================================
   Experience
   ========================================================================== */

.roles {
  margin-top: var(--spacing-72);
  border-top: 1px solid var(--color-ash-border);
}

.role {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--spacing-40);
  padding-block: var(--spacing-40) var(--spacing-56);
  border-bottom: 1px solid var(--color-ash-border);
}

.role__date {
  color: var(--color-fog-blue);
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.role__title {
  font-size: var(--text-heading-sm);
  font-weight: var(--font-weight-regular);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.role__org {
  margin-top: 7px;
  color: var(--color-fog-blue);
  font-size: var(--text-body);
  letter-spacing: -0.2px;
}

.role__points {
  max-width: 640px;
  margin-top: var(--spacing-20);
  display: grid;
  gap: 14px;
}

.role__points li {
  position: relative;
  padding-left: 22px;
  font-size: var(--text-body-sm);
  line-height: 1.5;
}

.role__points li::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 0;
  width: 10px;
  height: 1px;
  background: var(--color-fog-blue);
}

@media (max-width: 860px) {
  .role { grid-template-columns: 1fr; gap: var(--spacing-16); }
}

/* ==========================================================================
   About — the portrait sits on a Bone Card, the system's one inverted surface
   ========================================================================== */

.about {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.portrait {
  position: relative;
  border-radius: var(--radius-cards);
  overflow: hidden;
  /* Matches the video's own off-white ground (#e9eae8) so the frame edge
     dissolves — the card *is* the footage, not a container around it. */
  background: #e9eae8;
}

.portrait__video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  /* Lifts the source ground from #e8e9e6 toward Bone White */
  filter: brightness(1.06) saturate(0.97);
}

/* Bottom-left stays light (#e8–#ed) for the whole clip — the white shirt and
   ground both carry dark type. Sampled across frames before placing it here. */
.portrait__cap {
  position: absolute;
  bottom: var(--spacing-20);
  left: var(--spacing-20);
  color: var(--color-obsidian);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.15px;
}

.about__text {
  display: grid;
  gap: var(--spacing-20);
  padding-top: 6px;
}

.about__text h2 { margin-bottom: var(--spacing-20); }

.about__text p {
  max-width: 560px;
  font-size: var(--text-body-sm);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
}

/* ==========================================================================
   Capabilities + Credentials
   ========================================================================== */

.caps,
.creds {
  display: grid;
  gap: var(--spacing-56) var(--spacing-64);
}

.caps { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.creds { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.cap__list {
  font-size: var(--text-body-sm);
  line-height: 1.5;
}

.cred__body { display: grid; gap: 4px; }

.cred__lead {
  margin-top: var(--spacing-16);
  font-size: var(--text-body);
  line-height: 1.35;
  letter-spacing: -0.2px;
}
.cred__body > .cred__lead:first-child { margin-top: 0; }

.cred__meta {
  color: var(--color-fog-blue);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.15px;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  display: grid;
  gap: 0;
  margin-top: var(--spacing-72);
  border-top: 1px solid var(--color-ash-border);
}

.contact__link {
  padding-block: var(--spacing-20);
  border-bottom: 1px solid var(--color-ash-border);
  font-size: var(--text-heading-sm);
  line-height: 1.2;
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease),
              padding-left var(--dur) var(--ease);
}

.contact__link:hover {
  color: var(--color-fog-blue);
  padding-left: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding-bottom: var(--spacing-40);
}

.footer__rule {
  height: 1px;
  margin-top: 15px;
  background: var(--color-ash-border);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--spacing-16);
  padding-top: var(--spacing-20);
  font-size: 14px;
}

/* ==========================================================================
   Reveal — transform and opacity carry the transition, nothing else
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Stagger siblings inside a row so groups resolve as a sequence */
[data-reveal][style*='--i'] {
  transition-delay: calc(var(--i) * 0.08s);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero__video { opacity: 1; }
}
