/* Jean McDowell - Bauhaus Pure
   Type: Archivo Black (heavy grotesque) + Inter (body) by default
   Palette: red / yellow / blue / black on cream
*/

:root {
  --bg: #f2ece1;         /* cream */
  --ink: #0a0a0a;         /* near black */
  --ink-soft: #2a2a2a;
  --paper: #fbf7ee;
  --red: #d8331f;         /* Bauhaus red */
  --yellow: #f5c518;      /* Bauhaus yellow */
  --blue: #1f3fa3;        /* Bauhaus blue */
  --rule: 2px;
  --rule-thick: 4px;
  --grid-line: rgba(10,10,10,0.06);

  --display: "Archivo Black", "Druk", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

/* Focus styles: visible on keyboard nav, suppressed for mouse */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible,
.btn-ghost:focus-visible,
.contact-cta:focus-visible {
  outline-offset: 4px;
}

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
}

img,
svg,
canvas,
video {
  max-width: 100%;
  height: auto;
}

/* Faint construction grid behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 0;
  opacity: 1;
}

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

a,
button,
input {
  -webkit-tap-highlight-color: rgba(216, 51, 31, 0.2);
}

button,
.btn,
nav a {
  touch-action: manipulation;
}

/* Type */
.display {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.85;
  text-transform: uppercase;
}
.mono { font-family: var(--mono); font-feature-settings: "ss01" off; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Wordmark - two stacked lines so we can hide the tagline on mobile */
.hero-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.hero-brand-text .hero-brand-name,
.hero-brand-text .hero-brand-tagline {
  display: block;
}

/* Hamburger toggle: hidden on desktop, shown on mobile */
.hero-nav-toggle {
  display: none;
}

/* Layout primitives */
.frame {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}

@media (max-width: 720px) {
  .frame { padding: 0 20px; }
}

.section {
  position: relative;
  padding: 120px 0 80px;
  border-top: var(--rule-thick) solid var(--ink);
  background: var(--bg);
  z-index: 1;
}
.section:first-of-type { border-top: 0; }

.section-tag {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 56px;
  border-bottom: var(--rule) solid var(--ink);
  padding-bottom: 12px;
}
.section-tag .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.section-tag .name {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section-tag .meta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* Mechanical hover */
.mech {
  transition: transform 80ms steps(2, end), background 80ms steps(2, end), color 80ms steps(2, end);
}
.mech:hover {
  transform: translate(-2px, -2px);
}

/* Primary button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: var(--rule) solid var(--ink);
  cursor: pointer;
  position: relative;
  min-height: 44px;
}
.btn:hover,
.btn:focus-visible {
  background: var(--red);
  color: var(--paper);
  border-color: var(--ink);
}
.btn .arrow { display: inline-block; transition: transform 200ms cubic-bezier(.2,.8,.2,1); }
.btn:hover .arrow,
.btn:focus-visible .arrow { transform: translateX(4px); }

/* Ghost button: secondary action */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  cursor: pointer;
  min-height: 44px;
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* Nav links */
.nav-link {
  position: relative;
  padding: 6px 2px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

/* Color swatches */
.sw-red { background: var(--red); }
.sw-yel { background: var(--yellow); }
.sw-blu { background: var(--blue); }
.sw-ink { background: var(--ink); }

/* Marquee for hero ticker */
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Type-on cursor */
.caret::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  animation: blink 0.9s steps(2, end) infinite;
  color: var(--red);
}
@keyframes blink { 50% { opacity: 0; } }

/* Geometric loader: line draw */
@keyframes draw {
  from { stroke-dashoffset: var(--len, 1000); }
  to { stroke-dashoffset: 0; }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.6,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Selection */
::selection { background: var(--yellow); color: var(--ink); }

/* Card grid base */
.grid {
  display: grid;
  gap: 0;
}

/* Big type sizing */
.h-mega { font-size: clamp(80px, 16vw, 260px); }
.h-1 { font-size: clamp(48px, 7vw, 120px); }
.h-2 { font-size: clamp(32px, 4vw, 64px); }
.h-3 { font-size: clamp(22px, 2.4vw, 36px); }

/* Utility */
.flex { display: flex; }
.col { flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-24 { gap: 24px; } .gap-48 { gap: 48px; }
.full { width: 100%; }
.rel { position: relative; }
.abs { position: absolute; }
.uppercase { text-transform: uppercase; }
.thin-rule { border-bottom: var(--rule) solid var(--ink); }

@media (hover: none) {
  .mech:hover {
    transform: none;
  }
}

/* Contact CTAs */
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  border: 3px solid var(--paper);
  font-family: var(--display);
  text-transform: none;
  letter-spacing: -0.01em;
  transition: background 200ms ease, color 200ms ease, transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease;
  cursor: pointer;
  min-height: 56px;
  word-break: break-word;
}
.contact-cta__arrow {
  display: inline-block;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}
.contact-cta:hover,
.contact-cta:focus-visible {
  transform: translate(-3px, -3px);
}
.contact-cta:hover .contact-cta__arrow,
.contact-cta:focus-visible .contact-cta__arrow {
  transform: translateX(6px);
}
.contact-cta--primary {
  background: var(--paper);
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 28px);
}
.contact-cta--primary:hover,
.contact-cta--primary:focus-visible {
  background: var(--red);
  color: var(--paper);
  box-shadow: 8px 8px 0 var(--red);
}
.contact-cta--secondary {
  background: transparent;
  color: var(--paper);
  font-size: clamp(15px, 1.6vw, 20px);
}
.contact-cta--secondary:hover,
.contact-cta--secondary:focus-visible {
  background: var(--blue);
  color: var(--paper);
  box-shadow: 8px 8px 0 var(--blue);
}

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

/* Mobile: hide "Established 2026" tagline below 768px to prevent wordmark overlap */
@media (max-width: 768px) {
  .hero-brand-text .hero-brand-tagline {
    display: none;
  }
}

@media (max-width: 860px) {
  body::before {
    background-size: 48px 48px;
  }
  .frame {
    padding: 0 18px;
  }
  .section {
    padding: 72px 0 56px !important;
  }
  .section-tag {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 32px;
    padding-bottom: 10px;
  }
  .section-tag .meta {
    flex-basis: 100%;
    margin-left: 0;
    font-size: 10px;
    line-height: 1.35;
  }
  .h-mega {
    font-size: clamp(54px, 20vw, 82px);
  }
  .h-1 {
    font-size: clamp(42px, 15vw, 72px);
  }
  .h-2 {
    font-size: clamp(28px, 8.5vw, 44px);
  }
  .hero {
    min-height: auto !important;
    padding: 18px 18px 0 !important;
  }
  .hero-top {
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .hero-brand {
    flex: 0 0 auto;
    max-width: 148px;
    gap: 8px !important;
  }
  .hero-brand > svg {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
  }
  .hero-brand-text {
    font-size: 9px !important;
    letter-spacing: 0.11em !important;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  /* Mobile: hide inline nav, show hamburger toggle */
  .hero-nav-toggle {
    display: inline-flex !important;
    margin-left: auto;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .hero-nav-wrap .hero-nav {
    display: none !important;
  }
  .hero-nav-wrap .hero-nav.open {
    display: flex !important;
    flex-direction: column !important;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--paper);
    border: 3px solid var(--ink);
    padding: 16px 22px;
    gap: 6px !important;
    z-index: 20;
    font-size: 13px !important;
    letter-spacing: 0.14em !important;
    box-shadow: 6px 6px 0 var(--ink);
    min-width: 240px;
    margin: 0 !important;
    max-width: none !important;
    align-items: stretch !important;
  }
  .hero-nav-wrap .hero-nav.open a {
    min-height: 40px;
    padding: 6px 0;
    text-align: right;
    justify-content: flex-end !important;
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
  }
  .hero-copy {
    margin-top: 12vh !important;
    margin-bottom: 28px !important;
    gap: 0 !important;
  }
  .hero-title {
    max-width: 100%;
    letter-spacing: -0.045em !important;
    line-height: 0.82 !important;
    overflow-wrap: normal;
    word-break: keep-all;
  }
  .hero-title .split-line {
    white-space: nowrap;
  }
  .hero-title svg {
    width: clamp(44px, 18vw, 68px) !important;
    height: clamp(44px, 18vw, 68px) !important;
  }
  .hero-intro-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    margin-top: 24px !important;
    align-items: start !important;
  }
  .hero-intro {
    width: min(100%, 380px);
    max-width: 100% !important;
    padding: 18px 18px 20px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-left: 4px solid var(--yellow);
    font-size: 16px !important;
    line-height: 1.45 !important;
  }
  .hero-intro .eyebrow {
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: 0.14em;
  }
  .hero-actions {
    align-items: stretch;
    width: min(100%, 380px);
  }
  .hero-actions .btn {
    min-height: 48px;
    justify-content: center;
  }
  .hero-actions a:not(.btn) {
    min-height: 36px;
    text-align: left !important;
  }
  .hero-art {
    opacity: 0.7;
  }
  .hero-shape {
    transform-origin: center;
  }
  .hero-shape-1 {
    width: 180px !important;
    height: 180px !important;
    left: 58% !important;
    top: 18% !important;
  }
  .hero-shape-2 {
    width: 160px !important;
    height: 160px !important;
    left: -6% !important;
    top: 52% !important;
  }
  .hero-shape-3 {
    width: 150px !important;
    height: 150px !important;
    left: 52% !important;
    top: 62% !important;
  }
  .hero-shape-4 {
    width: 96px !important;
    height: 96px !important;
    left: 4% !important;
    top: 4% !important;
  }

  #about .about-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  #about .about-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #about .about-aside {
    position: static !important;
  }

  #work .role-grid,
  #capabilities .cap-grid {
    grid-template-columns: 1fr !important;
  }
  #work .role-grid {
    border-top-width: 2px !important;
    border-left-width: 2px !important;
  }
  #work .role-grid > .role-card {
    min-height: 240px !important;
    padding: 22px 20px !important;
  }
  #work .display {
    font-size: clamp(22px, 8vw, 30px) !important;
  }
  /* Selected Campaigns - stack to single column on mobile, drop the right border */
  #work .selected-campaigns-grid {
    grid-template-columns: 1fr !important;
  }
  #work .selected-campaigns-grid > div {
    border-right: none !important;
    border-bottom: 2px solid var(--ink);
  }
  #work .selected-campaigns-grid > div:last-child {
    border-bottom: none;
  }

  #capabilities .flex.col.gap-48 {
    gap: 36px;
  }
  #capabilities .cap-grid > .cap-card {
    min-height: 160px !important;
  }

  #contact .contact-cta {
    display: flex !important;
    width: 100%;
    justify-content: space-between;
    gap: 14px !important;
    padding: 18px 18px !important;
    overflow-wrap: anywhere;
  }
  #contact .contact-cta--primary {
    font-size: clamp(18px, 5.6vw, 24px) !important;
  }
  #contact .contact-cta--secondary {
    font-size: clamp(15px, 4.6vw, 19px) !important;
  }
  #contact .contact-meta-grid {
    grid-template-columns: 1fr !important;
    margin-top: 44px !important;
    gap: 20px !important;
  }

  .site-footer {
    padding-inline: 18px !important;
  }
}

@media (max-width: 420px) {
  .frame {
    padding: 0 16px;
  }
  .hero {
    padding-inline: 16px !important;
  }
  .hero-brand {
    max-width: 128px;
  }
  .hero-nav-wrap .hero-nav.open {
    min-width: calc(100vw - 32px);
    right: 0;
  }
  .hero-copy {
    margin-top: 11vh !important;
  }
  .hero-shape-1 {
    left: 55% !important;
  }
  .hero-shape-2 {
    width: 150px !important;
    height: 150px !important;
  }
  .hero-intro {
    padding: 16px;
  }
  #about .about-metrics {
    grid-template-columns: 1fr !important;
  }
  .site-footer {
    padding-inline: 16px !important;
  }
}
