/* =========================================
   FundamentosArtísticos.com — inicio.css
   Estilos exclusivos de la página de inicio
   ========================================= */

body.home { background: var(--paper); overflow-x: hidden; }
body.home main { overflow-x: clip; }
body.home ::selection { background: #F2B27A; color: var(--ink); }

/* ── HERO ────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: calc(100svh - 72px);
    min-height: calc(100vh - 72px);
    display: flex; align-items: center;
    margin-top: -72px; padding: 132px 0 96px;
    overflow: hidden;
    isolation: isolate;
}
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -2;
    background-image:
        linear-gradient(rgba(23,19,15,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23,19,15,.055) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 45%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 70% 45%, #000 10%, transparent 75%);
}
.hero::after {
    content: ''; position: absolute; z-index: -2;
    width: 900px; height: 900px; right: -260px; top: -220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(242,178,122,.45) 0%, rgba(242,178,122,.12) 40%, rgba(242,178,122,0) 70%);
}
.hero-visual { position: absolute; inset: 0; z-index: -1; }
.hero-visual canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.hero-visual.is-ready canvas { opacity: 1; }
.hero-visual.is-hover canvas { cursor: pointer; }

.hero-inner { position: relative; width: 100%; pointer-events: none; }
.hero-copy { max-width: 720px; pointer-events: auto; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
    padding: 7px 14px 7px 8px; border-radius: 999px;
    background: rgba(255,255,255,.7); border: 1px solid rgba(23,19,15,.08);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    margin-bottom: 26px;
}
.hero-kicker i {
    width: 22px; height: 22px; border-radius: 50%; background: var(--brand);
    display: grid; place-items: center; color: #fff; font-style: normal; font-size: 11px;
}
.hero-kicker i svg { width: 12px; height: 12px; }
.hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(44px, 6vw, 94px);
    line-height: .94;
    letter-spacing: -0.045em;
    word-spacing: .12em;
    color: var(--ink);
    font-variation-settings: 'opsz' 144;
}
.hero-title .ln { display: block; overflow: hidden; padding: 0 .12em .1em 0; margin-bottom: -.06em; }
.hero-title .w { display: inline-block; will-change: transform; }
.hero-title em { font-style: italic; color: var(--brand); font-weight: 500; }
.hero-lead {
    margin-top: 26px; max-width: 46ch;
    font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: var(--ink-2);
}
.hero-hint {
    position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.hero-hint b { display: block; width: 1px; height: 40px; background: linear-gradient(var(--ink-3), transparent); transform-origin: top; animation: hintLine 2.2s var(--ease) infinite; }
@keyframes hintLine { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.hero-touch {
    position: absolute; right: 28px; bottom: 30px;
    font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 8px;
    pointer-events: none;
}
.hero-touch svg { width: 16px; height: 16px; }

/* ── MARQUESINA ──────────────────────────────────── */
.marquee {
    position: relative; overflow: hidden;
    background: var(--ink); color: #fff;
    padding: 22px 0;
    transform: rotate(-1.2deg); margin: 0 -20px; width: calc(100% + 40px);
}
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; align-items: center; flex-shrink: 0; }
.marquee-group span {
    font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 44px); font-weight: 500; font-style: italic;
    letter-spacing: -0.02em; white-space: nowrap; padding: 0 22px;
}
.marquee-group svg { width: 22px; height: 22px; color: #F2B27A; flex-shrink: 0; }
.marquee-group span:nth-of-type(3n+2) { font-style: normal; font-weight: 600; }

/* ── SECCIONES ───────────────────────────────────── */
.sec { padding: 120px 0 0; scroll-margin-top: 70px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: 44px; }
.sec-kicker {
    display: flex; align-items: center; gap: 12px;
    font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand);
    margin-bottom: 16px;
}
.sec-kicker::after { content: ''; width: 40px; height: 1px; background: currentColor; opacity: .5; }
.sec-title {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -0.035em;
    color: var(--ink); max-width: 18ch; text-wrap: balance;
}
.sec-title em { font-style: italic; font-weight: 500; color: var(--brand); }
.sec-aside { max-width: 38ch; font-size: 16px; color: var(--ink-2); line-height: 1.6; }

/* ── BENTO ───────────────────────────────────────── */
.bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: 16px;
}
.bc {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    border-radius: 26px; padding: 30px;
    min-height: 250px;
    isolation: isolate;
    transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.bc:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(23,19,15,.35); }
.bc:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.bc-text { position: relative; z-index: 2; max-width: 34ch; }
.bc-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    margin-bottom: 14px; opacity: .85;
}
.bc-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bc h3 {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(24px, 2.4vw, 32px); line-height: 1.08; letter-spacing: -0.025em;
}
.bc p { margin-top: 12px; font-size: 15px; line-height: 1.6; opacity: .82; }
.bc-link {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
    font-size: 14.5px; font-weight: 600;
}
.bc-link svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.bc:hover .bc-link svg { transform: translateX(5px); }

.bc-dt    { grid-column: span 7; grid-row: span 2; background: var(--hm-blue-bg); color: #13294A; }
.bc-bach  { grid-column: span 5; background: var(--hm-purple-bg); color: #2A1B55; }
.bc-tools { grid-column: span 5; background: #FFF6E2; color: #4A3205; }
.bc-games { grid-column: span 4; background: var(--brand); color: #fff; }
.bc-blog  { grid-column: span 4; background: var(--ink); color: #fff; }
.bc-glos  { grid-column: span 4; background: var(--hm-green-bg); color: #123A24; }

/* Dibujo técnico: lámina con construcción */
.bc-dt .bc-text { max-width: 30ch; }
.dt-art { position: absolute; right: -40px; bottom: -30px; width: min(78%, 560px); height: auto; z-index: 1; }
.dt-art .grid line { stroke: rgba(46,95,160,.14); stroke-width: 1; }
.dt-art .draw { fill: none; stroke: var(--hm-blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dt-art .draw.thin { stroke-width: 1.2; stroke-dasharray: 5 6; opacity: .7; }
.dt-art .draw.accent { stroke: var(--brand); stroke-width: 2.6; }
.dt-art .pt { fill: var(--brand); }
.dt-art .pt-o { fill: var(--hm-blue); }
.dt-art text { font: 600 15px var(--font-body); fill: #13294A; }

/* 2º Bachillerato: fichas en abanico */
.bach-art { position: absolute; right: 30px; bottom: -64px; width: 176px; height: 196px; z-index: 1; }
.bach-card {
    position: absolute; inset: 0; border-radius: 14px; background: #fff;
    box-shadow: 0 18px 40px -18px rgba(42,27,85,.45);
    transform-origin: 50% 100%;
    transition: transform .6s var(--ease);
    overflow: hidden;
}
.bach-card:nth-child(1) { transform: rotate(-12deg) translateX(-34px); background: #D9CCF5; }
.bach-card:nth-child(2) { transform: rotate(-4deg) translateX(-10px); background: #EBE3FB; }
.bach-card:nth-child(3) { transform: rotate(6deg) translateX(18px); padding: 10px; }
.bach-card:nth-child(3) img { width: 100%; height: 104px; object-fit: cover; border-radius: 8px; display: block; }
.bach-card:nth-child(3) b { display: block; height: 8px; border-radius: 4px; background: #E6E0F2; margin-top: 10px; }
.bach-card:nth-child(3) b + b { width: 70%; }
.bc-bach:hover .bach-card:nth-child(1) { transform: rotate(-20deg) translateX(-60px); }
.bc-bach:hover .bach-card:nth-child(2) { transform: rotate(-7deg) translateX(-18px); }
.bc-bach:hover .bach-card:nth-child(3) { transform: rotate(10deg) translateX(30px) translateY(-8px); }
.bc-bach .bc-text { max-width: 22ch; }

/* Herramientas: pigmentos que se mezclan */
.tools-art { position: absolute; right: 18px; top: 50%; width: 200px; height: 200px; margin-top: -100px; z-index: 1; }
.tools-art i {
    position: absolute; width: 112px; height: 112px; border-radius: 50%;
    mix-blend-mode: multiply; opacity: .92;
}
.tools-art i:nth-child(1) { background: #00B4D8; left: 44px; top: 10px; }
.tools-art i:nth-child(2) { background: #F0559A; left: 10px; top: 72px; }
.tools-art i:nth-child(3) { background: #FFD23F; left: 78px; top: 72px; }
.bc-tools .bc-text { max-width: 22ch; }

/* Juegos: formas que flotan */
.games-art { position: absolute; right: 18px; top: 18px; width: 150px; height: 130px; z-index: 1; }
.games-art span { position: absolute; display: block; }
.games-art .g-c { width: 58px; height: 58px; border-radius: 50%; background: #F2B27A; left: 0; top: 52px; }
.games-art .g-s { width: 50px; height: 50px; border-radius: 10px; background: var(--ink); right: 6px; top: 6px; transform: rotate(14deg); }
.games-art .g-t { width: 0; height: 0; border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 52px solid #FFD23F; left: 62px; top: 66px; }
.bc-games .bc-text { margin-top: 70px; }

/* Blog */
.blog-list { list-style: none; margin-top: 18px; display: flex; flex-direction: column; }
.blog-list li {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 11px 0; border-top: 1px solid rgba(255,255,255,.14);
    font-size: 15px; font-weight: 500; color: rgba(255,255,255,.88);
}
.blog-list li::after { content: '↗'; color: #F2B27A; }

/* Glosario */
.glos-art {
    position: absolute; right: 22px; top: 6px; z-index: 0;
    font-family: var(--font-display); font-style: italic; font-weight: 500;
    font-size: 132px; line-height: 1; letter-spacing: -0.05em; color: rgba(42,112,73,.16);
    pointer-events: none;
}
.glos-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; position: relative; z-index: 2; }
.glos-chips span {
    font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 999px;
    background: rgba(255,255,255,.75); border: 1px solid rgba(42,112,73,.18);
}

/* ── DESTACADO ───────────────────────────────────── */
.feat {
    display: grid; grid-template-columns: 1.15fr 1fr;
    background: #fff; border: 1px solid var(--line); border-radius: 28px; overflow: hidden;
    transition: box-shadow .45s var(--ease), transform .45s var(--ease);
}
.feat:hover { box-shadow: 0 30px 60px -32px rgba(23,19,15,.35); transform: translateY(-4px); }
.feat:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.feat-media { position: relative; min-height: 360px; background: #1a1a2e; overflow: hidden; }
.feat-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.2s var(--ease); }
.feat:hover .feat-media img { transform: scale(1.12); }
.feat-media .chip {
    position: absolute; left: 20px; top: 20px; z-index: 1;
    font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px;
    background: rgba(255,255,255,.92); color: var(--hm-purple);
}
.feat-copy { padding: 44px 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.feat-copy h3 {
    font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3vw, 40px);
    line-height: 1.05; letter-spacing: -0.03em; color: var(--ink);
}
.feat-copy p { margin-top: 16px; font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.feat-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.feat-meta span { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--wash); color: var(--ink-2); }
.feat-copy .bc-link { color: var(--brand); }
.feat:hover .bc-link svg { transform: translateX(5px); }

.picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.pick {
    position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 34px;
    background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px;
    min-height: 190px;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.pick:hover { transform: translateY(-5px); box-shadow: 0 24px 44px -26px rgba(23,19,15,.35); border-color: var(--line-2); }
.pick:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.pick-tag { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.pick-tag.t-game { background: var(--hm-blue-bg); color: var(--hm-blue); }
.pick-tag.t-blog { background: var(--brand-soft); color: var(--brand-ink); }
.pick-title, .pick-excerpt { display: block; }
.pick-title { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); padding-right: 30px; }
.pick-excerpt { font-size: 14px; color: var(--ink-3); line-height: 1.5; margin-top: 8px; }
.pick-arrow {
    position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; background: var(--wash); color: var(--ink);
    transition: background .3s, color .3s, transform .4s var(--ease);
}
.pick-arrow svg { width: 16px; height: 16px; }
.pick:hover .pick-arrow { background: var(--ink); color: #fff; transform: rotate(-45deg); }

/* ── TÉRMINO ARTÍSTICO ───────────────────────────── */
.term-band {
    position: relative; overflow: hidden;
    margin-top: 120px; padding: 110px 0 100px;
    background: var(--ink); color: #fff;
    isolation: isolate;
}
.term-band::before {
    content: ''; position: absolute; z-index: -1;
    width: 760px; height: 760px; left: -220px; bottom: -420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(180,83,26,.55) 0%, rgba(180,83,26,0) 68%);
}
.term-band::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
    mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.term-band .sec-kicker { color: #F2B27A; }
.term-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px 80px; align-items: end; }
.term-cat {
    display: inline-flex; font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 999px;
    background: rgba(242,178,122,.14); color: #F2B27A; border: 1px solid rgba(242,178,122,.3);
    margin-bottom: 22px;
}
.term-word {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(54px, 9vw, 132px); line-height: .92; letter-spacing: -0.045em;
    font-variation-settings: 'opsz' 144;
    overflow-wrap: anywhere;
    min-height: 1.84em;
    display: flex; align-items: flex-end;
}
.term-word .ch { display: inline-block; will-change: transform; }
.term-def { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.65; color: rgba(255,255,255,.78); min-height: 6.6em; }
.term-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.term-btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 48px; padding: 12px 20px; border-radius: 999px; cursor: pointer;
    font: 600 15px/1 var(--font-body);
    background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25);
    transition: background .25s, border-color .25s, color .25s;
}
.term-btn svg { width: 17px; height: 17px; }
.term-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
.term-btn.primary { background: #fff; color: var(--ink); border-color: #fff; }
.term-btn.primary:hover { background: #F2B27A; border-color: #F2B27A; }
.term-btn:focus-visible { outline: 2px solid #F2B27A; outline-offset: 3px; }
.term-idx { margin-left: auto; font-size: 13px; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.term-glos { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 14.5px; font-weight: 600; color: #F2B27A; }
.term-glos svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.term-glos:hover svg { transform: translateX(4px); }
.term-glos:focus-visible { outline: 2px solid #F2B27A; outline-offset: 3px; border-radius: 4px; }

body.home footer { border-top: 1px solid rgba(255,255,255,.1); }
.term-band { margin-bottom: 0; }

/* ── ANIMACIÓN: estado inicial (solo con JS y sin movimiento reducido) ── */
.anim .hero-title .w { transform: translateY(115%); }
.anim .hero-kicker, .anim .hero-lead, .anim .hero-hint, .anim .hero-touch { opacity: 0; }
/* Movimiento reducido en el sistema: las palabras aparecen sin desplazarse */
.anim.soft .hero-title .w { transform: none; opacity: 0; }
.anim [data-reveal] { opacity: 0; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1100px) {
    .bc-dt { grid-column: span 12; grid-row: span 1; min-height: 420px; }
    .bc-bach, .bc-tools { grid-column: span 6; }
    .picks { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero { display: block; padding: 96px 0 72px; min-height: 0; }
    .hero-visual { position: relative; inset: auto; height: 340px; margin: 0 0 8px; }
    .hero::after { width: 600px; height: 600px; right: -260px; top: -120px; }
    .hero-hint { display: none; }
    .hero-touch { position: static; justify-content: center; margin: -4px 0 18px; }
    .term-grid { grid-template-columns: 1fr; }
    .feat { grid-template-columns: 1fr; }
    .feat-media { min-height: 260px; }
}

@media (max-width: 640px) {
    .hero-visual { height: 300px; }
    .sec { padding-top: 88px; }
    .sec-head { margin-bottom: 30px; }
    .bento { grid-auto-rows: auto; gap: 12px; }
    .bc, .bc-bach, .bc-tools, .bc-games, .bc-blog, .bc-glos { grid-column: span 12; min-height: 0; padding: 26px; border-radius: 22px; }
    .bc-dt { min-height: 590px; }
    .dt-art { width: 100%; right: -14%; bottom: -36px; }
    .bc-bach { padding-bottom: 210px; }
    .bach-art { right: 50%; margin-right: -90px; width: 180px; height: 190px; bottom: -50px; }
    .bc-tools { padding-bottom: 200px; }
    .tools-art { top: auto; bottom: 0; right: 50%; margin: 0 -100px 0 0; }
    .bc-games .bc-text { margin-top: 110px; }
    .glos-art { font-size: 110px; }
    .picks { grid-template-columns: 1fr; }
    .pick { min-height: 0; }
    .feat-copy { padding: 28px 24px 30px; }
    .term-band { margin-top: 88px; padding: 80px 0 72px; }
    .term-idx { margin-left: 0; width: 100%; }
    .term-word { min-height: 0; }
    .marquee { padding: 16px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .bc:hover, .feat:hover, .pick:hover { transform: none; }
}
