/* INHERTA public site.
 *
 * Deliberately NOT the React app: these pages must be readable by a crawler
 * that does not run JavaScript. Meta fetches /privacidad during App Review,
 * and the app shell would serve it an empty div.
 *
 * The palette is not decoration. Teal, violet and blue ARE the three channels
 * (WhatsApp, Instagram, Messenger) and they carry that meaning consistently:
 * in the hero streams, in the channel list, in the transcript. They are the
 * product's own brand tokens from packages/web/tailwind.config.js.
 */

@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 800;
  font-display: swap;
  src: url('./fonts/inter-800.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/mono-500.woff2') format('woff2');
}

:root {
  --ink: #0b0f14;
  --ink-2: #10151c;
  --ink-3: #161d26;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #e9eef5;
  --text-2: #a2aebd;
  --text-3: #7f8b9b;

  /* Channel identity. Saturated for graphics, lightened for text on ink. */
  --wa: #00b384;
  --ig: #7c3aed;
  --ms: #2563eb;
  --wa-lift: #34d6a8;
  --ig-lift: #a78bfa;
  --ms-lift: #6ba5fb;

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 48px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family:
    'Inter',
    -apple-system,
    system-ui,
    'Segoe UI',
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ── Eyebrow: the one place mono is used, so it reads as a system label ── */
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 18px;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px var(--pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* Three bars converging into one: the product thesis at favicon scale. */
.brand-mark {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
}

.site-head nav {
  display: flex;
  gap: 26px;
  font-size: 14.5px;
  color: var(--text-2);
}

.site-head nav a {
  text-decoration: none;
}

.site-head nav a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .site-head nav {
    display: none;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  padding-block: clamp(40px, 9vw, 96px) clamp(56px, 11vw, 128px);
}

/* The 3D canvas sits behind the copy and never intercepts pointer events. */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Shown when WebGL is unavailable, so the hero is never an empty black box. */
.hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(60% 50% at 78% 42%, rgba(124, 58, 237, 0.22), transparent 70%),
    radial-gradient(52% 44% at 62% 62%, rgba(0, 179, 132, 0.18), transparent 70%),
    radial-gradient(46% 40% at 88% 66%, rgba(37, 99, 235, 0.2), transparent 70%);
}

/* A scrim over the left of the hero so the streams never fight the headline.
   Sits above the canvas (z 0) and below the copy (z 2). */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    var(--ink) 22%,
    rgba(11, 15, 20, 0.88) 42%,
    rgba(11, 15, 20, 0) 66%
  );
}

/* Keep the page container width — constraining THIS box would shrink the
   wrap and `margin: 0 auto` would then centre the copy. `width: 100%` is
   load-bearing too: .hero is a flex container, so without it this shrinks to
   fit its content and the auto margins centre it in the flex line. */
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-inner h1,
.hero-inner .eyebrow,
.hero-inner .cta-row {
  max-width: 700px;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 6.4vw, 74px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h1 .soft {
  color: var(--text-2);
  font-weight: 600;
}

.lede {
  margin: 0 0 34px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 54ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background: var(--text);
  color: var(--ink);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #fff;
}

.btn-ghost {
  border-color: var(--line-2);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text-3);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Sections ───────────────────────────────────────────────────────── */
section {
  padding-block: clamp(64px, 10vw, 118px);
}

.section-head {
  max-width: 620px;
  margin-bottom: clamp(34px, 5vw, 56px);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(27px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-head p {
  margin: 0;
  color: var(--text-2);
  font-size: 17px;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ── Channels: rows, not cards. Each row is one channel, keyed by colour ── */
.channels {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.channel {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: clamp(16px, 4vw, 40px);
  align-items: baseline;
  padding-block: 26px;
  border-bottom: 1px solid var(--line);
}

.channel-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.channel p {
  margin: 0;
  color: var(--text-2);
  font-size: 15.5px;
}

.channel .state {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .channel {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .channel .state {
    order: 3;
  }
}

/* ── Transcript: the product's own artifact ─────────────────────────── */
.transcript {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  padding: clamp(18px, 3vw, 30px);
  max-width: 620px;
}

.msg {
  display: flex;
  margin-bottom: 12px;
}

.msg.out {
  justify-content: flex-end;
}

.bubble {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 15.5px;
  line-height: 1.5;
}

.msg.in .bubble {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}

.msg.out .bubble {
  background: rgba(0, 179, 132, 0.13);
  border: 1px solid rgba(0, 179, 132, 0.34);
  border-bottom-right-radius: 5px;
}

.msg.out.human .bubble {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.42);
}

.who {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 5px;
}

/* The handoff line is the whole point of the transcript, so it gets a rule. */
.handoff {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--ig-lift);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.handoff::before,
.handoff::after {
  content: '';
  height: 1px;
  flex: 1;
  background: rgba(124, 58, 237, 0.3);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

@media (max-width: 880px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.points {
  list-style: none;
  margin: 0;
  padding: 0;
}

.points li {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 16px;
}

.points li:first-child {
  border-top: 1px solid var(--line);
}

.points strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

/* ── Footer: carries the legal identity. Must be in the HTML, not JS. ── */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 46px 56px;
  font-size: 14px;
  color: var(--text-3);
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.foot-links a {
  color: var(--text-2);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--text);
}

.legal-entity {
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.65;
  max-width: 62ch;
}

.legal-entity strong {
  color: var(--text-2);
  font-weight: 600;
}

/* ── Legal document pages ───────────────────────────────────────────── */
.doc {
  max-width: 760px;
  padding-block: clamp(40px, 7vw, 76px) clamp(56px, 9vw, 96px);
}

.doc h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  margin-bottom: 10px;
}

.doc .meta {
  color: var(--text-3);
  font-size: 14px;
  margin: 0 0 40px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.doc h2 {
  font-size: clamp(20px, 2.4vw, 25px);
  margin: 44px 0 12px;
  letter-spacing: -0.02em;
}

.doc h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 26px 0 8px;
  letter-spacing: -0.01em;
}

.doc p,
.doc li {
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.72;
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 9px;
}

.doc strong {
  color: var(--text);
  font-weight: 600;
}

.doc a {
  color: var(--wa-lift);
  text-decoration-color: rgba(52, 214, 168, 0.4);
  text-underline-offset: 3px;
}

.callout {
  border: 1px solid var(--line);
  border-left: 2px solid var(--wa);
  background: var(--ink-2);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 26px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15.5px;
}

.doc th,
.doc td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  vertical-align: top;
}

.doc th {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Wide content scrolls inside itself; the page body never scrolls sideways. */
.scroll-x {
  overflow-x: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
