:root{
  color-scheme:dark;
  --bg:#030708;
  --panel:#071011;
  --gold:#d9a52c;
  --gold2:#f3c756;
  --ivory:#f2ead7;
  --muted:#d6c8aa;
  --line:rgba(222,169,47,.72);
  --shadow:rgba(0,0,0,.65);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--ivory)}
body{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;overflow-x:hidden}
body::before{content:"";position:fixed;inset:-60px;z-index:-2;background:linear-gradient(rgba(2,7,8,.72),rgba(2,7,8,.94)),url("assets/home/hero-rignac-clean.jpg") center/cover no-repeat;filter:blur(30px) saturate(.75);transform:scale(1.08)}
body::after{content:"";position:fixed;inset:0;z-index:-1;background:radial-gradient(circle at 50% 8%,rgba(190,125,25,.15),transparent 30%),linear-gradient(90deg,rgba(0,0,0,.55),transparent 28% 72%,rgba(0,0,0,.55));pointer-events:none}
a{color:inherit}
.home-app{position:relative;width:min(100%,760px);min-height:100dvh;margin:0 auto;background:linear-gradient(180deg,#061011 0%,#020708 100%);border-inline:1px solid rgba(214,159,39,.28);box-shadow:0 0 70px rgba(0,0,0,.75);overflow:hidden;container-type:inline-size}
.hero{position:relative;min-height:470px;background:url("assets/home/hero-rignac-clean.jpg") center/cover no-repeat;border-bottom:1px solid rgba(214,159,39,.35)}
.hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(1,5,6,.78) 0%,rgba(1,5,6,.38) 33%,rgba(1,5,6,.04) 59%,rgba(1,5,6,.20) 100%),linear-gradient(180deg,rgba(1,4,5,.04) 0%,rgba(1,4,5,.06) 43%,rgba(1,5,7,.88) 86%,#061011 100%)}
.brand{position:absolute;left:5.5%;top:4.2%;display:flex;flex-direction:column;align-items:flex-start;text-shadow:0 2px 12px #000;z-index:2}
.brand-mark{display:none}
.brand-mark-img{width:clamp(70px,18cqw,126px);height:clamp(70px,18cqw,126px);object-fit:contain;filter:drop-shadow(0 9px 12px rgba(0,0,0,.8)) drop-shadow(0 0 11px rgba(229,170,42,.16));margin-left:-1.5cqw;margin-bottom:-1.4cqw}
.brand strong{font-family:Georgia,"Times New Roman",serif;font-size:clamp(30px,7.1cqw,54px);font-weight:600;letter-spacing:.15em;margin-top:0;color:#f2dfad;background:linear-gradient(180deg,#fff3c8 0%,#f5cd6a 42%,#a96812 78%,#f0c661 100%);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-stroke:.35px rgba(84,49,4,.85);filter:drop-shadow(0 2px 0 #4a2b05) drop-shadow(0 5px 8px #000)}
.brand span{font-family:Georgia,"Times New Roman",serif;color:var(--gold2);font-size:clamp(9px,2cqw,14px);letter-spacing:.09em;margin-top:6px;text-shadow:0 2px 8px #000}
.welcome{position:absolute;z-index:2;left:5%;right:5%;bottom:4%;text-align:center;text-shadow:0 3px 14px #000}
.welcome>span{color:var(--gold2);font-family:Georgia,"Times New Roman",serif;font-size:clamp(10px,2cqw,14px);letter-spacing:.27em}
.welcome h1{margin:.12em 0 .08em;font-family:Georgia,"Times New Roman",serif;font-size:clamp(29px,7cqw,50px);font-weight:400;line-height:1.02}
.welcome p{margin:.25em 0 0;color:#e7dfcf;font-family:Georgia,"Times New Roman",serif;font-size:clamp(12px,2.3cqw,17px)}
.ornament{display:flex;justify-content:center;align-items:center;gap:8px;color:var(--gold);margin:.25em auto;width:58%}.ornament i{height:1px;flex:1;background:linear-gradient(90deg,transparent,var(--gold))}.ornament i:last-child{background:linear-gradient(90deg,var(--gold),transparent)}.ornament b{font-size:15px}
.module-list{display:grid;gap:12px;padding:14px 4.4% 10px}
.module-card{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;min-height:118px;border:1px solid var(--line);border-radius:22px;overflow:hidden;text-decoration:none;isolation:isolate;background:#07100f;box-shadow:inset 0 1px rgba(255,255,255,.05),0 8px 28px rgba(0,0,0,.28);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.module-card:hover,.module-card:focus-visible{transform:translateY(-2px);border-color:var(--gold2);box-shadow:0 10px 30px rgba(0,0,0,.45),0 0 22px rgba(218,161,36,.12);outline:none}.module-card:active{transform:scale(.99)}
.module-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-3}.module-overlay{position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,rgba(3,7,8,.98) 0%,rgba(4,9,10,.91) 28%,rgba(4,8,9,.64) 57%,rgba(2,6,7,.36) 100%)}
.module-icon{width:78px;height:78px;object-fit:cover;border-radius:50%;margin-left:15px;filter:drop-shadow(0 8px 12px rgba(0,0,0,.65));z-index:1}
.module-copy{display:flex;flex-direction:column;min-width:0;padding:12px 12px 12px 16px;z-index:1;text-shadow:0 2px 6px #000}.module-copy strong{font-family:Georgia,"Times New Roman",serif;font-size:clamp(22px,4.6cqw,34px);font-weight:400;line-height:1.05;text-transform:none}.module-copy small{color:var(--gold2);font-family:Georgia,"Times New Roman",serif;font-size:clamp(12px,2.25cqw,17px);margin-top:6px;line-height:1.2}
.module-arrow{width:54px;height:54px;border-radius:50%;margin-right:14px;filter:drop-shadow(0 5px 10px #000);z-index:1}
.home-footer{padding:10px 4.4% 20px;display:grid;grid-template-columns:1fr 86px 1fr;align-items:center;gap:12px}.footer-btn{height:58px;border:1px solid rgba(214,159,39,.65);border-radius:30px;text-decoration:none;display:flex;align-items:center;justify-content:center;gap:9px;background:linear-gradient(180deg,rgba(12,15,12,.92),rgba(4,8,8,.95));font-family:Georgia,"Times New Roman",serif;font-size:15px}.footer-btn img{width:36px;height:36px;border-radius:50%}.footer-emblem{width:80px;height:80px;border:1px solid var(--gold);border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,#24200f 0%,#090b08 65%);box-shadow:0 0 24px rgba(212,157,36,.14);overflow:hidden}.footer-emblem img{width:94%;height:94%;object-fit:contain;filter:drop-shadow(0 4px 8px #000)}
.motto{grid-column:1/-1;display:flex;align-items:center;gap:12px;color:var(--gold2);font-family:Georgia,"Times New Roman",serif;font-size:11px;letter-spacing:.22em;justify-content:center;margin-top:4px}.motto i{height:1px;flex:1;background:linear-gradient(90deg,transparent,var(--gold))}.motto i:last-child{background:linear-gradient(90deg,var(--gold),transparent)}
body{opacity:1;transform:scale(1);transition:opacity 220ms ease,transform 220ms ease}body.is-leaving{opacity:0;transform:scale(.995);pointer-events:none}.module-card.is-opening{border-color:var(--gold2);box-shadow:0 0 28px rgba(218,161,36,.22)}
@media (min-width:900px) and (orientation:landscape){.home-app{width:min(760px,calc((100dvh - 18px)*.5628));margin-block:9px}.hero{min-height:42cqw}.module-card{min-height:10.8cqw}.module-icon{width:10.2cqw;height:10.2cqw}.module-arrow{width:7.2cqw;height:7.2cqw}}
@media (max-width:560px){.hero{min-height:66vw}.brand{top:3.2%;left:4.5%}.welcome{bottom:2.5%}.module-list{gap:9px;padding-inline:3.2%}.module-card{min-height:95px;border-radius:17px}.module-icon{width:64px;height:64px;margin-left:10px}.module-copy{padding-left:12px;padding-right:7px}.module-copy strong{font-size:clamp(19px,5.8vw,27px)}.module-copy small{font-size:clamp(11px,3vw,14px);margin-top:4px}.module-arrow{width:44px;height:44px;margin-right:9px}.home-footer{grid-template-columns:1fr 70px 1fr;gap:7px;padding-inline:3.2%}.footer-btn{height:50px;font-size:12px}.footer-btn img{width:31px;height:31px}.footer-emblem{width:66px;height:66px;font-size:38px}.motto{font-size:8px;letter-spacing:.16em}}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* =========================================================
   RIGNAC v4.7 — cabecera fija + lista de módulos con scroll
   Objetivo: preservar una cabecera legible en notebook/PC y
   permitir recorrer los seis módulos sin comprimirlos.
   ========================================================= */
@media (min-width:900px) and (orientation:landscape){
  html,body{height:100%;overflow:hidden}
  .home-app{
    height:calc(100dvh - 18px);
    min-height:0;
    display:grid;
    grid-template-rows:clamp(280px,36dvh,330px) minmax(0,1fr) auto;
    overflow:hidden;
  }
  .hero{
    min-height:0;
    height:100%;
    overflow:hidden;
    background-position:center 18%;
  }
  .brand{
    top:5%;
    left:5.5%;
    max-width:56%;
  }
  .brand-mark{font-size:clamp(32px,7.2cqw,48px);}
  .brand strong{font-size:clamp(26px,6.1cqw,42px);margin-top:7px;}
  .brand span{font-size:clamp(8px,1.75cqw,12px);line-height:1.25;max-width:90%;}
  .welcome{
    left:4.5%;
    right:4.5%;
    bottom:5%;
  }
  .welcome>span{font-size:clamp(9px,1.75cqw,12px);}
  .welcome h1{
    font-size:clamp(27px,6.2cqw,42px);
    line-height:1.02;
    white-space:nowrap;
  }
  .welcome p{font-size:clamp(11px,2.05cqw,14px);}
  .ornament{width:48%;margin:.18em auto;}

  .module-list{
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    scroll-snap-type:y proximity;
    padding:14px 4.4% 14px;
    gap:12px;
    align-content:start;
  }
  .module-list::-webkit-scrollbar{width:9px}
  .module-list::-webkit-scrollbar-track{background:rgba(255,255,255,.025);border-radius:10px}
  .module-list::-webkit-scrollbar-thumb{background:linear-gradient(var(--gold2),#8a651e);border:2px solid #071011;border-radius:10px}
  .module-card{
    min-height:116px;
    height:116px;
    scroll-snap-align:start;
    flex:none;
  }
  .module-icon{width:74px;height:74px;}
  .module-arrow{width:50px;height:50px;}
  .module-copy strong{font-size:clamp(24px,4.6cqw,32px);}
  .module-copy small{font-size:clamp(12px,2.15cqw,15px);}

  .home-footer{
    padding:8px 4.4% 10px;
    grid-template-columns:1fr 70px 1fr;
    gap:9px;
    background:linear-gradient(180deg,rgba(3,8,9,.90),#020708 40%);
    border-top:1px solid rgba(214,159,39,.18);
  }
  .footer-btn{height:48px;font-size:13px;}
  .footer-btn img{width:31px;height:31px;}
  .footer-emblem{width:62px;height:62px;font-size:36px;}
  .motto{font-size:8px;letter-spacing:.16em;margin-top:0;}
}


/* =========================================================
   RIGNAC v4.8 — cabecera fotográfica + Cruz Occitana 3D
   - Foto limpia de la fachada aportada por el usuario
   - Identidad RIGNAC separada de la fotografía
   - Cruz Occitana 3D como símbolo institucional
   - Mayor legibilidad de cabecera en móvil / notebook
   ========================================================= */
.hero{background-image:url("assets/home/hero-rignac-clean.jpg");background-position:center 45%;}
.brand{left:4.8%;top:3.2%;width:46%;max-width:330px;align-items:flex-start;}
.welcome{left:4%;right:4%;bottom:3.8%;padding-top:20px;}
.welcome::before{content:"";position:absolute;z-index:-1;left:-5%;right:-5%;top:-10px;bottom:-16px;background:linear-gradient(180deg,transparent,rgba(2,7,8,.64) 25%,rgba(2,7,8,.92));filter:blur(.2px);}
.welcome h1{color:#fff4db;text-shadow:0 2px 0 rgba(74,43,5,.95),0 6px 14px #000;}
.module-card{border-color:rgba(227,170,42,.78);}
.module-icon,.module-arrow{filter:drop-shadow(0 7px 10px rgba(0,0,0,.72)) drop-shadow(0 0 7px rgba(227,170,42,.10));}
@media (min-width:900px) and (orientation:landscape){
  .hero{background-position:center 48%;}
  .brand{top:2.5%;left:4.8%;max-width:50%;}
  .brand-mark-img{width:clamp(64px,13cqw,92px);height:clamp(64px,13cqw,92px);margin-bottom:-10px;}
  .brand strong{font-size:clamp(27px,6.15cqw,43px);}
  .brand span{font-size:clamp(8px,1.65cqw,11px);}
  .welcome{bottom:3.2%;}
}
@media (max-width:560px){
  .hero{min-height:74vw;background-position:center 43%;}
  .brand{top:2.2%;left:4%;width:52%;}
  .brand-mark-img{width:19vw;height:19vw;margin-bottom:-3vw;}
  .brand strong{font-size:clamp(25px,8.3vw,38px);letter-spacing:.13em;}
  .brand span{font-size:clamp(8px,2.5vw,11px);line-height:1.28;}
  .welcome{bottom:2.8%;}
  .welcome>span{font-size:clamp(9px,2.6vw,12px);}
  .welcome h1{font-size:clamp(25px,7.2vw,34px);white-space:normal;}
  .welcome p{font-size:clamp(11px,3.25vw,14px);}
}
