/*==================== ORI THEME ====================
  Fondo parallax inspirado en Ori and the Will of the Wisps.
  Se carga DESPUES de styles.css y solo sobreescribe colores/fondos.
  Los colores del bosque (--c-*) los actualiza assets/js/ori-parallax.js
  segun la seccion que se esta viendo.
=====================================================*/
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&display=swap');

html{
    background: #050a1c;
}
html, body{ overflow-x: clip; }

/* el blob del hero medía 320px fijos y desbordaba en pantallas de 360px */
body.ori .home__blob{ width: min(320px, 100%); height: auto; }
body.ori .home__content > *{ min-width: 0; }

/* valores por defecto (por si el JS tarda o falla) */
:root{
    --c-sky0:#050a1c; --c-sky1:#0b1f4a; --c-sky2:#1c6a8c;
    --c-glow:#9be7ff; --c-far:#123a5e; --c-mid:#0b2547; --c-near:#050f22;
    --c-rim:#6fe0ff;  --c-fog:#2a7fb0; --c-front:#030914;
    --glow-rgb:155,231,255; --fog-rgb:42,127,176;
}

/*==================== VARIABLES DEL SITIO ====================*/
body.ori,
body.ori.dark-theme{
    --first-color: var(--c-glow);
    --first-color-alt: color-mix(in srgb, var(--c-glow) 78%, #000);
    --first-color-lighter: color-mix(in srgb, var(--c-glow) 55%, #fff);
    --first-color-second: rgba(4, 9, 24, .10);
    --title-color: #f1faff;
    --text-color: #c3d7ea;
    --text-color-light: #98b0c8;
    --input-color: rgba(10, 24, 52, .6);
    --body-color: #071327;
    --container-color: rgba(9, 22, 48, .55);
    --title-font: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    background-color: transparent;
}

/*==================== FONDO PARALLAX ====================*/
.ori-bg{
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: #050a1c;
}

.ori-sky{
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--c-sky0) 0%, var(--c-sky1) 52%, var(--c-sky2) 100%);
}

.ori-orb{
    position: absolute;
    left: 66%;
    top: 16%;
    width: 78vmin;
    height: 78vmin;
    margin: -39vmin 0 0 -39vmin;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255,255,255,.98) 0 3.5%,
        rgba(var(--glow-rgb), .85) 6%,
        rgba(var(--glow-rgb), .38) 18%,
        rgba(var(--glow-rgb), .13) 38%,
        transparent 68%);
    animation: oriPulse 9s ease-in-out infinite;
    will-change: transform;
}

.ori-rays{
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
    will-change: transform;
}
.ori-rays svg{ display: block; }
.ori-rays .ray{
    opacity: .45;
    animation: oriRay 11s ease-in-out infinite alternate;
}

.ori-layer{
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
}
.ori-layer svg{ display: block; }
.ori-layer--blur svg{ filter: blur(7px); }

/* formas del bosque */
.ori-bg .far{  fill: var(--c-far); }
.ori-bg .mid{  fill: var(--c-mid); }
.ori-bg .near{ fill: var(--c-near); }
.ori-bg .front{ fill: var(--c-front); }
.ori-bg .l{ stroke: var(--c-rim); stroke-opacity: .28; stroke-width: 1.2; }
.ori-bg .rim{
    fill: none;
    stroke: var(--c-rim);
    stroke-opacity: .55;
    stroke-width: 2;
    stroke-linecap: round;
}
.ori-bg .vein{
    fill: none;
    stroke: var(--c-rim);
    stroke-opacity: .22;
    stroke-width: 1.2;
}
.ori-bg .stem{
    fill: none;
    stroke-linecap: round;
}
.ori-bg .stem.m{ stroke: var(--c-mid); }
.ori-bg .stem.n{ stroke: var(--c-near); }
.ori-bg .bulb{ fill: url(#oriGlow); }
.ori-bg .core{ fill: #fff; fill-opacity: .92; }
.ori-bg .glowcap{ fill: var(--c-rim); fill-opacity: .9; }

.ori-mist{
    position: absolute;
    left: -20%;
    width: 140%;
    height: 62vh;
    will-change: transform;
    animation: oriDrift 42s ease-in-out infinite alternate;
}
.ori-mist--a{
    bottom: 14%;
    background:
        radial-gradient(ellipse at 28% 55%, rgba(var(--fog-rgb), .30), transparent 60%),
        radial-gradient(ellipse at 78% 40%, rgba(var(--fog-rgb), .22), transparent 55%);
}
.ori-mist--b{
    bottom: -8%;
    animation-duration: 55s;
    animation-direction: alternate-reverse;
    background:
        radial-gradient(ellipse at 60% 60%, rgba(var(--fog-rgb), .34), transparent 58%),
        radial-gradient(ellipse at 15% 45%, rgba(var(--fog-rgb), .2), transparent 55%);
}

.ori-fx{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ori-vignette{
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, transparent 42%, rgba(2, 5, 14, .6) 100%);
}

/* Tinte por seccion: solo cambia opacidad (compositor, sin repintar el bosque) */
.ori-tint{
    position: absolute;
    inset: 0;
    mix-blend-mode: color;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    transition: opacity 1.8s cubic-bezier(.45, 0, .2, 1);
}
.ori-tint.is-on{ opacity: .5; }
.ori-tint.no-anim{ transition: none; }
@media (prefers-reduced-motion: reduce){
    .ori-tint{ transition: none; }
}

@keyframes oriPulse{
    0%, 100%{ scale: 1;    opacity: 1; }
    50%{      scale: 1.05; opacity: .88; }
}
@keyframes oriRay{
    from{ opacity: .22; }
    to{   opacity: .62; }
}
@keyframes oriDrift{
    from{ translate: -4% 0; }
    to{   translate: 4% 2%; }
}

/*==================== TIPOGRAFIA ====================*/
body.ori .home__tittle,
body.ori .section__title,
body.ori .nav__logo{
    font-family: var(--title-font);
    font-weight: 600;
    letter-spacing: .01em;
}
body.ori .section__title,
body.ori .home__tittle{
    text-shadow: 0 0 30px rgba(var(--glow-rgb), .5), 0 2px 14px rgba(2, 8, 24, .6);
}
body.ori .section__title{ font-size: calc(var(--h1-font-size) * 1.25); }
body.ori .home__tittle{   font-size: calc(var(--big-font-size) * 1.1); }
body.ori .section__subtitle,
body.ori .home__description,
body.ori .home__subtitle{
    text-shadow: 0 1px 10px rgba(2, 8, 24, .7);
}

/*==================== NAV / HEADER ====================*/
body.ori .header{
    background-color: rgba(5, 12, 30, .72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(var(--glow-rgb), .22);
}
body.ori .change-theme{ display: none; } /* el tema oscuro es el unico */

/*==================== BOTONES ====================*/
body.ori .button{
    color: #04101f;
    box-shadow: 0 0 26px rgba(var(--glow-rgb), .4);
}
body.ori .button__link{
    color: var(--first-color);
    box-shadow: none;
}

/*==================== PANELES DE CRISTAL ====================*/
body.ori .about__container,
body.ori .filters,
body.ori .qualification__container,
body.ori .services__container,
body.ori .contact__container{
    background: rgba(5, 12, 30, .42);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(var(--glow-rgb), .18);
    border-radius: 1.25rem;
    padding: 1.5rem;
}
body.ori .about__container{ margin-top: 1.5rem; }

body.ori .filters__content{
    background-color: rgba(255, 255, 255, .07);
    border: 1px solid rgba(var(--glow-rgb), .25);
}
body.ori .filters__button:hover,
body.ori .filter-tab-active{
    background-color: rgba(var(--glow-rgb), .16);
}

body.ori .services__content{
    background-color: var(--container-color);
    border: 1px solid rgba(var(--glow-rgb), .25);
    border-radius: .9rem;
    box-shadow: 0 0 22px rgba(var(--glow-rgb), .12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
body.ori .services__content:hover{
    box-shadow: 0 0 34px rgba(var(--glow-rgb), .28);
}
body.ori .services__modal-content{
    background-color: #0a1a3a;
    border: 1px solid rgba(var(--glow-rgb), .3);
}

body.ori .projects__card{
    box-shadow: 0 0 24px rgba(var(--glow-rgb), .15);
}

body.ori .qualification__rounder,
body.ori .qualification__line{
    box-shadow: 0 0 10px rgba(var(--glow-rgb), .6);
}

/*==================== FOOTER ====================*/
body.ori .footer__bg{
    background-color: rgba(4, 9, 24, .10);
    border-top: 1px solid rgba(var(--glow-rgb), .2);
}
body.ori .footer__title,
body.ori .footer__subtitle,
body.ori .footer__link,
body.ori .footer__copy{
    text-shadow: 0 1px 12px rgba(2, 6, 18, .9), 0 0 3px rgba(2, 6, 18, .8);
}

/*==================== VENTANA SERVICES (estilo gamer) ====================
  Causa del bug de escritorio: un ancestro con backdrop-filter convierte
  a los hijos position:fixed en relativos a ese ancestro. Por eso la ventana
  se metia dentro de la tarjeta y no cubria la pantalla. Se quita el blur
  de esos contenedores; el blur queda solo en el overlay de la ventana.
*/
body.ori .services__container,
body.ori .services__content{
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.ori .services__modal{
    background:
        radial-gradient(ellipse at 50% 40%, rgba(var(--glow-rgb), .10), transparent 60%),
        rgba(2, 5, 14, .72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    padding: 1rem;
}
/* lineas de escaneo */
body.ori .services__modal::after{
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
    pointer-events: none;
}

body.ori .services__modal-content{
    position: relative;
    width: min(440px, 100%);
    padding: 2.25rem 1.75rem 1.75rem;
    border-radius: 0;
    background: linear-gradient(160deg, rgba(14, 34, 68, .97), rgba(5, 12, 30, .98));
    border: 1px solid rgba(var(--glow-rgb), .6);
    clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
    box-shadow: 0 0 40px rgba(var(--glow-rgb), .25), inset 0 0 60px rgba(var(--glow-rgb), .05);
    transform: translateY(18px) scale(.94);
    opacity: 0;
    transition: transform .4s cubic-bezier(.2, 1.25, .35, 1), opacity .3s ease;
}
/* barra superior de progreso */
body.ori .services__modal-content::before{
    content: '';
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--first-color), transparent 85%);
    box-shadow: 0 0 12px rgba(var(--glow-rgb), .8);
}
body.ori .active-modal .services__modal-content{
    transform: none;
    opacity: 1;
}

body.ori .services__modal-title{
    font-family: var(--title-font);
    font-size: 1.6rem;
    letter-spacing: .02em;
    text-shadow: 0 0 18px rgba(var(--glow-rgb), .5);
}
body.ori .services__modal-title::before{
    content: '> SERVICIO';
    display: block;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .72rem;
    letter-spacing: .18em;
    color: var(--first-color);
    margin-bottom: .4rem;
    opacity: .85;
}

body.ori .services__modal-service{
    align-items: center;
    padding: .55rem .75rem;
    border-left: 2px solid rgba(var(--glow-rgb), .35);
    background: rgba(var(--glow-rgb), .04);
}
body.ori .services__modal-icon{
    color: var(--first-color);
    text-shadow: 0 0 8px rgba(var(--glow-rgb), .9);
}

body.ori .services__modal-close{
    top: .9rem;
    right: .9rem;
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    border: 1px solid rgba(var(--glow-rgb), .5);
    transition: background .2s ease, transform .25s ease;
}
body.ori .services__modal-close:hover{
    background: rgba(var(--glow-rgb), .15);
    transform: rotate(90deg);
}

/*==================== SKILLS = INVENTARIO DE POWER-UPS ====================
  La rareza sale del nivel del HTML (data-rarity): Basic = comun,
  Intermediate = raro, Advanced = epico.
*/
body.ori{
    --rar-common: #8ea6c4;
    --rar-rare: var(--c-glow);
    --rar-epic: #c99bff;
    --rar-legend: #ffd86b;
}

body.ori .skills__content{ row-gap: 2.5rem; }
body.ori .skills__title{
    font-family: var(--title-font);
    font-size: 1.5rem;
    letter-spacing: .03em;
    text-shadow: 0 0 16px rgba(var(--glow-rgb), .45);
}
body.ori .skills__title::before{
    content: 'INVENTARIO';
    display: block;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .7rem;
    letter-spacing: .2em;
    color: var(--first-color);
    opacity: .85;
    margin-bottom: .3rem;
}
body.ori .skills__box{
    flex-wrap: wrap;
    column-gap: 1.25rem;
    row-gap: 1.25rem;
    justify-content: center;
}
body.ori .skills__group{
    flex: 1 1 230px;
    max-width: 290px;
    row-gap: .85rem;
}

body.ori .skills__data{
    position: relative;
    align-items: center;
    padding: .9rem .9rem .8rem 1rem;
    background: linear-gradient(160deg, rgba(10, 24, 52, .85), rgba(5, 12, 30, .92));
    border: 1px solid var(--rar, var(--rar-common));
    border-radius: 2px;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    box-shadow: 0 0 14px color-mix(in srgb, var(--rar, var(--rar-common)) 25%, transparent);
    transition: transform .25s ease, box-shadow .25s ease;
}
body.ori .skills__data:hover{
    transform: translateY(-3px);
    box-shadow: 0 0 22px color-mix(in srgb, var(--rar, var(--rar-common)) 55%, transparent);
}
/* etiqueta de rareza en la esquina */
body.ori .skills__data::before{
    content: attr(data-rarity);
    position: absolute;
    top: 0;
    right: 0;
    padding: .15rem .45rem;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .6rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #04101f;
    background: var(--rar, var(--rar-common));
}
body.ori .skills__data[data-rarity="common"]{ --rar: var(--rar-common); }
body.ori .skills__data[data-rarity="rare"]{  --rar: var(--rar-rare); }
body.ori .skills__data[data-rarity="epic"]{  --rar: var(--rar-epic); }

body.ori .skills__data i{
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    font-size: 1.1rem;
    color: var(--rar, var(--rar-common));
    border: 1px solid var(--rar, var(--rar-common));
    border-radius: 50%;
    box-shadow: 0 0 10px color-mix(in srgb, var(--rar, var(--rar-common)) 60%, transparent);
}
body.ori .skills__name{ font-family: var(--title-font); font-size: 1.15rem; font-weight: 600; }
body.ori .skills__level{
    display: inline-block;
    margin-top: .2rem;
    color: var(--rar, var(--rar-common));
    letter-spacing: .04em;
}

/*==================== PROJECTS = COLECCIONABLES ====================*/
body.ori .projects__content{
    counter-reset: coleccion;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}
body.ori .projects__card{
    counter-increment: coleccion;
    position: relative;
    padding: .6rem;
    border-radius: 6px;
    background: linear-gradient(170deg, rgba(14, 34, 68, .95), rgba(5, 12, 30, .97));
    border: 2px solid var(--rar, var(--rar-epic));
    box-shadow: 0 0 22px color-mix(in srgb, var(--rar, var(--rar-epic)) 30%, transparent);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}
body.ori .projects__card:hover{
    transform: translateY(-4px) rotate(-.4deg);
    box-shadow: 0 0 34px color-mix(in srgb, var(--rar, var(--rar-epic)) 60%, transparent);
}
/* numero de coleccion */
body.ori .projects__card::before{
    content: '#0' counter(coleccion);
    position: absolute;
    top: .9rem;
    left: .9rem;
    z-index: 2;
    padding: .15rem .5rem;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .7rem;
    letter-spacing: .1em;
    color: #04101f;
    background: var(--rar, var(--rar-epic));
}
body.ori .projects__card:nth-child(1){ --rar: var(--rar-legend); }
body.ori .projects__card:nth-child(n+2){ --rar: var(--rar-epic); }
body.ori .projects__card:nth-child(3){ --rar: var(--rar-rare); }

body.ori .projects__card img{
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 3px;
    filter: saturate(1.05) contrast(1.02);
}
/* la info siempre visible (en movil no hay hover) */
body.ori .projects__modal{
    position: relative;
    bottom: auto;
    height: auto;
    margin-top: .6rem;
    padding: .2rem 0 0;
    background: none;
}
body.ori .projects__card:hover .projects__modal{ bottom: auto; }
body.ori .projects__modal > div{ text-align: left; }
body.ori .projects__subtitle{
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--rar, var(--rar-epic));
}
body.ori .projects__title{
    font-family: var(--title-font);
    font-size: 1.35rem;
    margin: .2rem 0 .7rem;
    color: var(--title-color);
}
body.ori .projects__button{
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .8rem;
    font-size: .75rem;
    letter-spacing: .12em;
    color: #04101f;
    background: var(--rar, var(--rar-epic));
    border-radius: 2px;
    box-shadow: 0 0 14px color-mix(in srgb, var(--rar, var(--rar-epic)) 50%, transparent);
}

/*==================== ACCESIBILIDAD / RENDIMIENTO ====================*/
@media (prefers-reduced-motion: reduce){
    .ori-orb,
    .ori-rays .ray,
    .ori-mist{ animation: none; }
    html{ scroll-behavior: auto; }
}

@media screen and (max-width: 767px){
    .ori-layer--blur svg{ filter: none; opacity: .8; }
    body.ori .services__modal{ -webkit-backdrop-filter: none; backdrop-filter: none; background-color: rgba(2, 5, 14, .85); }
    body.ori .services__modal-content{ padding: 2rem 1.25rem 1.25rem; }
    body.ori .skills__group{ flex-basis: 150px; max-width: none; }
    body.ori .skills__name{ font-size: 1rem; }
    body.ori .projects__content{ grid-template-columns: 1fr 1fr; gap: 1rem; }
    .ori-mist{ animation: none; }
    /* backdrop-filter crearia un contenedor para el menu fixed y lo rompe en movil */
    body.ori .header{
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background-color: rgba(5, 12, 30, .92);
    }
    body.ori .about__container,
    body.ori .filters,
    body.ori .qualification__container,
    body.ori .services__container,
    body.ori .contact__container{
        padding: 1rem;
        background: rgba(5, 12, 30, .62);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    body.ori .services__content{
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background-color: rgba(9, 22, 48, .7);
    }
}
