/* EdNinja: shared styles for every page of edninja.app. Nothing is loaded from other domains. */

:root {
  --night: #1b1f4b;
  --night-2: #12153a;
  --indigo: #2e3580;
  --red: #e8452c;
  --red-dark: #c4351f;
  --red-darker: #a82c18;
  --sun: #ffc93c;
  --leaf: #3fa34d;
  --sky: #2f8fd8;
  --ink: #1d2036;
  --ink-soft: #545a75;
  --paper: #ffffff;
  --cream: #fff8ec;
  --line: #ebe3d3;
  --radius: 22px;
  --shadow: 0 12px 32px rgba(27, 31, 75, 0.14);
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dark); }
a:hover { color: var(--red); }
/* Yellow ring with a dark halo: visible (>= 3:1) on both the dark and the light sections. */
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; box-shadow: 0 0 0 6px var(--night); border-radius: 8px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--sun); color: var(--night); padding: 8px 14px; border-radius: 999px; font-weight: 800; z-index: 50; }
.skip:focus { left: 16px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(27, 31, 75, 0.94);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { width: 116px; height: auto; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a { text-decoration: none; color: rgba(255, 255, 255, 0.82); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lang {
  border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: #fff;
  font: inherit; font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; cursor: pointer; margin-left: 4px;
}
.lang:hover { background: rgba(255, 255, 255, 0.12); }
@media (max-width: 720px) { .top nav a.hide-sm { display: none; } }

/* ---------- Shuriken (inline SVG) ---------- */
.star { fill: currentColor; }
.spin { animation: spin 16s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(232, 69, 44, 0.35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(47, 143, 216, 0.28), transparent 50%),
    linear-gradient(170deg, var(--night), var(--night-2));
}
.hero .deco { position: absolute; color: rgba(255, 255, 255, 0.06); pointer-events: none; }
.hero .deco.a { width: 220px; right: -50px; top: -40px; }
.hero .deco.b { width: 120px; left: 46%; bottom: -30px; animation-duration: 22s; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 80px 0 96px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; background: rgba(255, 255, 255, 0.12); padding: 6px 14px; border-radius: 999px; }
.eyebrow svg { width: 16px; height: 16px; color: var(--sun); }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.04; margin: 18px 0 16px; letter-spacing: -1.4px; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero p.lead { font-size: clamp(18px, 2vw, 21px); max-width: 36ch; opacity: 0.9; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800;
  padding: 13px 22px; border-radius: 999px; background: var(--red-dark); color: #fff;
  box-shadow: 0 8px 20px rgba(196, 53, 31, 0.35); transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { color: #fff; background: var(--red-darker); transform: translateY(-2px); }
.btn.ghost { background: rgba(255, 255, 255, 0.1); box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.28); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.18); }
.hero-art { position: relative; justify-self: center; width: min(460px, 100%); aspect-ratio: 1 / 0.92; }
.hero-art .ring { position: absolute; inset: 6% 10% 14%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 201, 60, 0.28), rgba(255, 201, 60, 0) 68%); }
.hero-art .boy, .hero-art .girl { position: absolute; bottom: 0; width: 50%; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.35)); }
.hero-art .boy { left: 2%; animation: bob 6s ease-in-out infinite; }
.hero-art .girl { right: 2%; animation: bob 6s ease-in-out -3s infinite; }
.hero-art .throw { position: absolute; width: 18%; top: 4%; left: 41%; color: var(--sun); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3)); }
@keyframes bob { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art .boy, .hero-art .girl { animation: none; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding: 56px 0 72px; }
  .hero p.lead { margin-inline: auto; }
  .cta { justify-content: center; }
  .hero-art { width: min(340px, 90%); }
}

/* ---------- Sections ---------- */
main, section { scroll-margin-top: 64px; }
section { padding: 88px 0; }
section.alt { background: var(--cream); }
.kicker { color: var(--red-dark); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.8px; margin: 0 0 14px; color: var(--night); }
.sub { color: var(--ink-soft); font-size: 19px; max-width: 62ch; margin: 0 0 40px; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* ---------- Mission ---------- */
.mission { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.pillar { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.pillar .badge { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 14px; color: #fff; }
.pillar .badge svg { width: 26px; height: 26px; fill: currentColor; }
.pillar h3 { margin: 0 0 6px; font-size: 21px; color: var(--night); }
.pillar p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .mission { grid-template-columns: 1fr; } }

/* ---------- Apps ---------- */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app {
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line);
  border-radius: 28px; padding: 28px; box-shadow: var(--shadow); position: relative;
}
.app .head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.app .head img { width: 84px; height: 84px; border-radius: 22%; box-shadow: 0 8px 18px rgba(27, 31, 75, 0.22); flex: none; }
.app h3 { margin: 0; font-size: 22px; line-height: 1.2; color: var(--night); }
.tag { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.tag.live { background: #e3f4e5; color: #23702f; }
.tag.soon { background: #fff1cc; color: #8a5a00; }
.app p { margin: 0 0 14px; color: var(--ink-soft); }
.app ul { margin: 0 0 20px; padding-left: 20px; color: var(--ink-soft); font-size: 16px; }
.app ul li { margin-bottom: 4px; }
.app .links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.app .links a.more { font-weight: 800; text-decoration: none; padding: 9px 16px; border-radius: 999px; background: var(--night); color: #fff; font-size: 15px; }
.app .links a.more:hover { background: var(--indigo); }
.app .links a.store {
  display: inline-flex; align-items: center; gap: 8px; background: #000; color: #fff; text-decoration: none;
  padding: 7px 14px 7px 11px; border-radius: 12px; line-height: 1.05;
}
.app .links a.store svg { width: 20px; height: 20px; fill: currentColor; }
.app .links a.store small { display: block; font-size: 10px; opacity: 0.85; }
.app .links a.store strong { font-size: 15px; }
.app .links .note { font-size: 14px; color: var(--ink-soft); font-weight: 700; }
@media (max-width: 960px) { .apps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .apps { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.about p { color: var(--ink-soft); font-size: 18px; margin: 0 0 16px; }
.quote { font-size: 22px; font-weight: 800; color: var(--night); border-left: 5px solid var(--red); padding: 4px 0 4px 18px; margin: 24px 0 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 3px; background: var(--line); border-radius: 3px; }
.timeline li { position: relative; padding: 0 0 22px 48px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 3px; width: 25px; height: 25px; border-radius: 50%;
  background: var(--paper) url("img/shuriken.webp") center / 17px no-repeat; border: 3px solid var(--line);
}
.timeline strong { display: block; color: var(--night); font-size: 18px; }
.timeline span { color: var(--ink-soft); font-size: 16px; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(170deg, var(--night), var(--night-2)); color: #fff; position: relative; overflow: hidden; }
.contact h2 { color: #fff; }
.contact .sub { color: rgba(255, 255, 255, 0.8); }
.contact .deco { position: absolute; width: 160px; left: -40px; bottom: -40px; color: rgba(255, 255, 255, 0.06); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 20px; justify-content: center; }
.card {
  display: flex; align-items: center; gap: 16px; text-align: left; text-decoration: none; color: #fff;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 22px; padding: 22px 24px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.card:hover { color: #fff; background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }
.card .ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--red); }
.card .ic svg { width: 24px; height: 24px; fill: #fff; }
.card small { display: block; font-size: 13px; opacity: 0.75; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.card strong { font-size: 18px; word-break: break-word; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer { background: var(--night-2); color: rgba(255, 255, 255, 0.82); padding: 56px 0 40px; font-size: 15px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer img.logo { width: 160px; margin-bottom: 12px; }
footer .fh { color: #fff; font-weight: 800; margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.8px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 20px; font-size: 13px; opacity: 0.72; }
@media (max-width: 860px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .wrap > div:first-child { grid-column: 1 / -1; } }

/* ---------- Legal pages ---------- */
.doc-hero { background: linear-gradient(170deg, var(--night), var(--night-2)); color: #fff; padding: 56px 0 48px; }
.doc-hero h1 { margin: 0 0 6px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -1px; }
.doc-hero p { margin: 0; opacity: 0.85; }
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.3px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: #2b2f47; }
.doc .tldr { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 8px; }
.doc .tldr h2 { margin-top: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.doc th { background: var(--cream); }
.doc .table-wrap { overflow-x: auto; }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; background: linear-gradient(170deg, var(--night), var(--night-2)); color: #fff; padding: 40px 0; }
.lost img { width: 180px; margin: 0 auto 20px; }
.lost h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 8px; }
.lost p { opacity: 0.85; margin: 0 0 24px; }

/* Language switching: elements marked for the other language are hidden. */
html[lang="en"] [data-only="es"], html[lang="es"] [data-only="en"] { display: none !important; }
