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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f5f7;
  color: #1f2933;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(120deg, #f8fafc 0%, #eef2ff 45%, #f5f7fb 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(209, 213, 219, 0.6);
}

.header-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-content h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

nav ul {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

nav a {
  position: relative;
  color: #6b7280;
  padding-bottom: 2px;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #2f5fd0;
  transition: width 0.2s ease;
}

nav a:hover {
  color: #111827;
}

nav a:hover::after {
  width: 100%;
}

/* Shared navbar component (loaded via js/load-navbar.js) — same look as homepage */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(120deg, #f8fafc 0%, #eef2ff 45%, #f5f7fb 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(209, 213, 219, 0.6);
}

.site-header .container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.site-header .logo {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-header .nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.site-header .nav-link {
  position: relative;
  padding-bottom: 2px;
  color: #6b7280;
  transition: color 0.2s ease;
}

.site-header .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #2f5fd0;
  transition: width 0.2s ease;
}

.site-header .nav-link:hover {
  color: #111827;
}

.site-header .nav-link:hover::after {
  width: 100%;
}

.site-header .nav-link--primary {
  color: #2f5fd0;
}

@media (max-width: 720px) {
  .site-header .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 18px 10px;
  }

  .site-header .logo {
    font-size: 1.2rem;
  }

  .site-header .nav {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
    font-size: 0.85rem;
  }
}

main {
  max-width: 960px;
  margin: 32px auto 40px;
  padding: 0 20px;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

p {
  margin: 0 0 12px;
  color: #4b5563;
}

/* Tiles grid (case studies index) */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tile {
  display: block;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.03);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease;
}

.tile img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.tile h3 {
  font-size: 1rem;
  margin: 0 0 6px;
  color: #111827;
}

.tile p {
  font-size: 0.9rem;
  margin: 0;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.1);
  border-color: rgba(47, 95, 208, 0.2);
}

/* Case / article detail pages */
.case-header-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #6366f1;
  margin-bottom: 4px;
}

.case-title {
  font-size: 1.7rem;
  margin: 0 0 6px;
}

.case-tagline {
  font-size: 0.98rem;
  color: #6b7280;
  margin-bottom: 8px;
}

.case-meta {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 18px;
}

.case-layout {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 22px 22px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.case-layout h3 {
  font-size: 1.1rem;
  margin-top: 18px;
  margin-bottom: 6px;
  color: #111827;
}

.case-layout ul {
  padding-left: 20px;
  margin: 0 0 12px;
  color: #4b5563;
}

.case-layout li {
  margin-bottom: 4px;
}

footer {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  text-align: center;
  padding: 14px 20px;
  font-size: 0.8rem;
  color: #9ca3af;
}

@media (max-width: 720px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 16px 10px;
  }

  .header-content h1 {
    font-size: 1.2rem;
  }

  nav ul {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-end;
    column-gap: 12px;
    font-size: 0.85rem;
  }

  main {
    margin: 24px auto 32px;
    padding: 0 16px;
  }

  .tiles {
    gap: 14px;
    margin-top: 16px;
  }

  .tile {
    padding: 12px;
    border-radius: 10px;
  }

  .tile img {
    height: 120px;
    margin-bottom: 8px;
  }

  .tile h3 {
    font-size: 0.96rem;
    margin-bottom: 4px;
  }

  .tile p {
    font-size: 0.85rem;
  }
}

