/* =========================================================================
   Capsensa Corporate Site — index.agents.css
   Standalone stylesheet for the corporate marketing pages
   (index.agents.html, why.html, products.html, team.html).

   NOTE: color tokens below are copied from the *current* values of
   /static/css/capsico.css ':root' (deep navy / dark steel blue palette),
   plus a dark-teal accent copied from an alternate palette already present
   in that same file. This file is intentionally standalone: it does NOT
   import/reuse capsico.css, so the product app (capsico.css) and this
   corporate site can evolve their palettes independently over time.
   ========================================================================= */

:root {
  /* ---- Copied verbatim from capsico.css :root (deep navy / steel blue) ---- */
  --agents-navy:         #0A1628; /* deep navy blue   (== capsico.css --header-primary)   */
  --agents-navy-light:   #1E3A5F; /* dark steel blue  (== capsico.css --header-secondary) */
  --agents-navy-dark:    #061020; /* deep navy accent (== capsico.css --header-accent)    */
  --agents-navy-shadow:    rgba(10, 22, 40, 0.25);
  --agents-navy-shadow-lg: rgba(10, 22, 40, 0.30);

  /* ---- Copied from the alternate "teal" palette already commented in capsico.css ---- */
  --agents-teal:         #0F766E; /* soft jade / dark teal */
  --agents-teal-light:   #14B8A6; /* fresh teal-green       */
  --agents-teal-dark:    #065F46; /* deepest teal accent    */
  --agents-teal-shadow:    rgba(15, 118, 110, 0.25);

  /* ---- Copied text tokens from capsico.css :root ---- */
  --agents-text:         #456;
  --agents-text-light:   color-mix(in oklab, var(--agents-text) 100%, #FFF 40%);
  --agents-text-dark:    color-mix(in oklab, var(--agents-text) 100%, #000 50%);

  /* ---- New tokens specific to this corporate site ---- */
  --agents-bg:              #FFFFFF;                 /* main page background: white       */
  --agents-bg-alt:          #F7F9FC;                  /* very light section alt background */
  --agents-header-text:     #FFFFFF;
  --agents-header-text-dim: rgba(255, 255, 255, 0.75);
  --agents-border:          rgba(10, 22, 40, 0.10);
  --agents-radius:          0.75em;

  --agents-gradient-brand:  linear-gradient(135deg, var(--agents-navy) 0%, var(--agents-navy-light) 100%);
  --agents-gradient-accent: linear-gradient(135deg, var(--agents-teal) 0%, var(--agents-teal-light) 100%);

  --agents-header-height:           5.5em;
  --agents-header-height-scrolled:  3.25em;

  /* Shared horizontal edge padding — used by the header, footer AND the
     main content (.landing-container) so their left/right margins always
     line up, regardless of viewport width. */
  --agents-page-padding: 2em;
}

/* =========================================================================
   Reset / base typography — em-based, responsive
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%; /* 1em == 16px baseline; scales naturally with browser zoom/text-size */
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: var(--agents-header-height);
  background: var(--agents-bg);
  color: var(--agents-text);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; }

a { color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.agents-container {
  max-width: 75em; /* ~1200px */
  margin: 0 auto;
  padding: 0 2em;
}

/* =========================================================================
   Header — fixed, non-scrolling, shrinks on scroll
   ========================================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--agents-header-height);
  background: var(--agents-gradient-brand);
  box-shadow: 0 0.25em 1.25em var(--agents-navy-shadow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: height 0.3s ease, box-shadow 0.3s ease;
}

.site-header.site-header--scrolled {
  height: var(--agents-header-height-scrolled);
  box-shadow: 0 0.5em 2em var(--agents-navy-shadow-lg);
}

.site-header-inner {
  height: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--agents-page-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
}

.site-logo {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
  flex: 0 0 auto;
}

.site-logo img {
  height: 2.5em;
  width: auto;
  transition: height 0.3s ease;
}

.site-header--scrolled .site-logo img {
  height: 1.75em;
}

/* Primary nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2em;
}

.site-nav a {
  position: relative;
  color: var(--agents-header-text);
  text-decoration: none;
  font-size: 1.5em;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.4em 0.1em;
  opacity: 0.9;
  transition: opacity 0.2s ease, font-size 0.3s ease;
}

.site-header--scrolled .site-nav a {
  font-size: 1em;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 0.15em;
  background: var(--agents-gradient-accent);
  border-radius: 0.15em;
  transition: right 0.25s ease;
}

.site-nav a:hover,
.site-nav a.site-nav-active {
  opacity: 1;
}

.site-nav a:hover::after,
.site-nav a.site-nav-active::after {
  right: 0;
}

/* Mobile nav toggle (hamburger) */
.site-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3em;
  width: 2.5em;
  height: 2.5em;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.site-nav-toggle span {
  display: block;
  width: 1.5em;
  height: 0.15em;
  background: var(--agents-header-text);
  border-radius: 0.15em;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(0.45em) rotate(45deg); }
.site-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-0.45em) rotate(-45deg); }

/* =========================================================================
   Main content area — integrate landing.css sections seamlessly
   ========================================================================= */
.site-main {
  background: var(--agents-bg);
}

/* landing.agentic.html / landing.css were built as an absolutely-positioned,
   self-scrolling "app pane". On this corporate page we want normal page
   flow (so the fixed header above + footer below share one page scrollbar).
   We only adjust positioning/overflow here; all visuals/animations/colors
   below still come from landing.css itself. */
.landing-container {
  position: static;
  height: auto;
  overflow: visible;
  padding: 0 var(--agents-page-padding);
}

/* Re-theme landing.css (originally "purple theme") to match the corporate
   dark-teal / deep-navy brand. landing.css is loaded before this file, so
   these custom properties simply override its :root values. */
:root {
  --landing-primary: var(--agents-teal);
  --landing-secondary: var(--agents-navy);
  --landing-primary-light: rgba(15, 118, 110, 0.12);
  --landing-secondary-light: rgba(10, 22, 40, 0.12);
  --landing-primary-shadow: rgba(15, 118, 110, 0.08);
  --landing-primary-medium: rgba(15, 118, 110, 0.2);
  --landing-primary-hover: rgba(15, 118, 110, 0.3);
  --landing-primary-hover-strong: rgba(15, 118, 110, 0.4);
  --landing-gradient-bg: linear-gradient(135deg, rgba(15, 118, 110, 0.12) 0%, rgba(10, 22, 40, 0.12) 100%);
  --landing-gradient-text: linear-gradient(135deg, var(--agents-teal) 0%, var(--agents-navy) 100%);
  --landing-gradient-border: linear-gradient(90deg, transparent 0%, rgba(15, 118, 110, 0.4) 30%, rgba(10, 22, 40, 0.5) 70%, transparent 100%);
  --landing-gradient-divider: linear-gradient(90deg, transparent 0%, rgba(15, 118, 110, 0.4) 50%, transparent 100%);
  --landing-stats-bg: linear-gradient(135deg, #f4faf9 0%, #eef6f5 100%);
  --landing-section-decoration: radial-gradient(circle, rgba(15, 118, 110, 0.08) 0%, transparent 70%);
}

/* =========================================================================
   "Start" CTA buttons — injected via JS into the reused landing.agentic.html
   fragment (hero section + final CTA section). Reuses landing.css's own
   .landing-cta pill-button styling (already re-themed above) rather than
   introducing new button styles.
   ========================================================================= */
.site-cta-row {
  text-align: center;
  margin-top: 0.5em;
}

.landing-final-cta .site-cta-row {
  margin-top: 2em;
}

.landing-cta-lg {
  font-size: 1.2em;
  padding: 0.9em 2.5em;
}

/* =========================================================================
   Generic placeholder-page building blocks (why.html, products.html, team.html)
   ========================================================================= */
.page-hero {
  background: var(--agents-gradient-brand);
  color: var(--agents-header-text);
  padding: 5em var(--agents-page-padding) 4em var(--agents-page-padding);
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 0.5em 0;
  font-size: 2.25em;
  font-weight: 700;
}

.page-hero p {
  max-width: 40em;
  margin: 0 auto;
  font-size: 1.1em;
  color: var(--agents-header-text-dim);
}

.page-section {
  padding: 4em var(--agents-page-padding);
  max-width: 60em;
  margin: 0 auto;
}

.page-section + .page-section {
  border-top: 1px solid var(--agents-border);
}

.page-section h2 {
  font-size: 1.6em;
  color: var(--agents-navy);
  margin: 0 0 0.75em 0;
}

.page-section p {
  font-size: 1em;
  color: var(--agents-text);
  line-height: 1.8;
}

.page-badge {
  display: inline-block;
  background: var(--agents-gradient-accent);
  color: #fff;
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4em 1em;
  border-radius: 2em;
  margin-bottom: 1em;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--agents-gradient-brand);
  color: var(--agents-header-text);
  padding: 2.5em var(--agents-page-padding);
}

.site-footer-inner {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2em;
}

.site-footer-logo {
  flex: 0 0 auto;
}

.site-footer-logo img {
  height: 2.25em;
  width: auto;
}

.site-footer-copyright {
  flex: 1 1 16em;
  text-align: center;
  font-size: 0.9em;
  color: var(--agents-header-text-dim);
}

.site-footer-copyright a {
  color: var(--agents-header-text);
  text-decoration: underline;
}

.site-footer-contact {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--agents-radius);
  padding: 1em 1.5em;
  font-size: 0.9em;
  line-height: 1.6;
  min-width: 16em;
}

.site-footer-contact address {
  font-style: normal;
  color: var(--agents-header-text-dim);
}

.site-footer-contact a {
  color: var(--agents-header-text);
  text-decoration: none;
  font-weight: 600;
}

.site-footer-contact a:hover {
  text-decoration: underline;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 56.25em) { /* ~900px, matches landing.css breakpoint */
  .site-nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--agents-header-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--agents-navy-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-header--scrolled .site-nav {
    top: var(--agents-header-height-scrolled);
  }

  .site-nav.site-nav--open {
    max-height: 20em;
  }

  .site-nav a {
    padding: 1em 1.5em;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

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

  .site-footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .page-hero h1 {
    font-size: 1.75em;
  }
}
