@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --ink: #16171c;
  --ink-soft: #202126;
  --paper: #fafaf7;
  --paper-deep: #f1f1ed;
  --white: #ffffff;
  --gold: #3047ff;
  --gold-bright: #3047ff;
  --muted-dark: #747881;
  --muted-light: #646873;
  --line-dark: rgba(22, 23, 28, 0.14);
  --line-light: rgba(22, 23, 28, 0.14);
  --serif: "Inter", Arial, sans-serif;
  --sans: "Inter", Arial, sans-serif;
  --mono: "DM Mono", "Courier New", monospace;
  --shell: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
}

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

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 8px 13px;
  background: var(--gold-bright);
  color: var(--ink);
  font-size: 0.7rem;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(13, 17, 15, 0.96);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(166, 138, 85, 0.66);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1.25rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #aaada7;
  font-size: 0.57rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--gold-bright);
}

.nav-cta {
  padding: 9px 13px;
  border: 1px solid rgba(166, 138, 85, 0.5);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-dark);
  background: transparent;
  color: var(--white);
}

.nav-toggle > span:not(.sr-only) {
  display: block;
  width: 17px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
}

.case-main {
  padding-top: 82px;
}

.case-hero {
  position: relative;
  padding: 88px 0 92px;
  overflow: hidden;
  background:
    radial-gradient(circle at 83% 10%, var(--case-glow, rgba(166, 138, 85, 0.09)), transparent 27rem),
    linear-gradient(135deg, #0b0e0d, #111613 72%, #0b0e0d);
}

.case-hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 55px 55px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.case-hero .shell {
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 55px;
  color: #838881;
  font-size: 0.57rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--gold-bright);
}

.case-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.58fr);
  gap: clamp(55px, 8vw, 110px);
  align-items: end;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--gold);
  font-size: 0.59rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.case-hero h1 {
  max-width: 850px;
  margin: 0;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 8.2rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.82;
}

.case-lead {
  max-width: 720px;
  margin: 34px 0 0;
  color: #b6b9b2;
  font-family: var(--serif);
  font-size: clamp(1.28rem, 2.2vw, 1.75rem);
  line-height: 1.35;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 35px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 13px;
  padding: 10px 16px;
  border: 1px solid var(--gold);
  color: var(--white);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button-primary {
  background: var(--gold);
  color: var(--ink);
}

.button-primary:hover {
  border-color: var(--gold-bright);
  background: var(--gold-bright);
}

.button-secondary {
  border-color: var(--line-dark);
}

.case-side {
  border-top: 1px solid rgba(166, 138, 85, 0.62);
  border-bottom: 1px solid var(--line-dark);
}

.case-side dl {
  margin: 0;
}

.case-side dl > div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 15px;
  padding: 13px 0;
}

.case-side dl > div + div {
  border-top: 1px solid var(--line-dark);
}

.case-side dt {
  color: var(--gold);
  font-size: 0.53rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.case-side dd {
  margin: 0;
  color: #a4a8a1;
  font-size: 0.65rem;
}

.case-media-shell {
  position: relative;
  margin-top: 75px;
  padding: 18px;
  border: 1px solid rgba(166, 138, 85, 0.46);
  background: #090c0a;
}

.case-media-shell::before {
  display: block;
  margin-bottom: 13px;
  color: #6f746d;
  content: "PROJECT OUTPUT / SELECTED VIEW";
  font-size: 0.49rem;
  letter-spacing: 0.15em;
}

.case-media-shell img {
  width: 100%;
  max-height: 690px;
  object-fit: contain;
  border: 1px solid var(--line-dark);
  background: #101412;
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 24px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.case-fact {
  min-height: 126px;
  padding: 22px 21px;
}

.case-fact + .case-fact {
  border-left: 1px solid var(--line-dark);
}

.case-fact strong,
.case-fact span {
  display: block;
}

.case-fact strong {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  font-weight: 400;
  line-height: 1;
}

.case-fact span {
  margin-top: 10px;
  color: #737871;
  font-size: 0.58rem;
  line-height: 1.5;
}

.case-content {
  padding: 110px 0 130px;
  background: var(--paper);
  color: var(--ink);
}

.case-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 750px);
  gap: clamp(65px, 10vw, 145px);
  justify-content: center;
}

.case-toc {
  position: sticky;
  top: 120px;
  align-self: start;
  padding-top: 10px;
}

.case-toc > span {
  color: var(--gold);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.case-toc nav {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 4px 0 4px 18px;
  border-left: 1px solid var(--line-light);
}

.case-toc a {
  color: #858780;
  font-size: 0.67rem;
}

.case-toc a:hover {
  color: var(--ink);
}

.case-article section + section {
  margin-top: 80px;
  padding-top: 80px;
  border-top: 1px solid var(--line-light);
}

.case-article h2 {
  margin: 0 0 26px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.case-article h3 {
  margin: 39px 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
}

.case-article p,
.case-article li {
  color: var(--muted-light);
  font-size: 0.82rem;
}

.case-article p {
  margin: 0 0 19px;
}

.case-article ul,
.case-article ol {
  display: grid;
  gap: 11px;
  padding-left: 20px;
}

.case-article strong {
  color: #2a2e2a;
  font-weight: 600;
}

.case-article code {
  padding: 2px 5px;
  border: 1px solid var(--line-light);
  background: rgba(13, 17, 15, 0.035);
  color: #353935;
  font-size: 0.87em;
}

.callout {
  position: relative;
  margin: 35px 0;
  padding: 28px 35px;
  border-top: 1px solid rgba(166, 138, 85, 0.65);
  border-bottom: 1px solid rgba(166, 138, 85, 0.65);
}

.callout::before {
  position: absolute;
  top: -13px;
  left: 50%;
  padding: 0 9px;
  background: var(--paper);
  color: var(--gold);
  content: "✦";
  font-size: 0.75rem;
  transform: translateX(-50%);
}

.callout p {
  margin: 0;
  color: #4c514b;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.42;
  text-align: center;
}

.flow-grid {
  margin: 32px 0;
  border-top: 1px solid var(--line-light);
}

.flow-step {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line-light);
}

.flow-step > span:first-child {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.flow-step b,
.flow-step small {
  display: block;
}

.flow-step b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
}

.flow-step small {
  margin-top: 2px;
  color: #7d807a;
  font-size: 0.63rem;
}

.flow-step em {
  color: var(--gold);
  font-size: 0.5rem;
  font-style: normal;
  letter-spacing: 0.12em;
}

.decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 31px 0;
  border-top: 1px solid var(--line-light);
  border-left: 1px solid var(--line-light);
}

.decision-card {
  min-height: 190px;
  padding: 24px;
  border-right: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.decision-card span {
  color: var(--gold);
  font-size: 0.52rem;
  letter-spacing: 0.13em;
}

.decision-card h3 {
  margin: 14px 0 7px;
  font-size: 1.35rem;
}

.decision-card p {
  margin: 0;
  color: #7b7e78;
  font-size: 0.66rem;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  margin-top: 35px;
  padding: 0;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.case-tags span {
  padding: 9px 14px 9px 0;
  color: #747771;
  font-size: 0.55rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.case-tags span + span::before {
  margin-right: 14px;
  color: var(--gold);
  content: "/";
}

.next-case {
  display: block;
  margin-top: 85px;
  padding: 31px 34px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.next-case:hover {
  border-color: var(--gold);
}

.next-case > span {
  color: var(--gold);
  font-size: 0.53rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.next-case b {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.next-case i {
  color: var(--gold-bright);
  font-style: normal;
}

.qa-visual {
  display: grid;
  min-height: 430px;
  align-content: center;
  padding: clamp(28px, 7vw, 90px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #0e1310;
  background-size: 36px 36px;
}

.qa-job {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line-dark);
  color: #b6bab3;
  font-size: 0.62rem;
}

.qa-job:first-child {
  border-top: 1px solid var(--line-dark);
}

.qa-job i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px rgba(197, 169, 111, 0.45);
}

.qa-job span:last-child {
  color: var(--gold-bright);
  font-size: 0.49rem;
  letter-spacing: 0.1em;
}

.site-footer {
  border-top: 1px solid var(--line-dark);
  background: #090c0a;
}

.site-footer .shell {
  display: flex;
  min-height: 105px;
  align-items: center;
  justify-content: space-between;
  color: #686d67;
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-footer p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.site-footer .brand-mark {
  width: 33px;
  height: 33px;
  font-size: 0.88rem;
}

.site-footer a:hover {
  color: var(--gold-bright);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 950px) {
  .case-hero-grid {
    grid-template-columns: 1fr;
  }

  .case-side {
    max-width: 630px;
  }

  .case-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-fact:nth-child(3) {
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }

  .case-fact:nth-child(4) {
    border-top: 1px solid var(--line-dark);
  }

  .case-layout {
    grid-template-columns: 1fr;
  }

  .case-toc {
    display: none;
  }
}

@media (max-width: 740px) {
  .shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 10px;
    border: 1px solid rgba(166, 138, 85, 0.46);
    background: #101411;
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: 11px;
  }

  .nav-toggle[aria-expanded="true"] > span:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] > span:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
  }

  .case-hero {
    padding: 65px 0 70px;
  }

  .back-link {
    margin-bottom: 38px;
  }

  .case-hero h1 {
    font-size: clamp(4rem, 18vw, 6.2rem);
  }

  .case-media-shell {
    margin-top: 50px;
    padding: 10px;
  }

  .case-facts {
    grid-template-columns: 1fr;
  }

  .case-fact + .case-fact,
  .case-fact:nth-child(3),
  .case-fact:nth-child(4) {
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }

  .case-content {
    padding: 80px 0 95px;
  }

  .decision-grid {
    grid-template-columns: 1fr;
  }

  .flow-step {
    grid-template-columns: 36px 1fr;
  }

  .flow-step em {
    display: none;
  }

  .site-footer .shell {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    padding: 24px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Light portfolio system */
body { background: var(--paper); color: var(--ink); }
.site-header { border-bottom-color: var(--line-light); background: rgba(250, 250, 247, .94); }
.brand { color: var(--ink); }
.brand-mark { border-color: rgba(48, 71, 255, .4); color: var(--gold); font-family: var(--mono); }
.site-nav { color: #686c75; font-family: var(--mono); }
.nav-cta { border-color: rgba(48, 71, 255, .35); color: var(--gold); }
.nav-toggle { border-color: var(--line-light); color: var(--ink); }
.case-hero { background: radial-gradient(circle at 84% 4%, rgba(48, 71, 255, .09), transparent 27rem), var(--paper); }
.case-hero::before { background-image: linear-gradient(rgba(22, 23, 28, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(22, 23, 28, .025) 1px, transparent 1px); }
.back-link { color: #767a83; font-family: var(--mono); }
.eyebrow, .case-side dt, .case-media-shell::before, .case-toc > span, .flow-step em, .decision-card span, .next-case > span { font-family: var(--mono); }
.case-hero h1 { color: var(--ink); font-weight: 700; letter-spacing: -.07em; }
.case-lead { color: var(--muted-light); font-family: var(--sans); font-size: clamp(1.15rem, 2vw, 1.55rem); }
.button { border-radius: 7px; color: var(--ink); font-family: var(--mono); }
.button-primary { color: #fff; }
.button-secondary { border-color: var(--line-light); }
.case-side { border-top-color: var(--gold); border-bottom-color: var(--line-light); }
.case-side dl > div + div { border-top-color: var(--line-light); }
.case-side dd { color: var(--muted-light); }
.case-media-shell { border-color: var(--line-light); border-radius: 16px; background: #fff; }
.case-media-shell::before { color: #7a7e87; }
.case-media-shell img { border-color: var(--line-light); border-radius: 9px; background: #f0f0ed; }
.case-facts { border-color: var(--line-light); }
.case-fact + .case-fact { border-left-color: var(--line-light); }
.case-fact strong { color: var(--gold); font-family: var(--sans); font-weight: 600; letter-spacing: -.05em; }
.case-fact span { color: #71757e; }
.case-content { background: #fff; }
.case-article h2, .case-article h3, .flow-step b { font-family: var(--sans); letter-spacing: -.055em; }
.callout { border-color: rgba(48, 71, 255, .35); }
.callout p { color: #444851; font-family: var(--sans); font-weight: 500; }
.flow-step > span:first-child { color: var(--gold); font-family: var(--mono); font-size: .85rem; }
.decision-card { background: #fafaf7; }
.next-case { border-radius: 14px; background: var(--ink); color: #fff; }
.next-case b { font-family: var(--sans); }
.site-footer { border-top-color: var(--line-light); background: var(--paper); }
.site-footer .shell { color: #747881; }

@media (max-width: 740px) {
  .site-nav { border-color: var(--line-light); background: #fff; }
}
