/* Clickt Studio case-study detail page (single-work.php).
   Self-sufficient: this file carries its own tokens, fonts, nav, footer, buttons and
   CTA so single-work.php never depends on home.css. Foundation rules are copied from
   home.css so the two pages stay visually identical; the cs-* rules are page-specific.
   Self-hosted fonts (Inter + JetBrains Mono, OFL). No third-party Google Fonts request. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jbmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jbmono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #181221;
  --cream: #ECE8F1;
  --offwhite: #EEF1F3;
  --peach: #C7BDD5;
  --pink: #897B9E;
  --mauve: #897B9E;
  --purple: #4E4060;
  --plum: #4E4060;
  --plum-deep: #2B2236;
  --orange: #F86B3C;
  --accent-ink: #4E4060;
  --lilac: #C7BDD5;
  --lime: #897B9E;
  --yellow: #C7BDD5;
  --teal: #4E4060;
  --cherry: #F86B3C;
}
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: "Inter", -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--pink); color: var(--cream); }

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* NAV */
header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(43, 34, 54, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(236, 232, 241, 0.14);
}
.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo { text-decoration: none; display: flex; flex-direction: column; align-items: flex-start; font-family: "Inter", sans-serif; line-height: 1; white-space: nowrap; }
nav { display: flex; align-items: center; gap: clamp(12px, 2.2vw, 30px); }
nav a { text-decoration: none; color: var(--cream); font-size: 14.5px; font-weight: 600; white-space: nowrap; transition: color .15s; }
nav a:hover { color: var(--lilac); }
.nav-cta {
  background: var(--pink) !important;
  color: var(--ink) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  padding: 9px 20px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(43,34,54,0.12) !important;
  box-shadow: 0 10px 22px -14px rgba(43,34,54,0.28) !important;
  transition: transform .15s, box-shadow .15s !important;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -16px rgba(43,34,54,0.42) !important; }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); margin: 4px 0; border-radius: 2px; transition: .2s; }

/* Buttons */
.btn-primary {
  text-decoration: none; background: var(--pink); color: var(--ink); font-size: 15px; font-weight: 700;
  padding: 14px 30px; border-radius: 999px; border: 1px solid rgba(43,34,54,0.14);
  box-shadow: 0 14px 30px -18px rgba(43,34,54,0.32); transition: transform .15s, box-shadow .15s; display: inline-block;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 42px -20px rgba(43,34,54,0.45); }
.btn-secondary {
  text-decoration: none; background: #fff; color: var(--ink); font-size: 15px; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; border: 1px solid rgba(43,34,54,0.14);
  box-shadow: 0 14px 30px -18px rgba(43,34,54,0.32); transition: transform .15s, box-shadow .15s; display: inline-block;
}
.btn-secondary:hover { transform: translateY(-3px); }

/* SECTIONS common */
section { position: relative; }
.section-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(52px,7vw,104px) clamp(18px,4vw,56px) clamp(40px,5vw,72px);
}
h2 { font-family: "Inter", system-ui, sans-serif; font-weight: 400; font-size: clamp(34px, 4.6vw, 62px); line-height: 1.02; margin: 0; }
h2 em { font-style: normal; }

/* ===================== CASE STUDY ===================== */

/* HERO */
.cs-hero { position: relative; overflow: hidden; }
.cs-hero::before {
  content: ''; position: absolute; inset: -30% -10% auto -10%; height: 70%;
  background:
    radial-gradient(40% 60% at 78% 20%, rgba(248,107,60,0.20), transparent 70%),
    radial-gradient(46% 60% at 20% 30%, rgba(137,123,158,0.24), transparent 72%);
  filter: blur(46px); z-index: 0; pointer-events: none;
}
.cs-hero-inner { position: relative; z-index: 1; padding-bottom: clamp(28px,4vw,48px); }
.cs-eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--lilac); margin: 0 0 18px;
}
.cs-title {
  font-family: "Inter", system-ui, sans-serif; font-weight: 800;
  font-size: clamp(38px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.04em;
  margin: 0; max-width: 18ch; text-wrap: balance;
}
.cs-summary {
  font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: rgba(236,232,241,0.82);
  max-width: 54ch; margin: 22px 0 0; font-weight: 500;
}
.cs-back { margin-top: clamp(28px,4vw,40px); }

/* META STRIP */
.cs-meta {
  display: flex; flex-wrap: wrap; gap: clamp(20px,4vw,52px);
  margin: clamp(30px,4vw,44px) 0 0; padding-top: clamp(24px,3vw,32px);
  border-top: 1px solid rgba(236,232,241,0.16);
}
.cs-meta-item { display: flex; flex-direction: column; gap: 6px; }
.cs-meta-k {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(236,232,241,0.5);
}
.cs-meta-v { font-size: 16px; font-weight: 600; color: var(--cream); }
.cs-live-link { color: var(--orange); text-decoration: none; font-weight: 700; transition: color .15s; }
.cs-live-link:hover { color: var(--cream); }

/* NARRATIVE */
.cs-narrative-inner {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: clamp(28px,4vw,64px) clamp(36px,5vw,72px); align-items: start;
}
.cs-scope-block { grid-column: 1 / -1; }
.cs-h2 {
  font-family: "Inter", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(28px, 3.4vw, 46px); line-height: 1.04; margin: 0 0 clamp(16px,2vw,22px); text-wrap: balance;
}
.cs-em { font-style: normal; color: var(--orange); font-weight: 800; }
.cs-prose p { font-size: 16.5px; line-height: 1.66; color: rgba(236,232,241,0.8); margin: 0 0 14px; max-width: 56ch; }
.cs-prose p:last-child { margin-bottom: 0; }
.cs-scope {
  list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px clamp(24px,3vw,44px); margin: 0; max-width: 900px;
}
.cs-scope li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.5; color: rgba(236,232,241,0.82); font-weight: 500; }
.cs-scope-check {
  flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(248,107,60,0.16); color: var(--orange);
}
.cs-scope-check svg { display: block; }

/* BEFORE / AFTER */
.cs-ba-title { margin-bottom: clamp(26px,3.5vw,44px); }
.cs-arrow { color: var(--orange); font-style: normal; }
.cs-pairs { display: flex; flex-direction: column; gap: clamp(36px,5vw,64px); }
.cs-pair-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lilac); margin: 0 0 16px;
}
.cs-pair-frames { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(16px,2.4vw,28px); }
.cs-cap {
  position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: #fff;
  border: 1px solid rgba(43,34,54,0.14); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}
.cs-cap-after { border-color: rgba(248,107,60,0.5); box-shadow: 0 30px 64px -28px rgba(248,107,60,0.4); }
.cs-cap-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream); background: rgba(43,34,54,0.86); padding: 5px 11px; border-radius: 999px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.cs-cap-badge-after { background: var(--orange); color: var(--ink); }
.cs-cap-shot { background: #fff; }
.cs-cap-shot img { display: block; width: 100%; height: auto; }

/* RESULTS */
.cs-results-title { margin-bottom: clamp(24px,3vw,40px); }
.cs-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: clamp(14px,2vw,22px); }
.cs-stats-1 { grid-template-columns: minmax(0, 360px); }
.cs-stats-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cs-stats-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cs-stat {
  background: var(--plum-deep); border: 1px solid rgba(236,232,241,0.12);
  border-radius: 18px; padding: clamp(22px,3vw,32px); display: flex; flex-direction: column; gap: 10px;
}
.cs-stat-num {
  font-family: "Inter", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1; color: var(--orange);
}
.cs-stat-label { font-size: 14px; font-weight: 600; color: rgba(236,232,241,0.66); line-height: 1.4; }
.cs-results-note {
  font-size: 13.5px; line-height: 1.6; color: rgba(236,232,241,0.5);
  margin: clamp(20px,2.6vw,28px) 0 0; max-width: 70ch;
}

/* CTA */
.cs-cta { padding: clamp(20px,3vw,44px) clamp(14px,3vw,40px) clamp(52px,7vw,104px); }
.cta-box {
  max-width: 1320px; margin: 0 auto; background: var(--plum);
  border: 1px solid rgba(43,34,54,0.14); box-shadow: 0 28px 56px -30px rgba(43,34,54,0.45);
  border-radius: 28px; padding: clamp(56px,8vw,104px) clamp(24px,4vw,64px);
  text-align: center; position: relative; overflow: hidden;
}
.cta-eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lilac); margin: 0 0 18px;
}
.cta-box h2 { color: var(--offwhite); margin: 0 auto; max-width: 18ch; font-weight: 800; letter-spacing: -0.04em; }
.cta-box h2 em { color: var(--orange); }
.cta-sub { font-size: clamp(16px,1.6vw,19px); line-height: 1.55; color: rgba(236,232,241,0.85); max-width: 48ch; margin: 22px auto 0; font-weight: 500; }
.cs-cta-btns { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 34px; }

/* FOOTER */
footer { background: var(--ink); color: var(--cream); }
.footer-inner { max-width: 1320px; margin: 0 auto; padding: clamp(44px,6vw,68px) clamp(18px,4vw,56px); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 34px; padding-bottom: 36px; border-bottom: 2px solid rgba(236,232,241,0.22); }
.footer-brand { max-width: 32ch; }
.footer-logo { display: flex; align-items: flex-end; margin-bottom: 14px; font-family: "Inter", sans-serif; font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -0.04em; }
.footer-tagline { font-size: 15px; line-height: 1.55; color: rgba(236,232,241,0.62); margin: 0; }
.footer-links { display: flex; gap: clamp(36px,6vw,84px); flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col-title { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(236,232,241,0.45); font-weight: 700; }
.footer-col a { text-decoration: none; color: var(--cream); font-size: 15px; font-weight: 500; transition: color .15s; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; font-size: 13px; color: rgba(236,232,241,0.5); }
.footer-tagline-end { font-family: "Inter", system-ui, sans-serif; font-style: italic; font-size: 18px; color: rgba(236,232,241,0.85); }

/* Brand type layer (mirrors home.css) */
.footer-tagline, .footer-tagline-end { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .04em; }

/* Clickt logo lockup */
.lockup { display: inline-flex; align-items: baseline; gap: 0; line-height: 1; white-space: nowrap; font-family: "Inter", sans-serif; }
.lockup .mark { position: relative; display: inline-block; font-weight: 900; }
.lockup .mark .back { color: var(--lk-back); }
.lockup .mark .front { position: absolute; left: -0.15em; top: 0.052em; color: var(--lk-front); }
.lockup .word { font-weight: 900; letter-spacing: -0.055em; color: var(--lk-word); margin-left: 0.30em; }
.lockup .sep { width: 1px; align-self: stretch; background: var(--lk-div); opacity: 0.5; margin: 0.14em 0.58em; }
.lockup .divname { font-weight: 500; letter-spacing: -0.01em; color: var(--lk-div); }

/* Responsive */
@media (max-width: 820px) {
  .cs-narrative-inner { grid-template-columns: 1fr; }
  .cs-scope { grid-template-columns: 1fr; }
  .cs-stats, .cs-stats-1, .cs-stats-2, .cs-stats-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .cs-pair-frames { grid-template-columns: 1fr; }
  .cs-stats, .cs-stats-1, .cs-stats-2, .cs-stats-3 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(43,34,54,0.97); padding: 16px clamp(18px,4vw,56px); gap: 14px; border-bottom: 1px solid rgba(236,232,241,0.14); }
  nav.open { display: flex; }
  .nav-mobile-toggle { display: block; }
}

/* Respect reduced-motion. work.js also no-ops its reveals under this preference,
   so content is never left hidden. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================================
   WORK ARCHIVE (archive-work.php) — portfolio listing grid.
   Reuses the nav / footer / tokens above; adds hero + card grid.
   ============================================================ */
.wk-hero { max-width: 1320px; margin: 0 auto; padding: clamp(52px,7vw,96px) clamp(18px,4vw,56px) clamp(24px,3vw,36px); }
.wk-eyebrow { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--lilac); margin: 0 0 18px; }
.wk-hero h1 { font-family: "Inter", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.04em; font-size: clamp(40px,6vw,84px); line-height: 1.0; margin: 0; max-width: 16ch; }
.wk-hero h1 em { font-style: normal; color: var(--orange); }
.wk-hero-sub { font-size: clamp(17px,1.5vw,20px); line-height: 1.55; color: rgba(236,232,241,0.75); max-width: 52ch; margin: 20px 0 0; font-weight: 500; }

.wk-section { max-width: 1320px; margin: 0 auto; padding: clamp(20px,3vw,32px) clamp(18px,4vw,56px) clamp(52px,7vw,96px); }
.wk-empty { font-size: 16px; color: rgba(236,232,241,0.6); }
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: clamp(22px,2.6vw,36px); }

.wk-card { background: rgba(236,232,241,0.04); border: 1px solid rgba(236,232,241,0.12); border-radius: 22px; overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; }
.wk-card:hover { transform: translateY(-4px); border-color: rgba(236,232,241,0.28); box-shadow: 0 28px 56px -34px rgba(0,0,0,0.7); }
.wk-card--nolink:hover { transform: none; border-color: rgba(236,232,241,0.12); box-shadow: none; }
.wk-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.wk-card-link:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

.wk-shot { position: relative; background: var(--plum-deep); }
.wk-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(236,232,241,0.08); }
.wk-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(236,232,241,0.28); }
.wk-url { margin-left: 10px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.04em; color: rgba(236,232,241,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-shot img { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 640; object-fit: cover; }

.wk-body { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px,2.4vw,28px); flex: 1; }
.wk-tag { align-self: flex-start; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); background: var(--lilac); padding: 4px 10px; border-radius: 999px; }
.wk-title { font-family: "Inter", system-ui, sans-serif; font-weight: 800; letter-spacing: -0.03em; font-size: clamp(22px,2.2vw,28px); line-height: 1.1; margin: 2px 0 0; color: var(--cream); }
.wk-desc { font-size: 15px; line-height: 1.55; color: rgba(236,232,241,0.7); margin: 0; }
.wk-meta { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.wk-stat { font-family: "Inter", system-ui, sans-serif; font-weight: 800; font-size: 22px; color: var(--orange); letter-spacing: -0.02em; }
.wk-statlabel { font-size: 12.5px; color: rgba(236,232,241,0.55); }
.wk-cta { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 700; color: var(--lilac); }
.wk-card:hover .wk-cta { color: var(--cream); }

@media (max-width: 520px) {
  .wk-grid { grid-template-columns: 1fr; }
}
