:root {
  --tessly-navy: #1d3454;
  --tessly-navy-deep: #12233c;
  --tessly-blue: #7399cc;
  --tessly-surface: #eef4fb;
  --tessly-border: #d8e3f0;
  --background: #f7f9fc;
  --foreground: #0f172a;
  --card: #ffffff;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-light: #eff6ff;
  --dark: #0f172a;
  --dark-card: #1e293b;
  --dark-border: #334155;
  --dark-foreground: #f1f5f9;
  --marketing-font: var(--font-geist-sans), Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Consolas, monospace;
  /* tessly-blue darkened for text on light surfaces — keeps AA (≥4.5:1). */
  --tessly-blue-text: #4a6da8;
  font-family: var(--marketing-font);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--marketing-font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
}

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

button,
summary {
  font: inherit;
}

.marketing-header-sentinel {
  position: absolute;
  top: 24px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.marketing-skip {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 60;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--card);
  padding: 8px 16px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.marketing-skip:focus {
  transform: translateY(0);
}

.marketing-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.marketing-header.is-scrolled,
.marketing-header.is-menu-open {
  border-color: rgba(226, 232, 240, 0.7);
  background: rgba(247, 249, 252, 0.9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

.marketing-header-inner {
  display: flex;
  width: 100%;
  max-width: 1152px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.marketing-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  text-decoration: none;
}

.marketing-brand img {
  width: auto;
  height: 28px;
}

.marketing-brand-color {
  display: none;
}

.marketing-header.is-scrolled .marketing-brand-white,
.marketing-header.is-menu-open .marketing-brand-white {
  display: none;
}

.marketing-header.is-scrolled .marketing-brand-color,
.marketing-header.is-menu-open .marketing-brand-color {
  display: block;
}

.marketing-nav,
.marketing-header-actions {
  display: flex;
  align-items: center;
}

.marketing-nav {
  gap: 24px;
}

.marketing-header-actions {
  flex-shrink: 0;
  gap: 12px;
}

.marketing-nav > a,
.marketing-solutions > summary,
.marketing-language {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.marketing-nav > a:hover,
.marketing-nav > a[aria-current="page"],
.marketing-solutions > summary:hover,
.marketing-language:hover {
  color: #ffffff;
}

.marketing-header.is-scrolled .marketing-nav > a,
.marketing-header.is-scrolled .marketing-solutions > summary,
.marketing-header.is-scrolled .marketing-language,
.marketing-header.is-menu-open .marketing-nav > a,
.marketing-header.is-menu-open .marketing-solutions > summary,
.marketing-header.is-menu-open .marketing-language {
  color: var(--muted-foreground);
}

.marketing-header.is-scrolled .marketing-nav > a:hover,
.marketing-header.is-scrolled .marketing-nav > a[aria-current="page"],
.marketing-header.is-scrolled .marketing-solutions > summary:hover,
.marketing-header.is-scrolled .marketing-language:hover,
.marketing-header.is-menu-open .marketing-nav > a:hover,
.marketing-header.is-menu-open .marketing-nav > a[aria-current="page"],
.marketing-header.is-menu-open .marketing-solutions > summary:hover,
.marketing-header.is-menu-open .marketing-language:hover {
  color: var(--foreground);
}

.marketing-solutions {
  position: relative;
}

.marketing-solutions > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  list-style: none;
}

.marketing-solutions > summary::-webkit-details-marker {
  display: none;
}

.marketing-solutions > summary span {
  font-size: 13px;
  line-height: 1;
}

.marketing-solutions[open] > summary span {
  transform: rotate(180deg);
}

.marketing-solutions-panel {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  width: min(640px, calc(100vw - 48px));
  transform: translateX(-50%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  padding: 20px 24px 22px;
  color: var(--foreground);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.marketing-solutions-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 1fr;
  gap: 8px 36px;
}

.marketing-workflow-panel {
  left: 0;
  width: 176px;
  transform: none;
  padding: 10px;
}

.marketing-workflow-list {
  display: grid;
  gap: 2px;
}

.marketing-workflow-list a {
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.marketing-workflow-list a:hover,
.marketing-workflow-list a:focus-visible {
  background: var(--tessly-surface);
  color: var(--tessly-navy);
}

.marketing-solutions-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.marketing-solutions-column h2 {
  margin: 0 0 14px;
  color: #8195ad;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marketing-solutions-column a {
  display: block;
  width: calc(100% + 20px);
  margin: 0 -10px;
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.marketing-solutions-column a:hover,
.marketing-solutions-column a:focus-visible {
  background: var(--tessly-surface);
  color: var(--tessly-navy);
}

.marketing-solutions-column a strong,
.marketing-solutions-column a span {
  display: block;
}

.marketing-solutions-column a strong {
  color: var(--foreground);
  font-size: 15px;
  font-weight: 800;
}

.marketing-solutions-column a span {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 400;
}

.marketing-language {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 8px;
}

.marketing-header-cta {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  padding: 0 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.marketing-header-cta:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.marketing-header.is-scrolled .marketing-header-cta,
.marketing-header.is-menu-open .marketing-header-cta {
  border-color: var(--border);
  background: rgba(250, 250, 249, 0.7);
  color: var(--foreground);
}

.marketing-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.marketing-menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.marketing-header.is-scrolled .marketing-menu-toggle,
.marketing-header.is-menu-open .marketing-menu-toggle {
  border-color: var(--border);
  background: rgba(250, 250, 249, 0.7);
}

.marketing-header.is-scrolled .marketing-menu-toggle span,
.marketing-header.is-menu-open .marketing-menu-toggle span {
  background: var(--foreground);
}

.marketing-mobile-menu {
  display: none;
}

.marketing-mobile-workflow summary {
  list-style: none;
}

.marketing-mobile-workflow summary::-webkit-details-marker {
  display: none;
}

/* Light-surface variant — pages whose hero is light start with dark text
   instead of the default white-on-navy header state. Scrolled state
   (backdrop + shadow) still comes from .is-scrolled. */
.marketing-header.is-light .marketing-brand-white {
  display: none;
}

.marketing-header.is-light .marketing-brand-color {
  display: block;
}

.marketing-header.is-light .marketing-nav > a,
.marketing-header.is-light .marketing-solutions > summary,
.marketing-header.is-light .marketing-language {
  color: var(--muted-foreground);
}

.marketing-header.is-light .marketing-nav > a:hover,
.marketing-header.is-light .marketing-nav > a[aria-current="page"],
.marketing-header.is-light .marketing-solutions > summary:hover,
.marketing-header.is-light .marketing-language:hover {
  color: var(--foreground);
}

.marketing-header.is-light .marketing-header-cta {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--foreground);
}

.marketing-header.is-light .marketing-header-cta:hover {
  border-color: var(--border-strong);
  background: #ffffff;
}

.marketing-header.is-light .marketing-menu-toggle {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.7);
}

.marketing-header.is-light .marketing-menu-toggle span {
  background: var(--foreground);
}

.marketing-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-deep);
  border-radius: 6px;
  background: var(--primary-deep);
  padding: 0 20px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.marketing-button:hover {
  border-color: #1e40af;
  background: #1e40af;
}

.marketing-button:active {
  transform: translateY(1px);
}

.marketing-button-secondary {
  border-color: rgba(219, 234, 254, 0.58);
  background: rgba(255, 255, 255, 0.06);
  color: #eff6ff;
}

.marketing-button-secondary:hover {
  border-color: #eff6ff;
  background: rgba(255, 255, 255, 0.12);
}

.marketing-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #17191b;
  color: var(--dark-foreground);
}

.marketing-footer-inner {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 56px 24px;
}

.marketing-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 40px;
}

.marketing-footer-logo {
  width: auto;
  height: 24px;
}

.marketing-footer-contact {
  margin-top: 32px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.7;
}

.marketing-footer-contact p,
.marketing-footer-contact a {
  margin: 0;
}

.marketing-footer-contact a {
  color: #94a3b8;
  text-decoration: none;
}

.marketing-footer-contact a:hover,
.marketing-footer-links a:hover {
  color: #ffffff;
}

.marketing-footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.marketing-footer-links h2 {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.marketing-footer-links ul {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.marketing-footer-links a {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.7;
  text-decoration: none;
  transition: color 0.2s ease;
}

.marketing-copyright {
  margin: 64px 0 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 900px) {
  .marketing-nav {
    display: none;
  }

  .marketing-menu-toggle {
    display: inline-flex;
  }

  .marketing-mobile-menu {
    gap: 10px;
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    background: rgba(247, 249, 252, 0.98);
    padding: 14px 18px 18px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  }

  .marketing-mobile-menu.is-open {
    display: grid;
  }

  .marketing-mobile-menu > a,
  .marketing-mobile-workflow > summary {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    padding: 0 12px;
    color: var(--foreground);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
  }

  .marketing-mobile-workflow[open] > summary span {
    transform: rotate(180deg);
  }

  .marketing-mobile-workflow .marketing-workflow-list {
    gap: 6px;
    padding: 8px 10px 0;
  }

  .marketing-mobile-workflow .marketing-workflow-list a {
    min-height: 38px;
    border: 0;
    background: transparent;
    padding: 0 10px;
    font-weight: 700;
  }

  .marketing-footer-grid,
  .marketing-footer-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .marketing-header-inner {
    padding-right: 18px;
    padding-left: 18px;
  }

  .marketing-header-cta {
    display: none;
  }

  .marketing-footer-inner {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marketing-header,
  .marketing-button {
    transition: none;
  }
}
