/* ============================================
   rowbotics.ai — Sovereign Precision
   Design System CSS (Stitch tokens)
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --color-surface: #f7f9fb;
  --color-surface-dim: #d8dadc;
  --color-surface-bright: #f7f9fb;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #f2f4f6;
  --color-surface-container: #eceef0;
  --color-surface-container-high: #e6e8ea;
  --color-surface-container-highest: #e0e3e5;
  --color-on-surface: #191c1e;
  --color-on-surface-variant: #46464d;
  --color-inverse-surface: #2d3133;
  --color-inverse-on-surface: #eff1f3;
  --color-outline: #76767e;
  --color-outline-variant: #c6c6ce;
  --color-surface-tint: #575d78;
  --color-primary: #000000;
  --color-on-primary: #ffffff;
  --color-primary-container: #141a32;
  --color-on-primary-container: #7c839f;
  --color-inverse-primary: #bfc5e4;
  --color-secondary: #515f74;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #d5e3fc;
  --color-on-secondary-container: #57657a;
  --color-background: #f7f9fb;
  --color-on-background: #191c1e;
  --color-surface-variant: #e0e3e5;
  --color-error: #ba1a1a;
  --color-on-error: #ffffff;

  /* Brand palette */
  --color-navy: #0A1128;
  --color-gray-sophisticated: #475569;
  --color-gray-400: #94a3b8;
  --color-gray-800: #1e293b;

  /* Spacing */
  --unit: 8px;
  --stack-sm: 8px;
  --stack-md: 16px;
  --stack-lg: 32px;
  --gutter: 32px;
  --margin: 64px;
  --container-max: 1280px;
  --section-padding: 120px;

  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--color-background);
  color: var(--color-on-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

::selection {
  background-color: var(--color-primary-container);
  color: var(--color-on-primary-container);
}

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

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

/* --- Typography --- */
.h1 {
  font-family: 'Inter', sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.h2 {
  font-family: 'Inter', sans-serif;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.h3 {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.body-lg {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

.body-md {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

.label-caps {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.btn-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

/* --- Utility --- */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--margin);
  padding-right: var(--margin);
}

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

.text-on-surface-variant {
  color: var(--color-on-surface-variant);
}

.text-white {
  color: #ffffff;
}

.text-gray-400 {
  color: var(--color-gray-400);
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.3s ease-in-out;
}

.header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--margin);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  width: 100%;
}

.header__logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--color-navy);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--stack-lg);
}

.header__nav a {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-gray-sophisticated);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.header__nav a:hover {
  color: var(--color-navy);
  opacity: 0.9;
}

.header__mobile-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-navy);
  padding: 8px;
}

.header__mobile-btn svg {
  width: 24px;
  height: 24px;
}

/* Mobile Nav Overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  z-index: 49;
  padding: var(--stack-lg) var(--margin);
  flex-direction: column;
  gap: var(--stack-md);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-gray-sophisticated);
  padding: var(--stack-sm) 0;
  border-bottom: 1px solid var(--color-outline-variant);
  transition: color 0.2s ease;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover {
  color: var(--color-navy);
}

/* --- Hero Section --- */
.hero {
  padding-top: 160px;
  padding-bottom: var(--section-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__title {
  max-width: 896px;
  margin-bottom: var(--stack-lg);
}

.hero__subtitle {
  max-width: 672px;
  margin-bottom: var(--stack-lg);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-navy);
  color: #ffffff;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

/* --- Expertise Section --- */
.expertise {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  background-color: var(--color-surface-container-low);
  border-top: 1px solid var(--color-outline-variant);
  border-bottom: 1px solid var(--color-outline-variant);
}

.expertise__header {
  text-align: center;
  margin-bottom: 64px;
}

.expertise__header .h2 {
  margin-bottom: var(--stack-md);
}

.expertise__header p {
  max-width: 640px;
  margin: 0 auto;
}

.expertise__founders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}

.founder-card {
  display: flex;
  flex-direction: column;
}

.founder-card__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--color-surface-variant);
  border: 1px solid var(--color-outline-variant);
  border-left: 3px solid var(--color-navy);
  overflow: hidden;
  border-radius: var(--radius);
}

.founder-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1);
  opacity: 0.9;
  mix-blend-mode: multiply;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.founder-card:hover .founder-card__photo img {
  filter: grayscale(0.5);
  opacity: 1;
}

.founder-card__info {
  padding: 24px 0;
}

.founder-card__info .h3 {
  margin-bottom: var(--stack-md);
}

.founder-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.founder-card__list li {
  position: relative;
  padding-left: 20px;
}

.founder-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background-color: var(--color-navy);
  border-radius: 50%;
}

/* Zoom modifier for smaller-framed photos */
.founder-photo--zoom {
  transform: scale(1.3);
  transform-origin: center 80%;
}

/* --- Founders Section (bottom of page) --- */
.founders-section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  background-color: var(--color-surface-container-low);
  border-top: 1px solid var(--color-outline-variant);
  border-bottom: 1px solid var(--color-outline-variant);
}

/* --- Services Section (Bento Grid) --- */
.services {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

.services__title {
  text-align: center;
  margin-bottom: var(--stack-lg);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--stack-md);
}

.service-card {
  background-color: var(--color-surface-container-lowest);
  border: 1px solid var(--color-outline-variant);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  border-radius: var(--radius);
  transition: border-color 0.25s ease;
}

.service-card:hover {
  border-color: var(--color-outline);
}

.service-card--alt {
  background-color: var(--color-surface-container-low);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--stack-md);
  color: var(--color-primary);
}

.service-card__title {
  margin-bottom: var(--stack-sm);
}

.service-card__desc {
  max-width: 448px;
}

.col-span-4 {
  grid-column: span 4;
}

.col-span-5 {
  grid-column: span 5;
}

.col-span-7 {
  grid-column: span 7;
}

.col-span-8 {
  grid-column: span 8;
}

.col-span-12 {
  grid-column: span 12;
}

/* --- Industries Section --- */
.industries {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  background-color: var(--color-primary);
  color: #ffffff;
}

.industries__inner {
  display: flex;
  gap: var(--gutter);
}

.industries__info {
  flex: 0 0 33.333%;
}

.industries__info .h2 {
  margin-bottom: var(--stack-md);
}

.industries__info p {
  margin-bottom: var(--stack-lg);
}

.industries__grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background-color: var(--color-gray-800);
  border: 1px solid var(--color-gray-800);
}

.industry-cell {
  background-color: var(--color-primary);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: var(--stack-md);
}

.industry-cell__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--color-gray-400);
}

.industry-cell__label {
  color: #ffffff;
}

/* --- Footer --- */
.footer {
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px var(--margin);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: var(--stack-lg);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--stack-sm);
}

.footer__brand-name {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-on-surface);
}

.footer__brand-copy {
  color: var(--color-gray-sophisticated);
}

.footer__brand-email {
  color: var(--color-gray-sophisticated);
  margin-top: 4px;
}

.footer__nav {
  display: flex;
  align-items: center;
  gap: var(--stack-lg);
}

.footer__nav a {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: var(--color-navy);
  opacity: 0.8;
}

.footer__nav a.is-active {
  color: var(--color-navy);
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --margin: 24px;
    --section-padding: 72px;
  }

  .h1 {
    font-size: 32px;
    line-height: 1.15;
  }

  .h2 {
    font-size: 28px;
  }

  .h3 {
    font-size: 20px;
  }

  .body-lg {
    font-size: 16px;
  }

  .header__nav {
    display: none;
  }

  .header__mobile-btn {
    display: block;
  }

  .header__inner {
    padding: 0 24px;
  }

  .hero {
    padding-top: 120px;
  }

  .expertise__header {
    margin-bottom: 40px;
  }

  .expertise__founders {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .col-span-4,
  .col-span-5,
  .col-span-7,
  .col-span-8,
  .col-span-12 {
    grid-column: span 1;
  }

  .service-card {
    min-height: auto;
  }

  .industries__inner {
    flex-direction: column;
  }

  .industries__info {
    flex: none;
  }

  .industries__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .footer__brand {
    align-items: center;
  }

  .footer__nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- Scroll-reveal animation (progressive enhancement) --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}