/* The Ifa Company — site styles */

:root {
  --bg: #0B0B0C;
  --surface: #131315;
  --ink: #F2F0EC;
  --ink-2: #C9C2B4;
  --muted: #A5A19B;
  --muted-2: #8A8783;
  --muted-3: #6E6B66;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.22);
  --pad-x: clamp(20px, 5vw, 48px);
  --pad-y: clamp(56px, 7vw, 88px);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--ink-2); }

h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

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

.section { padding: var(--pad-y) var(--pad-x); border-bottom: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7vw, 78px); line-height: 1.03; letter-spacing: -0.02em; text-wrap: balance; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.15; letter-spacing: -0.01em; }
.h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 30px); letter-spacing: -0.01em; }
.lede { font-size: clamp(16px, 1.5vw, 17px); line-height: 1.7; color: var(--muted); max-width: 620px; }
.body { font-size: 15.5px; line-height: 1.75; color: var(--muted); }
.em { font-style: italic; color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 2px;
}
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--ink-2); color: var(--bg); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }

.textlink {
  display: inline-block;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 3px;
}

/* Masthead */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 12, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.masthead-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--pad-x);
  min-height: 60px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: block; width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink); stroke-width: 10; stroke-linecap: square; }
.brand:hover .brand-mark { stroke: var(--ink-2); }
.brand-name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.brand-name sup { font-size: 8px; position: relative; top: -6px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.nav a { display: flex; align-items: center; min-height: 44px; color: var(--muted-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .nav-cta {
  border: 1px solid var(--line-2);
  padding: 0 18px;
  border-radius: 2px;
  color: var(--ink);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle span { display: flex; flex-direction: column; gap: 3px; }
.nav-toggle span i { display: block; width: 14px; height: 1px; background: var(--ink); }

.nav-panel { display: none; }

@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-panel[data-open="true"] {
    display: flex;
    flex-direction: column;
    padding: 4px var(--pad-x) 16px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .nav-panel a {
    display: flex;
    align-items: center;
    min-height: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-panel a.panel-cta {
    justify-content: center;
    margin-top: 14px;
    background: var(--ink);
    color: var(--bg);
    border-bottom: none;
    border-radius: 2px;
  }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(40px, 5vw, 64px);
  align-items: end;
  padding: clamp(56px, 8vw, 104px) var(--pad-x) clamp(56px, 7vw, 88px);
  border-bottom: 1px solid var(--line);
}
.hero-copy { display: flex; flex-direction: column; gap: clamp(20px, 2.6vw, 28px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.page-hero {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 26px);
  padding: clamp(56px, 8vw, 96px) var(--pad-x) clamp(48px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}

/* Waveform */
.wave {
  height: clamp(120px, 16vw, 180px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 clamp(16px, 2.5vw, 28px);
  overflow: hidden;
}
.wave i {
  flex: 1;
  display: block;
  background: var(--ink-2);
  border-radius: 1px;
  transform-origin: center;
  animation: eq 1.6s ease-in-out infinite;
}
@keyframes eq { 0%, 100% { transform: scaleY(0.25); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .wave i { animation: none; } }

/* Tile grids */
.grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1040px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-3 { grid-template-columns: 1fr; } }
.grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stats-band { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tile { background: var(--bg); padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.tile-figure { font-family: var(--serif); font-size: 34px; line-height: 1; }
.tile-figure.sm { font-size: 26px; line-height: 1.3; }

.card {
  background: var(--bg);
  padding: clamp(28px, 3.4vw, 40px) clamp(24px, 3vw, 36px) clamp(32px, 3.6vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 280px;
}
.card-sm {
  background: var(--bg);
  padding: clamp(26px, 3vw, 34px) clamp(22px, 2.6vw, 30px) clamp(30px, 3.2vw, 38px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 190px;
}
.card-sm h4 { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.card-sm p { font-size: 14.5px; line-height: 1.7; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* Ticker */
.ticker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px clamp(18px, 3vw, 32px);
  padding: 18px var(--pad-x);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-3);
}

/* Split (process, case study) */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 5vw, 64px);
}
.split-intro { display: flex; flex-direction: column; gap: 18px; }
.split-intro p { max-width: 460px; font-size: 16px; line-height: 1.75; color: var(--muted); }

.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: none; }
.step-bullet { color: var(--muted-2); font-size: 13px; line-height: 1.9; flex: 0 0 auto; }
.step-body { display: flex; flex-wrap: wrap; gap: 6px 24px; flex: 1; min-width: 0; }
.step-body strong { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; flex: 0 0 auto; width: 150px; }
.step-body p { font-size: 15px; line-height: 1.7; color: var(--muted); flex: 1 1 240px; min-width: 0; }

/* Featured work */
.featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 4.5vw, 56px);
  align-items: center;
  padding-bottom: clamp(36px, 4.5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.featured-copy { display: flex; flex-direction: column; gap: 20px; }
.featured-copy .h3 { font-size: clamp(32px, 4.6vw, 44px); line-height: 1.05; letter-spacing: -0.015em; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(12px, 1.6vw, 18px); align-items: start; }
.shots img {
  width: 100%;
  height: auto;
  aspect-ratio: 760 / 1276;
  object-fit: contain;
  border-radius: 3px;
}
.featured .shots img:nth-child(2) { margin-top: clamp(16px, 2.4vw, 32px); }
.shots-flat { grid-template-columns: repeat(2, 1fr); max-width: 620px; }

.meta-box { display: flex; background: var(--line); border: 1px solid var(--line); margin-top: 4px; }
.meta-box > div { background: var(--bg); padding: 16px 22px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.meta-box span:last-child { font-size: 14px; }

/* Project rows */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  padding: 24px 2px;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: none; }
.row:hover { color: inherit; }
a.row:hover .row-name { color: var(--ink-2); }
.row-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--muted-2); flex: 0 0 auto; width: 34px; }
.row-name { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; flex: 0 0 auto; width: 200px; transition: color 0.2s ease; }
.row-desc { font-size: 15px; line-height: 1.7; color: var(--muted); flex: 1 1 260px; min-width: 0; }
.row-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-3); flex: 0 0 auto; width: 150px; }
.row-arrow { color: var(--muted-2); flex: 0 0 auto; }
/* A row that has somewhere to go. Set like .row-tag so it sits on the same
   line as the metadata rather than competing with .row-name, but in full ink
   instead of --muted-3, which is what marks it as the one thing here you can
   click. Only Yoyo Yorùbá has a site of its own so far. */
.row-link {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink); flex: 0 0 auto;
  border-bottom: 1px solid var(--line-2); padding-bottom: 2px;
}
.row-link:hover { color: var(--ink-2); border-bottom-color: var(--ink-2); }
.row-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Prose (legal pages) */
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 22px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; letter-spacing: -0.01em; margin-top: 20px; }
.prose p, .prose li { font-size: 15.5px; line-height: 1.8; color: var(--muted); }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.prose a { border-bottom: 1px solid rgba(255, 255, 255, 0.3); }

/* Contact + footer */
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px clamp(32px, 4vw, 48px);
  padding: clamp(52px, 6.5vw, 80px) var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.contact .h2 { font-size: clamp(30px, 4.4vw, 42px); max-width: 640px; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 26px;
  padding: 30px var(--pad-x);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-3);
}
.footer a { color: var(--muted-3); }
.footer a:hover { color: var(--ink-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
