/* ═══ CertiDoc web v2 — capa visual sobre Tailwind ═══ */
:root {
  --ink: #070b1a;
  --ink-2: #0d1330;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --accent: #06b6d4;
  --grad: linear-gradient(120deg, #6366f1 0%, #8b5cf6 45%, #06b6d4 100%);
  --reveal-t: opacity .7s ease, translate .7s cubic-bezier(.2, .7, .2, 1);
}

html, body { overflow-x: clip; }
body { font-feature-settings: "cv11", "ss01"; }
h1, h2, h3, .font-display { font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif; letter-spacing: -0.02em; }

/* ─── Text i botons amb degradat ─── */
.btn-grad {
  background: var(--grad); background-size: 160% 160%; background-position: 0% 50%;
  box-shadow: 0 10px 30px -8px rgba(99, 102, 241, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: background-position .5s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-grad:hover { background-position: 100% 50%; transform: translateY(-1px); box-shadow: 0 16px 36px -10px rgba(6, 182, 212, .55); }
.btn-glass { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px); transition: background .2s, border-color .2s; }
.btn-glass:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }

/* ─── Navbar: transparent sobre l'hero fosc, vidre blanc en fer scroll ─── */
#site-nav { transition: background .3s ease, border-color .3s ease, box-shadow .3s ease; }
.js #site-nav.nav-top { background: transparent; border-color: transparent; backdrop-filter: none; }
.js #site-nav.nav-top .nav-link, .js #site-nav.nav-top .nav-brand, .js #site-nav.nav-top #mobile-menu-btn { color: #e2e8f0; }
.js #site-nav.nav-top .nav-link:hover { color: #fff; }
.js #site-nav.nav-top .lang-switch { background: rgba(255, 255, 255, .08); }
.js #site-nav.nav-top .lang-btn { color: #94a3b8; }
.js #site-nav.nav-top .lang-btn-active { background: rgba(255, 255, 255, .95); color: var(--brand); }
.js #site-nav.nav-top #mobile-menu:not(.hidden) { background: rgba(7, 11, 26, .96); border-radius: 1rem; padding: .75rem; margin-bottom: .75rem; }
.js #site-nav.nav-top #mobile-menu a { color: #e2e8f0; }
.js #site-nav.nav-top #mobile-menu a:hover { background: rgba(255, 255, 255, .06); }
.js #site-nav:not(.nav-top) { box-shadow: 0 8px 30px -18px rgba(15, 23, 42, .35); }

/* ─── Hero ─── */
.hero-v2 { background: var(--ink); isolation: isolate; }
.hero-v2 .aurora { position: absolute; inset: -20% -10% auto -10%; height: 140%; z-index: -1; filter: blur(80px); opacity: .75; pointer-events: none; }
.hero-v2 .aurora span { position: absolute; border-radius: 9999px; animation: drift 18s ease-in-out infinite alternate; }
.hero-v2 .aurora span:nth-child(1) { width: 46rem; height: 46rem; left: -8rem; top: -12rem; background: radial-gradient(circle, rgba(99, 102, 241, .75), transparent 65%); }
.hero-v2 .aurora span:nth-child(2) { width: 40rem; height: 40rem; right: -10rem; top: -6rem; background: radial-gradient(circle, rgba(6, 182, 212, .5), transparent 65%); animation-duration: 22s; }
.hero-v2 .aurora span:nth-child(3) { width: 36rem; height: 36rem; left: 35%; top: 30%; background: radial-gradient(circle, rgba(139, 92, 246, .45), transparent 65%); animation-duration: 26s; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(4rem, 3rem, 0) scale(1.12); } }
.hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .09) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
}
.hero-v2::after { /* fosa suau cap a la secció següent */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: -1;
  background: linear-gradient(to bottom, transparent, rgba(7, 11, 26, .9));
}
.kicker-glass { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.mock-frame { position: relative; border-radius: 1.25rem; padding: 1px; background: linear-gradient(140deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, .04) 40%, rgba(6, 182, 212, .4)); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04); }
.mock-frame > div { border-radius: calc(1.25rem - 1px); }
.mock-glow { position: absolute; inset: 10% 5%; z-index: -1; background: var(--grad); filter: blur(70px); opacity: .45; border-radius: 2rem; }
.hero-chip { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); box-shadow: 0 20px 40px -16px rgba(2, 6, 23, .55); }
.hero-chip.float-a { animation: float 7s ease-in-out infinite; }
.hero-chip.float-b { animation: float 8s ease-in-out -3s infinite; }

/* ─── Franja de xifres ─── */
.stats-v2 { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); }
.stat-num { background: linear-gradient(180deg, #fff 30%, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ─── Etiqueta (eyebrow) de secció ─── */
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .8rem; margin-bottom: 1rem; border-radius: 9999px; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); background: rgba(99, 102, 241, .08); border: 1px solid rgba(99, 102, 241, .18); }
.eyebrow::before { content: ""; width: .4rem; height: .4rem; border-radius: 9999px; background: var(--grad); }
.eyebrow-dark { color: #a5b4fc; background: rgba(165, 180, 252, .08); border-color: rgba(165, 180, 252, .2); }

/* ─── Targetes: vora en degradat i aixecament en hover ─── */
.card-v2 { position: relative; background: #fff; border: 1px solid #e2e8f0; border-radius: 1.25rem; transition: var(--reveal-t), transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card-v2::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--grad); opacity: 0; transition: opacity .25s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }
.card-v2:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(79, 70, 229, .35); border-color: transparent; }
.card-v2:hover::before { opacity: 1; }

/* Funcionalitats: cada element en targeta */
#features .grid > .flex { padding: 1.25rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 1.1rem; transition: var(--reveal-t), transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
#features .grid > .flex:hover { transform: translateY(-3px); border-color: #c7d2fe; box-shadow: 0 18px 40px -22px rgba(79, 70, 229, .4); }
#features { background: linear-gradient(180deg, #f8fafc, #fff 30%); }

/* Mòduls: les targetes blanques reben l'estil v2 */
#modules .mod-card:not(.bg-gradient-to-br):hover { transform: translateY(-4px); border-color: #c7d2fe; box-shadow: 0 24px 48px -24px rgba(79, 70, 229, .35); }
#modules .mod-card { transition: var(--reveal-t), transform .25s ease, box-shadow .25s ease, border-color .25s ease; }

/* Estàndards: fons fosc amb resplendor i targetes de vidre */
#standards { background: var(--ink) !important; }
#standards .std-glow { position: absolute; width: 50rem; height: 50rem; border-radius: 9999px; filter: blur(110px); opacity: .35; pointer-events: none; }
#standards .grid > a { position: relative; overflow: hidden; border-radius: 1.1rem; transition: var(--reveal-t), transform .25s ease, background .25s ease, border-color .25s ease; }
#standards .grid > a::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); opacity: .0; transition: opacity .25s ease; }
#standards .grid > a:hover { transform: translateY(-4px); border-color: rgba(165, 180, 252, .35); background: rgba(255, 255, 255, .08); }
#standards .grid > a:hover::after { opacity: 1; }

/* Clients: logos en gris que agafen color */
#clients img { filter: grayscale(1); opacity: .9; transition: filter .3s ease, opacity .3s ease; }
#clients a:hover img { filter: none; opacity: 1; }

/* Preus i resta de targetes blanques amb vora suau */
#integrations .grid > div, #certifications .grid .bg-white { transition: transform .25s ease, box-shadow .25s ease; }
#integrations .grid > div:hover, #certifications .grid .bg-white:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .3); }

/* Contacte: mateix llenguatge que l'hero */
#contact { background: var(--ink) !important; isolation: isolate; }
#contact .contact-aurora { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(40rem 30rem at 15% 20%, rgba(99, 102, 241, .55), transparent 60%),
  radial-gradient(36rem 28rem at 90% 80%, rgba(6, 182, 212, .35), transparent 60%),
  radial-gradient(30rem 24rem at 60% 10%, rgba(139, 92, 246, .35), transparent 60%); }

/* ─── Aparició en fer scroll (només amb JS i sense reduced-motion) ─── */
.js .reveal { opacity: 0; translate: 0 24px; }
:where(.js .reveal) { transition: var(--reveal-t); }
.js .reveal.is-in { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; }
  .hero-v2 .aurora span { animation: none; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media print { .js .reveal { opacity: 1; translate: none; } }
