/* ─── ECLIPSE, LA MARCA ───
 * Las páginas donde habla Eclipse y no el estudio de la demo: el armador de
 * demos (/crear) y el panel del estudio (/mi-estudio). Se ven como
 * eclipsecms.com (repo eclipse-landing, su styles.css): Eclipse UI con la
 * personalidad "carbon" y los diales del brand book encima. Solo se carga en
 * layouts/builder, sobre <html data-eui="carbon" data-brand="eclipse">.
 *
 * Tres familias, tres trabajos: Geist Serif dice (titulares, un solo peso),
 * Geist explica (texto e interfaz) e IM Fell English anota (rótulos y cifras,
 * en versalitas). Sin itálicas. Todo cuadrado: solo los cuerpos del eclipse
 * (sol, luna, tierra) y el teléfono de la vista previa son redondos. El iris
 * (azul, agua y brasa) vive en una línea, en un filo o en el horizonte;
 * nunca en un fondo completo ni en texto.
 *
 * Si cambian allá (tokens al principio de styles.css), cambian aquí. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/eclipse_brand/geist-variable-37cf7ed1d7d79212716e279fdd8feabad0fc17e165b56b589ad97243859f504c.woff2) format("woff2");
}
@font-face {
  font-family: "Geist Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/eclipse_brand/geist-serif-regular-625d698f5c94f19f9220db220a9cf91ac0efae2948c967dde2606ba8d114597c.woff2) format("woff2");
}
@font-face {
  font-family: "IM Fell English SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/eclipse_brand/im-fell-english-sc-regular-c545ba53900c6d0f101a62e86eae791935726c574080b589debded32ed791ee0.woff2) format("woff2");
}

/* Los diales del sitio sobre "carbon" */
[data-brand="eclipse"][data-eui] {
  --eui-font-text: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --eui-font-display: "Geist Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --brand-font-fell: "IM Fell English SC", "Geist Serif", Georgia, serif;
  --eui-display-weight: 400;
  --eui-display-tracking: -0.03em;
  --eui-roundness: 0;
  --radius-full: 0px;

  /* El iris de noche: azul, agua y brasa */
  --brand-iris-1: #2a6df0;
  --brand-iris-2: #77e6e0;
  --brand-iris-3: #f4542a;
  --brand-iris: linear-gradient(90deg, var(--brand-iris-1), var(--brand-iris-2), var(--brand-iris-3));
  /* La luz del eclipse en campos grandes: azul, cian, lavanda, rosa y brasa */
  --brand-luz: linear-gradient(90deg, #2a6df0, #58bdf5 28%, #ead9f6 50%, #f5a9dc 70%, #f4542a);
  --brand-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(/%23n)'/%3E%3C/svg%3E");
}

/* Noche: luz sobre sombra */
.dark[data-brand="eclipse"][data-eui] {
  --eui-bg: #111113;
  --eui-fg: #f2f2f3;
  --eui-paper: #111113;
  --eui-ink: #f2f2f3;
}

/* Día: sombra sobre luz. El iris baja un paso para sostenerse. */
[data-brand="eclipse"][data-eui]:not(.dark) {
  --brand-iris-1: #1f55c9;
  --brand-iris-2: #129a93;
  --brand-iris-3: #d9431e;
  --brand-luz: linear-gradient(90deg, #1f55c9, #1d8fc2 28%, #8f67cf 50%, #d4559e 70%, #d9431e);

  --eui-brand: #111113;
  --eui-ink: #111113;
  --eui-paper: #f2f2f3;
  --eui-bg: #f2f2f3;
  --eui-fg: #111113;
  --color-card: #fafafa;
  --color-surface-hover: #f6f6f7;
  --color-raised: #eaeaec;
  --color-muted: #e9e9eb;
  --color-border: #d9d9dc;
  --color-border-hover: #c4c4c9;
  --color-border-subtle: #e3e3e6;
  --color-muted-foreground: #52525b;
  --color-primary: #111113;
  --color-primary-hover: #29292c;
  --color-primary-foreground: #f2f2f3;
  --color-primary-text: #111113;
}

[data-brand="eclipse"] body {
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Sin itálicas: el énfasis se da con tamaño, con peso o con Fell. */
[data-brand="eclipse"] :is(em, i, cite) {
  font-style: normal;
}

/* ─── RÓTULOS Y CIFRAS (IM Fell English, en versalitas) ─── */
.brand-fell {
  font-family: var(--brand-font-fell);
  font-weight: 400;
  letter-spacing: 0.05em;
  font-synthesis: none;
}

/* ─── EL SÍMBOLO ───
 * Los tres cuerpos vistos de frente: el sol son los dos arcos de iris
 * (#iris, en el <svg> escondido del layout), la tierra el anillo fino y la
 * luna el disco lleno. */
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  overflow: visible;
}
.brand-mark .sol {
  fill: none;
  stroke: url(#iris);
  stroke-width: 1.9;
}
.brand-mark .tierra {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
}
.brand-mark .luna {
  fill: currentColor;
}
.brand-iris-a { stop-color: var(--brand-iris-1); }
.brand-iris-b { stop-color: var(--brand-iris-2); }
.brand-iris-c { stop-color: var(--brand-iris-3); }

/* ─── EL IRIS EN UNA LÍNEA ─── */
.brand-iris-line {
  background-image: var(--brand-iris);
}
/* De arriba abajo, para un filo vertical */
.brand-iris-line--vertical {
  background-image: linear-gradient(180deg, var(--brand-iris-1), var(--brand-iris-2), var(--brand-iris-3));
}

/* ─── EL HORIZONTE ───
 * El arco de luz del hero de eclipsecms.com, en CSS (allá lo pinta WebGL y
 * este degradado es su respaldo): una elipse enorme cuya cima asoma en la
 * parte baja del bloque. La luz vive en el borde; afuera se apaga rápido y
 * adentro despacio. Va dentro de un contenedor con position: relative y
 * overflow: hidden. */
.brand-horizon {
  --arc-mask: radial-gradient(
    ellipse 82% 120% at 50% 196%,
    rgba(0, 0, 0, 0.28) 45%,
    rgba(0, 0, 0, 0.5) 72%,
    rgba(0, 0, 0, 0.8) 90%,
    #000 100%,
    rgba(0, 0, 0, 0.45) 103%,
    rgba(0, 0, 0, 0.16) 112%,
    transparent 128%
  );
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--brand-luz);
  -webkit-mask-image: var(--arc-mask);
  mask-image: var(--arc-mask);
  opacity: 0.9;
}
[data-brand="eclipse"]:not(.dark) .brand-horizon {
  opacity: 0.5;
}
/* Un grano mínimo, para que el degradado no haga bandas */
.brand-horizon::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--brand-grain);
  background-size: 160px 160px;
  opacity: 0.1;
  mix-blend-mode: overlay;
}

/* ─── EL TELÉFONO DE LA VISTA PREVIA ───
 * Un objeto, no interfaz: por eso es redondo aunque todo lo demás sea
 * cuadrado. Adentro va el sitio del estudio en su personalidad. */
.brand-device {
  border-radius: 2.75rem;
  padding: 0.625rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  box-shadow:
    0 1px 0 color-mix(in oklab, var(--color-foreground) 6%, transparent) inset,
    0 30px 60px -30px color-mix(in oklab, black 45%, transparent);
}
.brand-device__screen {
  border-radius: 2.15rem;
  overflow: hidden;
  isolation: isolate;
}
.brand-device__notch {
  width: 5.5rem;
  height: 1.4rem;
  border-radius: 999px;
  background: var(--color-foreground);
  opacity: 0.92;
}

/* Los cuerpos del eclipse y los avatares sí son círculos. */
.brand-round {
  border-radius: 999px;
}

/* ─── EL PASO QUE ENTRA ───
 * Al cambiar de paso, el nuevo sube un poco y aparece; hacia atrás, baja. */
@keyframes brand-step-forward {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes brand-step-back {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: none; }
}
.brand-step-in {
  animation: brand-step-forward var(--eui-dur-calm, 320ms) var(--eui-ease-exhale, cubic-bezier(0.22, 1, 0.36, 1)) both;
}
.brand-step-in[data-direction="back"] {
  animation-name: brand-step-back;
}
@media (prefers-reduced-motion: reduce) {
  .brand-step-in {
    animation: none;
  }
}
