/* =============================================================================
   Evida marketing site — mirrors the Evida One app identity
   (deep-navy dark surfaces, warm cream ink, teal accent, Google Sans).
   Palette values track application/lib/core/theme/evida_tokens.dart (dark).
   ============================================================================= */

/* Brand typeface — Google Sans, bundled to match the app (English → Google Sans). */
@font-face {
  font-family: "Google Sans";
  src: url("fonts/GoogleSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans";
  src: url("fonts/GoogleSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans";
  src: url("fonts/GoogleSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans";
  src: url("fonts/GoogleSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Surfaces (app dark tokens) */
  --bg: #0b1422;
  --navy: #101b2d;
  --surface: #16243a;
  --surface-2: #1c2d46;
  --nav: #0c1626;

  /* Ink (warm cream foreground + muted grays) */
  --ink: #f4efe6;
  --ink-2: #a7a395;
  --ink-3: #6e6b61;
  --on-accent: #08131f;

  /* Brand accent — teal */
  --accent: #1ba6a6;
  --accent-soft: #3fbfbf;
  --accent-deep: #147f7f;
  --accent-tint: rgba(27, 166, 166, 0.12);
  --accent-tint-border: rgba(27, 166, 166, 0.3);
  --accent-glow: rgba(27, 166, 166, 0.35);

  /* Neutral cool-gray line — every card border, divider, muted dot */
  --line: #8a8f98;
  --border: rgba(138, 143, 152, 0.1);
  --border-strong: rgba(138, 143, 152, 0.16);
  --border-track: rgba(138, 143, 152, 0.2);
  --border-hover: rgba(27, 166, 166, 0.4);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);

  --header-height: 72px;
  --container: 1120px;
  --section-gap: clamp(4rem, 8vw, 6.5rem);

  font-family: "Google Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
  color: var(--ink);
}

p {
  margin: 0;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 22, 38, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-strong);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.logo-mark {
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-list a {
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-hover);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

/* Hero */
.hero {
  background: radial-gradient(120% 90% at 78% 0%, rgba(27, 166, 166, 0.14) 0%, rgba(27, 166, 166, 0) 55%),
    linear-gradient(165deg, var(--nav) 0%, var(--bg) 48%, var(--navy) 100%);
  color: var(--ink);
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border);
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--ink-2);
  max-width: 34rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* Hero visual — CSS-only abstract scene */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-scene {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1 / 0.85;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.doc-stack {
  position: absolute;
  top: 1.75rem;
  left: 1.75rem;
  width: 140px;
}

.doc {
  position: relative;
  padding: 0.75rem 0.85rem;
  background: rgba(28, 45, 70, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  margin-bottom: -0.65rem;
}

.doc-1 { transform: rotate(-3deg); z-index: 1; }
.doc-2 { transform: rotate(1.5deg); z-index: 2; margin-left: 0.5rem; }
.doc-3 { transform: rotate(-1deg); z-index: 3; margin-left: 1rem; }

.doc-line {
  display: block;
  height: 4px;
  background: rgba(138, 143, 152, 0.45);
  border-radius: 2px;
  margin-bottom: 0.4rem;
}

.doc-line.short { width: 60%; }
.doc-line.medium { width: 80%; }

.flow-path {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-30%, -50%);
  display: flex;
  align-items: center;
  gap: 0;
}

.flow-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(138, 143, 152, 0.5);
  border: 2px solid rgba(138, 143, 152, 0.7);
  flex-shrink: 0;
}

.flow-node.verified {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
}

.flow-node.decision {
  width: 18px;
  height: 18px;
  background: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(27, 166, 166, 0.25);
}

.flow-line {
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, rgba(138, 143, 152, 0.4), var(--accent));
}

.knowledge-card {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: min(180px, 45%);
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.knowledge-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-soft);
  margin-bottom: 0.55rem;
}

.knowledge-line {
  display: block;
  height: 5px;
  background: rgba(244, 239, 230, 0.16);
  border-radius: 3px;
  margin-bottom: 0.4rem;
}

.knowledge-line.short { width: 70%; }

.knowledge-source {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--ink-2);
}

/* Trust strip */
.trust-strip {
  background: var(--surface);
  border-block: 1px solid var(--border-strong);
  padding-block: 1.5rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border);
  border-radius: var(--radius-sm);
  color: var(--accent-soft);
}

/* Sections */
.section {
  padding-block: var(--section-gap);
}

.section-alt {
  background: var(--navy);
}

.section-dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--surface) 100%);
}

.section-title-center {
  text-align: center;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-intro h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 36rem;
}

/* Product */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.product-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
}

.list-marker {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.55rem;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-tint);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1.15rem;
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border);
  border-radius: var(--radius-md);
  color: var(--accent-soft);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.55rem;
}

.card p {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Use cases */
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.use-case {
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease;
}

.use-case:hover {
  border-color: var(--border-hover);
}

.use-case-wide {
  grid-column: 1 / -1;
}

.use-case h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.use-case p {
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Why Evida */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.why-problems h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  margin-bottom: 1.5rem;
}

.problem-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.problem-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.problem-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background: var(--line);
  border-radius: 50%;
}

.why-promise blockquote {
  margin: 0 0 1.25rem;
  padding: 1.5rem 1.75rem;
  background: rgba(27, 166, 166, 0.07);
  border: 1px solid var(--accent-tint-border);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
}

.why-promise blockquote p {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.why-detail {
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* Security */
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.security-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.security-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.security-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.65rem;
}

.security-card p {
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* CTA */
.cta-section {
  background: radial-gradient(120% 140% at 50% 0%, rgba(27, 166, 166, 0.16) 0%, rgba(27, 166, 166, 0) 60%),
    linear-gradient(135deg, var(--surface) 0%, var(--nav) 100%);
}

.cta-inner {
  text-align: center;
  max-width: 640px;
}

.cta-inner h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}

.cta-inner p {
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}

/* Contact */
.section-contact {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
}

.contact-inner {
  text-align: center;
  max-width: 520px;
}

.contact-inner h2 {
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.contact-inner p {
  color: var(--ink-2);
  margin-bottom: 1rem;
}

.contact-link {
  display: inline-block;
  font-weight: 600;
  color: var(--accent-soft);
  border-bottom: 1px solid var(--accent-tint-border);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Footer */
.site-footer {
  background: var(--nav);
  color: var(--ink-2);
  padding-block: 3rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-strong);
}

.footer-desc {
  margin-top: 0.85rem;
  font-size: 0.92rem;
  max-width: 28rem;
  line-height: 1.55;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav a {
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-bottom {
  padding-top: 1.5rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .product-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .visual-scene {
    width: min(100%, 360px);
    margin-inline: auto;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.25rem 1.25rem 1.5rem;
    background: var(--nav);
    border-bottom: 1px solid var(--border-strong);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .btn-nav {
    width: 100%;
    margin-top: 1rem;
  }

  .site-header.is-menu-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.is-menu-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-menu-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .card-grid,
  .use-case-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }
}
