/* RayitoStudios: todo en tinta oscura, con el amarillo del rayo. */
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #0A0D12;
  --surface: #12171F;
  --surface-2: #181E28;
  --text: #F4F3EF;
  --muted: #A9AEB8;
  --faint: #757B85;
  --line: rgba(244, 243, 239, 0.09);
  --line-strong: rgba(244, 243, 239, 0.18);
  --accent: #FFC93C;
  --accent-soft: rgba(255, 201, 60, 0.13);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius: 18px;
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* colores del proyecto (el generador los cambia en cada página) */
  --c1: #FFC93C; --c2: #E0A21E; --c3: #8A5A00; --glow: rgba(255, 233, 170, 0.5); --p: #FFC93C; --p-dark: #FFC93C;
  color-scheme: dark;
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* Barra superior */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 13, 18, 0.72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.nav .logo img { height: 32px; width: auto; }
.nav nav { display: flex; gap: 4px; }
.nav nav a {
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted);
  padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.nav nav a:hover { background: var(--accent-soft); color: var(--text); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 16px/1 var(--display); text-decoration: none;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .2s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #0E1117; box-shadow: 0 10px 28px -12px rgba(255, 201, 60, 0.75); }
.btn-primary:hover { transform: translateY(-1px); background: #FFD45E; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(244, 243, 239, 0.06); }
.btn-soon { background: rgba(244, 243, 239, 0.07); color: var(--text); border-color: var(--line-strong); cursor: default; }

/* Bandas a todo el ancho, con el brillo amarillo y la cuadrícula de puntos */
.band { position: relative; overflow: hidden; isolation: isolate; }
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(48% 75% at 88% 12%, rgba(255, 201, 60, 0.22), transparent 62%),
    radial-gradient(35% 55% at 0% 100%, rgba(255, 201, 60, 0.07), transparent 60%);
}
.band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(244, 243, 239, 0.08) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(115deg, transparent 25%, #000 80%);
  mask-image: linear-gradient(115deg, transparent 25%, #000 80%);
}
.hero { padding: clamp(64px, 10vw, 136px) 0 clamp(64px, 9vw, 120px); border-bottom: 1px solid var(--line); }
.hero-mark {
  position: absolute; z-index: -1; bottom: -24px;
  right: max(-60px, calc((100% - 1120px) / 2 - 30px));
  width: clamp(240px, 36vw, 480px);
  filter: drop-shadow(0 30px 60px rgba(255, 201, 60, 0.18));
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 13px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(46px, 7.6vw, 96px); font-weight: 700; letter-spacing: -0.045em; line-height: 0.98; margin: 22px 0; max-width: 16ch; }
.glow { background: linear-gradient(92deg, #FFE7A3 0%, #FFC93C 45%, #FFAE1A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 30em; margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Secciones */
.section { padding-top: clamp(72px, 10vw, 120px); }
.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -0.035em; }
.section-head p { color: var(--muted); margin: 0; max-width: 40em; font-size: 18px; }

/* Tarjetas */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03); overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s;
}
.icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.icon svg { width: 22px; height: 22px; }

/* Proyectos de la portada */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
@media (min-width: 760px) { .project.featured { grid-column: span 2; } }
.project { display: flex; flex-direction: column; }
.project:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.project .art {
  position: relative; display: grid; place-items: center; height: 180px;
  background: radial-gradient(50% 70% at 50% 60%, var(--glow), transparent 70%), linear-gradient(135deg, var(--c1) 0%, var(--c2) 55%, var(--c3) 100%);
}
.project.featured .art { height: 230px; }
.project .art img { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 24px 48px -16px rgba(20, 10, 2, 0.6); }
.project.featured .art img { width: 112px; height: 112px; border-radius: 26px; }
.project .body { flex: 1; display: flex; flex-direction: column; padding: 24px 26px 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { font: 600 12.5px/1 var(--display); letter-spacing: 0.02em; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.chip.soon { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.project h3 { font-size: 22px; letter-spacing: -0.025em; margin-bottom: 8px; }
.project.featured h3 { font-size: 26px; }
.project p { color: var(--muted); margin: 0 0 20px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.arrow-link {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font: 600 15px/1 var(--display); padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); transition: border-color .2s, background .2s;
}
.arrow-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.arrow-link svg { width: 16px; height: 16px; transition: transform .2s; }
.arrow-link:hover svg { transform: translateX(2px); }
.soon-card {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg);
  padding: 28px; min-height: 260px; position: relative; overflow: hidden;
}
.soon-card .ghost-mark { position: absolute; top: 24px; right: 24px; width: 72px; opacity: 0.12; color: var(--text); }
.soon-card h3 { font-size: 22px; }
.soon-card p { color: var(--muted); margin: 0; }

/* Valores */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value { padding: 26px; }
.value h3 { font-size: 19px; margin-bottom: 6px; }
.value p { color: var(--muted); margin: 0; font-size: 16px; }

/* Llamado a escribir: banda a todo el ancho */
.cta-band { margin-top: clamp(80px, 11vw, 136px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(48px, 7vw, 88px) 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.03em; max-width: 18em; }
.cta-band p { color: var(--muted); margin: 8px 0 0; }

/* Pie */
.foot-grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 32px; padding-top: 48px; padding-bottom: 28px; }
.foot-brand img { height: 30px; width: auto; }
.foot-brand p { color: var(--muted); margin: 12px 0 0; font-size: 15px; }
.foot-cols { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 28px 64px; }
.foot-cols > div { min-width: 120px; }
.foot h4 { font: 600 12px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 6px 0 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.foot ul a { color: var(--muted); text-decoration: none; }
.foot ul a[href^="mailto:"] { white-space: nowrap; }
.foot ul a:hover { color: var(--text); }
.foot-bottom { padding-bottom: 36px; }
.foot-bottom small { display: block; border-top: 1px solid var(--line); padding-top: 20px; color: var(--faint); font-size: 14px; }

/* Página de proyecto */
.app-hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.app-hero h1 { font-size: clamp(48px, 7vw, 88px); letter-spacing: -0.045em; line-height: 0.98; margin: 18px 0 8px; }
.app-hero .sub { font: 600 clamp(18px, 2.2vw, 24px)/1.3 var(--display); color: var(--muted); margin: 0 0 18px; }
.app-art {
  position: relative; aspect-ratio: 1; max-width: 380px; justify-self: center; width: 100%;
  display: grid; place-items: center;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 50%, transparent), color-mix(in srgb, var(--c1) 10%, transparent) 60%, transparent 100%);
}
.app-art img { width: 52%; height: auto; border-radius: 22%; box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06); }
@media (prefers-reduced-motion: no-preference) {
  .app-art img { animation: float 6s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-8px); } }
}
.project-page .icon { background: color-mix(in srgb, var(--p-dark) 15%, transparent); color: var(--p-dark); }
.project-page .eyebrow.tone { color: var(--p-dark); }
.project-page .eyebrow.tone::before { box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-dark) 18%, transparent); }

/* Función estrella (con su ejemplo visual) */
.spotlight { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.spotlight h2 { font-size: clamp(32px, 4.6vw, 54px); letter-spacing: -0.035em; margin: 16px 0 16px; }
.spotlight > div > p { color: var(--muted); font-size: 18px; margin: 0 0 22px; max-width: 32em; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; flex: none; color: var(--p-dark); margin-top: 2px; }
.mock {
  position: relative; border-radius: var(--radius-xl); padding: clamp(18px, 3vw, 28px);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c2) 26%, var(--surface)) 0%, var(--surface) 70%);
  border: 1px solid var(--line-strong); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.mock-notif { background: rgba(244, 243, 239, 0.06); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.mock-notif .app { font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; }
.mock-notif b { display: block; font-family: var(--display); margin: 6px 0 2px; }
.mock-notif span { color: var(--muted); font-size: 15px; }
.mock-arrow { display: grid; place-items: center; height: 36px; color: var(--faint); }
.mock-arrow svg { width: 20px; height: 20px; transform: rotate(90deg); }
.mock-alarm { text-align: center; background: rgba(10, 13, 18, 0.55); border: 1px solid var(--line); border-radius: 22px; padding: 22px 18px; }
.ringing { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 8px 12px; border-radius: 999px; }
.ringing svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .ringing svg { animation: ring 1.6s ease-in-out infinite; transform-origin: 50% 10%; }
  @keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
}
.mock-time { font: 700 clamp(48px, 7vw, 64px)/1 var(--display); letter-spacing: -0.04em; margin: 14px 0 4px; }
.mock-who { color: var(--muted); margin: 0 0 18px; }
.mock-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mock-buttons span { font: 600 14px/1 var(--display); padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line-strong); }
.mock-buttons span.primary { background: var(--accent); color: #0E1117; border-color: transparent; }

.audience-title { font: 600 13px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: clamp(40px, 6vw, 64px) 0 16px; }
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.audience .card, .features .card { padding: 26px; }
.audience h3, .features h3 { font-size: 19px; margin-bottom: 6px; }
.audience p, .features p { color: var(--muted); margin: 0; font-size: 16px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }

/* "Y además": lista liviana, sin tarjetas */
.extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.extra { display: flex; gap: 14px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.extra .icon { width: 36px; height: 36px; border-radius: 11px; margin: 2px 0 0; flex: none; }
.extra .icon svg { width: 18px; height: 18px; }
.extra h3 { font-size: 17px; margin-bottom: 2px; }
.extra p { color: var(--muted); margin: 0; font-size: 15.5px; }

.privacy-band { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 28px; }
.privacy-band .icon { margin: 0; width: 56px; height: 56px; border-radius: 18px; }
.privacy-band .icon svg { width: 28px; height: 28px; }
.privacy-band h3 { font-size: 22px; margin-bottom: 4px; }
.privacy-band p { color: var(--muted); margin: 0; }

/* Textos legales */
.doc-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.doc-hero h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -0.04em; margin: 16px 0 10px; }
.doc-hero .date { color: var(--faint); margin: 0; }
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 40px; }
.toc { position: sticky; top: 92px; font-size: 14.5px; }
.toc p { font: 600 12px/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); border-left-color: var(--accent); }
.toc-mobile { display: none; }
.doc { max-width: 720px; color: #E4E2DC; }
.doc h2 { font-size: 26px; letter-spacing: -0.025em; margin: 48px 0 14px; color: var(--text); }
.doc h3 { font-size: 19px; margin: 30px 0 8px; color: var(--text); }
.doc p { margin: 0 0 14px; }
.doc ul { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin: 6px 0; }
.doc b { color: var(--text); }
.doc a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px 10px; margin: 8px 0; position: relative; overflow: hidden; }
.summary::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.summary h3 { margin-top: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; font-family: var(--display); }

/* Página no encontrada */
.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound h1 { font-size: clamp(36px, 6vw, 72px); letter-spacing: -0.04em; margin: 16px 0 12px; }
.notfound p { color: var(--muted); margin: 0 0 24px; }

/* Entrada suave */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: up .8s cubic-bezier(.2,.7,.2,1) both; }
  .reveal.d1 { animation-delay: .08s; }
  .reveal.d2 { animation-delay: .16s; }
  .reveal.d3 { animation-delay: .24s; }
  @keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* Tablet y celular */
@media (max-width: 900px) {
  .app-hero, .spotlight { grid-template-columns: 1fr; }
  .audience { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-cols { justify-content: flex-start; gap: 24px 40px; }
  .doc-layout { grid-template-columns: 1fr; gap: 0; padding-top: 24px; }
  .toc { display: none; }
  .toc-mobile { display: block; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
  .toc-mobile summary { cursor: pointer; font: 600 15px/1.4 var(--display); }
  .toc-mobile ol { margin: 10px 0 4px; padding-left: 20px; }
  .toc-mobile a { color: var(--muted); }
  .app-art { max-width: 260px; justify-self: start; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav nav a.hide-sm { display: none; }
  .privacy-band { grid-template-columns: 1fr; }
  .hero-mark { opacity: 0.35; }
  .project .art { height: 190px; }
  .soon-card { min-height: 200px; }
}
