/* ============================================
   TRUSTIVO SHARED DESIGN SYSTEM (self-contained)
   Canonical tokens MIRROR packages/ui-tokens/tokens.css and index.html's
   inline :root. They are inlined here (NOT @import'ed) because the
   landing page deploys as a standalone static site — only landing-page/
   is published — so a workspace-relative @import to ../packages/... 404s
   in production and leaves every secondary page (support/about/contact/
   security/compliance/…) completely unstyled (white bg, serif, no teal).
   Keep these values in sync with packages/ui-tokens/tokens.css.
   ============================================ */
:root {
  /* Brand teal */
  --teal: #26726C;
  --teal-light: #2E8A83;
  --teal-pale: rgba(38, 114, 108, 0.12);
  --teal-border: rgba(38, 114, 108, 0.3);
  --teal-glow: rgba(38, 114, 108, 0.25);

  /* Ink (dark surfaces) */
  --ink: #0D1117;
  --ink-2: #161B22;
  --ink-3: #21262D;
  --surface: #1C2128;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.08); /* legacy alias for --border-subtle */

  /* Text */
  --text-primary: #F0F6FC;
  --text-secondary: #8B9099;
  --text-muted: #525860;

  /* Status */
  --green: #2EA043;
  --amber: #D29922;
  --red: #F85149;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Typography (Google Fonts <link> in each page <head> loads the faces) */
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 max(24px, calc((100% - 1240px)/2));
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13, 17, 23, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav.scrolled {
  background: rgba(13, 17, 23, 0.95);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

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

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

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Wrapper is layout-transparent on desktop; becomes the dropdown panel on mobile */
.nav-menu {
  display: contents;
}

/* ── MOBILE NAV ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  z-index: 101;
}

@media (max-width: 968px) {

  /* Top bar stays a fixed 64px row — logo + hamburger never move */
  .hamburger {
    display: block;
  }

  /* Menu becomes a dropdown panel below the bar; absolutely positioned
     so opening/closing never reflows the bar (no jump) */
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 18px;
    padding: 20px max(24px, calc((100% - 1240px)/2)) 24px;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
  }

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

  .nav-links,
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
  }

  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: var(--font);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--border);
}

.btn-primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 0 0 1px rgba(38, 114, 108, 0.4), 0 4px 16px rgba(38, 114, 108, 0.25);
}

.btn-primary:hover {
  background: var(--teal-light);
  box-shadow: 0 0 0 1px rgba(46, 138, 131, 0.5), 0 4px 24px rgba(38, 114, 108, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--border);
}

.btn-lg {
  padding: 0.8125rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

/* ── PAGE WRAPPER ── */
.page-wrap {
  padding-top: 64px;
  min-height: 100vh;
}

/* ── PAGE HERO (subpages) ── */
.page-hero {
  padding: 72px max(24px, calc((100% - 1240px)/2)) 56px;
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--teal-glow) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  max-width: 720px;
}

.page-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4AADA6;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: currentColor;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
}

/* ── CONTENT SECTION ── */
.content-section {
  padding: 72px max(24px, calc((100% - 1240px)/2));
}

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

.content-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 72px;
  align-items: start;
}

.content-sidebar {}

.content-sidebar h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  border-left: 2px solid transparent;
}

.sidebar-nav a:hover {
  color: var(--text-primary);
  background: var(--border);
}

.sidebar-nav a.active {
  color: #4AADA6;
  border-color: var(--teal);
}

.content-body {}

.content-body h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--text-primary);
  margin: 40px 0 16px;
  line-height: 1.2;
}

.content-body h2:first-child {
  margin-top: 0;
}

.content-body h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin: 28px 0 10px;
}

.content-body p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.75;
}

.content-body ul,
.content-body ol {
  color: var(--text-secondary);
  padding-left: 20px;
  margin-bottom: 16px;
  line-height: 1.75;
}

.content-body li {
  margin-bottom: 6px;
}

.content-body a {
  color: #4AADA6;
  text-decoration: none;
}

.content-body a:hover {
  text-decoration: underline;
}

.content-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── CARD ── */
.card {
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-actions {
  margin-top: auto;
  padding-top: 24px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--teal-pale);
  border: 1px solid var(--teal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4AADA6;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── SECTION LABEL ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4AADA6;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: currentColor;
}

/* ── CONTACT FORM ── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--ink-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

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

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Restore a visible dropdown affordance (appearance:none strips the native arrow) */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B9099' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
  cursor: pointer;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ── BADGE / TAG ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
}

.badge-teal {
  background: var(--teal-pale);
  border: 1px solid var(--teal-border);
  color: #4AADA6;
}

.badge-green {
  background: rgba(46, 160, 67, 0.12);
  color: #3BB059;
}

/* ── TABLE ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ── FOOTER ── */
.footer {
  padding: 64px max(24px, calc((100% - 1240px)/2)) 32px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-logo img {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h5 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--text-secondary);
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .footer-top {
    grid-template-columns: 1fr;
  }

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