/* ==========================================================================
   FROG STACK — Design System
   Clean & Premium aesthetic with logo-derived colour palette
   ========================================================================== */

@font-face {
  font-family: 'Neutro';
  src: url('/fonts/Neutro-DEMO.otf') format('opentype');
  font-weight: 400 700;
  font-display: swap;
}

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Primary palette — derived from Frog Stack logo */
  --color-primary:       #124735;   /* canonical FrogStack forest, sampled from logo */
  --color-primary-light: #1F6B50;
  --color-primary-pale:  #BFD8CC;
  --color-primary-bg:    #F2F7F4;
  --color-forest-900:    #0B2A20;   /* deep brand dark — for dark sections, footer */
  --color-forest-100:    #E2EDE7;   /* subtle tint */

  /* Neutrals */
  --color-dark:          #1B1B1E;
  --color-body:          #3A3A3F;
  --color-muted:         #6C6C72;
  --color-border:        #E2E2E6;
  --color-light:         #F7F7F8;
  --color-white:         #FFFFFF;

  /* Accent */
  --color-accent:        #2D7A55;   /* vibrant emerald — brighter than primary, stays on-brand */
  --color-accent-hover:  #225E45;

  /* Typography */
  --font-heading: 'Neutro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Scale (clamp for fluid type) */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  clamp(1.75rem, 2vw + 1rem, 2rem);
  --text-4xl:  clamp(2rem, 3vw + 1rem, 2.75rem);
  --text-5xl:  clamp(2.5rem, 4vw + 1rem, 3.5rem);

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --container-max:   1200px;
  --container-narrow: 800px;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(15,30,25,0.06);
  --shadow-md:  0 4px 12px rgba(15,30,25,0.08);
  --shadow-lg:  0 12px 32px rgba(15,30,25,0.10);
  --shadow-xl:  0 20px 48px rgba(15,30,25,0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}


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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-body);
  background-color: var(--color-white);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}


/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); margin-bottom: var(--space-lg); }
h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--space-lg); }
h3 { font-size: var(--text-3xl); margin-bottom: var(--space-md); }
h4 { font-size: var(--text-2xl); margin-bottom: var(--space-md); }

p {
  margin-bottom: var(--space-md);
}

.lead {
  font-size: var(--text-xl);
  line-height: 1.6;
  color: var(--color-muted);
}

.overline {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  display: block;
}


/* ---------- Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--tinted {
  background-color: var(--color-primary-bg);
  padding: var(--space-4xl) 0;
}

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

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

.section--dark .lead {
  color: rgba(255,255,255,0.7);
}

.grid {
  display: grid;
  gap: var(--space-2xl);
}

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

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

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section { padding: var(--space-3xl) 0; }
  .container { padding: 0 var(--space-lg); }
}

.flex {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.text-center { text-align: center; }


/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75em 1.5em;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1;
  gap: var(--space-sm);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-white);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

.btn--white:hover {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn--sm {
  padding: 0.6em 1.4em;
  font-size: var(--text-sm);
}

.btn--lg {
  padding: 1em 2.5em;
  font-size: var(--text-lg);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}


/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-primary);
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
}

.site-footer .logo img {
  filter: brightness(0) invert(1);
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: var(--space-xl);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-body);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: var(--space-md);
}

.nav-links a.btn--primary,
.nav-links a.btn--primary:hover {
  color: var(--color-white);
}

/* ---------- Dropdown Navigation ---------- */
.nav-item--has-dropdown {
  position: relative;
}

.nav-chevron {
  display: inline-block;
  vertical-align: middle;
  margin-left: 2px;
  transition: transform var(--transition-fast);
}

.nav-item--has-dropdown:hover .nav-chevron,
.nav-item--has-dropdown:focus-within .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 0 var(--space-sm);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  list-style: none;
  z-index: 200;
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
  transform: translateX(-50%) rotate(45deg);
}

.nav-item--has-dropdown:hover .nav-dropdown,
.nav-item--has-dropdown:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown li a {
  display: block;
  padding: var(--space-sm) var(--space-xl);
  color: var(--color-body);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

.nav-dropdown li a::after {
  display: none;
}

.nav-dropdown li a:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .site-header nav {
    display: contents;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
    z-index: 1001;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md) var(--space-xl) var(--space-xl);
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

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

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--color-light);
  }

  .nav-links li.nav-cta {
    border-bottom: none;
    margin-top: var(--space-md);
  }

  .nav-links a:not(.btn) {
    display: block;
    width: 100%;
    padding: var(--space-md) 0;
    font-size: var(--text-base);
    color: var(--color-dark);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-dropdown {
    display: block;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color-primary-pale);
    border-radius: 0;
    padding: 0 0 var(--space-xs) var(--space-md);
    margin-top: 0;
    background: transparent;
    min-width: 0;
  }

  .nav-dropdown::before {
    display: none;
  }

  .nav-links .nav-dropdown li {
    border-bottom: none;
  }

  .nav-links .nav-dropdown li a {
    padding: var(--space-xs) 0;
    color: var(--color-muted);
    font-size: var(--text-sm);
  }

  .nav-chevron {
    display: none;
  }

  .nav-cta {
    margin-left: 0;
  }

  .nav-cta a.btn {
    display: flex;
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: calc(72px + var(--space-5xl)) 0 var(--space-5xl);
  background: var(--color-primary-bg);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero h1 {
  font-size: var(--text-5xl);
  line-height: 1.1;
}

.hero h1 .highlight {
  color: var(--color-primary);
}

.hero .lead {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2xl);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual-graphic {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  background: var(--color-forest-100);
  border: 1px solid var(--color-primary-pale);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Floating integration icons */
.integration-nodes {
  position: relative;
  width: 280px;
  height: 280px;
}

.integration-node {
  position: absolute;
  width: 64px;
  height: 64px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-xs);
  color: var(--color-dark);
  box-shadow: var(--shadow-lg);
  animation: nodeFloat 4.5s ease-in-out infinite;
}

.integration-node:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.integration-node:nth-child(2) { top: 30%; right: 0; animation-delay: 0.5s; }
.integration-node:nth-child(3) { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 1s; }
.integration-node:nth-child(4) { top: 30%; left: 0; animation-delay: 1.5s; }
.integration-node:nth-child(5) { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; background: var(--color-white); color: var(--color-primary); border: 2px solid var(--color-primary); font-size: var(--text-sm); animation-delay: 0.25s; padding: 8px; overflow: hidden; }

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

.integration-node:nth-child(1) {
  animation: nodeFloat1 4.5s ease-in-out infinite;
}
@keyframes nodeFloat1 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}
.integration-node:nth-child(3) {
  animation: nodeFloat3 4.5s ease-in-out infinite 1s;
}
@keyframes nodeFloat3 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}
.integration-node:nth-child(5) {
  animation: nodeFloat5 4.5s ease-in-out infinite 0.25s;
}
@keyframes nodeFloat5 {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-6px); }
}

@media (max-width: 768px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero .btn-group { justify-content: center; }
  .hero-visual { margin-top: var(--space-2xl); }
  .hero-visual-graphic { max-width: 320px; }
  .integration-nodes { width: 220px; height: 220px; }
  .integration-node { width: 52px; height: 52px; font-size: 0.65rem; }
  .integration-node:nth-child(5) { width: 60px; height: 60px; }
}


/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-2xl);
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px -15px rgba(0,0,0,0.10);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.15);
  transform: translateY(-5px);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: var(--color-primary);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: var(--text-xl);
}

.card p {
  color: var(--color-muted);
}


/* ---------- Stats Row ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}


/* ---------- Client Logos ---------- */
.client-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl) var(--space-3xl);
}

.client-logo {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-muted);
  opacity: 0.6;
  transition: opacity var(--transition-base);
  white-space: nowrap;
}

.client-logo:hover {
  opacity: 1;
}


/* ---------- Testimonial ---------- */
.testimonial {
  max-width: var(--container-narrow);
  margin: 0 auto;
  text-align: center;
}

.testimonial blockquote {
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--color-dark);
  line-height: 1.5;
  margin-bottom: var(--space-xl);
  position: relative;
  padding: 0 2rem;
}

.testimonial blockquote::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--color-primary-pale);
  position: absolute;
  top: -1rem;
  left: 0;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial blockquote::after {
  content: '\201D';
  font-size: 4rem;
  color: var(--color-primary-pale);
  position: absolute;
  bottom: -2.4rem;
  right: 0;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial cite {
  font-style: normal;
  font-size: var(--text-base);
  color: var(--color-muted);
}

.testimonial cite strong {
  color: var(--color-dark);
  display: block;
  margin-bottom: 2px;
}


/* ---------- Customer Cards ---------- */
.customer-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.customer-card:hover {
  box-shadow: var(--shadow-md);
}

.customer-card-logo {
  height: 100px;
  margin: calc(var(--space-2xl) * -1) calc(var(--space-2xl) * -1) var(--space-xl);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.customer-card-logo img {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.customer-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

.customer-card .systems {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.system-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
}

.customer-details {
  margin-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
}

.customer-details summary {
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  user-select: none;
}

.customer-details summary::-webkit-details-marker { display: none; }

.customer-details summary::after {
  content: '+';
  font-size: var(--text-lg);
  line-height: 1;
  transition: transform var(--transition-fast);
  display: inline-block;
}

.customer-details[open] summary::after {
  transform: rotate(45deg);
}

.customer-details p {
  margin-top: var(--space-md);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: 0;
}

.case-study-link {
  display: inline-block;
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  width: 100%;
}

.case-study-link:hover {
  text-decoration: underline;
}


/* ---------- Team ---------- */
.team-member {
  text-align: center;
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-pale), var(--color-primary-light));
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-white);
}

.team-member h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

.team-member .role {
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.team-member p {
  color: var(--color-muted);
  font-size: var(--text-sm);
}


/* ---------- Blog Cards ---------- */
.blog-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px -15px rgba(0,0,0,0.10);
  transition: all var(--transition-base);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.15);
  transform: translateY(-5px);
  color: inherit;
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--color-primary-bg), var(--color-primary-pale));
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-image--placeholder {
  background: linear-gradient(135deg, var(--color-primary-bg), var(--color-primary-pale));
}

.blog-card-image--placeholder img {
  width: auto;
  height: 56px;
  max-width: 60%;
  object-fit: contain;
  opacity: 0.45;
  filter: saturate(0.8);
}

.blog-card-body {
  padding: var(--space-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.blog-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.blog-card p {
  color: var(--color-muted);
  font-size: var(--text-sm);
  flex: 1;
}

.blog-card .read-more {
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  margin-top: var(--space-md);
}


/* ---------- Blog Post Content ---------- */
.post-header {
  padding: calc(72px + var(--space-3xl)) 0 var(--space-2xl);
  background: var(--color-primary-bg);
}

.post-meta {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

.post-content {
  padding: var(--space-3xl) 0 var(--space-5xl);
}

.post-content .container {
  max-width: var(--container-narrow);
}

.post-content h2 {
  margin-top: var(--space-2xl);
}

.post-content h3 {
  margin-top: var(--space-xl);
}

.post-content ul,
.post-content ol {
  margin-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.post-content li {
  margin-bottom: var(--space-sm);
}

.post-content blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-xl);
  margin: var(--space-xl) 0;
  color: var(--color-muted);
  font-style: italic;
}

.post-content img {
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.post-content code {
  background: var(--color-light);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.post-content pre {
  background: var(--color-dark);
  color: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}


/* ---------- Contact Form ---------- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
  color: var(--color-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-dark);
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-pale);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-message {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.form-message--success {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-pale);
}

.form-message--error {
  background: #FFF5F5;
  color: #C53030;
  border: 1px solid #FED7D7;
}


/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--color-forest-900);
  position: relative;
  overflow: hidden;
  padding: var(--space-5xl) 0;
  text-align: center;
  color: var(--color-white);
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/pattern-network.svg') center / 800px no-repeat;
  opacity: 0.08;
  color: var(--color-primary-pale);
  pointer-events: none;
}

.cta-section .container { position: relative; z-index: 1; }

.cta-section h2 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.cta-section .lead {
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-2xl);
}


/* ---------- Footer ---------- */
.site-footer {
  background: #071C15;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand .logo {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  max-width: 300px;
}

.site-footer h4 {
  color: var(--color-white);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-lg);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-md); }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}


/* ---------- Connector System Logo ---------- */
.connector-system-logo {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl) var(--space-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  margin-bottom: var(--space-xl);
}

.connector-system-logo img {
  max-height: 48px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
}


/* ---------- Screenshot Frame ---------- */
.screenshot-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  background: var(--color-white);
}

.screenshot-chrome {
  background: var(--color-light);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  gap: 6px;
  align-items: center;
}

.screenshot-chrome span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.screenshot-chrome span:nth-child(1) { background: #FF5F57; }
.screenshot-chrome span:nth-child(2) { background: #FEBC2E; }
.screenshot-chrome span:nth-child(3) { background: #28C840; }

.screenshot-body {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-primary-bg);
}

/*
  Show screenshots at native resolution (no downscaling) so text stays
  crisp and readable. The visible area is a top-left crop of the source
  image; users can click to open the full screenshot in the lightbox.
  When a `-thumbnail` variant is loaded (see main.js), it's already
  pre-cropped, so we fill the frame with `cover` instead.
*/
.screenshot-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s ease, object-position 0.5s ease;
  image-rendering: -webkit-optimize-contrast;
}

.screenshot-body img.is-thumbnail {
  object-fit: cover;
  object-position: center;
}

.screenshot-frame:hover .screenshot-body img {
  transform: scale(1.015);
}

.screenshot-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,23,42,0) 60%, rgba(15,23,42,0.55) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.screenshot-frame:hover .screenshot-body::after {
  opacity: 1;
}

.screenshot-expand {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 100px;
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  pointer-events: none;
  z-index: 1;
}

.screenshot-frame:hover .screenshot-expand,
.screenshot-body img:focus-visible ~ .screenshot-expand {
  opacity: 1;
  transform: translateY(0);
}

.screenshot-expand svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 768px) {
  /* On small screens fall back to fitting the whole image so the cropped
     top-left doesn't dominate when the frame is narrow. */
  .screenshot-body img {
    object-fit: cover;
  }
  /* Always show the hint on touch devices since there's no hover. */
  .screenshot-expand {
    opacity: 1;
    transform: none;
  }
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-bg);
}

.feature-row--reverse > :first-child { order: 1; }
.feature-row--reverse > :last-child  { order: 0; }

@media (max-width: 768px) {
  .feature-row--reverse > :first-child { order: unset; }
  .feature-row--reverse > :last-child  { order: unset; }
}


/* ---------- Page Header ---------- */
.page-header {
  padding: calc(72px + var(--space-3xl)) 0 var(--space-3xl);
  background: var(--color-primary-bg);
  text-align: center;
}

.page-header .lead {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}


/* ---------- Process / Steps ---------- */
.process-steps {
  counter-reset: step;
}

.process-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-2xl);
}

.process-step::before {
  counter-increment: step;
  content: counter(step);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-step h3 {
  margin-bottom: var(--space-sm);
}

@media (max-width: 640px) {
  .process-step { grid-template-columns: 56px 1fr; gap: var(--space-md); }
  .process-step::before { width: 48px; height: 48px; font-size: var(--text-xl); }
}


/* ---------- Platform / Why page specifics ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  margin-bottom: var(--space-4xl);
}

.feature-row:nth-child(even) {
  direction: rtl;
}

.feature-row:nth-child(even) > * {
  direction: ltr;
}

.feature-visual {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--color-primary-bg), var(--color-primary-pale));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) { direction: ltr; }
}


/* ---------- Scroll animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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


/* ---------- Team Portraits (real photos) ---------- */
.team-portrait {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: center top;
  margin: 0 auto var(--space-lg);
  display: block;
  background: var(--color-light);
  filter: grayscale(100%);
}

.team-portrait--sm {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  margin: 0;
}

.team-portrait--xs {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0;
  vertical-align: middle;
}

/* Homepage founder strip */
.founders-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
  max-width: 1100px;
  margin: 0 auto;
}

.founder-card {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  text-align: left;
}

.founder-card .founder-meta { flex: 1; min-width: 0; }
.founder-card h3 { font-size: var(--text-lg); margin-bottom: 2px; }
.founder-card .role {
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}
.founder-card .quip {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

/* Blog post author byline */
.post-byline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}
.post-byline-name { font-weight: 500; color: var(--color-body); }

@media (max-width: 640px) {
  .founders-strip { grid-template-columns: 1fr; gap: var(--space-lg); }
  .founder-card { gap: var(--space-md); }
}


/* ---------- Video Cards ---------- */
.video-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

.video-card:hover {
  box-shadow: var(--shadow-lg);
}

/* Standalone video frame (e.g. CEO intro on homepage). Any direct child
   — placeholder, <iframe>, or <video> — fills the 16:9 area. */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--color-forest-900);
}

.video-frame > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-frame .video-placeholder {
  aspect-ratio: auto;
}

.video-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--color-forest-900) 0%, var(--color-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder__play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base), transform var(--transition-base);
}

.video-card:hover .video-placeholder__play {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.video-placeholder__play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid rgba(255, 255, 255, 0.9);
  margin-left: 4px;
}

.video-placeholder__badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
}

.video-card__body {
  padding: var(--space-lg) var(--space-xl);
}

.video-card__category {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  display: block;
}

.video-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.3;
  margin: 0;
}


/* ---------- Homepage Feature Zig-Zag ---------- */
.feature-zigzag-wrapper .feature-row:last-child {
  margin-bottom: 0;
}

.feature-zigzag-wrapper .feature-row > div > p {
  color: var(--color-muted);
  font-size: var(--text-lg);
  line-height: 1.7;
}


/* ---------- Homepage Blog Bento Grid ---------- */
.blog-bento {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-xl);
}

.blog-bento .blog-card--featured {
  grid-row: 1 / 3;
}

.blog-bento .blog-card--featured .blog-card-image {
  height: 280px;
}

.blog-bento .blog-card--featured h3 {
  font-size: var(--text-2xl);
  line-height: 1.3;
}

@media (max-width: 768px) {
  .blog-bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .blog-bento .blog-card--featured {
    grid-row: auto;
  }
  .blog-bento .blog-card--featured .blog-card-image {
    height: 200px;
  }
}


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

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: var(--color-white);
  z-index: 10000;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-md);
}


/* ---------- Screenshot Lightbox ---------- */
.screenshot-body img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  cursor: zoom-out;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform var(--transition-base);
}

.lightbox.is-open .lightbox__img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base);
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}

body.lightbox-open {
  overflow: hidden;
}
