/* Shared styles for the case study pages in /work/.
   Colours, fonts and spacing match the homepage (index.html). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white:   #ffffff;
  --off:     #f8f8f6;
  --border:  #e8e8e4;
  --border2: #d0d0ca;
  --ink:     #0f0f0f;
  --mid:     #6b6b6b;
  --light:   #9a9a9a;
  --green:   #15803d;
  --nav-h:   68px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--white); color: var(--ink);
  font-family: 'Inter', sans-serif; font-weight: 400;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* ─── NAV ─────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 64px;
}
.nav-brand {
  font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 500;
  letter-spacing: .01em; color: var(--ink); text-decoration: none;
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mid); text-decoration: none; transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-contact {
  background: var(--ink); color: var(--white);
  padding: 9px 22px; transition: background .2s;
}
.nav-links .nav-contact:hover { background: #333; color: var(--white); }

/* ─── BUTTONS ─────────────────────────────────────── */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: 13px 28px; text-decoration: none;
}
.btn-primary {
  background: var(--ink); color: var(--white); border: 1px solid var(--ink);
  transition: background .2s;
}
.btn-primary:hover { background: #333; }
.btn-secondary {
  color: var(--ink); border: 1px solid var(--border2); transition: border-color .2s;
}
.btn-secondary:hover { border-color: var(--ink); }

/* ─── SECTIONS ────────────────────────────────────── */
.section { padding: 100px 64px; border-bottom: 1px solid var(--border); }
.sec-header {
  display: grid; grid-template-columns: 200px 1fr; gap: 64px;
  margin-bottom: 56px; padding-bottom: 40px; border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.sec-index {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--light);
}
.sec-title {
  font-family: 'Playfair Display', serif; font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 400; letter-spacing: -.01em; line-height: 1.1;
}
.sec-title em { font-style: italic; color: var(--mid); }

/* ─── CASE STUDY HERO ─────────────────────────────── */
.cs-hero { padding-top: calc(var(--nav-h) + 72px); background: var(--off); }
.cs-crumb {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--light);
  margin-bottom: 40px;
}
.cs-crumb a { color: var(--mid); text-decoration: none; }
.cs-crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cs-title {
  font-family: 'Playfair Display', serif; font-size: clamp(40px, 6vw, 80px);
  font-weight: 400; letter-spacing: -.02em; line-height: 1.02;
  max-width: 14ch; margin: 18px 0 28px;
}
.cs-lead {
  font-size: 18px; font-weight: 300; line-height: 1.7; color: var(--mid);
  max-width: 62ch; margin-bottom: 40px;
}
.cs-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 64px; }
.cs-facts {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--border2);
}
.cs-fact { padding: 20px 24px 0 0; }
.cs-fact + .cs-fact { padding-left: 24px; border-left: 1px solid var(--border); }
.cs-fact dt {
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--light); margin-bottom: 8px;
}
.cs-fact dd { font-size: 14px; line-height: 1.5; color: var(--ink); }

/* ─── BODY TEXT ───────────────────────────────────── */
.cs-body { display: grid; grid-template-columns: 200px 1fr; gap: 64px; }
.cs-prose { max-width: 68ch; }
.cs-prose p { font-size: 16px; font-weight: 300; line-height: 1.85; color: #333; }
.cs-prose p + p { margin-top: 20px; }
.cs-prose strong { font-weight: 500; color: var(--ink); }

/* Feature list: what was built */
.cs-features { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--border); }
.cs-feature { padding: 32px 40px 32px 0; border-bottom: 1px solid var(--border); }
.cs-feature:nth-child(even) { padding-left: 40px; border-left: 1px solid var(--border); }
.cs-feature h3 {
  font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 400;
  letter-spacing: -.01em; margin-bottom: 10px;
}
.cs-feature p { font-size: 14px; font-weight: 300; line-height: 1.75; color: var(--mid); }

/* Tech list */
.cs-stack { border-top: 1px solid var(--border); }
.cs-stack-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  padding: 20px 0; border-bottom: 1px solid var(--border); align-items: baseline;
}
.cs-stack-name { font-size: 15px; font-weight: 500; }
.cs-stack-why { font-size: 14px; font-weight: 300; line-height: 1.7; color: var(--mid); }

/* Client quote */
.cs-quote { margin: 0; max-width: 900px; }
.cs-quote blockquote {
  font-family: 'Playfair Display', serif; font-size: clamp(24px, 2.6vw, 36px);
  font-style: italic; font-weight: 400; line-height: 1.4; letter-spacing: -.01em;
  margin-bottom: 28px;
}
.cs-quote figcaption .q-name { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.cs-quote figcaption .q-co {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--light);
}

/* Next project */
.cs-next {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  text-decoration: none; color: inherit;
}
.cs-next-name {
  font-family: 'Playfair Display', serif; font-size: clamp(28px, 4vw, 52px);
  font-weight: 400; letter-spacing: -.01em; margin-top: 12px; display: block;
}
.cs-next-arrow { font-size: 32px; color: var(--light); transition: transform .2s, color .2s; }
.cs-next:hover .cs-next-name { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.cs-next:hover .cs-next-arrow { transform: translateX(6px); color: var(--ink); }

/* ─── WHATSAPP BAND ───────────────────────────────── */
.wa-band { background: var(--ink); color: var(--white); border-bottom: 1px solid var(--ink); }
.wa-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.wa-band .sec-index { color: #8a8a8a; display: block; margin-bottom: 18px; }
.wa-band .sec-title em { color: #8a8a8a; }
.wa-band .btn-primary { background: var(--white); color: var(--ink); border-color: var(--white); padding: 16px 30px; }
.wa-band .btn-primary:hover { background: #e8e8e4; }

.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 400;
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.wa-float img {
  width: 56px; height: 56px; border-radius: 16px; display: block;
  box-shadow: 0 10px 30px rgba(37,211,102,.35); transition: transform .2s;
}
.wa-float:hover img { transform: scale(1.06); }

/* ─── FOOTER ──────────────────────────────────────── */
footer {
  padding: 32px 64px; background: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.foot-name { font-family: 'Playfair Display', serif; font-size: 16px; color: var(--white); letter-spacing: .01em; }
.foot-copy {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: #666;
}
.foot-copy a { color: #999; text-decoration: none; }
.foot-copy a:hover { color: var(--white); }

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  nav, .section, footer { padding-left: 32px; padding-right: 32px; }
  .cs-facts { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .cs-fact:nth-child(4) { padding-left: 0; border-left: none; }
  .cs-body { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  nav { padding: 0 24px; }
  .nav-links { gap: 0; }
  .nav-links a:not(.nav-contact) { display: none; }
  .nav-links .nav-contact { padding: 8px 14px; font-size: 11px; }
  .section { padding: 60px 24px; }
  .cs-hero { padding-top: calc(var(--nav-h) + 40px); }
  .cs-lead { font-size: 16px; }
  .cs-ctas { flex-direction: column; }
  .cs-ctas a { justify-content: center; }
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .cs-fact, .cs-fact + .cs-fact { padding: 16px 0 0; border-left: none; }
  .sec-header { grid-template-columns: 1fr; gap: 12px; margin-bottom: 36px; }
  .cs-features { grid-template-columns: 1fr; }
  .cs-feature, .cs-feature:nth-child(even) { padding: 24px 0; border-left: none; }
  .cs-stack-row { grid-template-columns: 1fr; gap: 6px; }
  .wa-band .btn-primary { width: 100%; justify-content: center; }
  .wa-float { right: 16px; bottom: 16px; }
  .wa-float img { width: 50px; height: 50px; }
  footer { flex-direction: column; gap: 10px; text-align: center; padding: 28px 24px; }
}
