/* Lulumoy Studio — sitio web. Sin dependencias externas; colores del icono de la tortuga. */

:root {
  --g950: #0d260c; --g900: #143f13; --g800: #1f5e1c; --g700: #2e7d32; --g600: #4f9e2a;
  --g500: #6cb83d; --g400: #8bd450; --g300: #a6e06e; --g100: #d7eebf; --g50: #f4fbe9;
  --blue: #7fd3ff; --yellow: #ffd54f;
  --ink: #18221a; --muted: #56645a; --bg: #ffffff; --bg-alt: #f5f9f0; --card: #ffffff;
  --line: #dde8d3; --accent: #2e7d32; --accent-soft: #eaf5df;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 40, 14, .06), 0 8px 24px rgba(16, 40, 14, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --math: "STIX Two Math", "Latin Modern Math", "Cambria Math", math;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e4eedd; --muted: #a3b39b; --bg: #0f170e; --bg-alt: #132012; --card: #172617;
    --line: #2a3d27; --accent: #8bd450; --accent-soft: #1d311b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 3px solid var(--g400); outline-offset: 2px; border-radius: 4px; }
math { font-family: var(--math); }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--g400); color: #0d260c; padding: .6rem 1rem; }
.skip:focus { left: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

/* ---------------------------------------------------------------- barra superior */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 48, 15, .88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(166, 224, 110, .18); color: var(--g50);
}
.topbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-size: 1.12rem; letter-spacing: -.01em; }
.brand img { border-radius: 50%; background: var(--g50); }
.brand b { color: var(--g300); font-weight: 700; }
.mainnav { margin-left: auto; display: flex; align-items: center; gap: 1.2rem; }
.mainnav ul { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.mainnav ul a { display: block; padding: .45rem .75rem; border-radius: 999px; color: var(--g100); text-decoration: none; font-size: .95rem; font-weight: 500; }
.mainnav ul a:hover { background: rgba(166, 224, 110, .14); color: #fff; }
.mainnav ul a[aria-current="page"] { background: rgba(166, 224, 110, .22); color: #fff; }
.langs { display: flex; border: 1px solid rgba(166, 224, 110, .35); border-radius: 999px; overflow: hidden; }
.langs a { padding: .28rem .6rem; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--g100); text-decoration: none; }
.langs a:hover { background: rgba(166, 224, 110, .16); }
.langs a[aria-current="true"] { background: var(--g400); color: var(--g950); }
.gh { color: var(--g100); display: flex; }
.gh .ico { width: 24px; height: 24px; }
.gh:hover { color: #fff; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(166, 224, 110, .4); border-radius: 10px; width: 44px; height: 40px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--g50); margin: auto; position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .mainnav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: .8rem;
             padding: 1rem 1.25rem 1.4rem; background: rgba(16, 48, 15, .98); border-bottom: 1px solid rgba(166, 224, 110, .2); }
  .mainnav.open { display: flex; }
  .mainnav ul { flex-direction: column; }
  .mainnav ul a { padding: .7rem .9rem; font-size: 1.02rem; }
  .langs { align-self: flex-start; }
}

/* ---------------------------------------------------------------- botones */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .78rem 1.3rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
       text-decoration: none; border: 1.5px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--g400); color: var(--g950); box-shadow: 0 6px 20px rgba(139, 212, 80, .35); }
.btn-primary:hover { background: var(--g300); box-shadow: 0 8px 26px rgba(139, 212, 80, .45); }
.btn-ghost { color: var(--g50); border-color: rgba(215, 238, 191, .5); }
.btn-ghost:hover { background: rgba(244, 251, 233, .1); border-color: var(--g100); }
.btn-light { background: var(--g50); color: var(--g900); }
.btn-light:hover { background: #fff; }

/* ---------------------------------------------------------------- portada */
.hero {
  position: relative; overflow: hidden; color: var(--g50);
  background:
    linear-gradient(rgba(166, 224, 110, .06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(166, 224, 110, .06) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 75% 40%, #2f8329 0%, #1f5e1c 40%, #11360f 100%);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 80px; background: linear-gradient(transparent, rgba(13, 38, 12, .35)); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 6.5rem); }
.badge { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--g300);
         border: 1px solid rgba(166, 224, 110, .45); border-radius: 999px; padding: .3rem .85rem; margin-bottom: 1.2rem; }
.hero h1 { color: #fff; font-size: clamp(2.8rem, 6.5vw, 4.8rem); margin-bottom: .2em; }
.hero h1 span { color: var(--g400); }
.tagline { font-size: clamp(1.2rem, 2.2vw, 1.55rem); color: var(--g100); font-weight: 600; margin-bottom: .8em; }
.hero .lead { color: rgba(244, 251, 233, .86); font-size: 1.08rem; max-width: 40em; margin-bottom: 1.8rem; }
.hero-note { margin: 1.1rem 0 0; font-size: .9rem; color: rgba(215, 238, 191, .8); }
.hero-note a { color: var(--g300); }
.hero-art { position: relative; aspect-ratio: 1; max-width: 430px; justify-self: center; width: 100%; padding: 34px 0 0 34px; }
.ruler { position: absolute; background-color: rgba(13, 38, 12, .55); border: 1px solid rgba(166, 224, 110, .3); }
.ruler-x { top: 0; left: 34px; right: 0; height: 26px;
           background-image: repeating-linear-gradient(90deg, rgba(215, 238, 191, .75) 0 1px, transparent 1px 10px),
                             repeating-linear-gradient(90deg, var(--g300) 0 1.5px, transparent 1.5px 50px);
           background-size: 100% 8px, 100% 16px; background-position: 0 100%, 0 100%; background-repeat: repeat-x; }
.ruler-y { left: 0; top: 34px; bottom: 0; width: 26px;
           background-image: repeating-linear-gradient(180deg, rgba(215, 238, 191, .75) 0 1px, transparent 1px 10px),
                             repeating-linear-gradient(180deg, var(--g300) 0 1.5px, transparent 1.5px 50px);
           background-size: 8px 100%, 16px 100%; background-position: 100% 0, 100% 0; background-repeat: repeat-y; }
.halo { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center;
        background: radial-gradient(circle, rgba(244, 251, 233, .16), transparent 68%); }
.halo img { width: 82%; height: auto; border-radius: 50%; box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 10px rgba(244, 251, 233, .08);
            animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .halo img { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-art { max-width: 300px; order: -1; justify-self: start; }
}

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 2.6rem; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .8rem; font-weight: 800; color: var(--accent); margin-bottom: .6rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.4rem 1.2rem; box-shadow: var(--shadow);
        transition: transform .18s, border-color .18s; }
.card:hover { transform: translateY(-3px); border-color: var(--g400); }
.card p { color: var(--muted); font-size: .97rem; margin: 0; }
.card-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem;
             background: linear-gradient(140deg, var(--g500), var(--g800)); color: #fff; }
.card-icon svg { width: 24px; height: 24px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split > div > p { color: var(--muted); font-size: 1.06rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-rev > figure { order: 2; } }
.art-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; box-shadow: var(--shadow); }
.art-card img { display: block; width: 100%; height: auto; }
.formula-card { text-align: center; padding: 2.2rem 1.5rem 1.6rem;
                background: radial-gradient(circle at 30% 20%, var(--accent-soft), var(--card) 70%); }
.formula-card math { font-size: 1.65rem; margin: .4rem 0; }
.formula-card figcaption { color: var(--muted); font-size: .92rem; margin-top: 1rem; }
.checks { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.checks li { position: relative; padding-left: 1.9rem; margin-bottom: .55rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
                     background: var(--g400) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230d260c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }
.more { font-weight: 700; text-decoration: none; }
.more:hover { text-decoration: underline; }

.code { margin: 0; background: #0e1f0d; color: #dfeedd; border-radius: 16px; padding: 1.4rem 1.5rem; overflow-x: auto; font-size: .86rem; line-height: 1.6;
        border: 1px solid #23401f; box-shadow: var(--shadow); }
.code .k { color: var(--g400); } .code .s { color: var(--yellow); } .code .c { color: #7f9a7a; font-style: italic; }

.name-block { text-align: center; }
.name-block p { color: var(--muted); font-size: 1.1rem; }

.cta { background: linear-gradient(120deg, var(--g800), var(--g900) 60%, #0f300e); color: var(--g50); padding: 3.2rem 0; }
.cta-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.cta h2 { color: #fff; margin-bottom: .25em; }
.cta p { margin: 0; color: var(--g100); }

/* ---------------------------------------------------------------- páginas interiores */
.pagehead { background: radial-gradient(circle at 85% 0%, #2f8329, #1f5e1c 45%, #133b12); color: var(--g50); padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem); }
.pagehead h1 { color: #fff; }
.pagehead .eyebrow { color: var(--g300); }
.pagehead .lead { color: rgba(244, 251, 233, .88); font-size: 1.1rem; max-width: 52em; margin: 0; }
.pagehead-compact { padding: 2rem 0 1.6rem; }
.pagehead-compact h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0; }
.crumbs { margin: 0 0 .4rem; font-size: .92rem; }
.crumbs a { color: var(--g300); text-decoration: none; font-weight: 600; }
.notfound { min-height: 50vh; }

.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; padding: 2.6rem 0 4.5rem; align-items: start; }
.side { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: .93rem; padding-right: .5rem; }
.side ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.side li a { display: block; padding: .32rem .7rem; border-radius: 8px; color: var(--ink); text-decoration: none; border-left: 2px solid transparent; }
.side li a:hover { background: var(--accent-soft); }
.side li a[aria-current="page"], .side li a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; border-left-color: var(--accent); }
.side-group { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 800; color: var(--muted); margin: 1.1rem 0 .4rem .7rem; }
.side-home { display: inline-block; font-weight: 700; text-decoration: none; margin-left: .7rem; }
@media (max-width: 920px) {
  .docs { grid-template-columns: 1fr; gap: 1.5rem; }
  .side { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .6rem .2rem; background: var(--bg-alt); }
  .side ul { columns: 2; column-gap: 1rem; }
}
@media (max-width: 560px) { .side ul { columns: 1; } }

.prose { max-width: 800px; }
.prose h2 { font-size: 1.55rem; margin: 2.4rem 0 .8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.prose > h2:first-child, .prose > .lead + h2 { margin-top: 1rem; }
.prose > h2:first-child { border-top: 0; padding-top: 0; }
.prose h3 { margin: 1.6rem 0 .5rem; }
.prose .lead { font-size: 1.12rem; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose pre { background: #0e1f0d; color: #dfeedd; border-radius: 12px; padding: 1rem 1.2rem; overflow-x: auto; position: relative; line-height: 1.55; border: 1px solid #23401f; }
.prose :not(pre) > code { background: var(--accent-soft); padding: .1em .35em; border-radius: 5px; font-size: .86em; }
.copy { position: absolute; top: .5rem; right: .5rem; font: 600 .75rem var(--font); color: var(--g100); background: rgba(166, 224, 110, .14);
        border: 1px solid rgba(166, 224, 110, .35); border-radius: 6px; padding: .2rem .55rem; cursor: pointer; }
.copy:hover { background: rgba(166, 224, 110, .28); }
.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
.prose th { background: var(--bg-alt); font-weight: 700; color: var(--accent); }
.prose tr:last-child td { border-bottom: 0; }
.prose table.params td:first-child { width: 34%; font-weight: 600; }
figure.eq { margin: 1.3rem 0; padding: 1rem 1.3rem .9rem; background: var(--bg-alt); border: 1px solid var(--line); border-left: 4px solid var(--g500); border-radius: 12px; }
figure.eq math { display: block; font-size: 1.28rem; overflow-x: auto; overflow-y: hidden; padding: .4rem 0 .6rem; }
figure.eq figcaption { font-size: .94rem; color: var(--muted); }
.note, aside.note { border-left: 4px solid var(--yellow); background: color-mix(in srgb, var(--yellow) 12%, var(--bg)); padding: .8rem 1rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0; }
.tip { border-left: 4px solid var(--g500); background: var(--accent-soft); padding: .8rem 1rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0; }
.see { color: var(--muted); }
.refs ol { font-size: .9rem; color: var(--muted); padding-left: 1.4rem; }
.refs li { margin-bottom: .55rem; }
.refs a { overflow-wrap: anywhere; }
.kbd, kbd { font-family: var(--mono); font-size: .82em; padding: .1em .45em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--card); }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.8rem; margin-bottom: 1rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
                      background: var(--g400); color: var(--g950); font-weight: 800; font-size: .95rem; }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.2rem 0 1.6rem; }
.platform { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; background: var(--card); box-shadow: var(--shadow); }
.platform h3 { margin-bottom: .3rem; }
.platform p { color: var(--muted); font-size: .95rem; margin-bottom: .9rem; }
.platform .btn { font-size: .92rem; padding: .6rem 1.05rem; }
.btn-outline { color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.quote { border-left: 4px solid var(--g500); padding: .2rem 0 .2rem 1.2rem; margin: 1rem 0 1.6rem; color: var(--ink); font-size: 1.05rem; }

.notation { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem .5rem; margin-bottom: 2.4rem; }
.notation h2 { font-size: 1.2rem; }
.group-title { font-size: 1.3rem; margin: 2rem 0 1rem; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.topic { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 12px;
         background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; transition: border-color .15s, transform .15s; }
.topic:hover { border-color: var(--g400); transform: translateY(-2px); }
.topic .arrow { color: var(--accent); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.pager a:hover { border-color: var(--g400); }
.pager small { color: var(--muted); font-weight: 500; }
.pager .next { text-align: right; grid-column: 2; }

/* ---------------------------------------------------------------- pie */
.sitefoot { background: var(--g950); color: var(--g100); padding: 3rem 0 1.5rem; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.foot-brand { display: flex; gap: .9rem; align-items: flex-start; }
.foot-brand img { border-radius: 50%; background: var(--g50); }
.foot-brand b { color: #fff; }
.ver { color: var(--g300); font-size: .85rem; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: .45rem; }
.foot-links a { color: var(--g100); text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; }
.foot-legal { border-top: 1px solid rgba(166, 224, 110, .15); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: rgba(215, 238, 191, .65); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

@media print {
  .topbar, .sitefoot, .side, .pager, .copy, .cta { display: none !important; }
  .docs { display: block; }
  .pagehead { background: none; color: #000; } .pagehead h1 { color: #000; }
}
