:root {
  --bg: #0a0a0a;
  --fg: #ece6d6;
  --muted: #9a9a90;
  --muted2: #78786f;
  --card: #131313;
  --card2: #1a1a1a;
  --border: rgba(255, 255, 255, .12);
  --border-soft: rgba(255, 255, 255, .1);
  --a: #8b9b6d;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 46px 46px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

::selection { background: var(--a); color: var(--bg); }
a { color: var(--a); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .72; }
button { font-family: inherit; }

/* ---------- HEADER ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(rgba(10, 10, 10, .94), rgba(10, 10, 10, .58));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.logo-btn {
  background: none; border: none; cursor: pointer;
  color: var(--fg); font-weight: 700; font-size: 16px; letter-spacing: .02em; padding: 0;
}
.btn-accent {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--a); color: #f3efe4; font-weight: 700;
  border-radius: 999px; border: none; cursor: pointer;
}
.btn-accent.small { gap: 7px; font-size: 13.5px; padding: 8px 15px; }
.btn-accent svg { flex: none; }

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.hidden { display: none !important; }

/* ---------- HERO ---------- */
.hero { padding: 118px 20px 46px; }
.eyebrow {
  font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--a); margin-bottom: 22px;
}
.hero h1 {
  font-family: 'Playfair Display', serif; font-weight: 800;
  font-size: clamp(34px, 7.6vw, 72px); line-height: 1.03; letter-spacing: -.005em;
  margin: 0; max-width: 16ch;
}
.hero h1 span { color: var(--a); }
.hero p.lede {
  font-size: clamp(16px, 2.4vw, 20px); line-height: 1.5; color: var(--muted);
  max-width: 44ch; margin: 24px 0 30px;
}
.btn-hero { font-size: 16px; padding: 15px 26px; }

/* ---------- PROJECTS GRID ---------- */
.projects-section { padding: 34px 20px 30px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 26px;
}
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.section-count { font-family: 'Playfair Display', serif; font-size: 15px; color: var(--a); }

.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
}

.card {
  cursor: pointer; transition: transform .3s cubic-bezier(.2, .7, .2, 1);
  background: none; border: none; padding: 0; text-align: left; color: inherit; font: inherit;
}
.card:hover { transform: translateY(-4px); }
.card-shot {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  background: var(--card); transition: border-color .3s;
}
.card:hover .card-shot { border-color: var(--a); }
.browser-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft); background: var(--card2);
}
.browser-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #333; }
.browser-bar .pill {
  margin: 0 auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #7c7c74; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 14px;
}
.shot-area { position: relative; aspect-ratio: 16 / 10; background: var(--card); }
.shot-area img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; color: #4a4a44; text-align: center; padding: 20px;
  background:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 18px 18px;
}
.shot-placeholder svg { opacity: .5; }
.shot-placeholder span { font-size: 12.5px; max-width: 22ch; line-height: 1.4; }

.card-meta { padding: 18px 4px 4px; }
.card-cat {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--a); margin-bottom: 8px;
}
.card-name {
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 26px;
  letter-spacing: -.005em; margin: 0 0 8px;
}
.card-metric { font-size: 14.5px; color: var(--muted); margin: 0; }

/* ---------- CTA (home) ---------- */
.cta-section { padding: 70px 20px 60px; text-align: center; }
.cta-inner { border-top: 1px solid var(--border); padding-top: 64px; }
.cta-inner h2 {
  font-family: 'Playfair Display', serif; font-weight: 800;
  font-size: clamp(32px, 7vw, 60px); line-height: 1.06; letter-spacing: -.005em;
  margin: 0 auto; max-width: 15ch;
}
.cta-inner p {
  font-size: clamp(15px, 2.2vw, 18px); color: var(--muted); max-width: 40ch; margin: 22px auto 32px;
}
.btn-cta { font-size: 17px; padding: 17px 30px; }
.cta-note { font-size: 13px; color: var(--muted2); margin-top: 18px; }

/* ---------- FOOTER ---------- */
.site-footer { border-top: 1px solid var(--border-soft); }
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 22px 20px;
  display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--muted2);
}
.footer-links { display: flex; gap: 20px; }

/* ---------- CASE STUDY ---------- */
.case-view { max-width: 960px; margin: 0 auto; padding: 96px 20px 80px; }
.back-btn {
  background: none; border: 1px solid rgba(255, 255, 255, .16); cursor: pointer;
  color: var(--muted); font-size: 13.5px; padding: 9px 16px; border-radius: 999px;
  margin-bottom: 34px; display: inline-flex; align-items: center; gap: 8px;
  transition: color .2s, border-color .2s;
}
.back-btn:hover { color: var(--fg); border-color: var(--a); }

.case-category {
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--a); margin-bottom: 14px;
}
.case-title {
  font-family: 'Playfair Display', serif; font-weight: 800;
  font-size: clamp(38px, 8vw, 84px); line-height: 1.02; letter-spacing: -.005em; margin: 0;
}
.case-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-live { font-size: 14.5px; padding: 12px 22px; }
.nda-badge {
  display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 600;
  font-size: 13.5px; padding: 11px 18px; border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px; background: var(--card);
}

.case-shot-frame {
  margin: 34px 0 8px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
}
.case-shot-frame .browser-bar { padding: 11px 15px; }
.case-shot-frame .browser-bar .dot { width: 10px; height: 10px; }
.case-shot-frame .browser-bar .pill { font-size: 12px; padding: 4px 18px; }
.case-shot-frame .shot-area { aspect-ratio: 16 / 9; }

.case-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 46px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 24px 0;
}
.case-facts .fact-k {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted2); margin-bottom: 9px;
}
.case-facts .fact-v { font-size: 16px; font-weight: 600; color: var(--fg); }

.case-block { margin-bottom: 60px; }
.block-label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--a); margin-bottom: 18px;
}
.case-overview {
  font-family: 'Playfair Display', serif; font-weight: 500;
  font-size: clamp(21px, 3vw, 30px); line-height: 1.42; color: var(--fg); margin: 0;
}

.services-list { list-style: none; margin: 0; padding: 0; }
.services-list li {
  display: flex; gap: 16px; align-items: baseline; padding: 15px 0;
  border-bottom: 1px solid var(--border-soft);
}
.services-list .num { font-family: 'Playfair Display', serif; font-size: 14px; color: var(--a); min-width: 26px; }
.services-list .txt { font-size: 17px; font-weight: 500; color: var(--fg); }

.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.metric-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 28px 22px; }
.metric-val {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(30px, 5.5vw, 52px); line-height: 1; color: var(--a);
}
.metric-label { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

.testimonial-slot {
  border: 1px dashed rgba(255, 255, 255, .18); border-radius: 12px; padding: 34px 28px; margin-bottom: 56px;
}
.testimonial-slot .block-label { color: #63635b; margin-bottom: 14px; }
.testimonial-slot p {
  font-family: 'Playfair Display', serif; font-weight: 500;
  font-size: clamp(19px, 2.6vw, 26px); line-height: 1.4; color: #63635b; margin: 0;
}

.case-cta {
  border-top: 1px solid var(--border); padding-top: 40px;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
}
.case-cta h3 {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(24px, 4vw, 38px); letter-spacing: -.005em; margin: 0;
}

/* ---------- REVEAL ON SCROLL ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .case-facts, .metrics-grid { grid-template-columns: 1fr; }
}
