/* ============================================================
   Reset & Base
   ============================================================ */

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

html {
  color: #000634;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', sans-serif;
  background: white;
  overflow-x: hidden;
}

ul  { list-style: none; }
a   { text-decoration: none; color: inherit; }
img { display: block; }
button { font-family: inherit; }

/* Skip navigation link — visually hidden until focused (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 12px 24px;
  background: #000634;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Visually hidden — readable by screen readers, invisible on screen */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   Background gradient
   ============================================================
   The PNG is 2576×2176. Figma positions it at:
   left: -77.33%, top: -3.64%, width: 261.77%, height: 113.54%
   of the page container. We replicate that with a fixed overlay
   so the aurora stays in place while the user scrolls.
   ============================================================ */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: white;
}

.page-bg::before {
  content: '';
  position: absolute;
  left: -77.33%;
  top: -3.64%;
  width: 261.77%;
  height: 113.54%;
  background-image: url('PortfolioWebsiteBackground.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}


/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Frosted-glass effect matching Figma's backdrop-blur(100px) */
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 171px;
  padding: 32px 64px;
}

/* Logo container grows to push nav to the right */
.header-logo {
  flex: 1;
  min-width: 0;
}

.header-logo a {
  display: inline-block;
  border-radius: 4px;
  outline: 2px solid transparent;
  outline-offset: 4px;
}

.header-logo a:focus-visible {
  outline-color: #94ffeb;
}

.logo-full {
  width: 178px;
  height: 92px;
  object-fit: contain;
}

/* Hidden on desktop/tablet, shown on mobile */
.logo-small {
  display: none;
  width: 67px;
  height: 38px;
  object-fit: contain;
}

/* External link icon in nav */
.nav-external-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 3px;
  flex-shrink: 0;
}

/* ── Desktop / Tablet nav ── */

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-shrink: 0;
}

/* ── Nav links: global states (desktop + mobile) ── */

/* Default */
.nav-link,
.mobile-nav-link {
  font-size: 16px;
  font-weight: 500;
  color: #000634;
  letter-spacing: -0.08px;
  line-height: 1.45;
  text-transform: capitalize;
  text-decoration: none;
  transition: color 150ms ease;
  outline: 2px solid transparent;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Desktop only: prevent wrapping in horizontal nav */
.nav-link { white-space: nowrap; }

/* Hover */
.nav-link:hover,
.mobile-nav-link:hover {
  color: #00d7b0;
}

/* Active */
.nav-link:active,
.mobile-nav-link:active {
  color: #008d73;
}

/* Focus */
.nav-link:focus-visible,
.mobile-nav-link:focus-visible {
  color: #008d73;
  outline-color: #94ffeb;
}

/* ── Let's Chat! button: global states ── */

/* Default */
.btn-chat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1f2a2e;
  color: #ffffff;
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 150ms ease;
  outline: 3px solid transparent;
  outline-offset: 2px;
}

/* Hover */
.btn-chat:hover {
  background: #00d7b0;
}

/* Active */
.btn-chat:active {
  background: #008d73;
}

/* Focus */
.btn-chat:focus-visible {
  background: #008d73;
  outline-color: #94ffeb;
}

.btn-chat svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ── Email button: global states ── */

/* Default */
.btn-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #737373;
  border: 1px solid #737373;
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  outline: 3px solid transparent;
  outline-offset: 2px;
}

/* Hover */
.btn-email:hover {
  background: #e6e6e6;
  border-color: #b7b7b7;
}

/* Active */
.btn-email:active {
  background: #aeaeae;
  border-color: #a9a9a9;
  color: #ffffff;
}

/* Focus */
.btn-email:focus-visible {
  background: #a4a4a4;
  border: 3px solid #b7c7ff;
  color: #ffffff;
  outline: none;
}

.btn-email svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ── Mobile hamburger ── */

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.hamburger-btn img {
  width: 47px;
  height: 47px;
}

/* ── Mobile nav overlay ── */

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 40px;
  padding-bottom: 32px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px);
}

.mobile-overlay[hidden] {
  display: none;
}

/* Mirrors .header-inner exactly so logo and close button sit at identical positions */
.mobile-overlay-header {
  display: flex;
  align-items: center;
  height: 121px;
  padding: 32px 44px;
  flex-shrink: 0;
}

.mobile-overlay-header a {
  display: inline-block;
  border-radius: 4px;
  outline: 2px solid transparent;
  outline-offset: 4px;
}

.mobile-overlay-header a:focus-visible {
  outline-color: #94ffeb;
}

.mobile-overlay-close {
  width: 47px;
  height: 47px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 4px;
  outline: 2px solid transparent;
  outline-offset: 4px;
  transition: opacity 150ms ease;
}

.mobile-overlay-close:hover {
  opacity: 0.6;
}

.mobile-overlay-close:focus-visible {
  outline-color: #94ffeb;
}

.mobile-overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}


/* ============================================================
   Hero Section
   ============================================================
   Desktop: Figma Intro section is 644px. Sticky header is 171px.
   Visible area = 473px. Hero text top-gap below header ≈ 56px
   (Figma pt-227 − header 171px = 56px breathing room).
   ============================================================ */

.hero {
  min-height: 473px;  /* visible hero height on desktop */
  display: flex;
  align-items: flex-start;
}

.hero-content {
  padding: 56px 94px 80px 64px;
  max-width: 800px;
}

.hero-subtitle {
  font-size: 36px;
  font-weight: 400;
  color: #000634;
  letter-spacing: -0.9px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-headline {
  font-size: 64px;
  font-weight: 700;
  color: #000634;
  letter-spacing: -1.6px;
  line-height: 1.15;
}


/* ============================================================
   Case Studies Section
   ============================================================ */

.case-studies {
  padding: 96px 32px;
}

/* ── Card grid ── */

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;  /* cards align to top of each cell */
}

/*
  Desktop/Tablet layout:
    Col 1, Row 1 → Case Study (with image, tall)
    Col 1, Row 2 → Research (text only)
    Col 2, Row 1 → Streamlining (text only, right side)
*/
.card-case-study  { grid-column: 1; grid-row: 1; }
.card-research    { grid-column: 1; grid-row: 2; }
.card-streamlining { grid-column: 2; grid-row: 1; }


/* ── Card base styles ── */

.card {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  overflow: hidden;
}

.card-text {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-size: 20px;
  line-height: normal;
}

.card-title--bold {
  font-weight: 700;
  color: #000634;
}

.card-title--semibold {
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.card-meta {
  font-size: 18px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: -0.09px;
  line-height: 1.45;
  text-transform: capitalize;
}

.card-badge {
  font-size: 18px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: -0.09px;
  line-height: 1.45;
  text-transform: uppercase;
}

/* ── Case study card image ── */

/*
  Figma image container: aspect-ratio 672/357.
  The source image is positioned at:
    left: -13.25%, top: -17.41%, width: 125.67%, height: 133.06%
  This creates a slight zoom/crop effect.
*/
.card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 672 / 357;
  overflow: hidden;
}

.card-image img {
  position: absolute;
  left: -13.25%;
  top: -17.41%;
  width: 125.67%;
  height: 133.06%;
  max-width: none;
}


/* ── Coming-soon cards: visually dimmed, non-interactive ── */

.card-research,
.card-streamlining {
  opacity: 0.55;
  cursor: default;
}

/* ── Case study card hover state ── */

.card-case-study {
  position: relative;
  cursor: pointer;
}

.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.card-case-study:hover .card-hover-overlay,
.card-case-study:focus-within .card-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.btn-view-case-study {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1f2a2e;
  color: #ffffff;
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease;
  outline: 3px solid transparent;
  outline-offset: 2px;
}

.btn-view-case-study:hover {
  background: #00d7b0;
}

.btn-view-case-study:active {
  background: #008d73;
}

.btn-view-case-study:focus-visible {
  background: #008d73;
  outline-color: #94ffeb;
}

.btn-view-case-study svg {
  width: 22px;
  height: 18px;
  flex-shrink: 0;
}


/* ============================================================
   Case Study Page
   ============================================================ */

.cs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #000634;
  text-decoration: none;
  margin-bottom: 56px;
  border-radius: 4px;
  outline: 2px solid transparent;
  outline-offset: 4px;
  transition: color 150ms ease;
}

.cs-back-link:hover  { color: #00d7b0; }
.cs-back-link:active { color: #008d73; }
.cs-back-link:focus-visible { color: #008d73; outline-color: #94ffeb; }

.cs-hero {
  padding: 120px 120px 80px;
}

.cs-title {
  max-width: 1040px;
  font-size: 48px;
  font-weight: 700;
  color: #000634;
  letter-spacing: -0.96px;
  line-height: 1.2;
}

.cs-feature {
  padding: 0 106px 120px;
}

.cs-feature-img {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1076 / 712;
}

.cs-feature-img img {
  position: absolute;
  left: -19.87%;
  top: -9.42%;
  width: 132.09%;
  height: 114.36%;
  max-width: none;
}

.cs-meta {
  padding: 32px 60px;
}

.cs-meta-inner {
  display: flex;
  gap: 24px;
  padding: 24px 60px;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  min-width: 160px;
}

.cs-meta-label {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.48px;
  line-height: 1.1;
  padding: 16px 0;
}

.cs-meta-value {
  font-size: 24px;
  font-weight: 400;
  color: #000000;
  line-height: normal;
}

.cs-meta-value p {
  margin: 0;
  line-height: normal;
}

.cs-content {
  width: 100%;
  padding: 0 120px;
}

.cs-section {
  padding: 40px 0;
}

.cs-section-heading {
  font-size: 36px;
  font-weight: 700;
  color: #000634;
  line-height: normal;
  padding: 40px 0;
}

.cs-section-body {
  font-size: 24px;
  font-weight: 400;
  color: #000634;
  line-height: normal;
}

.cs-section-body p + p {
  margin-top: 24px;
}

.cs-section-body strong {
  font-weight: 700;
}

.cs-image-block {
  padding: 0 120px 56px;
}

.cs-image-block img {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.cs-image-mobile {
  display: none;
}

.cs-image-mobile img {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.cs-process-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cs-process-title {
  font-size: 24px;
  font-weight: 700;
  color: #000634;
  line-height: normal;
  margin-bottom: 12px;
}

.cs-process-body-text {
  font-size: 24px;
  font-weight: 400;
  color: #000634;
  line-height: normal;
  margin: 0;
}

.cs-outcomes-list {
  padding-left: 28px;
  font-size: 24px;
  color: #000634;
  line-height: normal;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cs-embed {
  padding: 64px;
  padding-bottom: 120px;
}

.cs-embed-placeholder {
  aspect-ratio: 1120 / 632;
  width: 100%;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 16px;
}

.cs-embed-frame {
  width: 100%;
  aspect-ratio: 1120 / 632;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.cs-embed-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}



/* ============================================================
   About (Intro) Section
   ============================================================ */

.about {
  overflow: hidden;
}

.about-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 80px 120px;
}

.about-image {
  width: 451px;
  height: 468px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 36px;
  flex: 1;
  max-width: 578px;
}

.about-name {
  font-size: 48px;
  font-weight: 700;
  color: #000634;
  letter-spacing: -0.96px;
  line-height: 1.2;
}

.about-role {
  font-size: 36px;
  color: #000634;
  line-height: normal;
}

.about-role-bold {
  font-weight: 700;
}

.about-role-normal {
  font-weight: 400;
}

.about-body-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-body {
  font-size: 18px;
  font-weight: 500;
  color: #000634;
  letter-spacing: -0.09px;
  line-height: 1.45;
}

.about-body strong {
  font-weight: 700;
}


/* ============================================================
   CTA Section
   ============================================================ */

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 120px 64px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ffffff 6.3%);
}

.cta-text {
  display: flex;
  flex-direction: column;
  gap: 36px;
  align-items: center;
  width: 100%;
}

.cta-heading {
  font-size: 64px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -1.6px;
  line-height: 1.1;
  max-width: 740px;
}

.cta-subtext {
  font-size: 24px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: -0.12px;
  line-height: 1.45;
}

.cta-subtext-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.cta-buttons .btn-chat,
.cta-buttons .btn-email {
  width: 160px;
  justify-content: center;
}


/* ============================================================
   Tablet  (768px – 1199px)
   ============================================================ */

@media (min-width: 768px) and (max-width: 1199px) {

  .hero-content {
    padding: 56px 120px 80px 44px;
    max-width: none;
  }

  .case-studies {
    padding: 120px 64px;
  }

  /* Tablet card titles bump up to 24px */
  .card-title {
    font-size: 24px;
  }

  .card-title--semibold {
    letter-spacing: -0.48px;
  }

  /* Case study */
  .cs-hero { padding: 200px 94px 80px; }
  .cs-feature { padding: 0 60px 96px; }
  .cs-meta-inner { flex-wrap: wrap; gap: 32px 36px; padding: 64px 32px; }
  .cs-meta-item { width: calc(50% - 18px); }
  .cs-content { padding: 0 88px; }
  .cs-image-block { padding: 0 60px 56px; }
  .cs-embed { padding: 48px 32px 96px; }

  /* About: stack image above text */
  .about-feature {
    flex-direction: column;
    align-items: center;
    padding: 200px 94px;
  }

  /* Body text is regular weight on tablet */
  .about-body {
    font-weight: 400;
  }

  /* CTA subtext is regular weight on tablet */
  .cta-subtext {
    font-weight: 400;
  }
}


/* ============================================================
   Mobile  (≤ 767px)
   ============================================================ */

@media (max-width: 767px) {

  /* ── Header ── */

  .header-inner {
    height: 121px;
    padding: 32px 44px;
  }

  /* Swap wordmark → initials mark */
  .logo-full  { display: none; }
  .logo-small { display: block; }

  /* Hide desktop nav, show hamburger */
  .desktop-nav  { display: none; }
  .hamburger-btn { display: flex; }

  /* ── Hero ── */

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 40px 44px 80px;
    max-width: none;
  }

  /* ── Cards: single column ── */

  .case-studies {
    padding: 120px 44px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Re-stack in natural reading order */
  .card-case-study   { grid-column: 1; grid-row: 1; }
  .card-research     { grid-column: 1; grid-row: 2; }
  .card-streamlining { grid-column: 1; grid-row: 3; }

  .card-title {
    font-size: 20px;
  }

  .card-title--semibold {
    letter-spacing: -0.4px;
  }

  /* Case study */
  .cs-hero { padding: 160px 44px 80px; text-align: center; }
  .cs-feature { padding: 0 24px 80px; }
  .cs-meta { padding: 32px 44px; }
  .cs-meta-inner { flex-wrap: wrap; justify-content: center; text-align: center; gap: 36px; padding: 24px 0 64px; }
  .cs-meta-item { width: 100%; align-items: center; }
  .cs-content { padding: 0 44px; }
  .cs-section-heading { text-align: center; }
  .cs-section-body { text-align: center; }
  .cs-process-title { text-align: center; }
  .cs-process-body-text { text-align: center; }
  .cs-outcomes-list { padding-left: 0; list-style-position: inside; text-align: center; }
  .cs-image-block { padding: 0 24px 56px; }
  .cs-image-block .cs-image-desktop { display: none; }
  .cs-image-mobile {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .cs-embed { padding: 48px 32px 96px; }

  /* About: stack, smaller image, narrower text */
  .about-feature {
    flex-direction: column;
    align-items: center;
    padding: 80px 44px 48px;
  }

  .about-image {
    width: 287px;
    height: 299px;
  }

  .about-text {
    max-width: 287px;
    width: 100%;
  }

  .about-body {
    font-weight: 400;
  }

  /* CTA: narrower heading, column buttons centered and equal width */
  .cta {
    padding: 48px 44px 80px;
  }

  .cta-heading {
    font-size: 64px;
    max-width: 337px;
  }

  .cta-subtext {
    font-weight: 400;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

}
