/* =============================================
   LOOK SERIOUS — Design Tokens & Full Site Styles
   ============================================= */

:root {
  --font-display: 'Clash Display', 'Arial Black', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;

  /* Fluid Type Scale */
  --text-xs:   clamp(0.6875rem, 0.65rem + 0.2vw, 0.8125rem);
  --text-sm:   clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Colors — Dark palette */
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-surface-2: #1c1c1c;
  --color-surface-alt: #111114;
  --color-surface-alt-hover: #18181c;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #e8e6e1;
  --color-text-muted: rgba(232, 230, 225, 0.7);
  --color-text-faint: rgba(232, 230, 225, 0.4);
  --color-accent: #E05A2B;
  --color-accent-hover: #F06B3A;
}

/* =============================================
   GLOBAL LAYOUT
   ============================================= */

.page-wrapper {
  overflow-x: hidden;
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (max-width: 768px) {
  .container { padding-inline: var(--space-4); }
}

/* =============================================
   NAVIGATION
   ============================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--color-text);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.nav-logo span {
  font-weight: 300;
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease-out);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: inherit;
}

@media (max-width: 768px) {
  .nav { padding: var(--space-4); }
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 200;
    padding: var(--space-32) var(--space-6);
    gap: var(--space-6);
  }

  .nav-links.active a {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: -0.02em;
  }
}

/* =============================================
   HERO (Homepage)
   ============================================= */

.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-32) var(--space-6) var(--space-12);
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}

/* Grid texture layer */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 70%);
  z-index: 0;
}

/* Grain overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

/* Dark gradient vignette over texture */
.hero > * {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-12);
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 2rem + 10vw, 12rem);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}

.hero-headline .accent {
  color: var(--color-accent);
  display: inline;
}

.hero-sub {
  margin-top: var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  font-weight: 400;
  color: var(--color-accent);
  letter-spacing: -0.01em;
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) 0.5s forwards;
}

.hero-support {
  margin-top: var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  max-width: 40ch;
  line-height: 1.6;
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) 0.7s forwards;
}

.hero-tagline {
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-muted);
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) 0.8s forwards;
}

/* Pixel Zebra */
.hero-zebra {
  flex-shrink: 0;
  width: clamp(140px, 15vw, 240px);
  opacity: 0;
  animation: zebra-reveal 1s var(--ease-out) 0.8s forwards;
  align-self: center;
}

.zebra-img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1) brightness(1.1) contrast(1.2);
  image-rendering: pixelated;
}

@keyframes zebra-reveal {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 0.85; transform: scale(1); }
}

@media (max-width: 768px) {
  .hero-content {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: var(--space-8);
  }
  .hero-zebra {
    width: 100px;
    align-self: flex-end;
  }
}

.hero-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) 0.9s forwards;
}

.hero-scroll {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.4;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero-scroll svg {
  width: 14px;
  height: 14px;
  animation: bounce-down 2s var(--ease-in-out) infinite;
}

/* Hero word reveal animation */
.hero-headline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: word-reveal 0.8s var(--ease-out) forwards;
}
.hero-headline .word:nth-child(1) { animation-delay: 0.1s; }
.hero-headline .word:nth-child(2) { animation-delay: 0.25s; }

@keyframes word-reveal {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* =============================================
   MARQUEE DIVIDER
   ============================================= */

.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-3) 0;
  position: relative;
  background: var(--color-bg);
}

/* Subtle gradient borders — top and bottom */
.marquee::before,
.marquee::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(224, 90, 43, 0.12) 20%,
    rgba(224, 90, 43, 0.25) 50%,
    rgba(224, 90, 43, 0.12) 80%,
    transparent 100%
  );
}

.marquee::before { top: 0; }
.marquee::after { bottom: 0; }

.marquee-track {
  display: inline-flex;
  animation: marquee-scroll 30s linear infinite;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  padding-right: var(--space-8);
}

.marquee-track span .sep {
  color: var(--color-accent);
  padding: 0 var(--space-3);
  font-size: 0.6em;
  vertical-align: middle;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =============================================
   SECTION
   ============================================= */

.section {
  padding-block: clamp(var(--space-12), 5vw, var(--space-20));
}

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

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-6);
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.section-subtext {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-10);
}

.underline-reveal {
  color: var(--color-text);
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-size: 0% 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.reveal.visible .underline-reveal {
  background-size: 100% 2px;
}

/* =============================================
   SERVICES GRID
   ============================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border);
}

.service-card {
  background: var(--color-bg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: background 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

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

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

.section--alt .service-card:hover { background: var(--color-surface-alt-hover); }

.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.service-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 36ch;
}

.service-card .service-number-badge {
  margin-top: auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-faint);
  background: transparent;
  transition: all 0.4s var(--ease-out);
}

.service-card:hover .service-number-badge {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: var(--space-6); }
}

/* =============================================
   WORK PREVIEW CARDS (Homepage)
   ============================================= */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.work-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  cursor: pointer;
}

.work-card .work-color-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: clip-path 0.7s var(--ease-out);
  clip-path: inset(0 0 0 0);
}

.work-card:hover .work-color-overlay {
  clip-path: inset(0 0 100% 0);
}

.work-card .work-color-overlay .work-logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: opacity 0.3s var(--ease-out);
}

.work-card:hover .work-color-overlay .work-logo-text {
  opacity: 0;
}

.work-card .work-thumb {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-2);
}

.work-card .work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.work-card:hover .work-thumb img {
  transform: scale(1.04);
}

.work-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(to top, rgba(10,10,10,0.9) 0%, transparent 100%);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease-out);
}

.work-card:hover .work-card-info {
  transform: translateY(0);
  opacity: 1;
}

.work-card-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.work-card-info .work-tags {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: var(--space-1);
}

.work-card.featured {
  grid-column: span 2;
  aspect-ratio: 21 / 9;
}

@media (max-width: 768px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card.featured { grid-column: span 1; aspect-ratio: 4 / 3; }
}

/* =============================================
   MANIFESTO
   ============================================= */

.manifesto {
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
  text-align: center;
}

.manifesto blockquote {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin-inline: auto;
}

.manifesto blockquote .accent {
  color: var(--color-accent);
}

.manifesto .manifesto-label {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  text-align: center;
}

/* =============================================
   LINK ARROW
   ============================================= */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: gap 0.3s var(--ease-out);
}

.link-arrow:hover {
  gap: var(--space-3);
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease-out);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

/* =============================================
   ABOUT CONTENT
   ============================================= */

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  padding-block: var(--space-12);
}

.about-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.about-content p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
  .about-content { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* =============================================
   INTRO WITH HEADSHOT
   ============================================= */

.intro-with-headshot {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-10);
  align-items: start;
}

.headshot-block {
  position: relative;
}

.headshot-placeholder {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 5;
}

.headshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.headshot-caption {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  letter-spacing: 0.02em;
}

.headshot-caption span {
  color: var(--color-text-faint);
  margin: 0 0.35em;
}

@media (max-width: 768px) {
  .intro-with-headshot {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .headshot-block {
    order: -1;
    max-width: 200px;
  }
}

/* =============================================
   POWER IMAGE PLACEHOLDER
   ============================================= */

.power-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.power-image-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* =============================================
   WAFFLE CHART — What We Do (warm tan section)
   ============================================= */

.waffle-wrapper {
  position: relative;
  background:
    linear-gradient(
      168deg,
      #f0e6d6 0%,
      #e8dcc8 35%,
      #f5ead8 60%,
      #ede0cc 100%
    );
  overflow: hidden;
}

/* Sunlight wash — warm glow from top-right */
.waffle-wrapper::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 70%;
  height: 80%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 220, 160, 0.45) 0%,
    rgba(255, 200, 120, 0.15) 40%,
    transparent 70%
  );
  pointer-events: none;
}

/* Film grain overlay */
.waffle-grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.waffle-intro {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: rgba(30, 20, 10, 0.5);
  max-width: 900px;
  margin: 0 auto var(--space-6);
  text-align: center;
  letter-spacing: -0.01em;
}

.waffle-section {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

/* 20 cols × 5 rows — 16:9ish landscape */
.waffle-grid {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 3px;
  width: 100%;
}

.waffle-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--cell-color, rgba(224, 90, 43, 1));
  opacity: 0;
  transform: scale(0);
  animation: waffleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition: opacity 0.3s ease, transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

@keyframes waffleIn {
  to { opacity: 1; transform: scale(1); }
}

.waffle-cell.dim {
  opacity: 0.25;
  transform: scale(0.88);
}

/* Horizontal inline legend below the grid */
.waffle-legend {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.waffle-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: default;
  transition: opacity 0.3s ease;
}

.waffle-legend-item.dim {
  opacity: 0.2;
}

.waffle-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.waffle-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: rgba(30, 20, 10, 0.6);
  letter-spacing: 0.01em;
}

.waffle-pct {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a1008;
}

@media (max-width: 768px) {
  .waffle-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
  }
  .waffle-legend {
    gap: var(--space-2) var(--space-4);
    margin-top: var(--space-4);
  }
  .waffle-label {
    font-size: 0.65rem;
  }
  .waffle-pct {
    font-size: 0.65rem;
  }
  .waffle-intro {
    font-size: var(--text-sm);
  }
}

/* =============================================
   TOOLBOX
   ============================================= */

.toolbox-prose {
  max-width: 60ch;
}

.toolbox-prose p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.85;
  margin-bottom: var(--space-6);
}

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

.tool-hl {
  color: var(--color-text);
  font-weight: 500;
  border-bottom: 1px solid rgba(224, 90, 43, 0.3);
  transition: border-color 0.25s var(--ease-out);
}

.tool-hl:hover {
  border-color: var(--color-accent);
}

/* =============================================
   PAGE HERO (Internal pages)
   ============================================= */

.page-hero {
  padding-top: clamp(var(--space-20), 10vw, var(--space-24));
  padding-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.page-hero .subtitle {
  margin-top: var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 50ch;
}

/* =============================================
   CASE STUDY CARDS — Work Page
   ============================================= */

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.case-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  cursor: pointer;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.case-card-img {
  aspect-ratio: 16 / 10;
  background: var(--color-surface-2);
  overflow: hidden;
}

.case-card-img > div {
  width: 100%;
  height: 100%;
  transition: transform 0.6s var(--ease-out);
}

.case-card:hover .case-card-img > div {
  transform: scale(1.03);
}

.case-card-body {
  padding: var(--space-6);
}

.case-card-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

.case-card-body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.case-tag {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.case-card.featured .case-card-img {
  aspect-ratio: 21 / 9;
}

@media (max-width: 768px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-card.featured { grid-column: span 1; }
  .case-card.featured .case-card-img { aspect-ratio: 16 / 10; }
}

/* =============================================
   CTA SECTION
   ============================================= */

.cta-section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
  text-align: center;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-6);
}

.cta-section p {
  font-size: var(--text-base);
  color: var(--color-text);
  opacity: 0.6;
  max-width: 42ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  transition: background var(--transition-interactive), transform var(--transition-interactive);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* =============================================
   HIRE FORM
   ============================================= */

.hire-form {
  max-width: 600px;
  margin-top: var(--space-8);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--transition-interactive);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea { min-height: 140px; resize: vertical; }

/* =============================================
   BOS PAGE STYLES
   ============================================= */

.bos-hero {
  min-height: 80dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-24) var(--space-6) var(--space-12);
  position: relative;
  overflow: hidden;
}

/* Fine grid texture */
.bos-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Dark gradient overlay with subtle color splash */
.bos-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(224, 90, 43, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(79, 156, 247, 0.04) 0%, transparent 60%),
    linear-gradient(180deg, var(--color-bg) 0%, transparent 30%, transparent 70%, var(--color-bg) 100%);
  pointer-events: none;
  z-index: 0;
}

.bos-hero > * {
  position: relative;
  z-index: 1;
}

.bos-badge {
  display: inline-flex;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-8);
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) 0.1s forwards;
}

.bos-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) 0.2s forwards;
}

.bos-subtitle {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) 0.35s forwards;
}

.bos-desc {
  margin-top: var(--space-6);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 52ch;
  line-height: 1.7;
  opacity: 0;
  animation: fade-up 0.6s var(--ease-out) 0.5s forwards;
}

/* Problem section */
.problem-headline {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.problem-body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 60ch;
  margin-bottom: var(--space-8);
}

.problem-pivot {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.4;
  max-width: 55ch;
  padding-left: var(--space-6);
  border-left: 3px solid var(--color-accent);
}

/* Systems grid */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-10);
}

.system-card {
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease-out);
}

.system-card:hover { border-color: var(--color-accent); }

.system-card .sys-num {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

.system-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: var(--space-3) 0;
}

.system-card .sys-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  font-style: italic;
}

.system-card ul {
  list-style: none;
  padding: 0;
}

.system-card ul li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--color-border);
}

.system-card ul li:last-child { border-bottom: none; }

@media (max-width: 1024px) { .systems-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .systems-grid { grid-template-columns: 1fr; } }

/* Process steps */
.process-steps { margin-top: var(--space-10); }

.process-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-8);
  align-items: baseline;
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-border);
}

.process-step:first-child { border-top: 1px solid var(--color-border); }

.step-num {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-border);
  opacity: 0.5;
  line-height: 1;
}

.step-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.step-content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 50ch;
}

.step-timeline {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .process-step { grid-template-columns: 1fr; gap: var(--space-2); }
  .step-num { font-size: var(--text-xl); }
}

/* Deliverables grid */
.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-10);
}

.deliverable-card {
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.deliverable-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

.deliverable-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

@media (max-width: 640px) { .deliverables-grid { grid-template-columns: 1fr; } }

/* Fit qualifier */
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.fit-col h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.fit-col.fit-yes h3 { color: var(--color-accent); }
.fit-col.fit-no h3 { color: var(--color-text-faint); }

.fit-col ul { list-style: none; padding: 0; }

.fit-col ul li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.5;
}

.fit-col ul li:last-child { border-bottom: none; }

@media (max-width: 640px) { .fit-grid { grid-template-columns: 1fr; } }

/* =============================================
   FOOTER
   ============================================= */

.footer {
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.footer-brand span { font-weight: 300; }

.footer-links {
  display: flex;
  gap: var(--space-8);
}

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
  opacity: 0.6;
  padding: var(--space-1) 0;
  transition: opacity var(--transition-interactive);
}

.footer-col a:hover { opacity: 1; }

.footer-bottom {
  max-width: var(--content-wide);
  margin-inline: auto;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: var(--space-6); }
  .footer-bottom { flex-direction: column; gap: var(--space-2); }
}

/* =============================================
   SCROLL REVEAL
   ============================================= */

/* Snap-in reveal — fast, decisive, clip-feel */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.03s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.07s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.11s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.15s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.19s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.23s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.27s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.31s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   BOS — SCREENCAST, PARALLAX & INLINE IMAGES
   ============================================= */

/* Full-bleed screencast — seamless with hero bg */
.bos-screencast {
  position: relative;
  width: 100%;
  padding: 0 var(--space-6) var(--space-16);
  background: var(--color-bg);
}

.bos-screencast-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  position: relative;
}

.bos-screencast-headline {
  position: absolute;
  top: var(--space-6);
  left: var(--space-6);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0.15;
  will-change: opacity;
}

.bos-screencast-headline span {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, var(--text-3xl));
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1.05;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.bos-screencast-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0d0820, #1a0d2a, #0f172a);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.96);
  will-change: opacity, transform;
}

/* Animated border trace — draws clockwise driven by scroll */
.bos-screencast-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
              conic-gradient(
                from 0deg,
                var(--color-accent) 0%,
                var(--color-accent) var(--border-progress, 0%),
                rgba(255,255,255,0.04) var(--border-progress, 0%),
                rgba(255,255,255,0.04) 100%
              ) border-box;
  pointer-events: none;
  z-index: 2;
}

/* Register custom property for transition */
@property --border-progress {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

/* Shared placeholder label */
.placeholder-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--space-4);
}

/* Inline image blocks within content sections */
.bos-inline-image {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.bos-inline-placeholder {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Full-bleed parallax image break */
.bos-parallax {
  width: 100%;
  height: 50vh;
  min-height: 320px;
  max-height: 560px;
  overflow: hidden;
  position: relative;
}

.bos-parallax-inner {
  position: absolute;
  inset: -20% 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Parallax effect via scroll — CSS-only with fixed attachment */
@supports (background-attachment: fixed) {
  .bos-parallax-inner {
    background-attachment: fixed;
  }
}

@media (max-width: 768px) {
  .bos-screencast {
    padding: var(--space-8) var(--space-4);
  }
  .bos-screencast-headline {
    top: var(--space-4);
    left: var(--space-4);
  }
  .bos-screencast-headline span {
    font-size: var(--text-xl);
  }
  .bos-parallax {
    height: 35vh;
    min-height: 200px;
  }
}
