@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Montserrat:wght@300;400;500;600&display=swap');

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Dark mode (default) ── */
:root {
  --bg:      #0a0a0a;
  --surface: #111111;
  --border:  #1e1e1e;
  --fg:      #e8e4de;
  --muted:   #999999;
  --dim:     #555555;
  --accent:  #52B69A;
  --max:     1280px;
  --leaf-front: #1e1e1e;
  --leaf-mid:   #282828;
  --leaf-back:  #333333;
}

/* ── Light mode ── */
body.light {
  --bg:      #f5f3ef;
  --surface: #eceae5;
  --border:  #dddad4;
  --fg:      #111111;
  --muted:   #555555;
  --dim:     #aaaaaa;
  --accent:  #168AAD;
  --leaf-front: #dddad4;
  --leaf-mid:   #e5e2dc;
  --leaf-back:  #eeebe7;
}

html { scroll-behavior: smooth; }

/* ── Custom scrollbars ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--dim); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
  text-wrap: balance;
}

h1, h2, h3, h4,
.hero-name, .cs-title, .cs-h2, .step-title, .problem-title, .metric-value, .case-card-company {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 600;
}

/* ── Layout ── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Sticky Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.3s;
}

.site-nav.scrolled {
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 48px;
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 46px;
  width: auto;
  display: block;
  transform-origin: left center;
  transition: transform 0.3s ease;
  transform: translateY(4px);
}

body:not(.light) .nav-logo-img,
body:not(.light) .footer-logo {
  filter: invert(1);
}

.site-nav.scrolled .nav-logo-img {
  transform: scale(0.6);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--fg); }

/* ── Nav right group ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ── Nav Theme Toggle ── */
.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-toggle-icon {
  display: flex;
  align-items: center;
  color: var(--dim);
  transition: color 0.3s;
}

body.light  .nav-toggle-icon.sun  { color: var(--fg);   }
body:not(.light) .nav-toggle-icon.moon { color: var(--muted); }

.nav-toggle-track {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--dim);
  position: relative;
  display: block;
  transition: border-color 0.3s;
}

body.light .nav-toggle-track { border-color: var(--muted); }

.nav-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.3s, background 0.3s;
  transform: translateX(14px);
}

body.light .nav-toggle-thumb {
  transform: translateX(0);
  background: var(--fg);
}

/* ── Home Hero ── */
.hero {
  padding: 100px 0 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 48px;
}

#wind-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 5;
}

#cloud-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 3;
}

.hero-text {
  flex: 1;
  padding-bottom: 88px;
  min-width: 0;
}

.hero-photo {
  flex-shrink: 0;
  align-self: flex-end;
  line-height: 0;
  position: relative;
  padding-top: 80px;
}

/* ── Sun ── */
.hero-sun {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--leaf-front);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--leaf-front) 10%, transparent),
    0 0 0 11px color-mix(in srgb, var(--leaf-front) 5%, transparent),
    0 0 18px 6px color-mix(in srgb, var(--leaf-front) 13%, transparent);
  transition: opacity 0.55s ease;
  top: 12px;
  right: 18px;
  z-index: 0;
  animation: sun-pulse 4s ease-in-out infinite;
}

/* dark mode: immediately hide sun, no transition/animation */
body:not(.light) .hero-sun {
  visibility: hidden !important;
  animation: none !important;
}

/* Sun visible during click animation */
#hero-sun.sun-animating {
  visibility: visible !important;
  animation: none !important;
  cursor: pointer;
}

#hero-sun { cursor: pointer; }

/* ── Click hint arrow ── */
.click-hint {
  position: absolute;
  right: 39px;
  top: -69px;
  z-index: 11;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 210px;
}

.click-hint.hint-visible { opacity: 1; }

.hint-arrow {
  width: 55px;
  height: 32px;
  display: block;
  align-self: flex-end;
}

.hint-arrow-path { stroke: var(--fg); }

.hint-psst {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--fg);
  white-space: nowrap;
  margin-left: 30px;
  margin-top: 40px;
}

.hint-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  margin-left: 30px;
}

/* Slow theme transition during sun/moon click */
body.theme-transitioning {
  transition: background 1.1s ease, color 1.1s ease !important;
}
body.theme-transitioning .site-nav {
  transition: background-color 1.1s ease, border-color 1.1s ease !important;
}

#sky-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Themed leaf layers — fill container, natural SVG colors */
.leaves-themed {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.5s ease;
}
.leaves-black { opacity: 1;  z-index: 1; }
.leaves-white { opacity: 0;  z-index: 1; }
body:not(.light) .leaves-black { opacity: 0; }
body:not(.light) .leaves-white { opacity: 1; }

@keyframes sun-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

@keyframes sun-spin {
  to { transform: rotate(360deg); }
}

.hero-photo img:not(.leaves-themed) {
  height: min(545px, 55vh);
  width: auto;
  display: block;
  view-transition-name: leon-photo;
}

.hero-leaves-wrap {
  position: relative;
  z-index: 1;
  width: 315px;
  height: 340px;
  left: -60px;
  transform-origin: 50% 100%;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.hero-leaves-wrap svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
  transition: opacity 0.6s ease-out;
  z-index: 1;
}

#wind-canvas { z-index: 10; }

.leaves-full { opacity: 1; }
.leaves-min  { opacity: 0; }

.hero-name {
  font-size: clamp(52px, 6.5vw, 96px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--fg);
  margin-bottom: 20px;
  margin-left: -8px;
}

.hero-tagline {
  margin-bottom: 36px;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 400;
  font-weight: 300;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-tagline br + em {
  display: block;
  margin-top: 10px;
}

.hero-tagline em {
  color: var(--fg);
  font-style: normal;
  font-weight: 500;
}

.hero-cta {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-cta a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 999px;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s;
}

.hero-cta .cta-primary {
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
}

.hero-cta .cta-primary:hover { opacity: 0.8; }

.hero-cta .cta-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--dim);
}

.hero-cta .cta-secondary:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* ── Beyond the Job Title ── */
.beyond-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.beyond-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 32px;
}

.beyond-item {
  display: flex;
  gap: 16px;
}

.beyond-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.beyond-text {}

.beyond-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 4px;
}

.beyond-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Work List ── */
.work-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 40px;
}

.case-list { list-style: none; }

.case-item { border-top: 1px solid var(--border); }
.case-item:last-child { border-bottom: 1px solid var(--border); }

.case-link {
  display: grid;
  grid-template-columns: 56px 1fr auto 32px;
  align-items: center;
  gap: 20px;
  padding: 32px 0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.case-link:hover { opacity: 0.6; }

.case-num {
  font-size: 28px;
  font-weight: 300;
  color: var(--dim);
  letter-spacing: -1px;
  line-height: 1;
}

.case-company {
  font-size: 22px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 4px;
}

.case-desc {
  font-size: 13px;
  color: var(--muted);
}

.case-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tag {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 14px;
  border: 1px solid var(--dim);
  border-radius: 999px;
}

.case-arrow {
  font-size: 20px;
  color: var(--dim);
  transition: transform 0.2s, color 0.2s;
  text-align: right;
}

.case-link:hover .case-arrow {
  transform: translate(4px, -4px);
  color: var(--fg);
}

.case-thumb {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  object-position: top;
  display: block;
  filter: grayscale(15%) brightness(0.85);
  transition: filter 0.3s;
  border-radius: 2px;
  margin-bottom: 32px;
}

.case-item:hover .case-thumb {
  filter: grayscale(0%) brightness(0.95);
}

body.light .case-thumb {
  filter: grayscale(10%) brightness(1);
}

/* ── Contact Section ── */
.contact-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.contact-intro {
  font-size: 15px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-links-col {}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.contact-row:first-child { border-top: 1px solid var(--border); }
.contact-row:hover { opacity: 0.6; }

.contact-row-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
}

.contact-row-value {
  font-size: 13px;
  color: var(--muted);
}

/* Email form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
}

.form-input,
.form-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--muted);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--dim);
}

.form-textarea { height: 100px; }

.form-submit {
  background: var(--fg);
  color: var(--bg);
  border: none;
  padding: 13px 28px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: opacity 0.2s;
  align-self: flex-start;
}

.form-submit:hover { opacity: 0.8; }

/* ── Footer ── */
footer {
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer span, footer a {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
  text-decoration: none;
}

/* ══════════════════════════════════════
   CASE STUDY PAGES
══════════════════════════════════════ */

.cs-back {
  padding: 24px 0 0;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.cs-back:hover { color: var(--fg); }

.cs-hero {
  padding: 48px 0 64px;
  border-bottom: 1px solid var(--border);
}

.cs-index {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 20px;
}

.cs-title {
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin-bottom: 20px;
}

.cs-subtitle {
  font-size: 14px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.cs-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.cs-meta-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}

.cs-meta-value {
  font-size: 13px;
  color: var(--muted);
}

.cs-body { padding: 72px 0; }

.cs-section { margin-bottom: 72px; }

.cs-section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cs-section-num {
  font-size: 52px;
  font-weight: 300;
  letter-spacing: -3px;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
}

body.light .cs-section-num { color: var(--dim); opacity: 0.3; }

.cs-section-title {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.cs-h2 {
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 300;
  line-height: 1.3;
  color: var(--fg);
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}

.cs-p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 600px;
}

.cs-p + .cs-p { margin-top: 16px; }

.cs-eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.cs-bullets {
  list-style: disc;
  padding-left: 20px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.cs-footnote {
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.6;
}

/* Problem pairs: two columns side by side */
.problem-pairs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 24px;
  row-gap: 0;
  margin-top: 32px;
}

.problem-pairs-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.problem-pair {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-weight: 300;
}

.problem-card-top {
  padding: 32px 28px 24px;
}

.problem-pair-img-wrap {
  overflow: hidden;
  width: 100%;
  min-height: 240px;
}

.problem-pair-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

body.light .problem-pair-img--evidence {
  mix-blend-mode: multiply;
}



/* Problem fact bullets */
.problem-facts {
  list-style: none;
  margin: 0;
  padding: 0 28px 24px;
  display: flex;
  flex-direction: column;
}

.problem-fact {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.problem-fact-icon {
  font-size: 18px;
  color: var(--dim);
  flex-shrink: 0;
  margin-top: 2px;
  font-variation-settings: 'wght' 300;
}

.problem-fact-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.problem-fact-value {
  font-size: 13px;
  font-weight: 400;
  color: var(--fg);
  line-height: 1.4;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  margin-top: 32px;
  border-radius: 8px;
  overflow: hidden;
}

.problem-card {
  background: var(--bg);
  padding: 28px 24px;
}

.problem-num {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

.problem-title {
  font-size: 20px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 10px;
  line-height: 1.4;
}

.problem-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.problem-who {
  margin-top: 12px;
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.5px;
}

.research-phase-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.research-list { list-style: none; margin-top: 24px; max-width: 640px; }

/* CSM findings table */
.csm-table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.csm-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.csm-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.csm-table td {
  padding: 14px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.csm-table tbody tr:last-child td { border-bottom: none; }

.csm-table tbody tr:hover td { background: color-mix(in srgb, var(--fg) 3%, transparent); }

.csm-table-quote {
  font-style: italic;
  color: var(--muted);
  max-width: 260px;
}

.csm-table-insight {
  color: var(--fg) !important;
  font-weight: 500;
  max-width: 200px;
  background: var(--surface);
}

.csm-table th:last-child {
  background: var(--surface);
}

.research-item {
  display: flex;
  gap: 16px;
  padding: 8px 0;
}

.research-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  flex-shrink: 0;
  margin-top: 8px;
}

.research-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}



.execution-step {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.execution-step:last-child { border-bottom: none; padding-bottom: 0; }

.step-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

.step-title {
  font-size: 30px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 12px;
  line-height: 1.3;
}

.step-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 580px;
}

.cs-img {
  width: 100%;
  display: block;
  border-radius: 8px;
  margin: 28px 0;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.cs-img-plain {
  width: 100%;
  display: block;
  margin: 28px 0;
}

.trusted-svg-wrap {
  width: 100%;
  margin: 28px 0;
}

.trusted-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

body.light .svg-adaptive-text {
  fill: var(--fg);
}

.ux-cards-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.ux-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-weight: 300;
}

.ux-card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f3ef;
}

.ux-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: grayscale(1);
  mix-blend-mode: multiply;
  transition: filter 0.4s ease;
}

.ux-card:hover .ux-card-img {
  filter: grayscale(0);
}

.ux-card-body {
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.ux-card-num {
  font-size: 11px;
  font-weight: 400;
  color: var(--dim);
  margin: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ux-card-title {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--fg);
  line-height: 1.4;
}

.ux-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 900px) {
  .ux-cards-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu panel ── */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 8px 24px 20px;
}

.nav-mobile-menu.open { display: flex; }

.nav-mobile-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-mobile-links li a {
  display: block;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.nav-mobile-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0;
}

.nav-mobile-toggle-label {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .nav-logo-img { height: 37px; }
  .nav-right { display: none; }
  .nav-hamburger { display: flex; }
  .pan-btn { width: 36px; height: 36px; font-size: 18px; }
}

@media (max-width: 560px) {
  .ux-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  margin-top: 32px;
  border-radius: 8px;
  overflow: hidden;
}

.metric {
  background: var(--bg);
  padding: 32px 24px;
}

.metric-value {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 300;
  color: var(--fg);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 10px;
}

.metric-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.quote-block {
  border-left: 1px solid var(--border);
  padding: 4px 24px;
  margin: 28px 0;
}

.quote-text {
  font-size: 15px;
  color: var(--fg);
  font-weight: 300;
  line-height: 1.7;
  font-style: italic;
}

.quote-attr {
  margin-top: 10px;
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
}

/* ── CSM infographic graph ── */

.csm-graph rect { fill: var(--muted); }
.csm-graph path[fill="#D2D2D2"] { fill: var(--fg); }
.csm-graph path[fill="#2B2A2A"] { fill: var(--bg); }
body.light .csm-graph path[fill="#91E3FC"] { fill: #1E6091; }


.csm-graph-note {
  margin: 24px 0 0;
  max-width: 50%;
  font-size: 11px;
  color: var(--dim);
  line-height: 1.5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  padding: 6px 8px;
  border-radius: 4px;
  text-align: left;
}

/* ── Section divider ── */
.cs-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0 28px;
}

/* ── Why Customer Success — side-by-side layout ── */
.csm-why-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 48px;
}

/* Widget interactive canvas */
/* Widget interactive grid */
.widgets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 8px;
  align-items: flex-start;
}

.widget-item {
  display: block;
  cursor: zoom-in;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s;
  z-index: 1;
  border-radius: 6px;
  position: relative;
  height: auto;
  max-height: 220px;
  width: auto;
  object-fit: contain;
}

.widget-item:hover { z-index: 5; filter: brightness(1.03); }

.widget-item.active {
  transform: scale(2.5);
  z-index: 100;
  cursor: zoom-out;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}

.widget-hint {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.cs-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}

.cs-split-layout--reverse {
  direction: rtl;
}

.cs-split-layout--reverse > * {
  direction: ltr;
}

.cs-split-img-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  border-radius: 12px;
  overflow: hidden;
}

.cs-split-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: right top;
}

.cs-split-img--nobg {
  mix-blend-mode: multiply;
}

.cs-split-img--no-radius {
  border-radius: 0;
}

.cs-split-img-wrap:has(.cs-split-img--no-radius) {
  border-radius: 0;
}

.cs-split-img-wrap--light-bg {
  background: #f5f3ef;
  border: 1px solid var(--border);
}

.pan-wrap {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  position: relative;
  border-radius: 12px;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.pan-wrap.is-dragging {
  cursor: grabbing;
}

.pan-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  border-radius: 12px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pan-hint.hidden {
  opacity: 0;
}

.pan-hint-icon {
  font-size: 28px;
  font-variation-settings: 'wght' 300;
}

.pan-hint-text {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.pan-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pan-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.pan-overlay-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  opacity: 0.7;
}

.pan-overlay-close:hover { opacity: 1; }

.pan-overlay-frame {
  position: relative;
  width: 92vw;
  height: 92vh;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f3ef;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: grab;
}

.pan-overlay-frame.is-dragging { cursor: grabbing; }

.pan-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.pan-btn--expand {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.pan-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.pan-btn:hover {
  background: var(--surface);
}

.pan-img {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  display: block;
  will-change: transform;
  transform-origin: 0 0;
}


@media (max-width: 720px) {
  .cs-split-layout { grid-template-columns: 1fr; direction: ltr; }
  .cs-split-layout--reverse { direction: ltr; }
  .cs-split-text { order: 1; }
  .cs-split-img-wrap,
  .pan-wrap { order: 2; }
}

.csm-graph-wrap {
  display: flex;
  flex-direction: column;
}

.csm-graph-img {
  width: 100%;
  object-fit: contain;
  object-position: top left;
}

body:not(.light) .csm-graph-img {
  filter: invert(1) hue-rotate(180deg);
}

.csm-why-content {
  display: flex;
  flex-direction: column;
}

.csm-why-points {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.csm-why-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.csm-why-item:first-child {
  border-top: none;
}

.csm-why-item:last-child {
  border-bottom: none;
}

.csm-why-icon {
  font-size: 18px;
  line-height: 1;
  width: 20px;
  text-align: center;
  color: var(--dim);
  flex-shrink: 0;
  margin-top: 3px;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.csm-why-item p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.csm-graph-note {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.5;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .csm-why-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Decorative background photo block (sub-section level) ── */
.cs-intro-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  margin-bottom: 220px;
  margin-right: -48px;
}

.cs-intro-img-wrap {
  display: flex;
  justify-content: flex-end;
  align-self: stretch;
}

.cs-intro-img {
  width: 100%;
  max-width: 280px;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  display: block;
  transform: translateX(-100px) scale(1.69);
  transform-origin: top right;
  border-radius: 12px;
}


@media (max-width: 720px) {
  .cs-intro-layout { grid-template-columns: 1fr; margin-right: 0; margin-bottom: 48px; }
  .cs-intro-img-wrap { justify-content: center; }
  .cs-intro-img {
    transform: none;
    max-width: 100%;
    height: auto;
    object-position: center;
  }
}

/* ── Case Study Next/Prev ── */
.cs-nav-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
  margin-top: 80px;
  border-radius: 8px;
  overflow: hidden;
}

.cs-nav-link {
  background: var(--bg);
  padding: 36px 40px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.cs-nav-link:hover { background: var(--surface); }

.cs-nav-link > * {
  position: relative;
  z-index: 1;
}

.cs-nav-link.next { text-align: right; align-items: flex-end; }

.cs-nav-direction {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
}

.cs-nav-name {
  font-size: 20px;
  font-weight: 300;
  color: var(--fg);
}

.cs-nav-desc {
  font-size: 13px;
  color: var(--muted);
}

/* ── Lightbox ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

body.light .lightbox-overlay {
  background: rgba(240,237,232,0.95);
}

body.light .lightbox-close {
  color: #999;
}

body.light .lightbox-close:hover {
  color: #111;
}

.lightbox-overlay.open { display: flex; }

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 80px rgba(0,0,0,0.8);
  cursor: default;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #888;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

.lightbox-close:hover { color: #fff; }

/* ── Chat Widget ── */
#chat-widget {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 400;
}

.chat-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.chat-btn:hover,
.chat-btn.active { transform: scale(1.1); }

.chat-panel {
  position: absolute;
  bottom: 56px;
  right: 0;
  width: 320px;
  height: 480px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s, opacity 0.2s;
}

.chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-hname {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

.chat-hsub {
  font-size: 11px;
  color: var(--dim);
  margin-top: 1px;
}

.chat-close {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s;
  font-family: inherit;
}

.chat-close:hover { color: var(--fg); }

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}

.chat-msgs::-webkit-scrollbar { width: 3px; }
.chat-msgs::-webkit-scrollbar-track { background: transparent; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-bubble {
  max-width: 88%;
  font-size: 13px;
  line-height: 1.6;
  padding: 9px 13px;
  border-radius: 12px;
}

.chat-bubble.bot {
  background: var(--surface);
  color: var(--fg);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}

.chat-bubble.user {
  background: var(--fg);
  color: var(--bg);
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

.chat-typing {
  display: flex;
  gap: 5px;
  padding: 11px 14px;
  background: var(--surface);
  border-radius: 12px;
  border-bottom-left-radius: 3px;
  align-self: flex-start;
  width: 50px;
}

.chat-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dim);
  animation: chat-dot 1.2s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chat-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%            { opacity: 1;   transform: translateY(-4px); }
}

.chat-foot { flex-shrink: 0; }

.chat-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 14px;
}

.chat-opt {
  font-size: 13px;
  padding: 7px 15px;
  border: 1px solid var(--dim);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.3px;
  transition: color 0.2s, border-color 0.2s;
}

.chat-opt:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
}

.chat-input-field {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-field:focus { border-color: var(--muted); }
.chat-input-field::placeholder { color: var(--dim); }

.chat-send-btn {
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.chat-send-btn:hover { opacity: 0.8; }

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
}

.chat-form input,
.chat-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.chat-form input:focus,
.chat-form textarea:focus { border-color: var(--muted); }

.chat-form input::placeholder,
.chat-form textarea::placeholder { color: var(--dim); }

.chat-form textarea { height: 60px; }

.chat-form-send {
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.chat-form-send:hover { opacity: 0.8; }

.chat-form-cal {
  background: transparent;
  color: var(--muted);
  border: none;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.3px;
  cursor: pointer;
  padding: 4px 0;
  text-align: center;
  transition: color 0.2s;
}

.chat-form-cal:hover { color: var(--fg); }

/* ── Mobile ── */
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .problem-pairs-grid { grid-template-columns: 1fr; }
  .problem-pairs-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-photo { display: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .beyond-grid { grid-template-columns: 1fr; }
  .case-link { grid-template-columns: 40px 1fr 24px; }
  .case-tags { display: none; }
  .contact-layout { grid-template-columns: 1fr; }
  .cs-meta { gap: 24px; }
  .problem-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .theme-toggle { bottom: 20px; right: 20px; }

  /* Table — simple horizontal scroll */
  .csm-table-wrap { overflow-x: auto; }
}

@media (min-width: 901px) {
  .hero { padding-top: 115px; }
  .hero-photo { padding-top: 92px; }
  .hero-leaves-wrap { width: 361px; height: 391px; }
}
