@import url("fonts.css");

:root {
  --paper: #F4F2ED;
  --card: #FFFFFF;
  --panel: #EDEAE4;
  --hover: #ECE9E3;
  --ink: #131313;
  --ink-2: #42464A;
  --muted: #6B6F73;
  --label: #6A6E72;
  --accent: #DF402A;
  --line: rgba(19, 19, 19, .16);
  --line-soft: rgba(19, 19, 19, .12);
  --hair: rgba(19, 19, 19, .1);
  --pad: clamp(20px, 4vw, 40px);
  --sans: "Manrope", system-ui, sans-serif;
  --cond: "Roboto Condensed", "Arial Narrow", sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
:root[data-theme="light"] { color-scheme: only light; }
:root[data-theme="dark"] { color-scheme: only dark; }

img, figure { max-width: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- primitives ---------- */

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }

.sec { padding-top: clamp(56px, 7vw, 96px); }
.sec--tight { padding-top: clamp(52px, 6.5vw, 88px); }

.rule { height: 1px; background: var(--line); }

.label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--label);
}
.label--accent { color: var(--accent); }
.label--sm { font-size: 10.5px; }

.sec-head { display: flex; flex-direction: column; gap: 14px; }
.sec-head__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
}
.btn--primary:hover { background: var(--ink); color: #fff; }
.btn--ghost { border-color: rgba(19, 19, 19, .26); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 242, 237, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(19, 19, 19, .13);
}
.site-header__row {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad);
  min-height: clamp(72px, 9vw, 128px);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(14px, 2vw, 40px);
}
.site-header__logo { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; }
.site-header__logo img { width: min(58vw, 436px); height: auto; max-width: 100%; display: block; }

.nav {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: 0 0 auto; color: var(--muted); }

.cta {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
  padding: clamp(8px, 1.2vw, 10px) clamp(10px, 2vw, 18px);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(10px, 1.1vw, 11.5px);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cta:hover { background: var(--accent); color: #fff; }

/* ---------- hero ---------- */

.hero { position: relative; }
.hero__lattice {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(19, 19, 19, .15) 1px, transparent 1px),
    radial-gradient(rgba(223, 64, 42, .28) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px;
  background-position: 0 0, 16px 16px;
  animation: latDrift 24s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 60%, transparent);
}
@keyframes latDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 64px 64px, 64px 64px; }
}

.hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: clamp(44px, 6vw, 96px) 0 clamp(44px, 6vw, 84px);
}
.hero__eyebrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); }
.hero__eyebrow i { width: 28px; height: 1px; background: var(--accent); display: block; }

.hero h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(22px, 6.4vw, 94px);
  line-height: .96;
  letter-spacing: -.015em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.hero h1 span { color: var(--accent); }

.hero__lead {
  max-width: 56ch;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- stats ---------- */

.stats {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { flex: 1 1 250px; min-width: 0; padding: 34px 32px; display: flex; flex-direction: column; gap: 10px; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid var(--line); padding-right: 0; }
.stat b {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(34px, 3.4vw, 44px);
  line-height: 1;
}
.stat span { font-size: 14.5px; line-height: 1.5; color: var(--muted); max-width: 30ch; }

/* ---------- lead statement ---------- */

.split { display: flex; flex-wrap: wrap; gap: clamp(22px, 4vw, 64px); }
.split__aside { flex: 1 1 220px; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.split__body { flex: 3 1 440px; }

.statement {
  font-size: clamp(20px, 1.55vw, 27px);
  line-height: 1.45;
  text-wrap: pretty;
}
.statement em { font-style: normal; color: var(--accent); }

/* ---------- domain cards ---------- */

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 44px;
}
.card {
  flex: 1 1 300px;
  min-width: 0;
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.card:hover { border-color: rgba(223, 64, 42, .5); }
.card__texture { position: absolute; inset: 0; pointer-events: none; }
.card--grid .card__texture {
  background-image:
    linear-gradient(rgba(19, 19, 19, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 19, 19, .07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.card--dots .card__texture {
  background-image: radial-gradient(rgba(19, 19, 19, .16) 1px, transparent 1px);
  background-size: 18px 18px;
}
.card > *:not(.card__texture) { position: relative; }
.card__top { display: flex; justify-content: space-between; align-items: baseline; }
.card h3 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  text-transform: uppercase;
}
.card p { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.card__list { margin-top: auto; border-top: 1px solid var(--line-soft); }
.card__list li {
  display: flex;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
}
.card__list li::before {
  content: "→";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  padding-top: 3px;
}

/* ---------- photo strip ---------- */

.figs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
}
.fig { flex: 1 1 210px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.fig__frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); }
.fig__frame { cursor: zoom-in; }
.fig__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(11, 11, 12, .92);
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; gap: 14px; max-width: 100%; }
.lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; display: block; }
.lightbox figcaption {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: #EDEBE6;
  max-width: 70ch;
}
.lightbox__close {
  position: absolute;
  top: clamp(12px, 3vw, 28px);
  right: clamp(12px, 3vw, 28px);
  background: none;
  border: 1px solid rgba(237, 235, 230, .3);
  color: #EDEBE6;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }
.fig figcaption { font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--muted); }

/* ---------- principles ---------- */

.principle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(18px, 2.5vw, 32px);
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
}
.principle:hover { background: var(--hover); }
.principle__n { flex: 0 0 44px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.principle__title { flex: 1 1 300px; font-size: 19px; line-height: 1.4; font-weight: 500; text-wrap: pretty; }
.principle__practice { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; }
.principle__practice p { font-size: 15.5px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* ---------- clients / tabs ---------- */

.clients { display: flex; flex-wrap: wrap; gap: clamp(26px, 4vw, 56px); margin-top: 36px; }
.tabs {
  flex: 1 1 250px;
  max-width: 420px;
  align-self: start;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-soft);
}
.tab {
  display: flex;
  gap: 14px;
  align-items: baseline;
  text-align: left;
  padding: 20px 16px 20px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hair);
  border-left: 2px solid transparent;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.tab b { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; font-weight: 400; }
.tab.is-active { background: var(--card); border-left-color: var(--accent); color: var(--ink); font-weight: 700; }

.panels { flex: 3 1 440px; min-height: 520px; }
.panel { display: none; flex-direction: column; gap: 30px; }
.panel.is-active { display: flex; }
.panel h3 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(28px, 2.6vw, 42px);
  line-height: 1.08;
  text-transform: uppercase;
  text-wrap: balance;
}
.panel__lead { max-width: 70ch; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.panel__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  border-top: 1px solid var(--line-soft);
  padding-top: 28px;
}
.panel__col { flex: 1 1 225px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.panel__col li { display: flex; gap: 12px; }
.panel__col--abilities li { font-size: 15.5px; line-height: 1.5; }
.panel__col--abilities li::before {
  content: "■";
  color: var(--label);
  font-family: var(--mono);
  font-size: 11px;
  padding-top: 3px;
}
.panel__col--examples li { font-size: 15px; line-height: 1.5; color: var(--muted); }
.panel__col--examples li::before {
  content: "·";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  padding-top: 3px;
}

/* ---------- not doing ---------- */

.notdoing {
  border: 1px solid var(--line);
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 40px);
  background: var(--panel);
}
.notdoing__title {
  flex: 1 1 200px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 30px;
  text-transform: uppercase;
  line-height: 1.05;
}
.notdoing__title span { color: var(--accent); }
.notdoing__list {
  flex: 2 1 360px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 36px;
  align-content: flex-start;
}
.notdoing__list li {
  flex: 1 1 230px;
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15.5px;
  color: var(--muted);
  display: flex;
  gap: 12px;
}
.notdoing__list li::before { content: "×"; color: var(--accent); font-family: var(--mono); font-size: 12px; }

/* ---------- works ---------- */

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0; }
.chip {
  padding: 9px 16px;
  background: none;
  border: 1px solid rgba(19, 19, 19, .22);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.works { border-top: 1px solid var(--line); }
.work {
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(16px, 2.5vw, 32px);
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: flex-start;
}
.work:hover { background: var(--hover); }
.work[hidden] { display: none; }
.work__idx { flex: 0 0 40px; font-family: var(--mono); font-size: 11.5px; color: var(--label); padding-top: 4px; }
.work__type { flex: 1 1 190px; font-size: 15.5px; line-height: 1.45; font-weight: 700; }
.work__body {
  flex: 2 1 300px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: flex-start;
}
.work__topic { flex: 1 1 240px; font-size: 15.5px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.tag {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--label);
  border: 1px solid var(--line);
  padding: 4px 8px;
}

/* ---------- team ---------- */

.team { display: flex; flex-wrap: wrap; gap: clamp(26px, 4vw, 56px); align-items: flex-start; margin-top: 44px; }
.team__person { flex: 0 0 190px; max-width: 100%; display: flex; flex-direction: column; gap: 14px; }
.team__photo { width: 100%; aspect-ratio: 3 / 4; border: 1px solid var(--line); overflow: hidden; background: var(--panel); }
.team__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team__name { font-weight: 700; font-size: 17px; }
.team__role { font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.quote {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 1px solid var(--line);
  padding-left: clamp(20px, 3vw, 40px);
}
.quote p { font-size: 17.5px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.quote p:last-of-type { color: var(--ink); }
.quote span { color: var(--accent); }

/* ---------- contacts ---------- */

.contacts {
  border-top: 1px solid var(--line);
  padding-top: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4vw, 56px);
  align-items: flex-start;
}
.contacts__claim { flex: 3 1 400px; display: flex; flex-direction: column; gap: 26px; }
.contacts__claim h2 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(34px, 4vw, 64px);
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
}
.contacts__claim p { max-width: 60ch; font-size: 18px; line-height: 1.55; color: var(--muted); }
.contacts__data { flex: 1 1 280px; border-top: 1px solid var(--line); }
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.contact-block a { font-family: var(--mono); font-size: 18px; }
.contact-block a.mail { color: var(--accent); }

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 44px 0 40px;
  margin-top: 44px;
  border-top: 1px solid rgba(19, 19, 19, .13);
}
.site-footer img { height: 34px; display: block; }
.site-footer span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--label); }

@media (max-width: 1040px) {
  .nav { display: none; }
}

@media (max-width: 620px) {
  .stat, .stat:first-child, .stat + .stat { padding: 28px 0; border-left: none; }
  .stat + .stat { border-top: 1px solid var(--line); }
}

/* ---------- dark theme ----------
   Applied only when :root has data-theme="dark" (set from the system
   preference or the header switch). Shipping a real dark theme is also what
   stops Chrome / Samsung Internet from auto-inverting the light one. */

:root[data-theme="dark"] {
  --paper: #0B0B0C;
  --card: #131518;
  --panel: #101113;
  --hover: #191C1F;
  --ink: #EDEBE6;
  --ink-2: #C6C3BD;
  --muted: #9AA0A6;
  --label: #9AA0A6;
  --line: rgba(237, 235, 230, .2);
  --line-soft: rgba(237, 235, 230, .14);
  --hair: rgba(237, 235, 230, .11);
}
:root[data-theme="dark"] .site-header {
  background: rgba(11, 11, 12, .9);
  border-bottom-color: rgba(237, 235, 230, .16);
}
:root[data-theme="dark"] .hero__lattice {
  background-image:
    radial-gradient(rgba(237, 235, 230, .16) 1px, transparent 1px),
    radial-gradient(rgba(223, 64, 42, .34) 1px, transparent 1px);
}
:root[data-theme="dark"] .card--grid .card__texture {
  background-image:
    linear-gradient(rgba(237, 235, 230, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 235, 230, .06) 1px, transparent 1px);
}
:root[data-theme="dark"] .card--dots .card__texture {
  background-image: radial-gradient(rgba(237, 235, 230, .14) 1px, transparent 1px);
}
:root[data-theme="dark"] .btn--primary:hover { background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .btn--ghost { border-color: rgba(237, 235, 230, .28); }
:root[data-theme="dark"] .chip { border-color: rgba(237, 235, 230, .24); }
:root[data-theme="dark"] .site-footer { border-top-color: rgba(237, 235, 230, .16); }
:root[data-theme="dark"] .fig__frame,
:root[data-theme="dark"] .team__photo { background: #191C1F; }
