/* Dojo Master: landing y páginas legales. Sin frameworks ni recursos externos. */

@font-face {
  font-family: "Anton";
  src: url("../fonts/Anton-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Colores de la marca: fondo casi negro del icono y rojo del torii. */
  --bg: #121214;
  --field: #1c1b1e;
  --ink: #f4efee;
  --muted: #b3abaa;
  --accent: #c8121a;
  --accent-hover: #de1820;
  --red: #ff4b52;
  --radius: 6px;
  --margin: 32px;
  --max: 1280px;
  --display: "Anton", "Roboto", sans-serif;
  --text: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --h2: clamp(40px, 4.6vw, 64px);
  color-scheme: dark;
  interpolate-size: allow-keywords;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
  text-decoration-color: var(--red);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--margin);
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--field);
  padding: 8px 14px;
  border-radius: var(--radius);
}

/* Cabecera */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}
.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav a:not(.btn) {
  font-size: 15px;
  text-decoration: none;
  color: var(--muted);
  transition: color 180ms ease;
}
.nav a:not(.btn):hover {
  color: var(--ink);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  transition: transform 140ms var(--ease-out), background-color 180ms ease;
}
.btn:active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background: var(--accent-hover);
  }
}
.btn-small {
  min-height: 44px;
  padding: 0 20px;
  font-size: 16px;
}

/* Capturas: la app es la imagen de la página. */
.shot {
  width: 100%;
  border-radius: var(--radius);
  background: var(--field);
}

/* Portada */
.hero {
  padding: 56px 0 0;
}
.hero-text {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px 64px;
  align-items: end;
  margin-bottom: 56px;
}
.hero h1 {
  grid-column: 1 / -1;
}
.hero h1 {
  font-size: clamp(56px, 8.4vw, 124px);
  line-height: 0.95;
}
.hero-lead {
  font-size: 20px;
  max-width: 46ch;
}
.hero-meta {
  font-size: 15px;
  color: var(--muted);
  margin-top: 14px;
}

/* Secciones */
.block {
  padding: 168px 0 0;
}
.block-field {
  margin-top: 168px;
  padding: 120px 0;
  background: var(--field);
}
.block-field + .block {
  padding-top: 168px;
}
.block h2 {
  font-size: var(--h2);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
}
.split-reverse {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.split-text h2 {
  margin-bottom: 28px;
}
.split-text p + p {
  margin-top: 16px;
}

.pair {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 56px;
}
.pair p {
  max-width: 52ch;
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* Funciones: lista tipográfica */
.list-title {
  margin-bottom: 48px;
}
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 64px;
  margin: 0;
}
.features dt {
  font-family: var(--display);
  font-size: clamp(26px, 2.4vw, 30px);
  line-height: 1.1;
  margin-bottom: 6px;
}
.features dd {
  margin: 0;
  color: var(--muted);
  max-width: 44ch;
}

/* Privacidad */
.block-dark {
  margin-top: 168px;
  padding: 120px 0;
  background: var(--accent);
}
.block-dark + .block {
  padding-top: 168px;
}
.block-dark h2 {
  margin-bottom: 28px;
}
.statement-sub {
  font-size: 20px;
  max-width: 50ch;
}
.text-link {
  color: #fff;
  font-weight: 700;
  text-decoration-color: #fff;
  white-space: nowrap;
}

/* Preguntas */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 64px;
  align-items: start;
}
.faq h2 {
  position: sticky;
  top: 32px;
}
.faq-list details {
  background: var(--field);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 18px;
  padding: 22px 64px 22px 24px;
  position: relative;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 16px;
  height: 3px;
  margin-top: -1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 240ms var(--ease-out);
}
.faq-list summary::after {
  transform: rotate(90deg);
}
.faq-list details[open] summary::after {
  transform: rotate(0deg);
}
.faq-list details p {
  padding: 0 24px 24px;
  max-width: 60ch;
}
.faq-list a {
  color: var(--ink);
}

/* Clip de la clasificación */
.clip-video {
  aspect-ratio: 16 / 10;
}
.clip-still {
  display: none;
}

/* Cierre */
.cta {
  padding: 200px 0 160px;
}
.cta-row {
  display: flex;
  align-items: center;
  gap: 32px;
}
.cta-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  flex: none;
}
.cta-text {
  flex: 1;
}
.cta h2 {
  font-size: var(--h2);
  margin-bottom: 8px;
}
.cta-text p {
  color: var(--muted);
}

/* Pie */
.site-footer {
  color: var(--muted);
  font-size: 15px;
  padding: 0 0 36px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 24px;
}
.site-footer .wrap > div:first-child a {
  margin-left: 0;
}
.site-footer a:hover {
  text-decoration: underline;
  text-decoration-color: var(--red);
}

/* Páginas legales */
.legal-hero {
  padding: 72px 0 40px;
}
.legal-hero h1 {
  font-size: clamp(44px, 6vw, 80px);
  margin-bottom: 16px;
}
.legal-hero p {
  color: var(--muted);
}
.legal {
  padding: 0 0 120px;
}
.legal .wrap {
  max-width: 860px;
}
.legal h2 {
  font-size: 32px;
  margin: 56px 0 16px;
}
.legal h3 {
  font-family: var(--text);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0;
  margin: 28px 0 8px;
}
.legal p,
.legal li {
  font-size: 17px;
}
.legal p + p {
  margin-top: 14px;
}
.legal ul {
  padding-left: 22px;
}
.legal .toc,
.legal .summary {
  background: var(--field);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.legal .toc ol {
  margin: 8px 0 0;
  padding-left: 22px;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 16px 0;
}
.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #2e2c30;
  padding: 10px 8px;
}
.legal code {
  font-size: 0.85em;
  word-break: break-all;
}

/* Movimiento, solo con CSS y siempre con transform: si el navegador no
   soporta las animaciones ligadas al scroll, todo se ve en su sitio. */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 900ms var(--ease-out) both;
  }
  .rise-2 {
    animation-delay: 120ms;
  }
  .rise-3 {
    animation-delay: 240ms;
  }
  @supports (animation-timeline: scroll()) {
    /* La captura de portada llega inclinada y se endereza con los primeros 500px de scroll. */
    .tilt {
      transform-origin: 50% 0;
      animation: rise 900ms var(--ease-out) 240ms both, flatten linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 500px;
    }
    /* Las demás capturas suben un poco al entrar en pantalla. */
    .lift {
      animation: lift linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
    .lift-2 {
      animation-range: entry 10% entry 90%;
    }
    .lift-3 {
      animation-range: entry 20% entry 100%;
    }
    .features > div {
      animation: lift-small linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }
  }
  /* Las preguntas se abren con su altura real (navegadores con ::details-content). */
  .faq-list details::details-content {
    height: 0;
    overflow: clip;
    transition: height 320ms var(--ease-out), content-visibility 320ms allow-discrete;
  }
  .faq-list details[open]::details-content {
    height: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .clip-video {
    display: none;
  }
  .clip-still {
    display: block;
  }
}
@keyframes flatten {
  from {
    transform: perspective(1800px) rotateX(16deg) scale(0.94);
  }
}
@keyframes lift {
  from {
    transform: translateY(72px) scale(0.96);
  }
}
@keyframes lift-small {
  from {
    transform: translateY(32px);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-text,
  .split,
  .split-reverse,
  .pair,
  .faq {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .split-reverse .split-text {
    order: -1;
  }
  .faq h2 {
    position: static;
  }
  .cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .block,
  .block-field + .block,
  .block-dark + .block {
    padding-top: 112px;
  }
  .block-field,
  .block-dark {
    margin-top: 112px;
    padding: 88px 0;
  }
}

@media (max-width: 640px) {
  :root {
    --margin: 16px;
  }
  body {
    font-size: 17px;
  }
  .nav a:not(.btn) {
    display: none;
  }
  .hero {
    padding-top: 28px;
  }
  .hero h1 {
    font-size: 11vw;
  }
  .hero-lead {
    font-size: 18px;
  }
  .btn {
    width: 100%;
  }
  .btn-small {
    width: auto;
  }
  .trio {
    grid-template-columns: 1fr 1fr;
  }
  .trio .shot:last-child {
    display: none;
  }
  .features {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .br-wide {
    display: none;
  }
  .cta-icon {
    width: 80px;
    height: 80px;
    border-radius: 19px;
  }
  .cta {
    padding: 128px 0 96px;
  }
  .site-footer a {
    margin: 0 18px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
