/* ==========================================================================
   Alex Lawal — Signal (Direction B)
   Production build: static HTML/CSS/JS, no framework runtime.
   ========================================================================== */

:root {
  --bg: #0d0d0c;
  --bg2: #171715;
  --fg: #f1efe9;
  --mute: #8a877f;
  --line: rgba(241, 239, 233, .12);
  --acc: #D0612F;
  --status: #3ddc84;
  --d: 1;
  --pad: clamp(18px, 3.4vw, 48px);
  --gap: calc(140px * var(--d));
  --disp: 'Archivo', 'Arial Narrow', sans-serif;
  --sans: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
sup { line-height: 0; }

::selection { background: var(--acc); color: #fff; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--fg);
  color: var(--bg);
  font: 600 14px var(--sans);
  text-decoration: none;
  border-radius: 4px;
  transform: translateY(-160%);
  transition: transform .2s;
}
.skip:focus { transform: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Nav ---------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px var(--pad);
  background: rgba(13, 13, 12, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports (background: color-mix(in oklab, #000 80%, transparent)) {
  .site-nav { background: color-mix(in oklab, var(--bg) 80%, transparent); }
}

.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 14px var(--sans);
  text-decoration: none;
  justify-self: start;
}
.mark b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--acc);
  color: #fff;
  font: 800 12px var(--disp);
  font-variation-settings: 'wdth' 70;
  letter-spacing: .02em;
}

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font: 500 13px var(--sans);
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background .2s;
}
.nav-links a:hover { background: var(--bg2); }
.nav-links sup,
.mobile-menu sup {
  font: 400 9px var(--mono);
  color: var(--mute);
  margin-right: 4px;
}

.nav-right { justify-self: end; display: flex; gap: 14px; align-items: center; }
.live {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.live i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--status);
  box-shadow: 0 0 10px var(--status);
  animation: blink 1.6s infinite;
}
@keyframes blink { 50% { opacity: .3; } }

.burger { display: none; font-size: 26px; line-height: 1; }

.prog {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--acc);
  transition: width .1s linear;
}

.mobile-menu {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 29;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: 12px var(--pad) 24px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  text-align: left;
  font: 800 40px/1.15 var(--disp);
  font-variation-settings: 'wdth' 70;
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 0;
}

/* ---------- Hero --------------------------------------------------------- */

.hero {
  position: relative;
  min-height: calc(100svh - 60px);
  padding: calc(40px * var(--d)) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
}

.spot {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 62%) var(--my, 38%),
              rgba(208, 97, 47, .22), transparent 60%);
}
@supports (background: color-mix(in oklab, #000 22%, transparent)) {
  .spot {
    background: radial-gradient(600px circle at var(--mx, 62%) var(--my, 38%),
                color-mix(in oklab, var(--acc) 22%, transparent), transparent 60%);
  }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 60%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 60%, #000 20%, transparent 75%);
}

.hero-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font: 400 12px var(--mono);
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.hero-title {
  font: 900 clamp(64px, 13.5vw, 220px)/.84 var(--disp);
  font-variation-settings: 'wdth' 62;
  text-transform: uppercase;
  letter-spacing: -.02em;
  margin: 40px 0;
  display: flex;
  flex-direction: column;
}
.line { display: block; overflow: hidden; }
.line > span {
  display: inline-block;
  animation: rise 1s cubic-bezier(.2, .8, .2, 1) both;
}
.line:nth-child(2) > span { animation-delay: .1s; }
.line:nth-child(3) > span { animation-delay: .2s; }
@keyframes rise { from { transform: translateY(100%); } }

.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
}
.accent { color: var(--acc); }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.hero-foot p {
  font: 400 clamp(17px, 1.5vw, 21px)/1.45 var(--sans);
  max-width: 34ch;
  margin: 0;
  color: var(--mute);
}

.split-btn {
  display: inline-flex;
  align-items: center;
  background: var(--acc);
  color: #fff;
  font: 600 15px var(--sans);
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
  flex: none;
}
.split-btn span { padding: 16px 22px; }
.split-btn i {
  font-style: normal;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .18);
  transition: transform .3s;
}
.split-btn:hover i { transform: rotate(45deg); }

/* ---------- Stats -------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
}
.stats div {
  padding: calc(30px * var(--d)) var(--pad);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stats div:last-child { border-right: 0; }
.stats strong {
  font: 800 clamp(48px, 6vw, 88px)/.9 var(--disp);
  font-variation-settings: 'wdth' 62;
  font-variant-numeric: tabular-nums;
}
.stats span {
  font: 400 12px var(--mono);
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: .05em;
  max-width: 22ch;
}
.stats strong .count { font: inherit; color: inherit; text-transform: none; letter-spacing: 0; }

/* ---------- Sections ----------------------------------------------------- */

.sec { padding: var(--gap) var(--pad) 0; }
.sec-flush { padding-left: 0; padding-right: 0; }
.pad { padding: 0 var(--pad); }

.label {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 12px var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: calc(48px * var(--d));
}
.label span:first-child { color: var(--acc); }
.label i { flex: 1; height: 1px; background: var(--line); }

.big {
  font: 500 clamp(30px, 4.4vw, 64px)/1.08 var(--sans);
  letter-spacing: -.025em;
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
}
.hl {
  background: linear-gradient(var(--acc), var(--acc)) 0 92% / 100% 12% no-repeat;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: calc(72px * var(--d));
}
.split > p {
  font: 400 18px/1.6 var(--sans);
  color: var(--mute);
  margin: 0;
  max-width: 40ch;
}

.services details { border-top: 1px solid var(--line); }
.services details:last-child { border-bottom: 1px solid var(--line); }
.services summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 40px 1fr 20px;
  gap: 8px;
  padding: 20px 0;
  font: 600 20px var(--sans);
}
.services summary::-webkit-details-marker { display: none; }
.services summary span {
  font: 400 12px var(--mono);
  color: var(--acc);
  padding-top: 5px;
}
.services summary i {
  font-style: normal;
  transition: transform .3s;
  color: var(--mute);
  justify-self: end;
}
.services details[open] summary i { transform: rotate(45deg); }
.services details p {
  margin: -6px 0 20px 40px;
  color: var(--mute);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- Work --------------------------------------------------------- */

.work {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: start;
}

.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li { border-top: 1px solid var(--line); }
.work-list li:last-child { border-bottom: 1px solid var(--line); }

.work-row {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: baseline;
  text-align: left;
  padding: calc(20px * var(--d)) 0;
  transition: color .25s;
  color: var(--mute);
}
.wn { font: 400 12px var(--mono); }
.wt {
  font: 800 clamp(26px, 3.4vw, 50px)/1 var(--disp);
  font-variation-settings: 'wdth' 70;
  text-transform: uppercase;
  transition: transform .35s, color .25s;
}
.wm { font: 400 12px var(--mono); text-align: right; }

.work-row:hover,
.work-row:focus-visible { color: var(--fg); }
.work-row:hover .wt { transform: translateX(10px); }
.work-row.on { color: var(--fg); }
.work-row.on .wt { transform: translateX(10px); }
.work-row.on .wn { color: var(--acc); }

.work-detail { position: sticky; top: 90px; }
.wd-img {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, var(--bg2), #22201c 55%, var(--bg2));
  overflow: hidden;
}
.wd-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .35s ease, transform .5s ease;
}
.wd-img img.swap { opacity: 0; transform: scale(.985); }
.wd-img img[src=""] { opacity: 0; }

.wd-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.wd-meta span {
  display: block;
  font: 400 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mute);
  margin-bottom: 4px;
}
.wd-meta b { font-weight: 500; }
.work-detail p {
  font: 400 17px/1.55 var(--sans);
  color: var(--mute);
  transition: opacity .3s;
}
.work-detail p.swap { opacity: 0; }

/* ---------- Writing ------------------------------------------------------ */

.filter { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.filter button {
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  font: 500 13px var(--sans);
  transition: background .2s, color .2s, border-color .2s;
}
.filter button:hover { border-color: var(--mute); }
.filter button.on {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.posts { position: relative; }
.post {
  display: grid;
  grid-template-columns: 110px 1fr auto 40px;
  gap: 20px;
  align-items: center;
  padding: calc(24px * var(--d)) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  position: relative;
  isolation: isolate;
}
.post:last-child { border-bottom: 1px solid var(--line); }
.post[hidden] { display: none; }
.post::before {
  content: '';
  position: absolute;
  inset: 0 calc(var(--pad) * -1);
  background: var(--acc);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  z-index: -1;
}
.post > * { position: relative; z-index: 1; }
.post:hover::before,
.post:focus-visible::before { transform: scaleY(1); }
.post:hover,
.post:focus-visible { color: #fff; }
.post:hover .pd,
.post:hover .pg,
.post:focus-visible .pd,
.post:focus-visible .pg { color: rgba(255, 255, 255, .8); }
.pd, .pg {
  font: 400 12px var(--mono);
  color: var(--mute);
  text-transform: uppercase;
}
.pt {
  font: 600 clamp(19px, 2vw, 26px)/1.2 var(--sans);
  letter-spacing: -.01em;
}
.post i { font-style: normal; font-size: 20px; text-align: right; }

.filter-empty {
  font: 400 15px var(--mono);
  color: var(--mute);
  text-transform: uppercase;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.filter-empty[hidden] { display: none; }

/* ---------- Now ---------------------------------------------------------- */

.now { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; }
.now-clock {
  background: var(--bg2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: start;
}
.now-clock div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 14px;
}
.now-clock span {
  font: 400 12px var(--mono);
  text-transform: uppercase;
  color: var(--mute);
}
.now-clock strong {
  font: 800 44px/1 var(--disp);
  font-variation-settings: 'wdth' 62;
  font-variant-numeric: tabular-nums;
}
.now-clock em {
  font: 400 11px var(--mono);
  color: var(--mute);
  font-style: normal;
}

.now-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.now-items div { background: var(--bg); padding: 24px 28px 28px 0; }
.now-items div:nth-child(even) { padding-left: 28px; padding-right: 0; }
.now-items span { font: 500 12px var(--mono); color: var(--acc); }
.now-items p { font: 400 19px/1.45 var(--sans); margin: 10px 0 0; }

/* ---------- Gallery ------------------------------------------------------ */

.strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 var(--pad) 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--mute) transparent;
}
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: var(--line); }
.strip:focus-visible { outline-offset: -2px; }

.shot {
  flex: 0 0 clamp(240px, 30vw, 420px);
  margin: 0;
  scroll-snap-align: start;
}
.shot:nth-child(even) { margin-top: 60px; }
.shot-img {
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #1c1a17, #232019);
  overflow: hidden;
}
.shot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter .5s, transform .6s;
}
.shot:hover .shot-img img,
.shot:focus-within .shot-img img { filter: none; transform: scale(1.02); }
.shot figcaption {
  display: flex;
  gap: 12px;
  padding-top: 10px;
  font: 400 12px var(--mono);
  color: var(--mute);
  text-transform: uppercase;
}
.shot figcaption span { color: var(--acc); }

/* ---------- Contact ------------------------------------------------------ */

.contact { padding: var(--gap) var(--pad) 32px; }
.cta-big {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  font: 900 clamp(60px, 12vw, 200px)/.86 var(--disp);
  font-variation-settings: 'wdth' 62;
  text-transform: uppercase;
  letter-spacing: -.02em;
}
.cta-big span { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.cta-big:hover span:last-child { transform: translateX(3%); }

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font: 500 18px var(--sans);
}
.contact-row div { display: flex; gap: 24px; flex-wrap: wrap; }
.contact-row a { text-decoration: none; }
.contact-row a:hover { color: var(--acc); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 80px;
  padding-bottom: 60px;
  font: 400 11px var(--mono);
  color: var(--mute);
  text-transform: uppercase;
}

/* ---------- Reveal primitive -------------------------------------------- */

[data-rv] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .9s cubic-bezier(.2, .7, .2, 1),
    transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--dl, 0s);
}
[data-rv].in { opacity: 1; transform: none; }

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 1100px) {
  .work { gap: 32px; }
  .now { gap: 32px; }
}

@media (max-width: 760px) {
  .site-nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .burger { display: block; }
  .live { font-size: 0; gap: 0; }

  .hero { min-height: 700px; }
  .hero-title { font-size: 76px; }
  .hero-meta { gap: 6px 14px; font-size: 10px; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-foot p { max-width: 36ch; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats div:nth-child(3) { border-bottom: 1px solid var(--line); }

  .big { font-size: 30px; }

  .split,
  .work,
  .now,
  .now-items { grid-template-columns: 1fr; gap: 32px; }
  .split > p { max-width: 46ch; }

  .now-items div,
  .now-items div:nth-child(even) { padding: 20px 0; }

  .work-detail { position: static; }
  .wm { display: none; }
  .work-row { grid-template-columns: 36px 1fr; }
  .work-row:hover .wt,
  .work-row.on .wt { transform: translateX(6px); }

  .post { grid-template-columns: 1fr 24px; gap: 6px 12px; }
  .pd { grid-column: 1; grid-row: 1; }
  .pt { grid-column: 1; }
  .pg { grid-column: 1; }
  .post i { grid-row: 1 / span 3; grid-column: 2; }

  .shot { flex-basis: 250px; }
  .shot:nth-child(even) { margin-top: 36px; }

  .cta-big { font-size: 64px; }
  .contact-row { flex-direction: column; font-size: 16px; }
  .foot { flex-direction: column; gap: 6px; }
}

/* ---------- Motion preferences ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  [data-rv] { opacity: 1; transform: none; }
  .spot { background: radial-gradient(600px circle at 62% 38%, rgba(208, 97, 47, .16), transparent 60%); }
}
