/* ============================================
   SpringCT Technical Expertise - Design Tokens
   From Figma: SpringCT-verticals-webpages
   ============================================ */

:root {
  /* Colors */
  --color-primary: #0c111f;
  --color-primary-dark: #0b0b0b;
  --color-text: #1d1d1d;
  --color-text-muted: #333333;
  --color-white: #ffffff;
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f1f1f3;
  --color-bg-tertiary: rgb(241, 239, 252);
  --color-button: #1e50be;
  --color-content-inverted: #ffffff;
  --color-border: #f3f4f6;
  --color-polars-dark: #1f2f51;

  /* Gradient - Hero title */
  --gradient-hero-title: linear-gradient(90deg, #2563eb 0%, #6a52ce 100%);
  --gradient-hero-bg: linear-gradient(161.83deg, var(--color-bg-tertiary) 0%, var(--color-bg-primary) 50%, var(--color-bg-tertiary) 100%);

  /* Shadows */
  --shadow-header: 0px 4px 4px 0px rgba(0, 0, 0, 0.11);
  --shadow-button: 0px 4px 5.7px 0px rgba(0, 0, 0, 0.12);
  --shadow-card: 0px 4px 6px -1px rgba(0, 0, 0, 0.15), 0px 2px 4px -2px rgba(0, 0, 0, 0.15);

  /* Typography - Heebo */
  --font-family: 'Heebo', sans-serif;
  --font-nav: 14px;
  --font-nav-lh: 42px;
  --font-nav-tracking: 0.28px;
  --font-hero-title: 28px;
  --font-hero-title-lh: 40px;
  --font-hero-body: 16px;
  --font-hero-body-lh: 24px;
  --font-section-title: 24px;
  --font-section-title-lh: 30px;
  --font-section-desc: 14px;
  --font-section-desc-lh: 22px;
  --font-subsection: 20px;
  --font-subsection-lh: 26px;
  --font-btn: 14px;
  --font-btn-weight: 700;
  --font-btn-transform: none;
  --font-btn-color: var(--color-content-inverted);
  --font-btn-lh: normal;
  --font-btn-letter-spacing: 0;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-2xl: 60px;
  --section-padding-x: 24px;
  --section-padding-y: 40px;

  /* Layout */
  --max-content: 1240px;
  --header-height: 60px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-weight: 400;
  color: var(--color-primary);
  background: var(--color-bg-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ============================================
   Header & Navigation - Mobile First
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  box-shadow: var(--shadow-header);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--section-padding-x);
  min-height: var(--header-height);
  max-width: 100%;
}

.logo__text {
  font-weight: 700;
  font-size: 20px;
  color: var(--color-primary-dark);
}

/* Hamburger - visible on mobile */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger[aria-expanded="true"] .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav - hidden on mobile by default */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--color-white);
  padding: calc(var(--header-height) + var(--spacing-lg)) var(--section-padding-x) var(--spacing-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 99;
}

.nav.is-open {
  transform: translateX(0);
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  font-size: var(--font-nav);
  font-weight: 400;
  letter-spacing: var(--font-nav-tracking);
  color: var(--color-primary-dark);
}

.nav__list a {
  display: block;
  padding: var(--spacing-xs) 0;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  background: var(--gradient-hero-bg);
  padding: var(--spacing-xl) var(--section-padding-x);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  max-width: var(--max-content);
  margin: 0 auto;
}

.hero__content {
  order: 1;
}

.hero__title {
  margin: 0 0 var(--spacing-sm);
  font-weight: 800;
  font-size: var(--font-hero-title);
  line-height: var(--font-hero-title-lh);
  color: var(--color-text);
}

.hero__title-line1 {
  display: block;
}

.hero__title-line2 {
  background: var(--gradient-hero-title);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__text {
  margin: 0 0 var(--spacing-md);
  font-size: var(--font-hero-body);
  line-height: var(--font-hero-body-lh);
  color: var(--color-primary);
}

.hero__visual {
  order: 0;
}

.hero__img {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Button - uses tokens from :root */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-family);
  font-weight: var(--font-btn-weight);
  font-size: var(--font-btn);
  line-height: var(--font-btn-lh);
  letter-spacing: var(--font-btn-letter-spacing);
  text-transform: var(--font-btn-transform);
  color: var(--font-btn-color);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.btn--primary {
  background: var(--color-button);
  color: var(--font-btn-color);
  box-shadow: var(--shadow-button);
}

.btn--primary:hover {
  opacity: 0.9;
}

.btn--primary:active {
  transform: scale(0.98);
}

/* ============================================
   Section Blocks - Mobile First
   ============================================ */

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

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

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

.section__inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.section__header--row .section__text {
  order: 1;
}

.section__header--row .section__img-wrap {
  order: 0;
}

.section__header--reverse .section__text {
  order: 0;
}

.section__header--reverse .section__img-wrap {
  order: 1;
}

.section__header--image-first-sm .section__img-wrap {
  order: 0;
}

.section__header--image-first-sm .section__text {
  order: 1;
}

.section__header--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section__header--center .section__img-group {
  order: 0;
}

.section__header--center .section__text {
  order: 1;
}

.section__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section__title {
  margin: 0;
  font-weight: 700;
  font-size: var(--font-section-title);
  line-height: var(--font-section-title-lh);
  color: var(--color-primary);
}

.section__desc {
  margin: 0;
  font-size: var(--font-section-desc);
  line-height: var(--font-section-desc-lh);
  color: var(--color-primary);
}

.section__img-wrap,
.section__img-group {
  max-width: 100%;
}

.section__img-wrap img,
.section__img-group img {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  object-fit: contain;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.section__header--center .section__img-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
}

.section__header--center .section__img-group img {
  max-width: 180px;
}

/* Server Technologies header: mobile/tablet layout */
.section__header--server {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
}

.section__header--server .section__text--server {
  flex: 1 1 100%;
  text-align: center;
}

.section__header--server .section__img-group--left {
  display: none;
}

.section__header--server .section__img-group--right {
  flex: 1 1 45%;
  display: flex;
  justify-content: center;
}

/* Subsection */
.subsection {
  margin-top: var(--spacing-xl);
}

.subsection:first-child {
  margin-top: var(--spacing-lg);
}

.subsection-row {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  width: 100%;
  margin-top: var(--spacing-lg);
}

.subsection__title {
  margin: 0 0 var(--spacing-md);
  font-weight: 700;
  font-size: var(--font-subsection);
  line-height: var(--font-subsection-lh);
  color: var(--color-primary);
}

/* Tech Grid - Mobile: 2 columns, left-aligned */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-items: start;
}

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

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

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

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

/* Tech card: img is the card. No inner padding - logo fills the card. */
.tech-card {
  display: block;
  width: 100%;
  max-width: 110px;
  aspect-ratio: 1;
  padding: 0;
  box-sizing: border-box;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  object-fit: contain;
  overflow: clip;
  transition: transform 0.2s;
}

.tech-card:hover {
  transform: translateY(-2px);
}

.tech-card--tinted {
  background:
    linear-gradient(90deg, rgba(var(--tint), 0.05) 0%, rgba(var(--tint), 0.05) 100%),
    linear-gradient(90deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%);
}

.tech-card--dark {
  background: var(--color-polars-dark);
}

.tech-card--blend-darken {
  mix-blend-mode: darken;
}

/* ============================================
   Desktop: min-width 1024px
   ============================================ */

@media (min-width: 1024px) {
  :root {
    --font-hero-title: 49px;
    --font-hero-title-lh: 58px;
    --font-hero-body: 18px;
    --font-hero-body-lh: 27px;
    --font-section-title: 36px;
    --font-section-title-lh: 43px;
    --font-section-desc: 16px;
    --font-section-desc-lh: 24px;
    --font-subsection: 24px;
    --font-subsection-lh: 28px;
    --font-btn: 16px;
    --section-padding-x: 96px;
    --section-padding-y: 60px;
  }

  .header__inner {
    padding: 10px var(--section-padding-x);
    max-width: var(--max-content);
    margin: 0 auto;
  }

  /* Hide hamburger on desktop */
  .hamburger {
    display: none;
  }

  /* Nav - always visible, horizontal */
  .nav {
    position: static;
    transform: none;
    padding: 0;
    background: transparent;
  }

  .nav__list {
    flex-direction: row;
    gap: 31px;
    align-items: center;
  }

  .nav__list a {
    padding: 0;
  }

  /* Hero - side by side */
  .hero {
    padding: var(--spacing-2xl) var(--section-padding-x);
  }

  .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .hero__content {
    flex: 1;
    order: 0;
  }

  .hero__visual {
    flex: 0 0 45%;
    max-width: 717px;
    order: 1;
  }

  .hero__img {
    max-width: none;
    width: 100%;
    height: auto;
  }

  /* Section headers - row layout */
  .section__header--row,
  .section__header--reverse {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: var(--spacing-lg);
  }

  .section__header--row .section__text,
  .section__header--row .section__img-wrap,
  .section__header--reverse .section__text,
  .section__header--reverse .section__img-wrap {
    order: unset;
  }

  .section__header--row .section__text,
  .section__header--reverse .section__text {
    flex: 1;
    min-width: 0;
    max-width: 600px;
  }

  .section__header--reverse .section__img-wrap {
    order: -1;
  }

  .section__header--center {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 72px;
    text-align: center;
  }

  .section__header--center .section__text--center {
    flex: 1;
    min-width: 300px;
  }

  .section__img-wrap img,
  .section__img-group img {
    max-width: 460px;
  }

  .section__header--center .section__img-group img {
    max-width: 220px;
  }

  /* Server Technologies: Figma layout - title centered, images on both sides */
  .section__header--server {
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 72px;
    text-align: center;
  }

  .section__header--server .section__img-group--left {
    order: 1;
    flex: 0 0 226px;
    width: 226px;
    padding-bottom: 32px;
    display: flex;
    justify-content: flex-start;
  }

  .section__header--server .section__img-group--left img {
    width: 100%;
    height: 214px;
    max-width: none;
    object-fit: contain;
  }

  .section__header--server .section__text--server {
    order: 2;
    flex: 1 1 600px;
    min-width: 300px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .section__header--server .section__text--server .section__title,
  .section__header--server .section__text--server .section__desc {
    text-align: center;
  }

  .section__header--server .section__img-group--right {
    order: 3;
    flex: 0 0 220px;
    width: 220px;
    display: flex;
    justify-content: flex-end;
  }

  .section__header--server .section__img-group--right img {
    width: 220px;
    height: 238px;
    max-width: none;
    object-fit: contain;
  }

  /* AI Frameworks: LLM and TTS subsections side-by-side */
  .subsection-row {
    flex-direction: row;
    gap: 56px;
  }

  .subsection-row .subsection {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 0;
  }

  /* Tech grid - 6 columns on desktop, left-aligned */
  .tech-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 56px;
    justify-items: start;
  }

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

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

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

  .tech-grid--5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .tech-card {
    width: 110px;
    height: 110px;
    max-width: 110px;
    padding: 0;
    justify-self: start;
    margin: 0;
  }
}

/* ============================================
   Tablet: 768px - 1023px
   ============================================ */

@media (min-width: 768px) {
  :root {
    --section-padding-x: 48px;
  }

  .hero__inner {
    flex-direction: row;
  }

  .hero__content { order: 0; }
  .hero__visual { order: 1; flex: 0 0 45%; }
  .hero__img { max-width: none; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

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

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

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

  .tech-grid--5 {
    grid-template-columns: repeat(5, 1fr);
  }

  .section__header--row,
  .section__header--reverse {
    flex-direction: column;
  }

  .section__img-wrap img,
  .section__img-group img {
    max-width: 360px;
  }
}
