/* ─── Echo solution landing page ──────────────────────────────────────────
   Served statically at echo.sapienevo.ai/ (nginx root), separate from the
   portal app at /portal/. Self-contained: no CSP here, so this file owns the
   whole look. Mirrors the portal's AI-native design language (teal accent,
   glass surfaces, soft glow) so the root and the console feel like one brand.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light dark;

  --bg: #f6f7f9;
  --bg-grad:
    radial-gradient(1100px 520px at 82% -12%, rgba(13, 148, 136, .14) 0%, transparent 58%),
    radial-gradient(900px 480px at -8% 28%, rgba(45, 212, 191, .10) 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f4f6f9;
  --line: #e2e6ed;
  --line-soft: #eef1f5;

  --text: #0b1220;
  --text-dim: #475569;
  --text-faint: #64748b;

  --accent: #0d9488;
  --accent-soft: rgba(13, 148, 136, .10);
  --accent-ring: rgba(13, 148, 136, .26);
  --accent-text: #ffffff;
  --glow: rgba(13, 148, 136, .16);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --radius: 14px;
  --radius-full: 999px;
  --ease: cubic-bezier(.2, .8, .25, 1);
  --dur: .16s;
}

[data-theme="dark"] {
  --bg: #060912;
  --bg-grad:
    radial-gradient(1100px 560px at 84% -10%, rgba(13, 148, 136, .18) 0%, transparent 60%),
    radial-gradient(900px 520px at -10% 30%, rgba(45, 212, 191, .10) 0%, transparent 55%);
  --surface: #0d1220;
  --surface-2: #151c2e;
  --line: #232c44;
  --line-soft: #1a2236;
  --text: #e7ecf8;
  --text-dim: #93a1c0;
  --text-faint: #5f6f92;
  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, .14);
  --accent-ring: rgba(45, 212, 191, .30);
  --glow: rgba(45, 212, 191, .18);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font: 14.5px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--text);
}

h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.skip-link {
  position: fixed;
  top: .6rem;
  left: .6rem;
  z-index: 100;
  padding: .5rem .9rem;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transform: translateY(-160%);
  transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); text-decoration: none; }

/* ── Layout ────────────────────────────────────────────────────────────── */

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1.6rem;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.landing-mark { display: flex; align-items: center; gap: .7rem; }
.landing-mark-name { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.brand-logo { width: 84px; height: 28px; border-radius: 7px; flex: none; }

.landing-nav-actions { display: flex; align-items: center; gap: .6rem; }
/* The language switcher reads as a quiet text link beside the primary CTA. */
.lang-switch {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .44rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  text-decoration: none;
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent-ring); background: var(--accent-soft); text-decoration: none; }

.landing-main { flex: 1; width: min(1120px, 100%); margin: 0 auto; padding: 3.5rem 1.6rem 2rem; }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.landing-hero { text-align: center; padding: 1rem 0 3.5rem; animation: rise .3s var(--ease) both; }
.landing-eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  border-radius: var(--radius-full);
  padding: .3rem .85rem;
  margin-bottom: 1.2rem;
}
.landing-h1 {
  font-size: 2.6rem;
  font-weight: 760;
  letter-spacing: -.03em;
  line-height: 1.12;
  background: linear-gradient(120deg, var(--text), color-mix(in srgb, var(--accent) 55%, var(--text)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 1rem;
}
.landing-desc {
  max-width: 60ch;
  margin: 0 auto 1.8rem;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.65;
}
.landing-hero-actions { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.landing-note { color: var(--text-faint); font-size: .8rem; }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: .44rem .85rem;
  min-height: 34px;
  font-size: .89rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: translateY(0) scale(.98); }
.btn.primary {
  background: linear-gradient(135deg, #0f766e, var(--accent) 55%, color-mix(in srgb, var(--accent) 78%, #14b8a6));
  background-size: 160% 160%;
  color: var(--accent-text);
  box-shadow: 0 2px 6px rgba(15, 118, 110, .35), 0 0 18px var(--glow);
}
.btn.primary:hover { filter: brightness(1.1) saturate(1.1); }
.btn.lg { padding: .7rem 1.5rem; min-height: 44px; font-size: .98rem; border-radius: 12px; }

/* ── Features ──────────────────────────────────────────────────────────── */

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.landing-feature {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.landing-feature:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 10px 26px var(--glow);
  transform: translateY(-2px);
}
.landing-feature-ico {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  box-shadow: 0 0 14px var(--glow);
  margin-bottom: .8rem;
}
.landing-feature-ico svg { width: 19px; height: 19px; }
.landing-feature h2 { font-size: .98rem; font-weight: 680; margin-bottom: .35rem; letter-spacing: -.005em; }
.landing-feature p { color: var(--text-dim); font-size: .86rem; line-height: 1.55; }

/* ── Stack strip + footer ──────────────────────────────────────────────── */

.landing-stack { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1rem 0 2.5rem; }
.landing-stack-item {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: .32rem .8rem;
}

.landing-foot { text-align: center; color: var(--text-faint); font-size: .78rem; padding: 1.2rem 1rem 2rem; }

/* ── Motion ────────────────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(8px) scale(.995); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .landing-h1 { font-size: 2.05rem; }
  .landing-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .landing-main { padding: 2rem 1.1rem 1.5rem; }
  .landing-h1 { font-size: 1.7rem; }
  .landing-features { grid-template-columns: 1fr; }
  .landing-nav { padding: .7rem 1.1rem; }
}
