/* ==========================================================================
   Design tokens - see design.md
   Punctuation: no em/en dashes in copy; use spaced hyphen ( - ) only.
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-surface: #f7f7f5;
  --color-border: #e2e2e0;
  --color-text-primary: #111111;
  --color-text-body: #333333;
  --color-text-muted: #888888;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 96px;
  --space-xxl: 180px;
  --space-gutter: 80px;
  --space-gutter-mobile: 24px;
  --space-section-y: var(--space-xl);
  --space-hero-top: var(--space-lg);
  --space-hero-bottom: 48px;
  --space-card-padding: 24px;

  /* Vertical rhythm between blocks (8px grid) */
  --stack-tight: 8px;
  --stack-default: 16px;
  --stack-relaxed: 24px;
  --stack-section: 32px;

  --content-max: 1100px;
  --body-copy-max: 640px;
  --headline-max: 560px;

  --font-display: "IBM Plex Sans", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Type scale  -  display, subhead, body, meta */
  --type-eyebrow: 11px;
  --type-body: 15px;
  --type-small: 13px;
  --type-ui: 13px;
  --type-subhead: 18px;
  --type-display: clamp(26px, 2.8vw, 34px);
  --type-display-hero: clamp(32px, 3.5vw, 44px);
  --type-line-body: 1.65;
  --type-line-small: 1.55;
  --type-line-display: 1.1;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: var(--type-line-body);
  color: var(--color-text-body);
  background: var(--color-bg);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Layout  -  sections & content width
   ========================================================================== */

.section {
  padding: var(--space-section-y) var(--space-gutter);
}

.section--surface {
  background: var(--color-surface);
}

.section--follow-hero {
  padding-top: var(--space-lg);
}

.section__inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Section eyebrow */
.eyebrow {
  display: block;
  margin: 0 0 var(--stack-default);
  font-family: var(--font-mono);
  font-size: var(--type-eyebrow);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Display headlines  -  hero + section H2 */
.headline {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--type-line-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.pov__kicker {
  margin: 0 0 var(--stack-tight);
  max-width: var(--headline-max);
  font-family: var(--font-display);
  font-size: var(--type-subhead);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text-primary);
}

.section-headline {
  margin: 0 0 var(--stack-relaxed);
  max-width: var(--headline-max);
  font-size: var(--type-display);
}

/* Body copy  -  one size */
.prose {
  margin: 0 0 var(--stack-relaxed);
  max-width: var(--body-copy-max);
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: var(--type-line-body);
  color: var(--color-text-body);
}

.prose:last-child {
  margin-bottom: 0;
}

.prose--lead {
  color: var(--color-text-primary);
}

.prose--narrow {
  max-width: var(--body-copy-max);
}

.pov__research {
  color: var(--color-text-primary);
}

.honest-limit {
  margin-top: var(--stack-section);
  color: var(--color-text-primary);
}

.eyebrow + .card-grid,
.eyebrow + .about-grid {
  margin-top: calc(var(--stack-section) - var(--stack-default));
}

.prose + .card-grid {
  margin-top: calc(var(--stack-section) - var(--stack-relaxed));
}

/* ==========================================================================
   CTA button
   ========================================================================== */

.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  border: 1.5px solid var(--color-text-primary);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--type-ui);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cta:hover {
  background: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: var(--color-bg);
  text-decoration: none;
}

/* ==========================================================================
   Card grid (POV + Work)
   ========================================================================== */

.card-grid {
  display: grid;
  gap: var(--space-md);
  margin-top: 0;
}

.card-grid--pov {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid--work {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: var(--space-card-padding);
  transition: border-color 0.15s ease;
}

.pov-card {
  background: var(--color-surface);
}

.section--surface .work-card {
  background: var(--color-bg);
}

.card:hover {
  border-color: var(--color-text-primary);
}

/* Card titles (POV + work) */
.pov-card__title,
.work-card__company {
  margin: 0 0 var(--stack-tight);
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text-primary);
}

.pov-card__text,
.work-card__descriptor {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 400;
  line-height: var(--type-line-small);
  color: var(--color-text-body);
}

.work-card__company {
  margin-bottom: var(--stack-default);
}

.work-card__descriptor {
  margin-bottom: var(--stack-section);
}

/* Work cards */
button.work-card {
  appearance: none;
  -webkit-appearance: none;
}

.work-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.work-card__tag {
  display: block;
  margin: 0 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--type-eyebrow);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.work-card__descriptor {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: auto;
}

.pill {
  font-family: var(--font-mono);
  font-size: var(--type-eyebrow);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  background: var(--color-surface);
  color: var(--color-text-body);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  display: inline-block;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.work-card:hover .pill {
  background: var(--color-bg);
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

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

.hero {
  display: block;
}

.hero.section {
  padding: var(--space-hero-top) var(--space-gutter) var(--space-hero-bottom);
}

.hero__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.hero-headline {
  margin: 0 0 var(--stack-default);
  max-width: 100%;
  font-size: var(--type-display-hero);
  line-height: var(--type-line-display);
}

.hero-headline__primary,
.hero-headline__accent {
  display: block;
}

.hero-headline__accent {
  color: var(--color-text-muted);
}

@media (min-width: 769px) {
  .hero-headline__primary,
  .hero-headline__accent {
    white-space: nowrap;
  }
}

.hero__lede {
  margin: 0 0 var(--stack-tight);
}

.hero__prompt {
  margin: 0 0 var(--stack-section);
  max-width: var(--body-copy-max);
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: var(--type-line-body);
  color: var(--color-text-primary);
}

.hero__cta-wrap {
  margin: 0;
}

.logo-bar {
  margin-top: var(--stack-section);
}

.logo-bar__label {
  display: block;
  margin: 0 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--type-eyebrow);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.logo-bar__img {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 9100 / 1068;
  object-fit: contain;
  object-position: left center;
  filter: grayscale(100%);
  opacity: 0.4;
}

/* ==========================================================================
   About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: var(--space-lg);
  align-items: start;
}

.about__toggle {
  display: inline-block;
  margin-top: var(--stack-section);
  font-family: var(--font-mono);
  font-size: var(--type-ui);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.about__toggle:hover {
  color: var(--color-text-muted);
  text-decoration: underline;
}

.about__expanded {
  margin-top: var(--stack-section);
}

.about__expanded[hidden] {
  display: none;
}

.about__expanded .prose {
  margin-bottom: var(--stack-relaxed);
}

.about__expanded p:last-child {
  margin-bottom: 0;
}

.about__expanded a {
  color: var(--color-text-primary);
}

.about__expanded a:hover {
  color: var(--color-text-muted);
}

.about__photo-img {
  width: 100%;
  height: auto;
  border-radius: 3px;
}

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

.contact-headline {
  margin: 0 0 var(--stack-relaxed);
  max-width: var(--headline-max);
  font-size: var(--type-display);
}

.contact__intro {
  margin: 0 0 var(--stack-section);
  max-width: var(--body-copy-max);
  color: var(--color-text-body);
}

.contact__cta-wrap {
  margin: 0;
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-gutter);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  max-width: var(--content-max);
  margin: 0 auto;
}

.site-footer__brand {
  font-family: var(--font-mono);
  font-size: var(--type-eyebrow);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  font-family: var(--font-mono);
  font-size: var(--type-ui);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--color-text-muted);
  text-decoration: underline;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  position: relative;
  width: 90vw;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 48px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-overlay.is-open .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-family: "Inter", sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-primary);
  transition: all 0.15s ease;
}

.modal-close:hover {
  text-decoration: none;
  color: var(--color-text-muted);
}

.modal-content[hidden] {
  display: none;
}

.modal-content__title {
  margin: 0 0 var(--stack-section);
  padding-right: var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--type-display);
  font-weight: 600;
  line-height: var(--type-line-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}

.modal-content h3 {
  margin: var(--space-md) 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--type-eyebrow);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.modal-content p {
  margin: 0 0 var(--stack-default);
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 400;
  line-height: var(--type-line-small);
  color: var(--color-text-body);
}

.modal-content__note {
  margin-top: var(--stack-section);
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 400;
  line-height: var(--type-line-small);
  color: var(--color-text-muted);
}

.modal-placeholder {
  margin: var(--stack-section) 0;
  padding: var(--stack-section);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: var(--type-small);
  line-height: var(--type-line-small);
  color: var(--color-text-muted);
}

.modal-figure {
  margin: var(--space-md) 0 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 3px;
}

.modal-figure__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.modal-video {
  margin: var(--space-md) 0 0;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.modal-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 900px) {
  .card-grid--pov {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --space-section-y: var(--space-lg);
    --space-gutter: var(--space-gutter-mobile);
    --space-hero-bottom: 40px;
  }

  .section {
    padding: var(--space-section-y) var(--space-gutter);
  }

  .hero.section {
    padding: var(--space-section-y) var(--space-gutter) var(--space-hero-bottom);
  }

  .hero-headline {
    font-size: clamp(28px, 7vw, 36px);
  }

  .card-grid {
    gap: var(--stack-relaxed);
  }

  .card-grid--pov,
  .card-grid--work {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about__photo {
    max-width: 280px;
  }

  .logo-bar__img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: none;
  }

  .site-footer {
    padding: var(--space-md) var(--space-gutter);
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-overlay {
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100%;
    border-radius: 0;
    border: none;
    padding: var(--space-gutter);
  }
}
