/* EUTHENTIC — euthentic.social
   Blanco cálido, tinta antracita, acento esmeralda. Sans humanista del sistema.
   Un solo tema claro; oscurecido suave vía prefers-color-scheme (sin toggle). */

:root {
  --bg: #faf6ef;
  --bg-alt: #f2ecdf;
  --card: #ffffff;
  --ink: #26292b;
  --ink-soft: #5b615e;
  --accent: #0e8a6d;
  --accent-deep: #0b6f58;
  --accent-soft: #e2f1ea;
  --line: #e5ddcd;
  --on-accent: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(38, 41, 43, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1e1d;
    --bg-alt: #171918;
    --card: #242726;
    --ink: #ebe6db;
    --ink-soft: #a9aea9;
    --accent: #2aa886;
    --accent-deep: #4cc2a1;
    --accent-soft: #123329;
    --line: #363a37;
    --on-accent: #10201a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans',
    'Trebuchet MS', Verdana, system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: 40rem; }

h1, h2, h3 { line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0.6rem 0 1rem; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 0 0 0.6rem; }
h3 { font-size: 1.15rem; margin: 0.9rem 0 0.4rem; }

a { color: var(--accent-deep); }
a:hover { color: var(--accent); }

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

.skip-link {
  position: absolute;
  left: -999rem;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus-visible { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  margin: 0;
}

.brand-seal { width: 1.9rem; height: 1.9rem; color: var(--accent); flex: none; }

.brand-name {
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 1.05rem;
}

.site-nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 550;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }

.lang-select {
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

/* ---------- hero ---------- */

.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 800px) {
  .hero-grid { grid-template-columns: 3fr 2fr; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
}

.badge-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 38rem; }

.hero-actions { margin-top: 1.6rem; }

.hero-art { display: flex; justify-content: center; }

.hero-seal {
  width: min(19rem, 70vw);
  height: auto;
  color: var(--accent);
  animation: seal-in 1s ease-out both;
}

@keyframes seal-in {
  from { transform: scale(0.92) rotate(-6deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 650;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--accent-deep);
  color: var(--on-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ---------- principles ---------- */

.principles { background: var(--bg-alt); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

.section-intro { color: var(--ink-soft); max-width: 40rem; margin-top: 0; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 2rem;
}

@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.3rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card.in { opacity: 1; transform: none; }

.card p { color: var(--ink-soft); margin-bottom: 0; }

.card-icon { width: 2.6rem; height: 2.6rem; color: var(--accent); }

/* ---------- status ---------- */

.status { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1rem; }

.status-inner {
  text-align: center;
  max-width: 40rem;
}

.status-seal { width: 4.2rem; height: 4.2rem; color: var(--accent); }

.status-inner p { color: var(--ink-soft); }

/* ---------- waitlist form ---------- */

.waitlist { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); }

.field { margin-bottom: 1rem; }

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.field input.invalid,
.field textarea.invalid {
  border-color: #b3402e;
  outline-color: #b3402e;
}

.field textarea { resize: vertical; min-height: 6rem; }

/* honeypot: fuera de vista, no display:none para engañar a bots simples */
.hp-field {
  position: absolute;
  left: -999rem;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions { margin-top: 1.4rem; }

.form-status { min-height: 1.5rem; font-weight: 600; }
.form-status.ok { color: var(--accent-deep); }
.form-status.err { color: #b3402e; }
@media (prefers-color-scheme: dark) {
  .field input.invalid, .field textarea.invalid { border-color: #e07a63; }
  .form-status.err { color: #e07a63; }
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr; } }

.footer-brand-line { display: inline-flex; align-items: center; gap: 0.55rem; }

.footer-contact h2 { font-size: 1.05rem; margin-top: 0; color: var(--ink); }
.footer-contact p { margin: 0.25rem 0; }

.footer-legal {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.disclaimer { max-width: 46rem; }

/* ---------- chat widget ---------- */

.chat-fab {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 60;
  width: 3.6rem;
  height: 3.6rem;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.chat-fab:hover { background: var(--accent-deep); transform: translateY(-2px); }

.chat-fab svg { width: 1.7rem; height: 1.7rem; }

.chat-panel {
  position: fixed;
  right: 1.2rem;
  bottom: 5.4rem;
  z-index: 60;
  width: min(22rem, calc(100vw - 2.4rem));
  max-height: min(30rem, calc(100vh - 7rem));
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-panel[hidden] { display: none; }

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
}

.chat-header h2 { font-size: 1rem; margin: 0; }

.chat-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 8rem;
}

.chat-msg {
  max-width: 85%;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--accent-soft);
  color: var(--ink);
  border-bottom-right-radius: 4px;
}

.chat-msg.agent {
  align-self: flex-start;
  background: var(--bg-alt);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  border-top: 1px solid var(--line);
}

.chat-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
}

.chat-send { padding: 0.5rem 1.1rem; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .card { opacity: 1; transform: none; }
}
