:root {
  --bg: #f8f7f4;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #666761;
  --line: #dedbd3;
  --accent: #8b5d33;
  --accent-soft: #efe4d7;
  --max-width: 1180px;
  --space: clamp(72px, 10vw, 136px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(17, 17, 17, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 17, 17, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a { color: inherit; text-decoration: none; }
p { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.75; }
h1, h2, h3 { margin: 0; letter-spacing: -0.055em; line-height: 0.96; }
h1 { font-size: clamp(4rem, 11vw, 9.5rem); max-width: 920px; }
h2 { font-size: clamp(2.45rem, 5vw, 5.4rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.85rem); letter-spacing: -0.035em; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(222, 219, 211, 0.72);
  background: rgba(248, 247, 244, 0.82);
  backdrop-filter: blur(18px);
}

.brand, .nav-links { display: flex; align-items: center; gap: 14px; }
.brand { font-weight: 650; letter-spacing: -0.02em; }
.brand-mark { width: 16px; height: 16px; border: 1px solid var(--ink); display: inline-block; background: linear-gradient(135deg, transparent 48%, var(--ink) 49%, var(--ink) 54%, transparent 55%); }
.nav-links { gap: clamp(14px, 3vw, 34px); color: var(--muted); font-size: 0.92rem; }
.nav-links a:hover { color: var(--ink); }

.section-shell { max-width: var(--max-width); margin: 0 auto; padding: var(--space) clamp(20px, 4vw, 56px); }
.hero { min-height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); align-items: center; gap: clamp(44px, 7vw, 96px); }
.eyebrow, .section-kicker { margin: 0 0 22px; color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.hero-subtitle { max-width: 690px; margin: 28px 0 0; font-size: clamp(1.25rem, 2vw, 1.75rem); color: #34342f; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid var(--ink); border-radius: 999px; font-weight: 650; transition: transform 180ms ease, background 180ms ease, color 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ink); color: var(--paper); }
.button-secondary { color: var(--ink); background: rgba(255, 255, 255, 0.38); }

.sequential-composition { position: relative; min-height: 520px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 40px 100px rgba(17,17,17,.08); overflow: hidden; }
.panel { position: absolute; border: 1px solid #171713; background: #fdfcf8; }
.panel-large { left: 8%; top: 8%; width: 48%; height: 38%; }
.panel-tall { right: 9%; top: 8%; width: 28%; height: 62%; background: #f7f4ee; }
.panel-small { left: 8%; bottom: 10%; width: 23%; height: 28%; }
.panel-wide { left: 36%; bottom: 10%; width: 55%; height: 20%; }
.panel-accent { left: 41%; top: 52%; width: 18%; height: 12%; background: var(--accent-soft); border-color: var(--accent); }
.flow-line { position: absolute; height: 1px; background: var(--accent); transform-origin: left; opacity: .72; }
.flow-one { left: 18%; top: 48%; width: 58%; transform: rotate(14deg); }
.flow-two { left: 18%; top: 74%; width: 40%; transform: rotate(-10deg); }

.manifesto, .network { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.manifesto-grid, .split-section { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(34px, 7vw, 92px); align-items: start; }
.prose p:first-child { margin-top: 0; }
.large-text { max-width: 980px; color: #252520; font-size: clamp(1.6rem, 3vw, 3rem); line-height: 1.18; letter-spacing: -0.045em; }
.section-heading { display: grid; gap: 18px; max-width: 820px; margin-bottom: 36px; }
.card-grid, .project-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card, .project-card { min-height: 260px; padding: 26px; border: 1px solid var(--line); background: rgba(255,255,255,.64); }
.card span { color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.card h3 { margin-top: 58px; }
.card p { margin-bottom: 0; font-size: 1rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.tag-cloud span { padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: #2f302b; }
.project-list { grid-template-columns: repeat(3, 1fr); }
.project-card { min-height: 150px; display: flex; align-items: end; transition: border-color 180ms ease, transform 180ms ease; }
.project-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.final-cta { text-align: center; }
.final-cta p:not(.eyebrow) { margin: 22px auto 32px; }
.site-footer { display: flex; justify-content: space-between; gap: 32px; padding: 42px clamp(20px, 4vw, 56px); border-top: 1px solid var(--line); }
.site-footer h2 { font-size: 1.2rem; letter-spacing: -0.02em; }
.site-footer p { max-width: 560px; margin-bottom: 0; font-size: .98rem; }
.site-footer a { color: var(--accent); font-weight: 650; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .button, .project-card { transition: none; }
}

@media (max-width: 900px) {
  .hero, .manifesto-grid, .split-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .sequential-composition { min-height: 380px; }
  .card-grid, .project-list { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  .section-shell { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: clamp(3.35rem, 17vw, 4.8rem); }
  .button { width: 100%; }
  .card-grid, .project-list { grid-template-columns: 1fr; }
  .card { min-height: 220px; }
  .site-footer { flex-direction: column; }
}

.visual-system {
  margin-top: 0;
  padding: var(--space) 0;
  border-bottom: 1px solid var(--line);
}

.visual-system--fullbleed {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
}

.visual-system-heading {
  max-width: var(--max-width);
  margin: 0 auto 36px;
  padding: 0 clamp(20px, 4vw, 56px);
}

.visual-system-bleed {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 10px;
}

.apple-like-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.image-slot {
  position: relative;
  width: 100%;
  min-height: 220px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.028), transparent 34%),
    #f0efeb;
}

.image-slot::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(17, 17, 17, 0.045);
  pointer-events: none;
}

.image-slot-dark {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 34%),
    #141411;
}

.image-slot-soft {
  background:
    linear-gradient(135deg, rgba(139, 93, 51, 0.08), transparent 38%),
    #ebe6de;
}

.image-slot img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-slot figcaption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  color: rgba(17, 17, 17, 0.52);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.image-slot-dark figcaption {
  color: rgba(255, 255, 255, 0.48);
}

.visual-slot-large,
.visual-slot-wide {
  width: 100%;
}

.visual-slot-large {
  aspect-ratio: 16 / 7;
}

.visual-slot-wide {
  aspect-ratio: 16 / 8;
}

.visual-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.visual-slot-half {
  aspect-ratio: 4 / 3;
}

.visual-carousel-shell {
  display: grid;
  width: 100%;
  gap: 18px;
  margin-top: 0;
  padding-top: 12px;
}

.visual-carousel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 2px;
}

.visual-carousel-header .section-kicker {
  margin-bottom: 12px;
}

.visual-carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.carousel-button:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.28);
  background: var(--paper);
}

.visual-carousel {
  width: 100%;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-padding-left: 0;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 17, 0.22) transparent;
}

.visual-carousel::-webkit-scrollbar {
  height: 6px;
}

.visual-carousel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.2);
}

.visual-carousel-item {
  flex: 0 0 32%;
  min-height: 300px;
  aspect-ratio: 4 / 3;
  scroll-snap-align: start;
}

@media (max-width: 1024px) {
  .visual-system-bleed {
    padding: 0 8px;
  }

  .visual-two-column,
  .visual-carousel {
    gap: 10px;
  }

  .visual-carousel-item {
    flex-basis: 48%;
  }
}

@media (max-width: 768px) {
  .visual-system {
    padding: var(--space) 0;
  }

  .visual-system-heading {
    margin-bottom: 20px;
    padding: 0 16px;
  }

  .visual-system-bleed {
    padding: 0 6px;
  }

  .apple-like-grid,
  .visual-two-column,
  .visual-carousel {
    gap: 8px;
  }

  .visual-two-column {
    grid-template-columns: 1fr;
  }

  .visual-slot-large,
  .visual-slot-wide,
  .visual-slot-half {
    aspect-ratio: 4 / 3;
  }

  .visual-carousel-header {
    align-items: start;
    flex-direction: column;
  }

  .visual-carousel-item {
    flex-basis: 88%;
    min-height: 250px;
  }

  .image-slot figcaption {
    left: 12px;
    bottom: 12px;
  }
}
