/* Shared styles for LastLayer reference (case study) pages */
:root {
  --ink: #0f1222;
  --ink-2: #474b63;
  --ink-3: #7a7f99;
  --line: #e6e8f2;
  --bg: #ffffff;
  --bg-soft: #f6f7fd;
  --blue: #3535ee;
  --blue-dark: #2525c4;
  --purple: #7b3fe4;
  --teal: #12a594;
  --orange: #f2711c;
  --grad: linear-gradient(100deg, #3535ee 0%, #7b3fe4 45%, #ec3f8c 80%, #f2711c 100%);
  --shadow: 0 1px 2px rgba(20, 24, 60, .04), 0 8px 24px rgba(20, 24, 60, .07);
  --radius: 16px;
  --c: var(--blue);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: Outfit, Inter, sans-serif; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px/1 Inter, sans-serif;
  padding: 14px 22px; border-radius: 10px; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(53, 53, 238, .28); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: #f1f1ff; }
.btn-outline-white { border-color: rgba(255,255,255,.8); color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,.12); }
.btn svg, .back svg { width: 16px; height: 16px; }

/* Header (same as index.html) */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.logo img { height: 34px; width: auto; }
.nav-links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover { color: var(--blue); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-cta .btn { padding: 11px 18px; font-size: 14px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: 14px; }
.link-arrow svg { width: 15px; height: 15px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 26px; height: 26px; }

/* Hero */
.ref-hero { padding: 56px 0 0; position: relative; overflow: hidden; }
.ref-hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 60%; height: 120%;
  background:
    radial-gradient(closest-side, rgba(123, 63, 228, .11), transparent 70%) 70% 30% / 70% 70% no-repeat,
    radial-gradient(closest-side, rgba(25, 182, 230, .10), transparent 70%) 30% 70% / 60% 60% no-repeat;
  pointer-events: none;
}
.ref-head { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a:hover { color: var(--blue); }
.ref-head h1 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 600; margin: 14px 0 16px; max-width: 820px; }
.client { font: 600 20px Outfit, sans-serif; color: var(--c); }
.client-meta { font-size: 14.5px; color: var(--ink-3); margin-top: 2px; }
.client-logo { display: grid; place-items: center; width: 180px; height: 130px; }
.client-logo img { max-height: 110px; max-width: 170px; width: auto; mix-blend-mode: multiply; }
.hero-img { margin-top: 40px; position: relative; }
.hero-img img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 20px; box-shadow: 0 24px 60px rgba(20, 24, 60, .14); }
.caption { font-size: 12.5px; color: var(--ink-3); font-style: italic; margin-top: 10px; }

/* KPI strip */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0 0; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px 20px 18px; }
.kpi .num { font: 600 32px/1.05 Outfit, sans-serif; color: var(--c); white-space: nowrap; }
.kpi .num small { font-size: 20px; }
.kpi .lbl { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.4; }

/* Content */
.content { padding: 64px 0 24px; }
.content h2 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 600; margin: 48px 0 14px; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 19px; margin: 28px 0 10px; }
.content p { color: var(--ink-2); font-size: 16.5px; margin-bottom: 14px; }
.content p strong, .content li strong { color: var(--ink); }
.intro p { font-size: 18px; color: var(--ink); }
.glance { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.glance li { position: relative; padding-left: 30px; color: var(--ink-2); font-size: 16px; }
.glance li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: #ebedff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.3 2.2 4.7-5' fill='none' stroke='%233535ee' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.figure { margin: 26px 0 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.figure img { width: 100%; height: auto; border-radius: 8px; }
.note { font-size: 13px !important; color: var(--ink-3) !important; font-style: italic; line-height: 1.5; margin-top: 10px; }
.callout {
  margin: 24px 0; padding: 20px 24px; border-radius: 14px; background: var(--bg-soft);
  border-left: 4px solid var(--c); color: var(--ink); font-size: 16.5px;
}
.callout p { color: var(--ink); margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 18px 0 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
th, td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; white-space: normal; }
th { background: var(--bg-soft); font-weight: 600; font-size: 13px; color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
tr.hl td { background: color-mix(in srgb, var(--c) 7%, #fff); font-weight: 600; color: var(--ink); }
td.l, th.l { text-align: left; white-space: normal; }

.sources { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.sources p { font-size: 13px; color: var(--ink-3); font-style: italic; }

/* More references */
.more { padding: 56px 0 72px; background: var(--bg-soft); margin-top: 56px; }
.more h2 { font-size: 26px; margin-bottom: 22px; }
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.more-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.more-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,24,60,.05), 0 16px 36px rgba(20,24,60,.10); }
.more-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.more-card div { padding: 14px 16px 16px; }
.more-card .t { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--blue); }
.more-card h3 { font-size: 15.5px; margin-top: 4px; line-height: 1.3; }

/* CTA */
.cta-wrap { padding: 0 0 72px; background: var(--bg-soft); }
.cta {
  position: relative; overflow: hidden; border-radius: 22px; padding: 44px 52px;
  background: linear-gradient(100deg, #1f6bf2 0%, #3535ee 30%, #6a2fd9 65%, #b2338f 88%, #f2711c 100%);
  color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; }
.cta p { opacity: .88; margin-top: 8px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

footer { border-top: 1px solid var(--line); padding: 26px 0; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.foot img { height: 26px; width: auto; }
.foot a:hover { color: var(--blue); }

@media (max-width: 980px) {
  .nav-links, .nav-cta .link-arrow { display: none; }
  .menu-btn { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 76px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 16px; box-shadow: var(--shadow);
  }
  .nav-links.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .more-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .wrap, .narrow { padding: 0 16px; }
  .nav-cta .btn { display: none; }
  .ref-hero { padding-top: 32px; }
  .ref-head { grid-template-columns: 1fr; gap: 20px; }
  .client-logo { order: -1; width: auto; height: auto; justify-items: start; }
  .client-logo img { max-height: 72px; max-width: 130px; }
  .hero-img img { aspect-ratio: 4 / 3; border-radius: 14px; }
  .kpi .num { font-size: 26px; }
  .more-grid { grid-template-columns: 1fr; }
  .cta { padding: 32px 22px; }
  .figure { padding: 10px; }
}
