:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #667085;
  --primary: #133c82;
  --accent: #3b82f6;
  --border: #e5e7eb;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1180px;
  --header-height: 74px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, ul { margin-top: 0; }

body[data-page="home"] {
  min-height: 100svh;
  overflow-x: hidden;
}

body[data-page="home"] main {
  min-height: calc(100svh - var(--header-height));
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.narrow {
  width: min(calc(100% - 2rem), 760px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: "Josefin Sans", sans-serif;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--muted);
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  transition: 180ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(19, 60, 130, 0.08);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font: inherit;
}

.section {
  padding: 2.75rem 0;
}

.full-section {
  min-height: auto;
}

.page-main {
  min-height: auto;
}

.page-hero {
  padding: 1.1rem 0 0.35rem;
}

.tools-heading,
.cases-heading {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
  text-align: left;
}

.eyebrow {
  margin-bottom: 0.7rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1, h2, h3 {
  font-family: "Josefin Sans", sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.08;
  margin: 0 0 0.9rem;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

h3 {
  font-size: 1.3rem;
}

.lead,
.home-text,
.company-details,
.feature-list,
.contact-list,
.card p,
.service-panel p,
.tool-tile p {
  color: var(--muted);
}

.lead,
.home-text {
  font-size: 1.08rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 180ms ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(19, 60, 130, 0.18);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.button:hover {
  transform: translateY(-1px);
}

.home-hero {
  min-height: calc(100svh - var(--header-height));
  padding: 1.15rem 0 0;
  display: flex;
  align-items: flex-start;
}

.home-shell {
  display: grid;
  grid-template-rows: auto auto;
  gap: 4.75rem;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

.home-intro {
  width: 100%;
  max-width: var(--container);
}

.home-intro h1 {
  font-size: clamp(2rem, 3vw, 2.85rem);
  max-width: none;
  margin-bottom: 0.55rem;
}

.home-text {
  width: 100%;
  max-width: none;
  margin-bottom: 0.65rem;
}

.company-details {
  margin: 0.85rem 0 0;
  font-size: 0.98rem;
}

.typewriter {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--primary);
  max-width: 100%;
  animation:
    typing 3s steps(36, end),
    caret 0.8s step-end infinite;
}

.home-cards,
.case-grid,
.tool-grid,
.services-grid,
.partners-grid {
  display: grid;
  gap: 1.25rem;
}

.home-cards,
.case-grid,
.tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-cards {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

.services-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.partners-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.card,
.service-panel,
.tool-tile,
.contact-card,
.contact-form,
.partners-box {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card,
.tool-tile {
  overflow: hidden;
  height: 100%;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.home-card img {
  aspect-ratio: 16 / 7.2;
}

.card-content,
.service-panel,
.tool-tile,
.contact-card,
.contact-form {
  padding: 1.1rem;
}

.card-content p,
.service-panel p,
.tool-tile p {
  margin-bottom: 0;
}

.home-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
}

.home-card p {
  font-size: 0.96rem;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes caret {
  0%, 49% { border-color: var(--primary); }
  50%, 100% { border-color: transparent; }
}

.feature-list,
.contact-list {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.feature-list li,
.contact-list li {
  margin-bottom: 0.45rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.contact-card,
.contact-form {
  height: 100%;
}

.contact-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-list-plain {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.contact-form {
  display: grid;
  gap: 0.75rem;
}

.contact-form label {
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  padding: 0.95rem 1rem;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form .button {
  width: fit-content;
  margin-top: 0.4rem;
}

.tool-tile {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.tool-link {
  text-decoration: none;
}

.tool-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 18px;
}

.tool-logo-full {
  width: 100%;
  height: 148px;
  object-fit: contain;
  border-radius: 0;
}

.service-image {
  width: 100%;
  aspect-ratio: 16 / 4.8;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.coming-soon {
  justify-content: flex-start;
}

.coming-soon-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.placeholder-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #eef4fb, #dfe8f5);
  color: var(--primary);
  font-weight: 700;
}

.coming-soon .placeholder-card span {
  display: none;
}

.partners-box {
  padding: 1.6rem;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.partner-logo img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.partner-trigger.active {
  border-color: rgba(19, 60, 130, 0.22);
  box-shadow: inset 0 0 0 2px rgba(19, 60, 130, 0.08);
}

.partner-panels {
  margin-top: 1.5rem;
}

.partner-panel {
  display: none;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  align-items: start;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.partner-panel.active {
  display: grid;
}

.partner-panel-copy h2 {
  margin-bottom: 0.9rem;
}

.partner-shot {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.text-link {
  color: var(--primary);
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0 2rem;
}

body[data-page="home"] .site-footer {
  display: none;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-shell span {
  font-family: "Josefin Sans", sans-serif;
  letter-spacing: 0.12em;
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.6rem);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .home-cards,
  .case-grid,
  .tool-grid,
  .services-grid,
  .partners-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .partner-panel,
  .partner-panel.active {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
    padding: 1.5rem 0 2rem;
  }

  .typewriter {
    white-space: normal;
    border-right: 0;
    animation: none;
  }

  .footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 2rem 0;
  }

  .brand span {
    display: none;
  }

  .button-row {
    flex-direction: column;
  }

  .button,
  .contact-form .button {
    width: 100%;
  }
}
