:root {
      --navy: #052c52;
      --navy-deep: #031c35;
      --blue: #0a6bb8;
      --blue-mid: #1a7fc4;
      --teal: #7dc3b4;
      --teal-soft: #a2d9ce;
      --ink: #1a2332;
      --muted: #5a6a7a;
      --paper: #f6f8fa;
      --line: rgba(5, 44, 82, 0.1);
      --radius: 4px;
      --radius-lg: 8px;
    }

    * { -webkit-tap-highlight-color: transparent; }
    html { scroll-behavior: smooth; }
    body {
      font-family: 'Manrope', system-ui, sans-serif;
      color: var(--ink);
      background: #fff;
      overflow-x: hidden;
    }
    h1, h2, h3, h4, .font-display { font-family: 'Sora', system-ui, sans-serif; }

    /* Focus */
    :focus-visible {
      outline: 2px solid var(--blue);
      outline-offset: 3px; 
    }

    /* Header */
    /* ========== HEADER — transição suave ========== */
    .site-header {
      --hp: 0; /* 0 = sobre o hero | 1 = sólido */
      --header-pad-y: calc(1.1rem - (var(--hp) * 0.2rem));
      padding-top: var(--header-pad-y);
      padding-bottom: var(--header-pad-y);
      background: transparent;
    }
    .site-header .header-veil {
      position: absolute;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background: #ffffff;
      opacity: var(--hp);
      box-shadow: 0 1px 0 rgba(5, 44, 82, calc(var(--hp) * 0.08));
    }
    /* Linha editorial sutil na base — única assinatura da transição */
    .site-header .header-edge {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 2;
      height: 1px;
      pointer-events: none;
      background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(10, 107, 184, 0.35) 20%,
        rgba(125, 195, 180, 0.55) 50%,
        rgba(10, 107, 184, 0.35) 80%,
        transparent 100%
      );
      opacity: var(--hp);
      transform: scaleX(calc(0.35 + var(--hp) * 0.65));
      transform-origin: center;
    }
    .site-header .header-inner {
      position: relative;
      z-index: 3;
    }
    .header-brand {
      display: inline-flex;
      align-items: center;
      text-decoration: none;
      flex-shrink: 0;
      position: relative;
    }
    .header-brand .header-logo-stack {
      position: relative;
      display: block;
      height: 48px;
      width: auto;
    }
    .header-brand .header-logo {
      display: block;
      height: 48px;
      width: auto;
      max-width: min(210px, 48vw);
      object-fit: contain;
      object-position: left center;
    }
    /* Dual logo: light over dark hero, blue over white header */
    .header-brand .header-logo-stack .logo-light,
    .header-brand .header-logo-stack .logo-color {
      position: absolute;
      left: 0;
      top: 0;
      height: 48px;
      width: auto;
      max-width: min(210px, 48vw);
      object-fit: contain;
      object-position: left center;
    }
    .header-brand .header-logo-stack .logo-color {
      position: relative;
      opacity: var(--hp, 1);
    }
    .header-brand .header-logo-stack .logo-light {
      opacity: calc(1 - var(--hp, 0));
    }
    /* Mobile panel / contexts always on light bg */
    .header-brand.is-static .header-logo-stack .logo-color { opacity: 1; position: relative; }
    .header-brand.is-static .header-logo-stack .logo-light { display: none; }
    @media (min-width: 640px) {
      .header-brand .header-logo-stack,
      .header-brand .header-logo-stack .logo-light,
      .header-brand .header-logo-stack .logo-color,
      .header-brand .header-logo {
        height: 58px;
        max-width: 260px;
      }
    }
    .nav-link {
      position: relative;
      color: color-mix(in srgb, rgba(255,255,255,0.88) calc((1 - var(--hp)) * 100%), #052c52 calc(var(--hp) * 100%));
    }
    .nav-link::after {
      content: '';
      position: absolute;
      left: 0.625rem;
      right: 0.625rem;
      bottom: 0.15rem;
      height: 1.5px;
      border-radius: 1px;
      background: color-mix(in srgb, #a2d9ce calc((1 - var(--hp)) * 100%), #0a6bb8 calc(var(--hp) * 100%));
      transform: scaleX(0);
      transform-origin: center;
      transition: transform 0.25s ease;
      opacity: 0.9;
    }
    .nav-link.is-active::after,
    .nav-link:hover::after {
      transform: scaleX(1);
    }
    .nav-link:hover {
      color: color-mix(in srgb, #ffffff calc((1 - var(--hp)) * 100%), #0a6bb8 calc(var(--hp) * 100%));
    }
    @supports not (color: color-mix(in srgb, white 50%, black 50%)) {
      .site-header:not(.is-solid) .nav-link { color: rgba(255,255,255,.85); }
      .site-header.is-solid .nav-link { color: #052c52; }
      .site-header:not(.is-solid) .nav-link::after { background: #a2d9ce; }
      .site-header.is-solid .nav-link::after { background: #0a6bb8; }
    }
    .btn-header-cta {
      background: color-mix(in srgb, #ffffff calc((1 - var(--hp)) * 100%), #052c52 calc(var(--hp) * 100%));
      color: color-mix(in srgb, #052c52 calc((1 - var(--hp)) * 100%), #ffffff calc(var(--hp) * 100%));
      transition: transform 0.2s ease;
    }
    @supports not (color: color-mix(in srgb, white 50%, black 50%)) {
      .site-header:not(.is-solid) .btn-header-cta { background: #fff; color: #052c52; }
      .site-header.is-solid .btn-header-cta { background: #052c52; color: #fff; }
    }
    #menu-toggle {
      color: color-mix(in srgb, #ffffff calc((1 - var(--hp)) * 100%), #052c52 calc(var(--hp) * 100%));
    }
    @supports not (color: color-mix(in srgb, white 50%, black 50%)) {
      .site-header:not(.is-solid) #menu-toggle { color: #fff; }
      .site-header.is-solid #menu-toggle { color: #052c52; }
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: .5rem;
      font-family: 'Sora', sans-serif;
      font-weight: 600;
      font-size: .8125rem;
      letter-spacing: .04em;
      text-transform: uppercase;
      padding: .875rem 1.5rem;
      border-radius: var(--radius);
      transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
      cursor: pointer;
      border: 1.5px solid transparent;
      line-height: 1.2;
      text-align: center;
    }
    .btn:active { transform: scale(0.98); }
    .btn-primary {
      background: var(--blue);
      color: #fff;
      box-shadow: 0 8px 24px -4px rgba(10, 107, 184, 0.35);
    }
    .btn-primary:hover {
      background: #085a9c;
      box-shadow: 0 12px 28px -4px rgba(10, 107, 184, 0.45);
    }
    .btn-secondary {
      background: transparent;
      color: #fff;
      border-color: rgba(255,255,255,.45);
    }
    .btn-secondary:hover {
      background: rgba(255,255,255,.08);
      border-color: #fff;
    }
    .btn-outline {
      background: transparent;
      color: var(--navy);
      border-color: rgba(5, 44, 82, 0.22);
    }
    .btn-outline:hover {
      border-color: var(--navy);
      background: var(--paper);
    }
    .btn-navy {
      background: var(--navy);
      color: #fff;
    }
    .btn-navy:hover { background: var(--navy-deep); }
    .btn-teal {
      background: var(--teal);
      color: var(--navy);
    }
    .btn-teal:hover { background: var(--teal-soft); }
    .btn-ghost-light {
      background: rgba(255,255,255,.08);
      color: #fff;
      border-color: rgba(255,255,255,.2);
    }
    .btn-ghost-light:hover { background: rgba(255,255,255,.14); }

    /* Technical grid bg */
    .tech-grid {
      background-image:
        linear-gradient(rgba(5, 44, 82, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(5, 44, 82, 0.04) 1px, transparent 1px);
      background-size: 48px 48px;
    }
    .tech-grid-dark {
      background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
      background-size: 56px 56px;
    }

    /* Reveal animations */
    .reveal {
      opacity: 0;
      transform: translateY(28px);
      transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
    }
    .reveal.is-visible {
      opacity: 1;
      transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: .08s; }
    .reveal-delay-2 { transition-delay: .16s; }
    .reveal-delay-3 { transition-delay: .24s; }
    .reveal-delay-4 { transition-delay: .32s; }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .reveal { opacity: 1; transform: none; transition: none; }
      .journey-line-draw, .draw-line { animation: none !important; stroke-dashoffset: 0 !important; }
      * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    }

    /* Section label */
    .sec-label {
      font-family: 'Sora', sans-serif;
      font-size: .6875rem;
      font-weight: 600;
      letter-spacing: .16em;
      text-transform: uppercase;
      color: var(--blue);
      display: inline-flex;
      align-items: center;
      gap: .625rem;
    }
    .sec-label::before {
      content: '';
      width: 1.5rem;
      height: 1px;
      background: currentColor;
      opacity: 0.85;
    }

    /* Option chips / interactive */
    .option-chip {
      position: relative;
      text-align: left;
      padding: 1.125rem 1.25rem;
      border: 1.5px solid var(--line);
      border-radius: var(--radius-lg);
      background: #fff;
      transition: border-color .25s, background .25s, box-shadow .25s, transform .25s;
      cursor: pointer;
      width: 100%;
    }
    .option-chip:hover {
      border-color: rgba(10, 107, 184, 0.4);
      box-shadow: 0 4px 20px -6px rgba(5, 44, 82, 0.1);
    }
    .option-chip.is-selected {
      border-color: var(--blue);
      background: linear-gradient(135deg, rgba(10,107,184,.06), rgba(125,195,180,.08));
      box-shadow: 0 0 0 1px var(--blue);
    }
    .option-chip.is-selected .chip-check {
      opacity: 1;
      transform: scale(1);
    }
    .chip-check {
      opacity: 0;
      transform: scale(0.6);
      transition: .25s;
      width: 1.25rem;
      height: 1.25rem;
      border-radius: 50%;
      background: var(--blue);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    /* Challenge cards */
    .challenge-card {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 1.5rem;
      background: #fff;
      transition: border-color .25s, box-shadow .25s, transform .25s;
      cursor: pointer;
      height: 100%;
      text-align: left;
    }
    .challenge-card:hover {
      border-color: rgba(10, 107, 184, 0.35);
      box-shadow: var(--shadow-lift, 0 12px 40px -8px rgba(5, 44, 82, 0.12));
      transform: translateY(-2px);
    }
    .challenge-card.is-active {
      border-color: var(--blue);
      background: var(--paper);
    }

    /* Process tabs */
    .process-tab {
      padding: .625rem 1rem;
      font-size: .8125rem;
      font-weight: 600;
      color: var(--muted);
      border: 1px solid transparent;
      border-radius: var(--radius);
      transition: .2s;
      white-space: nowrap;
      background: transparent;
      cursor: pointer;
    }
    .process-tab:hover { color: var(--navy); background: var(--paper); }
    .process-tab.is-active {
      color: var(--navy);
      background: #fff;
      border-color: var(--line);
      box-shadow: var(--shadow-soft, 0 4px 16px -4px rgba(5,44,82,.08));
    }

    /* Tech cards */
    .tech-card {
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 1.5rem;
      background: #fff;
      transition: .25s;
      height: 100%;
      display: flex;
      flex-direction: column;
    }
    .tech-card:hover {
      border-color: rgba(10, 107, 184, 0.3);
      box-shadow: 0 12px 32px -10px rgba(5, 44, 82, 0.12);
    }

    /* Param pills */
    .param-pill {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      padding: .5rem .875rem;
      border: 1px solid var(--line);
      border-radius: 2px;
      font-size: .8125rem;
      font-weight: 500;
      color: var(--navy);
      background: #fff;
      font-family: 'Sora', sans-serif;
      letter-spacing: .02em;
      transition: .2s;
    }
    .param-pill:hover {
      border-color: var(--teal);
      background: rgba(125, 195, 180, 0.12);
    }
    .param-pill .dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--teal);
    }

    /* Journey */
    .journey-step {
      position: relative;
    }
    .journey-num {
      font-family: 'Sora', sans-serif;
      font-weight: 700;
      font-size: .75rem;
      letter-spacing: .08em;
      color: var(--teal);
    }

    /* Water quality types */
    .water-type {
      border-left: 2px solid var(--line);
      padding: 1rem 0 1rem 1.25rem;
      transition: border-color .25s;
    }
    .water-type:hover { border-color: var(--blue); }

    /* Before/After */
    .ba-panel {
      position: relative;
      border-radius: var(--radius-lg);
      overflow: hidden;
    }

    /* Document mock */
    .doc-sheet {
      background: #fff;
      border-radius: 2px;
      box-shadow:
        0 1px 0 rgba(5,44,82,.06),
        0 24px 48px -16px rgba(5,44,82,.18),
        0 0 0 1px rgba(5,44,82,.06);
    }
    .doc-line {
      height: 6px;
      border-radius: 1px;
      background: rgba(5, 44, 82, 0.08);
    }
    .doc-highlight {
      background: rgba(125, 195, 180, 0.35);
      border-left: 2px solid var(--teal);
    }

    /* Form */
    .form-progress {
      height: 3px;
      background: rgba(5, 44, 82, 0.08);
      border-radius: 2px;
      overflow: hidden;
    }
    .form-progress-bar {
      height: 100%;
      background: linear-gradient(90deg, var(--blue), var(--teal));
      transition: width .4s cubic-bezier(.22,1,.36,1);
      border-radius: 2px;
    }
    .form-step { display: none; }
    .form-step.is-active { display: block; animation: fadeStep .35s ease; }
    @keyframes fadeStep {
      from { opacity: 0; transform: translateX(12px); }
      to { opacity: 1; transform: translateX(0); }
    }
    .form-option {
      display: flex;
      align-items: center;
      gap: .75rem;
      padding: 1rem 1.125rem;
      border: 1.5px solid var(--line);
      border-radius: var(--radius);
      cursor: pointer;
      transition: .2s;
      background: #fff;
      width: 100%;
      text-align: left;
    }
    .form-option:hover { border-color: rgba(10,107,184,.4); }
    .form-option.is-selected {
      border-color: var(--blue);
      background: rgba(10, 107, 184, 0.04);
    }
    .form-option input { position: absolute; opacity: 0; pointer-events: none; }
    .form-radio {
      width: 1.125rem;
      height: 1.125rem;
      border: 1.5px solid rgba(5,44,82,.25);
      border-radius: 50%;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: .2s;
    }
    .form-option.is-selected .form-radio {
      border-color: var(--blue);
      background: var(--blue);
    }
    .form-option.is-selected .form-radio::after {
      content: '';
      width: 6px;
      height: 6px;
      background: #fff;
      border-radius: 50%;
    }
    .form-input {
      width: 100%;
      padding: .875rem 1rem;
      border: 1.5px solid var(--line);
      border-radius: var(--radius);
      font-size: .9375rem;
      transition: border-color .2s, box-shadow .2s;
      background: #fff;
      color: var(--ink);
    }
    .form-input:focus {
      outline: none;
      border-color: var(--blue);
      box-shadow: 0 0 0 3px rgba(10, 107, 184, 0.12);
    }
    .form-textarea {
      min-height: 120px;
      resize: vertical;
    }

    /* Comparison table */
    .cmp-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
    .cmp-table th, .cmp-table td {
      padding: .75rem 1rem;
      text-align: left;
      border-bottom: 1px solid var(--line);
    }
    .cmp-table th {
      font-family: 'Sora', sans-serif;
      font-size: .6875rem;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--muted);
      font-weight: 600;
      background: var(--paper);
    }
    .cmp-table tr:hover td { background: rgba(10, 107, 184, 0.03); }

    /* Knowledge cards */
    .know-card {
      display: block;
      padding: 1.5rem;
      border-bottom: 1px solid var(--line);
      transition: background .2s, padding-left .2s;
      text-decoration: none;
      color: inherit;
    }
    .know-card:hover {
      background: var(--paper);
      padding-left: 1.75rem;
    }

    /* Mobile menu */
    .mobile-nav {
      position: fixed;
      inset: 0;
      z-index: 60;
      background: rgba(3, 28, 53, 0.5);
      opacity: 0;
      pointer-events: none;
      transition: opacity .3s;
    }
    .mobile-nav.is-open { opacity: 1; pointer-events: auto; }
    .mobile-nav-panel {
      position: absolute;
      top: 0;
      right: 0;
      width: min(100%, 360px);
      height: 100%;
      background: #fff;
      transform: translateX(100%);
      transition: transform .35s cubic-bezier(.22,1,.36,1);
      display: flex;
      flex-direction: column;
    }
    .mobile-nav.is-open .mobile-nav-panel { transform: translateX(0); }

    /* WhatsApp FAB */
    .wa-fab {
      position: fixed;
      bottom: 1.5rem;
      right: 1.5rem;
      z-index: 50;
      width: 3.25rem;
      height: 3.25rem;
      border-radius: 50%;
      background: #25D366;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px -4px rgba(37, 211, 102, 0.45);
      transition: transform .2s, box-shadow .2s;
    }
    .wa-fab:hover {
      transform: scale(1.06);
      box-shadow: 0 12px 28px -4px rgba(37, 211, 102, 0.55);
    }

    /* Hero diagram */
    .hero-flow {
      position: relative;
    }
    .flow-node {
      font-family: 'Sora', sans-serif;
      font-size: .625rem;
      font-weight: 600;
      letter-spacing: .1em;
      text-transform: uppercase;
      padding: .5rem .75rem;
      border: 1px solid rgba(255,255,255,.18);
      background: rgba(255,255,255,.06);
      backdrop-filter: blur(8px);
      color: rgba(255,255,255,.9);
      border-radius: 2px;
      white-space: nowrap;
    }
    .flow-node.is-accent {
      border-color: rgba(125, 195, 180, 0.5);
      background: rgba(125, 195, 180, 0.12);
      color: var(--teal-soft);
    }
    .flow-arrow {
      width: 24px;
      height: 1px;
      background: rgba(255,255,255,.25);
      position: relative;
    }
    .flow-arrow::after {
      content: '';
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
      border: 3px solid transparent;
      border-left-color: rgba(255,255,255,.35);
    }

    /* SVG draw */
    .draw-path {
      stroke-dasharray: 400;
      stroke-dashoffset: 400;
      animation: drawPath 2s ease forwards 0.5s;
    }
    @keyframes drawPath {
      to { stroke-dashoffset: 0; }
    }

    /* Pulse soft */
    @keyframes softPulse {
      0%, 100% { opacity: .4; }
      50% { opacity: .8; }
    }
    .soft-pulse { animation: softPulse 4s ease-in-out infinite; }

    /* Transform split */
    .transform-after {
      position: relative;
    }
    .transform-after::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: linear-gradient(180deg, var(--blue), var(--teal));
      border-radius: 2px;
    }

    /* Scrollbar thin for process tabs */
    .scroll-x {
      overflow-x: auto;
      scrollbar-width: thin;
      scrollbar-color: rgba(5,44,82,.15) transparent;
      -webkit-overflow-scrolling: touch;
    }

    

    /* Placeholder badge */
    .ph-badge {
      display: inline-block;
      font-size: .625rem;
      font-weight: 600;
      letter-spacing: .1em;
      text-transform: uppercase;
      padding: .25rem .5rem;
      background: rgba(10, 107, 184, 0.08);
      color: var(--blue);
      border-radius: 2px;
    }

/* Inner pages: solid header by default + content offset */
body.page-inner .site-header {
  --hp: 1;
}
body.page-inner .site-header.is-solid,
body.page-inner .site-header {
  /* ensure solid look */
}
body.page-inner main#conteudo {
  padding-top: 5.5rem;
}
