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

/* ── Variables ── */
:root {
  --dark-cyan:    #083344;
  --vibrant-cyan: #0E7490;
  --faint-cyan:   #ECFEFF;
  --white:        #FFFFFF;
  --border:       rgba(8, 51, 68, 0.12);
  --text-muted:   rgba(8, 51, 68, 0.55);

  /* Accent — amber. Used sparingly: brand mark, primary actions, featured signals. */
  --accent:       #D97706;
  --accent-dark:  #92400E;
  --accent-faint: #FFFBEB;

  /* Card image overlay — opaque off-white top-left → transparent at 60% diagonal */
  --card-overlay: linear-gradient(
    to bottom right,
    rgba(249, 250, 251, 1)    0%,
    rgba(249, 250, 251, 1)   40%,
    rgba(249, 250, 251, 0.80) 45%,
    rgba(249, 250, 251, 0.50) 50%,
    rgba(249, 250, 251, 0.18) 55%,
    rgba(249, 250, 251, 0)   60%
  );
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--white);
  color: var(--dark-cyan);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1.5px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

.navbar__inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--dark-cyan);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar__brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar__nav a {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-cyan);
  opacity: 0.7;
  border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
  letter-spacing: 0.01em;
}

.navbar__nav a:hover,
.navbar__nav a.active {
  opacity: 1;
  background: var(--faint-cyan);
}

.navbar__nav a.active {
  color: var(--vibrant-cyan);
  font-weight: 600;
}

/* ── Page Header ── */
.page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px 48px;
  border-bottom: 1.5px solid var(--border);
}

.page-header__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vibrant-cyan);
  margin-bottom: 12px;
}

.page-header__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--dark-cyan);
  max-width: 560px;
}

.page-header__description {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 520px;
  font-weight: 400;
}

/* ── Blog Grid ── */
.blog-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ── Card ── */
.card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: var(--white);
  box-shadow:
    0 1px 3px rgba(8, 51, 68, 0.06),
    0 4px 12px rgba(8, 51, 68, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
  position: relative;
}

.card:hover {
  box-shadow:
    0 6px 20px rgba(8, 51, 68, 0.10),
    0 20px 48px rgba(8, 51, 68, 0.12);
  transform: translateY(-4px);
}

.card__image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background-color: var(--faint-cyan);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  /* Layer 1: gradient (stays fixed). Layer 2: photo (zooms on hover). */
  background-size: 100% 100%, 100%;
  transition: background-size 0.4s ease;
}

.card:hover .card__image-wrap {
  background-size: 100% 100%, 108%;
}

/* Title overlaid in upper-left triangle of image */
.card__image-title {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 54%;
  font-size: clamp(0.7rem, 1.4vw, 0.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--dark-cyan);
  margin: 0;
  max-height: 58%;
  overflow: hidden;
  z-index: 2;
}

.card__badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  background: var(--dark-cyan);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}

.card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vibrant-cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card__excerpt {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 400;
  flex: 1;
}

.card__footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__author {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.card__cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s, color 0.15s;
}

.card:hover .card__cta {
  gap: 8px;
  color: var(--accent-dark);
}

.card__cta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Stretched link — entire card is clickable via the CTA anchor */
.card__cta::after,
.case-card__cta::after,
.news-card__cta::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* ── Featured card (most recent post) ── */
.card--featured {
  border-top: 3px solid var(--accent);
}



/* ── Case Study Article (detail page) ── */
.case-article {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 96px;
}

/* Hero */
.case-article__hero {
  background: var(--dark-cyan);
  border-radius: 8px;
  padding: 56px 64px;
  margin: 40px 0 0;
  position: relative;
  overflow: hidden;
}

.case-article__hero::before {
  content: attr(data-index);
  position: absolute;
  top: -24px;
  right: 24px;
  font-size: 14rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.04);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

.case-article__sector {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vibrant-cyan);
  margin-bottom: 16px;
}

.case-article__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--white);
  max-width: 680px;
  margin-bottom: 24px;
}

.case-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.case-article__tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  padding: 3px 10px;
}

/* Outcome stats bar */
.case-article__outcomes {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  margin: 28px 0 48px;
  overflow: hidden;
}

.outcome-stat {
  flex: 1;
  padding: 24px 32px;
  border-right: 1.5px solid var(--border);
}

.outcome-stat:last-child {
  border-right: none;
}

.outcome-stat__value {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dark-cyan);
  line-height: 1.1;
  margin-bottom: 4px;
}

.outcome-stat__value a {
  color: inherit;
  text-decoration: none;
}
.outcome-stat__value a:hover {
  color: var(--vibrant-cyan);
}

.outcome-stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Article body — constrained reading width */
.case-article__body {
  max-width: 720px;
}

.case-article__body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dark-cyan);
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--border);
}

.case-article__body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-cyan);
  margin: 32px 0 12px;
}

.case-article__body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--dark-cyan);
  margin-bottom: 16px;
}

.case-article__body ul,
.case-article__body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.case-article__body li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--dark-cyan);
  margin-bottom: 6px;
}

.case-article__body li::marker {
  color: var(--vibrant-cyan);
}

.case-article__body blockquote {
  border-left: 3px solid var(--vibrant-cyan);
  margin: 24px 0;
  padding: 4px 0 4px 20px;
}

.case-article__body blockquote p {
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

.case-article__body strong {
  font-weight: 700;
  color: var(--dark-cyan);
}

/* Diagrams and formulas — allowed to be wider than reading column */
.case-article__body figure {
  margin: 40px 0;
}

.case-article__body figure img,
.case-article__body figure svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--faint-cyan);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.case-article__body figure.wide,
.case-article__body pre.wide {
  width: min(100vw - 48px, 1200px);
}

.case-article__body figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Tables */
.case-article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.9rem;
}
.case-article__body th {
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}
.case-article__body td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.case-article__body tr:last-child td { border-bottom: none; }
.case-article__body td:first-child {
  font-weight: 600;
  color: var(--vibrant-cyan);
  white-space: nowrap;
}

/* Code blocks */
.case-article__body pre {
  background: var(--accent-faint);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  overflow-x: auto;
  margin: 32px 0;
  font-size: 0.82rem;
  line-height: 1.7;
}
.case-article__body pre code {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  color: var(--dark-cyan);
}

/* Back link */
.case-article__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vibrant-cyan);
  margin: 32px 0 0;
  letter-spacing: 0.02em;
  transition: gap 0.15s;
}

.case-article__back:hover { gap: 10px; }

.case-article__back svg {
  width: 14px;
  height: 14px;
}

/* ── Case Study Cards ── */
.case-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.case-card {
  display: flex;
  flex-direction: row;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(8, 51, 68, 0.06),
    0 4px 12px rgba(8, 51, 68, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
  min-height: 260px;
  position: relative;
}

.case-card:hover {
  box-shadow:
    0 6px 20px rgba(8, 51, 68, 0.12),
    0 20px 48px rgba(8, 51, 68, 0.14);
  transform: translateY(-3px);
}

/* ── Left anchor panel ── */
.case-card__anchor {
  flex: 0 0 30%;
  background: var(--dark-cyan);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Large faded number as background texture */
.case-card__anchor::before {
  content: attr(data-index);
  position: absolute;
  bottom: -16px;
  right: -8px;
  font-size: 9rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

.case-card__sector {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vibrant-cyan);
}

.case-card__outcome {
  margin-top: auto;
}

.case-card__metric {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 6px;
}

.case-card__metric-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

/* ── Right body panel ── */
.case-card__body {
  flex: 1;
  background: var(--white);
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
}

.case-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--dark-cyan);
  margin-bottom: 14px;
}

.case-card__description {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
  flex: 1;
}

.case-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.case-card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vibrant-cyan);
  border: 1px solid rgba(14, 116, 144, 0.3);
  border-radius: 3px;
  padding: 3px 10px;
}

.case-card__footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.case-card__year {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.case-card__cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s, color 0.15s;
}

.case-card:hover .case-card__cta {
  gap: 8px;
  color: var(--accent-dark);
}

.case-card__cta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── News Cards ── */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.news-card {
  display: flex;
  flex-direction: row;
  border-radius: 8px;
  background: var(--white);
  box-shadow:
    0 1px 3px rgba(8, 51, 68, 0.06),
    0 4px 12px rgba(8, 51, 68, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
  overflow: hidden;
  min-height: 200px;
  position: relative;
}

.news-card:hover {
  box-shadow:
    0 6px 20px rgba(8, 51, 68, 0.10),
    0 20px 48px rgba(8, 51, 68, 0.12);
  transform: translateY(-3px);
}

.news-card__image {
  flex: 0 0 36%;
  position: relative;
  background-color: var(--faint-cyan);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-size 0.4s ease;
}

.news-card:hover .news-card__image {
  background-size: 108%;
}

/* Gradient fades the image into the white card body on the right */
.news-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    transparent  0%,
    transparent 55%,
    rgba(255, 255, 255, 0.6) 75%,
    rgba(255, 255, 255, 1)  100%
  );
  pointer-events: none;
}

.news-card__body {
  flex: 1;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-card__badge {
  display: inline-block;
  background: var(--dark-cyan);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  align-self: flex-start;
  margin-bottom: 12px;
}

.news-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--dark-cyan);
  margin-bottom: 10px;
}

.news-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 400;
  flex: 1;
}

.news-card__footer {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-card__meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.news-card__meta span {
  color: var(--vibrant-cyan);
  font-weight: 600;
}

.news-card__cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s, color 0.15s;
}

.news-card:hover .news-card__cta {
  gap: 8px;
  color: var(--accent-dark);
}

.news-card__cta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .navbar__inner { padding: 0 20px; }

  .navbar__nav a { padding: 6px 10px; font-size: 0.8rem; }

  .page-header { padding: 40px 20px 36px; }

  .blog-section { padding: 36px 20px 64px; }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .case-card {
    flex-direction: column;
  }

  .case-card__anchor {
    flex: 0 0 auto;
    min-height: 180px;
    padding: 28px 24px;
  }

  .case-card__anchor::before {
    font-size: 6rem;
  }

  .case-card__body {
    padding: 24px;
  }

  .news-card {
    flex-direction: column;
  }

  .news-card__image {
    flex: 0 0 auto;
    min-height: 180px;
  }

  .news-card__image::after {
    background: linear-gradient(
      to bottom,
      transparent 55%,
      rgba(255, 255, 255, 0.6) 80%,
      rgba(255, 255, 255, 1) 100%
    );
  }

  .news-card__body {
    padding: 20px;
  }
}
