/* ============================================================
   César Zea — Editorial portfolio
   ============================================================ */

:root {
  /* Defaults — overridable via Tweaks */
  --ink: #0b0b0e;
  --ink-2: #15151a;
  --ink-3: #1d1d24;
  --paper: #f4f1ea;
  --paper-2: #ece8df;
  --rule: rgba(244, 241, 234, 0.14);
  --rule-strong: rgba(244, 241, 234, 0.28);
  --text: #e8e5dd;
  --text-mute: #a09c92;
  --text-dim: #6b6960;
  --accent: #e8b66b;       /* warm amber */
  --accent-ink: #1a1206;

  --serif: "Fraunces", "Iowan Old Style", "Georgia", serif;
  --sans: "Inter Tight", "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --measure: 64ch;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1280px;

  --easing: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* Light theme override */
:root[data-theme="light"] {
  --ink: #f4f1ea;
  --ink-2: #ece8df;
  --ink-3: #e2dccf;
  --paper: #1a1a1f;
  --paper-2: #0f0f12;
  --rule: rgba(15, 15, 18, 0.14);
  --rule-strong: rgba(15, 15, 18, 0.32);
  --text: #1a1a1f;
  --text-mute: #5a574e;
  --text-dim: #908b7e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ============================================================
   Layout
   ============================================================ */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

.wrap-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { position: relative; }

/* ============================================================
   Type
   ============================================================ */

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
.mono  { font-family: var(--mono); font-feature-settings: "ss02"; }
.sans  { font-family: var(--sans); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--text-mute);
}

.eyebrow.no-rule::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
}

.display-1 {
  font-size: clamp(54px, 9.5vw, 142px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 300;
}

.display-1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.display-2 {
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 400;
}

.display-3 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}

.body p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  max-width: var(--measure);
}

.body p + p { margin-top: 1.1em; }

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

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: color-mix(in oklab, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav.scrolled { border-bottom-color: var(--rule); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.brand-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-2px);
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  transition: color 0.2s;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}

.nav-links a:link,
.nav-links a:visited { color: var(--text-mute); }
.nav-links a:hover,
.nav-links a.current { color: var(--text); }

.nav-cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  transition: transform 0.2s var(--easing), background 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  background: color-mix(in oklab, var(--accent) 88%, white);
}

/* Mobile nav */
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
  }
  .nav-toggle span {
    width: 22px; height: 1.5px; background: var(--text);
  }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--ink-2);
    padding: 24px var(--gutter);
    border-bottom: 1px solid var(--rule);
    gap: 20px;
    align-items: flex-start;
  }
  .nav-cta { display: none; }
}

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

.hero {
  padding: 180px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -1px -1px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: end;
  position: relative;
  z-index: 1;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
}

.hero-meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent); }
  50%      { box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent) 8%, transparent); }
}

.hero h1 {
  margin-bottom: 0;
}

.hero-portrait {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.05);
  transition: filter 0.6s ease;
}

.hero-portrait:hover img { filter: grayscale(0) contrast(1.0); }

.hero-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, color-mix(in oklab, var(--ink) 60%, transparent) 100%);
  pointer-events: none;
}

.hero-portrait-tag {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  z-index: 1;
}

.hero-sub {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  border-top: 1px solid var(--rule);
  padding-top: 48px;
}

.hero-sub .lead { max-width: 50ch; }

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-portrait { max-width: 360px; }
  .hero-sub { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 0;
  transition: all 0.25s var(--easing);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn .arr {
  display: inline-block;
  transition: transform 0.25s var(--easing);
}

.btn:hover .arr { transform: translateX(4px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--rule-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
}

/* ============================================================
   Marquee strip (numbers)
   ============================================================ */

.strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0;
  background: var(--ink-2);
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.strip-cell {
  padding: 36px var(--gutter);
  border-right: 1px solid var(--rule);
}

.strip-cell:last-child { border-right: 0; }

.strip-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}

.strip-num em {
  font-style: italic;
  color: var(--accent);
  font-size: 0.45em;
  font-weight: 400;
  letter-spacing: 0;
}

.strip-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  line-height: 1.5;
}

@media (max-width: 820px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-cell:nth-child(2) { border-right: 0; }
  .strip-cell:nth-child(1), .strip-cell:nth-child(2) {
    border-bottom: 1px solid var(--rule);
  }
}

/* ============================================================
   Section header
   ============================================================ */

.section {
  padding: 140px 0;
  position: relative;
}

.section-pad-sm { padding: 100px 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 80px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.section-head .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  text-transform: uppercase;
}

.section-head h2 { margin-top: 18px; }

.section-head .body { max-width: 56ch; }

@media (max-width: 820px) {
  .section { padding: 100px 0; }
  .section-head {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 56px;
  }
}

/* ============================================================
   Clients
   ============================================================ */

.clients {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}

.clients-label {
  text-align: center;
  margin-bottom: 48px;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
  align-items: center;
}

.client-cell {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border-right: 1px solid var(--rule);
  position: relative;
}

.client-cell:last-child { border-right: 0; }

.client-cell img {
  max-height: 36px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(1.6) contrast(0.9);
  opacity: 0.6;
  transition: all 0.3s ease;
}

:root[data-theme="light"] .client-cell img {
  filter: grayscale(1) brightness(0.6) contrast(1.1);
  opacity: 0.7;
}

.client-cell:hover img {
  filter: none;
  opacity: 1;
}

@media (max-width: 1024px) {
  .clients-grid { grid-template-columns: repeat(4, 1fr); }
  .client-cell:nth-child(4n) { border-right: 0; }
  .client-cell:nth-child(-n+4) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 540px) {
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .client-cell { border-right: 1px solid var(--rule) !important; }
  .client-cell:nth-child(2n) { border-right: 0 !important; }
  .client-cell:not(:nth-last-child(-n+2)) { border-bottom: 1px solid var(--rule); }
}

/* ============================================================
   Capabilities
   ============================================================ */

.caps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}

.cap {
  padding: 56px 40px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background 0.3s ease;
}

.cap:nth-child(2n),
.cap:last-child { border-right: 0; }

.caps > .cap:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.cap:hover { background: var(--ink-2); }

.cap-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cap-num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.cap h3 {
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.cap p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mute);
  margin-bottom: 28px;
}

.cap-list {
  list-style: none;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  margin-top: auto;
}

.cap-list li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 8px 0;
  display: flex;
  gap: 12px;
}

.cap-list li::before {
  content: "→";
  color: var(--accent);
}

@media (max-width: 820px) {
  .caps { grid-template-columns: 1fr; }
  .cap { border-right: 0; padding: 48px var(--gutter); }
}

/* ============================================================
   Selected work
   ============================================================ */

.work-list {
  border-top: 1px solid var(--rule-strong);
}

.work-row {
  display: grid;
  grid-template-columns: 56px 2fr 1.2fr 1.5fr 32px;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  transition: padding 0.4s var(--easing);
  position: relative;
  cursor: pointer;
}

.work-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--easing);
  z-index: -1;
  opacity: 0.04;
}

.work-row:hover { padding-left: 16px; padding-right: 16px; }
.work-row:hover::before { transform: scaleX(1); }

.work-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.work-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.work-row:hover .work-title { color: var(--accent); }

.work-client {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  border: 1px solid var(--rule);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.work-arr {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text-dim);
  text-align: right;
  transition: transform 0.4s var(--easing), color 0.3s;
}

.work-row:hover .work-arr {
  transform: translateX(8px);
  color: var(--accent);
}

@media (max-width: 1024px) {
  .work-row {
    grid-template-columns: 36px 1fr 24px;
    gap: 16px;
    padding: 24px 0;
  }
  .work-client, .work-tags { display: none; }
}

/* ============================================================
   Featured case study
   ============================================================ */

.case {
  border-top: 1px solid var(--rule-strong);
  padding-top: 80px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.case-side {
  position: sticky;
  top: 120px;
}

.case-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.case h3 {
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 32px;
}

.case-meta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
  margin-top: 28px;
}

.case-meta-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  font-size: 14px;
  align-items: baseline;
}

.case-meta-row dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.case-meta-row dd { color: var(--text); }

.case-content { }

.case-block {
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
}

.case-block:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

.case-block .eyebrow { margin-bottom: 18px; }
.case-block h4 {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.case-block p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  max-width: 60ch;
}

.case-block p + p { margin-top: 1em; }

.case-pillars {
  margin-top: 36px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.case-pillar {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.case-pillar:last-child { border-bottom: 0; }

.case-pillar-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.case-pillar h5 {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--text);
}

.case-pillar p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mute);
  max-width: 56ch;
}

.case-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  margin-top: 36px;
}

.case-result {
  padding: 28px 24px 28px 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.case-result:nth-child(2n) { border-right: 0; padding-right: 0; padding-left: 24px; }
.case-result:nth-last-child(-n+2) { border-bottom: 0; }

.case-result-num {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.case-result h6 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text);
}

.case-result p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-mute);
}

@media (max-width: 1024px) {
  .case { grid-template-columns: 1fr; gap: 56px; }
  .case-side { position: static; }
  .case-results { grid-template-columns: 1fr; }
  .case-result { border-right: 0 !important; padding: 24px 0 !important; }
  .case-result:nth-last-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .case-result:last-child { border-bottom: 0; }
}

/* ============================================================
   Approach
   ============================================================ */

.approach {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.approach-quote {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  position: relative;
  padding-left: 40px;
  border-left: 2px solid var(--accent);
}

.approach-quote::before {
  content: "“";
  position: absolute;
  top: -28px;
  left: 30px;
  font-size: 80px;
  color: var(--accent);
  font-family: var(--serif);
  line-height: 1;
}

.approach-points {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.approach-point {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  align-items: baseline;
}

.approach-point .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.approach-point h4 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--text);
}

.approach-point p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mute);
}

@media (max-width: 820px) {
  .approach { grid-template-columns: 1fr; gap: 48px; }
  .approach-point { grid-template-columns: 1fr; gap: 8px; }
}

/* ============================================================
   Engagement / contact
   ============================================================ */

.contact-section {
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-grid h2 { margin-bottom: 32px; }

.contact-grid .body p { color: var(--text); }

.engagement-list {
  margin-top: 40px;
  border-top: 1px solid var(--rule);
}

.engagement-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}

.engagement-item .name {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.engagement-item .name span {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 400;
  margin-top: 4px;
}

.engagement-item .price {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  white-space: nowrap;
}

.contact-card {
  background: var(--ink);
  border: 1px solid var(--rule);
  padding: 40px;
}

.contact-link-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 300px;
  transition: border-color 0.25s var(--easing), background 0.25s var(--easing), transform 0.25s var(--easing);
}

.contact-link-card:hover {
  border-color: var(--accent);
  background: var(--ink-3);
  transform: translateY(-2px);
}

.contact-card-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.contact-card h3 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  color: var(--text);
}

.contact-link-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.contact-card .sub {
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 24px;
}

.contact-link-card .sub {
  font-size: 16px;
  line-height: 1.6;
  max-width: 34ch;
  margin-bottom: auto;
}

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

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

.footer {
  border-top: 1px solid var(--rule);
  padding: 56px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}

.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 400;
  margin-bottom: 20px;
}

.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer ul a {
  font-size: 14px;
  color: var(--text);
  transition: color 0.2s;
}

.footer ul a:hover { color: var(--accent); }

.footer-tag {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.footer-tag span { color: var(--accent); font-style: italic; }

.footer-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bot { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Reveal animation
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--easing), transform 0.9s var(--easing);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-meta .dot { animation: none; }
}

/* ============================================================
   Tweaks panel
   ============================================================ */

.tweaks {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  background: var(--ink-2);
  border: 1px solid var(--rule-strong);
  padding: 20px;
  width: 280px;
  font-family: var(--sans);
  display: none;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.tweaks.open { display: block; }

.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}

.tweaks-head h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 400;
}

.tweaks-head button {
  color: var(--text-mute);
  font-size: 18px;
  line-height: 1;
}

.tweak-row {
  margin-bottom: 14px;
}

.tweak-row label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 8px;
}

.tweak-seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 3px;
  background: var(--ink);
  border: 1px solid var(--rule);
}

.tweak-seg button {
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  transition: all 0.2s;
}

.tweak-seg button.on {
  background: var(--accent);
  color: var(--ink);
}

.tweak-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.tweak-swatch {
  height: 28px;
  border: 1px solid var(--rule);
  cursor: pointer;
  position: relative;
}

.tweak-swatch.on::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.5px solid var(--text);
}


/* ============================================================
   Hero headline wide variant
   ============================================================ */

.hero-headline-wide {
  grid-column: 1 / -1;
}

/* When hero-grid only has one child column, make it full width */
.hero-grid > div:only-child {
  grid-column: 1 / -1;
}

/* ============================================================
   Hero alt variant — used for secondary hero (the "behind the offer")
   ============================================================ */

.hero.hero-alt {
  padding: 80px 0 80px;
  background: var(--ink-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.hero.hero-alt::before {
  display: none;
}

.hero.hero-alt .hero-sub {
  margin-top: 40px;
  padding-top: 40px;
}

.hero-alt-wide {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.hero-alt-wide .muted {
  font-size: 18px;
  line-height: 1.6;
  max-width: 100%;
  color: var(--text);
}

@media (max-width: 820px) {
  .hero.hero-alt {
    padding: 56px 0 56px;
  }
  .hero-alt-wide {
    margin-top: 32px;
    padding-top: 32px;
  }
  .hero-alt-wide .muted {
    font-size: 16px;
  }
}

/* ============================================================
   Selected clients section
   ============================================================ */

.clients-section .section-head .body .muted {
  font-size: 19px;
  line-height: 1.55;
  max-width: 60ch;
}

@media (max-width: 820px) {
  .clients-section .section-head .body .muted {
    font-size: 17px;
  }
}

.clients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 40px;
}

.clients-col {
  list-style: none;
  padding: 0;
  margin: 0;
}

.clients-col li {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

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

.client-name {
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}

.client-sector {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--text);
  opacity: 0.78;
  text-align: right;
}

@media (max-width: 820px) {
  .clients-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .clients-col li {
    padding: 14px 0;
  }
  .client-name {
    font-size: 17px;
  }
  .client-sector {
    font-size: 14px;
    letter-spacing: 0.01em;
  }
}

/* ============================================================
   Strip alt variant — expertise & credentials strip
   ============================================================ */

.strip.strip-alt {
  background: var(--ink);
}

.strip.strip-alt .strip-num-text {
  font-size: clamp(28px, 3.5vw, 44px);
  font-style: italic;
  letter-spacing: -0.02em;
}

.strip.strip-alt .strip-num-text em {
  font-style: normal;
  font-size: 0.55em;
  color: var(--accent);
}

/* ============================================================
   Pre-metrics lead paragraph
   ============================================================ */

.pre-metrics-lead {
  padding: 40px 0 32px;
}

.pre-metrics-lead .muted {
  font-size: 18px;
  line-height: 1.6;
  max-width: 76ch;
}

@media (max-width: 768px) {
  .pre-metrics-lead {
    padding: 24px 0 24px;
  }
  .pre-metrics-lead .muted {
    font-size: 16px;
  }
}

/* ============================================================
   Hero domains line
   ============================================================ */

.hero-domains {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 32px;
  font-weight: 500;
}

.hero-domains .hero-tech {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
}

@media (max-width: 480px) {
  .hero-domains {
    font-size: 10px;
    letter-spacing: 0.16em;
    margin-top: 24px;
  }

  .hero-domains .hero-tech {
    font-size: 9px;
    letter-spacing: 0.12em;
  }
}

/* ============================================================
   Selected work — domain titles
   ============================================================ */

.work-domain-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
  margin-top: 64px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-strong);
}

.work-domain-title:first-of-type {
  margin-top: 0;
}

/* ============================================================
   The Profile — 360 senior profile grid
   ============================================================ */

.profile-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}

.profile-card {
  padding: 48px 40px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
}

.profile-card:nth-child(2n) { border-right: 0; }

.profile-cols > .profile-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: 0;
}

.profile-card:hover { background: var(--ink-2); }

.profile-card-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-card-num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.profile-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--text);
}

.profile-card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mute);
}

@media (max-width: 820px) {
  .profile-cols { grid-template-columns: 1fr; }
  .profile-card {
    border-right: 0;
    padding: 40px var(--gutter);
  }
}

/* ============================================================
   Profile — bridge between the two halves of the same profile
   ============================================================ */

.profile-bridge {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: baseline;
  padding: 24px 40px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklab, var(--ink-2) 72%, transparent);
}

.profile-bridge-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}

.profile-bridge p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mute);
  max-width: 72ch;
}

.profile-bridge strong {
  color: var(--text);
  font-weight: 500;
}

.profile-cols-secondary {
  border-top: 0;
}

@media (max-width: 820px) {
  .profile-bridge {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 22px var(--gutter);
  }
}

/* ============================================================
   Career arc — compact chronology
   ============================================================ */

.career-list {
  border-top: 1px solid var(--rule-strong);
}

.career-row {
  display: grid;
  grid-template-columns: 150px 1.1fr 1.7fr;
  gap: 40px;
  align-items: baseline;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}

.career-years {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.career-row h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.career-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  line-height: 1.5;
}

.career-row > p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mute);
  max-width: 62ch;
}

.career-foot {
  margin-top: 32px;
}

@media (max-width: 1024px) {
  .career-row {
    grid-template-columns: 130px 1fr;
    gap: 24px 32px;
  }
  .career-row > p {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .career-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 26px 0;
  }
  .career-row > p {
    grid-column: auto;
  }
}

/* ============================================================
   Signature engagements — two proof cards
   ============================================================ */

.signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.signature {
  background: var(--ink-2);
  border: 1px solid var(--rule);
  padding: 48px 40px;
  position: relative;
  transition: border-color 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
}

.signature:hover {
  border-color: var(--rule-strong);
  background: var(--ink-3);
}

.signature-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 22px;
}

.signature h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 24px;
}

.signature p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-mute);
  margin-bottom: 28px;
  flex: 1;
}

.signature-outcome {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  line-height: 1.5;
}

@media (max-width: 820px) {
  .signatures {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .signature { padding: 36px 28px; }
}

/* ============================================================
   Mobile refinements (≤480px) and touch-device polish
   ============================================================ */

@media (max-width: 480px) {
  /* Tighter section vertical rhythm */
  .section { padding: 72px 0; }
  .hero { padding-top: 96px; padding-bottom: 60px; }
  .hero-grid { gap: 36px; }
  .hero-portrait { max-width: 280px; }

  /* Display headlines need to stay readable but not overflow on tiny phones */
  .display-1 { font-size: clamp(40px, 12vw, 64px); line-height: 1; }
  .display-2 { font-size: clamp(32px, 9vw, 48px); }

  /* Buttons readable & not crammed */
  .btn { padding: 14px 20px; font-size: 11px; }

  /* Tweaks panel becomes a bottom sheet rather than a corner card */
  .tweaks {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: 60vh;
    overflow-y: auto;
  }
}

/* Hide non-essential hover effects on touch */
@media (hover: none) {
  .work-row:hover { background: transparent; }
  .case-card:hover { transform: none; }
  .nav-link:hover { color: var(--text); }
  .hero-portrait:hover img { filter: var(--portrait-filter, grayscale(0.15) contrast(1.05)); }
  .reveal { opacity: 1; transform: none; }
}
