/* BrainOne — minimal enterprise surface */
:root {
  --bg: #f6f7f9;
  --bg-elevated: #ffffff;
  --ink: #12151c;
  --ink-muted: #4b5568;
  --ink-subtle: #6b7289;
  --border: #e4e7ee;
  --accent: #45ada8;
  --accent-hover: #3a9490;
  --accent-deep: #2d7d79;
  --accent-soft: rgba(69, 173, 168, 0.12);
  --accent-line: rgba(69, 173, 168, 0.38);
  --accent-muted-soft: rgba(45, 125, 121, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(18, 21, 28, 0.04), 0 8px 24px rgba(18, 21, 28, 0.06);
  --shadow-hover: 0 4px 12px rgba(18, 21, 28, 0.08), 0 16px 40px rgba(18, 21, 28, 0.1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --max: 1320px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-muted);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: var(--space-sm) var(--space-md);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(246, 247, 249, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
}

.logo:hover {
  color: var(--ink);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(18, 21, 28, 0.08);
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-primary a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav-primary a:hover {
  color: var(--ink);
}

.nav-primary .nav-cta {
  margin-top: 0;
  text-decoration: none;
}

@media (max-width: 767px) {
  .nav-primary .nav-cta {
    margin-top: var(--space-sm);
    text-align: center;
  }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(18, 21, 28, 0.04);
}

.btn-secondary:hover {
  border-color: var(--ink-subtle);
  color: var(--ink);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  padding: var(--space-2xl) 0 var(--space-xl);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-bg svg {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

.hero-copy h1 {
  margin: 0 0 var(--space-sm);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-copy .lede {
  margin: 0 0 var(--space-md);
  font-size: 1.125rem;
  max-width: 36ch;
  color: var(--ink-muted);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4/3;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--space-md);
  display: grid;
  place-items: center;
}

.hero-card-inner {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-lg) - 8px);
  background: linear-gradient(145deg, var(--accent-soft) 0%, var(--accent-muted-soft) 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero-card-inner::after {
  content: "";
  position: absolute;
  inset: 20%;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius);
  opacity: 0.6;
}

/* Sections */
section {
  padding: var(--space-xl) 0;
}

.section-label {
  margin: 0 0 var(--space-xs);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

section h2 {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-intro {
  margin: 0 0 var(--space-lg);
  max-width: 62ch;
  color: var(--ink-muted);
}

/* About */
.about {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.about-grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.stat {
  padding: var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 0.875rem;
  color: var(--ink-subtle);
}

/* Services */
.services-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: 0 1px 0 rgba(18, 21, 28, 0.03);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.service-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(69, 173, 168, 0.28);
  transform: translateY(-2px);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-sm);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}

.service-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* Services image carousel */
.services-slider-wrap {
  margin-bottom: var(--space-lg);
}

.services-slider {
  outline: none;
}

.services-slider-viewport {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.services-slider-track {
  list-style: none;
  margin: 0;
  padding: 0;
}

.services-slide[hidden] {
  display: none !important;
}

.services-slide-card {
  display: grid;
  margin: 0;
  min-height: 0;
}

@media (min-width: 768px) {
  .services-slide-card {
    grid-template-columns: 1.2fr 1fr;
    align-items: stretch;
  }
}

.services-slide-media {
  position: relative;
  min-height: 200px;
  background: var(--ink);
}

@media (min-width: 768px) {
  .services-slide-media {
    min-height: 100%;
  }
}

.services-slide-media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .services-slide-media img {
    min-height: 320px;
  }
}

.services-slide-caption {
  padding: var(--space-md) var(--space-md) var(--space-lg);
  text-align: left;
}

@media (min-width: 768px) {
  .services-slide-caption {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.services-slide-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.services-slide-caption h3 {
  margin: 0 0 var(--space-xs);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.services-slide-caption p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.55;
  max-width: 42ch;
}

.services-slider-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.services-slider-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.services-slider-btn:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.services-slider-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.services-slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.services-slider-dot:hover {
  background: var(--ink-subtle);
}

.services-slider-dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

@media (prefers-reduced-motion: reduce) {
  .services-slider-dot.is-active {
    transform: none;
  }
}

/* Why */
.why {
  background: linear-gradient(180deg, var(--bg) 0%, #eef0f4 100%);
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .why-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .why-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.why-list li {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  transition: border-color 0.2s ease;
}

.why-list li:hover {
  border-color: rgba(69, 173, 168, 0.22);
}

.why-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 0.875rem;
  display: grid;
  place-items: center;
}

.why-list h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.why-list p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* Cases */
.cases-grid {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.case-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: box-shadow 0.25s ease;
}

.case-card:hover {
  box-shadow: var(--shadow);
}

.case-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.case-card h3 {
  margin: 0 0 var(--space-sm);
  font-size: 1.0625rem;
  color: var(--ink);
}

.case-metric {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.case-metric span {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-subtle);
  margin-top: 0.25rem;
}

.case-card p {
  margin: var(--space-sm) 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* CTA band */
.cta-band {
  padding: var(--space-xl) 0;
}

.cta-inner {
  background: linear-gradient(155deg, #1a3330 0%, #12151c 52%, #101418 100%);
  color: #e8eaef;
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(69, 173, 168, 0.12);
}

@media (min-width: 768px) {
  .cta-inner {
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: var(--space-lg);
  }
}

.cta-inner h2 {
  color: #fff;
  margin: 0 0 var(--space-xs);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.cta-inner p {
  margin: 0;
  max-width: 42ch;
  color: #a8b0c0;
  font-size: 0.9375rem;
}

.cta-inner .btn-accent {
  margin-top: var(--space-md);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .cta-inner .btn-accent {
    margin-top: 0;
  }
}

/* Footer */
.site-footer {
  background: #0c0e12;
  color: #9ca3b0;
  padding: var(--space-xl) 0 var(--space-md);
  font-size: 0.875rem;
}

.site-footer a {
  color: #c5cad6;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer-brand .logo-img {
  box-shadow: 0 0 0 1px rgba(69, 173, 168, 0.35);
}

.footer-brand p {
  margin: 0;
  max-width: 32ch;
  line-height: 1.55;
}

.footer-col h3 {
  margin: 0 0 var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.social a {
  padding: 0.35rem 0.65rem;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  font-size: 0.8125rem;
}

.social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-bottom {
  padding-top: var(--space-md);
  border-top: 1px solid #1f242e;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-bottom p {
  margin: 0;
}

/* Products page */
.page-products .page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.page-products .page-hero h1 {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.page-products .page-hero .lede {
  margin: 0;
  max-width: 56ch;
  color: var(--ink-muted);
  font-size: 1.0625rem;
}

.product-showcase {
  padding: var(--space-xl) 0;
}

.product-showcase.alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.product-block {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 900px) {
  .product-block {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .product-block.product-block-reverse .product-block-copy {
    order: 2;
  }

  .product-block.product-block-reverse .product-block-visual {
    order: 1;
  }
}

.product-block-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--ink);
}

.product-block-visual img {
  width: 100%;
  height: auto;
  min-height: 240px;
  object-fit: cover;
  display: block;
}

.product-block-copy .section-label {
  margin-bottom: var(--space-xs);
}

.product-block-copy h2 {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.product-block-copy .product-tagline {
  margin: 0 0 var(--space-md);
  font-size: 1.0625rem;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 52ch;
}

.product-features {
  margin: 0 0 var(--space-md);
  padding-left: 1.2rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.product-features li {
  margin-bottom: 0.5rem;
}

.product-block-copy .btn {
  margin-top: var(--space-xs);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-primary {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
    box-shadow: var(--shadow);
  }

  .nav-primary.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-primary a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-primary a:last-child {
    border-bottom: none;
  }
}
