/* ============================================================
   CLASS SYSTEMS — DESIGN SYSTEM
   main.css: tokens, reset, grid, typography, spacing, layout
   ============================================================ */

/* ---------- DESIGN TOKENS ---------------------------------- */
:root {
  /* Colours */
  --color-primary:        #0D2F9E;
  --color-cta:            #0099FF;
  --color-cta-hover:      #007ACC;
  --color-teal:           #00CCDF;
  --color-lime:           #D4F000;
  --color-bg:             #ECF4FF;
  --color-white:          #FFFFFF;
  --color-border:         #B8D0F8;
  --color-text:           #0A1B3D;
  --color-text-secondary: #475F85;
  --color-overlay:        rgba(13, 47, 158, 0.72);

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --fs-h1:   clamp(40px, 6vw, 64px);
  --fs-h2:   clamp(28px, 4vw, 48px);
  --fs-h3:   clamp(22px, 3vw, 32px);
  --fs-h4:   20px;
  --fs-body: 17px;
  --fs-sm:   14px;
  --fw-bold:     700;
  --fw-semibold: 600;
  --fw-regular:  400;
  --lh-heading: 1.15;
  --lh-body:    1.65;

  /* Spacing — 8px grid */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 80px;
  --sp-8: 100px;

  /* Layout */
  --max-width:        1200px;
  --section-padding:  var(--sp-7) 0;
  --card-padding:     var(--sp-3) var(--sp-4);
  --border-radius-sm: 8px;
  --border-radius:    12px;
  --border-radius-lg: 20px;

  /* Shadows */
  --shadow-card: 0 2px 16px rgba(13, 47, 158, 0.09);
  --shadow-hover: 0 6px 28px rgba(13, 47, 158, 0.18);
  --shadow-nav:  0 2px 12px rgba(13, 47, 158, 0.12);

  /* Transitions */
  --transition: 200ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol { list-style: none; }

button, input, textarea, select {
  font: inherit;
}

/* ---------- TYPOGRAPHY ------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--lh-heading);
  color: var(--color-text);
  font-weight: var(--fw-bold);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }

p { margin-bottom: var(--sp-2); }
p:last-child { margin-bottom: 0; }

/* ---------- LAYOUT ----------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-3);
}

.section {
  padding: var(--section-padding);
}

.section--alt {
  background-color: var(--color-bg);
}

.section--dark {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--sp-3);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ---------- SECTION HEADER --------------------------------- */
.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--sp-5);
}

.section-header .eyebrow {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-cta);
  margin-bottom: var(--sp-1);
}

.section-header h2 {
  margin-bottom: var(--sp-2);
}

.section-header p {
  font-size: 18px;
  color: var(--color-text-secondary);
}

.section--dark .section-header p {
  color: rgba(255,255,255,0.75);
}

.section--dark .section-header .eyebrow {
  color: var(--color-lime);
}

/* ---------- RESPONSIVE ------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-padding: var(--sp-6) 0;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- UTILITY ---------------------------------------- */
.text-center { text-align: center; }
.text-white  { color: var(--color-white); }
.text-secondary { color: var(--color-text-secondary); }

.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }

.mb-1 { margin-bottom: var(--sp-1); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }

.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }

/* Fade-in animation (triggered by IntersectionObserver) */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- IMAGE HOVER ZOOM ------------------------------- */
/*
  Zoom effect requires overflow:hidden on the parent so the image
  stays clipped to its container while scaling.
  .screenshot-wrap and .problem-strip__image already have overflow:hidden.
  Logo and integration image containers get overflow:hidden added here.
*/

.screenshot-wrap img,
.problem-strip__image img {
  transition: transform 250ms ease;
}

.screenshot-wrap:hover img,
.problem-strip__image:hover img {
  transform: scale(1.04);
}

/* Logo strips — clip the img itself so it zooms within its own bounds */
.logo-strip__logos img,
.logo-grid-item img,
.integration-strip img {
  overflow: hidden;
  transition: transform 250ms ease;
}

.logo-strip__logos img:hover,
.logo-grid-item:hover img,
.integration-strip img:hover {
  transform: scale(1.08);
}

/* Team photos — wrap already provides circular clip via border-radius+overflow */
.team-card__photo-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--sp-2);
  border: 3px solid var(--color-border);
  flex-shrink: 0;
}

.team-card__photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 250ms ease;
}

.team-card:hover .team-card__photo-wrap img {
  transform: scale(1.08);
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
