/* ==========================================================================
   Ladris — Customer Story (case study) shared styles
   Used by every page in stories/. Pages live in the stories/ subfolder, so
   their nav/footer links and asset src's are prefixed with ../
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --black: #0a0a08;
  --black-2: #111110;
  --white: #f5f4f0;
  --accent: #c8392b;
  --border: rgba(245,244,240,0.09);
  --border-strong: rgba(245,244,240,0.18);
  --text-subtle: rgba(245,244,240,0.94);
  --text-faint: rgba(245,244,240,0.80);
  --text-dim: rgba(245,244,240,0.64);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 48px;
}
html { scroll-behavior: smooth; }
em, i { font-style: normal; }
body {
  background: var(--black); color: var(--white);
  font-family: var(--font-sans); font-weight: 300;
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* NAV */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); height: 62px;
  background: rgba(10,10,8,0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--border);
}
.brand { display: flex; align-items: baseline; gap: 0; }
.brand-mark { height: 22px; width: auto; display: block; }
.footer-brand .brand-mark { height: 26px; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 13px; font-weight: 400; color: var(--text-subtle); transition: color 180ms ease; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: none; border-radius: 3px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, opacity 180ms ease;
  white-space: nowrap; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--white); color: var(--black); }
.btn-primary:hover { opacity: 0.85; }
.btn-ghost { background: transparent; color: var(--white); border: 0.5px solid var(--border-strong); }
.btn-ghost:hover { border-color: rgba(245,244,240,0.45); background: rgba(245,244,240,0.03); }
.btn-text { background: transparent; color: var(--text-subtle); padding: 10px 0; border: none; }
.btn-text:hover { color: var(--white); }
.btn-sm { padding: 7px 16px; font-size: 12px; }

/* BREADCRUMB */
.crumb {
  padding: 96px var(--gutter) 0;
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 500;
}
.crumb a { color: var(--text-faint); transition: color 180ms ease; }
.crumb a:hover { color: var(--white); }
.crumb .sep { color: var(--text-dim); }
.crumb .here { color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }

/* STORY HERO */
.story-hero {
  padding: 40px var(--gutter) 0;
  max-width: 1180px; margin: 0 auto;
}
.story-eyebrow {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 30px;
}
.story-eyebrow .tag { color: var(--accent); }
.story-eyebrow .sep { color: var(--border-strong); }
.story-customer-label {
  font-size: 13px; font-weight: 500; color: var(--white);
  letter-spacing: 0.02em; margin-bottom: 20px;
}
.story-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(34px, 4.8vw, 64px);
  font-weight: 300; line-height: 1.04;
  letter-spacing: -0.032em; margin-bottom: 26px;
  text-wrap: balance; max-width: 17ch;
}
.story-dek {
  font-family: var(--font-serif); font-style: normal;
  font-size: 21px; line-height: 1.45;
  color: var(--text-subtle); max-width: 56ch;
}

/* HERO IMAGE */
.story-figure {
  margin: 56px auto 0; max-width: 1180px;
  padding: 0 var(--gutter);
}
.story-figure-inner {
  position: relative; width: 100%;
  aspect-ratio: 21 / 9; overflow: hidden;
  border: 0.5px solid var(--border);
  background: var(--black-2) center/cover no-repeat;
}
.story-figure-inner .frame {
  position: absolute; inset: 22px;
  border: 0.5px solid rgba(245,244,240,0.16);
  pointer-events: none;
}

/* STAT BAND */
.story-stats {
  max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter);
}
.story-stats-inner {
  margin-top: 64px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 0.5px solid var(--border);
  border-left: 0.5px solid var(--border);
}
.story-stat {
  padding: 32px 32px 34px;
  border-right: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
}
.story-stat .n {
  font-family: var(--font-sans); font-size: clamp(36px, 4vw, 52px);
  font-weight: 200; letter-spacing: -0.035em; line-height: 1;
  color: var(--white); margin-bottom: 12px;
}
.story-stat .l {
  font-size: 12px; color: var(--text-faint);
  letter-spacing: 0.04em; line-height: 1.5;
  font-family: var(--font-mono); text-transform: uppercase;
}

/* BODY PROSE */
.story-body {
  max-width: 760px; margin: 0 auto; padding: 104px var(--gutter) 0;
}
.story-section { margin-bottom: 64px; }
.story-section:last-child { margin-bottom: 0; }
.story-section h2 {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 28px;
  display: flex; align-items: baseline; gap: 14px;
}
.story-section h2::before {
  content: ""; width: 28px; height: 0.5px;
  background: var(--accent); display: inline-block;
  transform: translateY(-5px);
}
.story-section p {
  font-size: 18px; line-height: 1.72;
  color: var(--text-faint); margin-bottom: 24px;
  text-wrap: pretty;
}
.story-section p:last-child { margin-bottom: 0; }
.story-section p strong { color: var(--white); font-weight: 500; }

/* PULL QUOTE */
.story-quote {
  max-width: 900px; margin: 104px auto 0;
  padding: 0 var(--gutter);
}
.story-quote-inner {
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  padding: 64px 0;
}
.story-quote blockquote {
  font-family: var(--font-serif); font-style: normal;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400; line-height: 1.26;
  letter-spacing: -0.018em; color: var(--white);
  margin-bottom: 36px; text-wrap: balance;
}
.story-quote blockquote::before { content: "\201C"; color: var(--accent); }
.story-quote blockquote::after { content: "\201D"; color: var(--accent); }
.story-quote .attrib { display: flex; flex-direction: column; gap: 4px; }
.story-quote .attrib .name { font-size: 15px; font-weight: 500; color: var(--white); }
.story-quote .attrib .role {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-dim); letter-spacing: 0.04em;
}

/* RELATED */
.related {
  max-width: 1180px; margin: 0 auto; padding: 112px var(--gutter) 0;
}
.related-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 40px;
}
.related-head h2 {
  font-family: var(--font-sans); font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 300; letter-spacing: -0.025em;
}
.related-head a {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.04em; color: var(--text-subtle);
  transition: color 180ms ease, gap 180ms ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.related-head a:hover { color: var(--white); gap: 12px; }
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 0.5px solid var(--border);
  border-left: 0.5px solid var(--border);
}
.related-card {
  border-right: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  display: flex; flex-direction: column;
  transition: background 220ms ease;
}
.related-card:hover { background: rgba(245,244,240,0.015); }
.related-img {
  aspect-ratio: 16 / 10;
  background-size: cover; background-position: center;
  border-bottom: 0.5px solid var(--border);
  filter: grayscale(0.35) contrast(0.96);
  transition: filter 240ms ease;
}
.related-card:hover .related-img { filter: grayscale(0) contrast(1); }
.related-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.related-customer {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--accent); letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 12px;
}
.related-title {
  font-size: 17px; font-weight: 400; line-height: 1.25;
  letter-spacing: -0.012em; color: var(--white);
  margin-bottom: 18px; text-wrap: balance; flex: 1;
}
.related-foot {
  padding-top: 14px; border-top: 0.5px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint);
}
.related-foot .arrow { color: var(--accent); }

/* CTA */
.cta {
  margin-top: 112px;
  padding: 120px var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: 96px;
  align-items: center;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 70% at 80% 50%, rgba(200,57,43,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta > * { position: relative; z-index: 2; }
.cta .eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 24px;
}
.cta h2 {
  font-family: var(--font-sans);
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 300; line-height: 1.1; letter-spacing: -0.025em;
}
.cta h2 .dim { color: var(--text-faint); }
.cta-body p {
  font-size: 14px; line-height: 1.8;
  color: var(--text-subtle); margin-bottom: 32px; max-width: 50ch;
}
.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* FOOTER */
footer { padding: 96px var(--gutter) 48px; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 64px;
}
.footer-brand p {
  color: var(--text-subtle); font-size: 13px; line-height: 1.7;
  margin-top: 18px; max-width: 38ch;
}
.footer-locations {
  display: flex; flex-wrap: wrap; align-items: center;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 26px; margin-bottom: 26px;
  border-bottom: 0.5px solid var(--border);
}
.footer-locations .hq { color: var(--white); }
.footer-locations i { color: var(--border-strong); margin: 0 12px; font-style: normal; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-label {
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px;
}
.footer-col a {
  font-size: 13px; color: var(--text-subtle); font-weight: 400;
  transition: color 180ms ease;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 0.5px solid var(--border); padding-top: 32px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-faint); flex-wrap: wrap; gap: 16px;
}

@media (max-width: 1000px) {
  .related-grid { grid-template-columns: 1fr; }
  .related-img { aspect-ratio: 21 / 9; }
}
@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .nav-links { display: none; }
  .story-figure-inner { aspect-ratio: 4 / 3; }
  .story-stats-inner { grid-template-columns: 1fr; }
  .story-body { padding-top: 72px; }
  .story-section p { font-size: 16.5px; }
  .cta { grid-template-columns: 1fr; gap: 40px; padding: 80px var(--gutter); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Auto light/dark theme — matches OS/browser preference */
@media (prefers-color-scheme: light) {
  :root {
    --black: #f4f2ec;
    --black-2: #ffffff;
    --white: #14130f;
    --border: rgba(10,10,8,0.09);
    --border-strong: rgba(10,10,8,0.18);
    --text-subtle: rgba(10,10,8,0.94);
    --text-faint: rgba(10,10,8,0.80);
    --text-dim: rgba(10,10,8,0.64);
    --text-mute: rgba(10,10,8,0.42);
  }
  nav.top { background: rgba(247,246,242,0.9) !important; }
  .btn-ghost:hover { border-color: rgba(10,10,8,0.45) !important; background: rgba(10,10,8,0.03) !important; }
  .brand-mark-dark { display: none !important; }
  .brand-mark-light { display: block !important; }
  .footer-legal a { color: rgba(10,10,8,0.55) !important; }
}
