*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1a1a1f;
  --paper: #f3ede4;
  --violet: #6b3fa0;
  --blue: #205dba;
  --darkblue: #0b285a;
  --teal: #218e77;
  --green: #065e45;
  --muted: #4f4f50;
  --gray: #8c8c8c;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Urbanist', system-ui, sans-serif;
  --body: 'Libre Franklin', 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', monospace;
}
html, body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  overflow-x: hidden;
}
.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 0 48px;
  padding: 42px 52px 44px 52px;
  max-width: 1440px;
  margin: 0 auto;
}
.main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: calc(12vh - 8px);
  max-width: 640px;
}
.cs-page p {
  font-family: var(--body);
}

.articles-outer {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-self: start;
  position: relative;
  overflow: hidden;
}
.articles-outer::before,
.articles-outer::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 32px;
  pointer-events: none;
  z-index: 2;
}
.articles-outer::before {
  height: 200px;
  top: 0;
  background: linear-gradient(to bottom, var(--paper) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.articles-outer::after {
  bottom: 0;
  background: linear-gradient(to top, var(--paper) 0%, transparent 100%);
}
.articles-outer.is-scrolled::before {
  opacity: 1;
}
.articles {
  position: relative;
  z-index: 1;
  padding-top: calc(10vh + 8px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  gap: 12px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: none;
  padding-right: 52px;
  padding-bottom: 112px;
}
.articles::-webkit-scrollbar { display: none; }
.article-card {
  position: relative;
  background: white;
  border: 1px solid rgba(26,26,31,0.08);
  padding: 20px 24px;
  text-decoration: none;
  display: block;
  transition: box-shadow 0.2s;
  max-width: 500px;
}
.article-card::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--violet), var(--blue));
  transform: scaleY(0);
  transform-origin: center;
  transition: none;
}
.article-card:hover {
  box-shadow: 0 4px 24px rgba(26,26,31,0.14);
}
.article-card:hover::before {
  transform: scaleY(1);
  transition: transform 0.15s ease;
}
.article-card-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 11px;
}
.article-card-title {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.article-card-excerpt {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 300;
  color: #323238;
  line-height: 1.6;
  margin-bottom: 8px;
}
.article-card-meta {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.articles-view-all {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.articles-view-all:hover { -webkit-text-fill-color: var(--ink); }
.articles-label {
  display: none;
}
@media (max-width: 1024px) {
  .page {
    grid-template-columns: 1fr;
    padding: 80px 24px 44px 24px;
  }
  .main {
    grid-column: 1;
    grid-row: 1;
    max-width: 100%;
    padding-top: 24px;
  }
  .articles-outer {
    grid-column: 1;
    grid-row: 2;
    max-height: none;
    overflow: visible;
  }
  .articles-outer::before,
  .articles-outer::after { display: none; }
  .articles {
    max-height: none;
    overflow-y: visible;
    padding-top: 32px;
  }
  
  .articles-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
  }
  .articles-label::before {
    content: '';
    display: block;
    width: 16px;
    height: 1px;
    background: linear-gradient(90deg, var(--violet), var(--blue));
  }
.articles-view-all {
  max-width:600px;
  width: 100%;
  text-align: right;
  display: block;
  padding-right: 40px;
}
@media (max-width: 630px) {
  .articles-view-all {
    padding-right: 0;
  }
}
}
.pre-footer {
  margin-top: 56px;
}
.pre-footer .status-block {
  margin-bottom: 20px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
}
.name {
  font-family: var(--sans);
  font-size: clamp(32px, 4.8vw, 72px);
  font-weight: 800;
  line-height: 1.37;
  letter-spacing: -0.035em;
  color: var(--ink);
}
@media (max-width: 1100px) {
  .name { font-size: clamp(48px, 4.8vw, 60px); }
}
@media (max-width: 900px) {
  .name { font-size: clamp(32px, 4.8vw, 54px); }
}
.name .gradient-text {
  color: var(--ink);
}
.tagline {
  font-family: var(--mono);
  font-weight: 300;
  font-size: clamp(21px, 2.2vw, 30px);
  color: var(--teal);
  margin-top: 36px;
  margin-bottom: 8px;
  line-height: 1.5;
  letter-spacing: -0.08em;
}
.status-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}
.status-text {
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
  opacity: 0.7;
  letter-spacing: 0.04em;
}
.email-form {
  display: flex;
  max-width: 440px;
  border: 1px solid rgba(26,26,31,0.2);
  background: white;
}
.email-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.email-form input::placeholder { color: var(--muted); }
.email-form button {
  border: none;
  border-left: 1px solid rgba(26,26,31,0.15);
  background: linear-gradient(135deg, #241840 0%, var(--violet) 55%, var(--blue) 110%);
  color: white;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.email-form button:hover { background: linear-gradient(135deg, #4e2e75, #1f4e99, #07704a); color: white; }
.confirm-msg {
  display: none;
  font-size: 13px;
  font-weight: 300;
  color: var(--teal);
  margin-top: 12px;
  font-family: var(--mono);
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 24px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, #ccc4e5, rgba(61, 61, 101, 0.12)) 1;
  grid-column: 1 / -1;
  grid-row: 2;
}
.footer-left {
  font-size: 16.5px;
  font-weight: 300;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-links { display: flex; gap: 24px; align-items: center; }
.footer-links a {
  font-size: 16.5px;
  font-weight: 300;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 1; -webkit-text-fill-color: var(--ink); }
a.footer-left { text-decoration: none; }
a.footer-left svg line { transition: stroke 0.2s; }
a.footer-left:hover .footer-left-text { background: none; -webkit-text-fill-color: var(--ink); }
a.footer-left:hover svg line { stroke: var(--ink); }



/* Top logo */
.top-logo {
  position: fixed;
  top: 5px;
  left: 52px;
  z-index: 100;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.top-logo svg {
  display: block;
}


/* Case Studies vertical tab */
.case-studies-tab {
  position: fixed;
  right: 0;
  top: 44%;
  transform: translateY(-44%);
  z-index: 99;
  border: none;
  cursor: pointer;
  padding: 30px 15px;
  background: linear-gradient(180deg, #2a1f45, var(--violet), var(--blue));
  color: white;
  font-family: var(--mono);
  font-size: 16.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(-44%) rotate(180deg);
  transition: opacity 0.2s, padding 0.2s;
  border-radius: 0 6px 6px 0;
}
.case-studies-tab:hover { background: linear-gradient(180deg, #4e2e75, #1f4e99, #07704a); color: white; padding: 30px 20px; }

/* Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,31,0.35);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Drawer */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(600px, 92vw);
  height: 100vh;
  background: var(--paper);
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0, 0.14, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(26,26,31,0.08);
}
.drawer.open {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 36px 24px;
  border-bottom: 1px solid rgba(26,26,31,0.08);
  flex-shrink: 0;
}
.drawer-title {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.drawer-close {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  font-size: 30px;
  font-weight: 200;
  line-height: 1;
  transition: color 0.2s;
}
.drawer-close:hover { color: var(--ink); }
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Case study cards */
.case-card {
  position: relative;
  background: white;
  border: 1px solid rgba(26,26,31,0.08);
  padding: 20px;
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.case-card::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--violet), var(--blue));
  transform: scaleY(0);
  transform-origin: center;
  transition: none;
}
.case-card:hover {
  box-shadow: 0 4px 24px rgba(26,26,31,0.14);
}
.case-card:hover::before {
  transform: scaleY(1);
  transition: transform 0.15s ease;
}
.case-card.active {
  border-color: var(--blue);
}
.case-card-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 13px;
}
.case-card-title {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 9px;
  letter-spacing: -0.01em;
}
.case-card-desc {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 300;
  color: #323238;
  line-height: 1.6;
  margin-bottom: 16px;
}
.case-card-meta {
  display: flex;
  gap: 16px;
}
.case-card-meta span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: #065e45;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* Desktop hover preview panel — lives in the empty space to the left of the drawer.
   Visibility is toggled in JS and gated behind a (hover: hover) media query check. */
.case-preview {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  /* anchor the panel a fixed gap to the left of the open drawer's edge, so it
     keeps the same relationship to the drawer at every desktop width */
  right: calc(min(600px, 92vw) + 44px);
  /* fill the space left of the drawer minus equal margins, capped so it doesn't
     grow indefinitely on very large screens */
  width: min(1000px, calc(100vw - min(600px, 92vw) - 96px));
  z-index: 102;
  display: none;
  pointer-events: none;
  background: #ffffff;
  border-radius: 18px;
  padding: 6px;
  box-shadow: 0 1px 2px rgba(26,26,31,0.06), 0 8px 24px rgba(26,26,31,0.06);
}
.case-preview.visible { display: block; }
.case-preview-inner {
  background: #ffffff;
  border: 1px solid rgba(26,26,31,0.06);
  border-radius: 13px;
  padding: 6px;
}
.case-preview-image {
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  background: #f0f0f2;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-preview-image span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: #f3ede4;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox > img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
}

.lightbox-close:hover { color: var(--ink); }

.lightbox-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 92vw;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  cursor: default;
  flex-shrink: 1;
}

.lightbox-nav {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
  display: none;
  flex-shrink: 0;
}

.lightbox-nav:hover { color: var(--ink); }
.lightbox.has-carousel .lightbox-nav { display: block; }

.cs-page img:not(.no-lightbox) { cursor: zoom-in; }

.deco {
  position: fixed;
  top: 0; right: 0;
  width: 50vw; height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.page > * { position: relative; z-index: 1; }
@media (max-width: 1024px) {
  .name { font-size: clamp(36px, 10vw, 56px); }
  .pre-footer { grid-column: 1; grid-row: 3; }
  .footer {
    grid-column: 1;
    grid-row: 3;
    flex-direction: column;
    align-items: flex-start;
    gap: 44px;
    padding-top: 48px;
  }
  .deco { width: 80vw; opacity: 0.5; }
  .drawer-header, .drawer-body { padding-left: 24px; padding-right: 24px; }
  .article-card {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .main {
    grid-column: 1;
    grid-row: 1;
    max-width: 100%;
    padding-top: 48px;
  }
.articles {
  align-items: flex-start;
  margin-left: 0;
  width: 100%;
  padding-right: 0;
}
  .top-logo {
  display: none;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.article-card {
  max-width: 560px;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
}
