/* ============================================================
   AIDataMed — Landing Page
   Design system (blue brand, matches the app interface)
   Tokens sampled from aidatamed-tokens.css + institutional logos
   ============================================================ */

:root{
  /* Brand */
  --blue:        #275D91;   /* PRIMARY */
  --blue-bright: #2F84C9;   /* accent / links / focus */
  --blue-700:    #1F4E7A;
  --blue-800:    #173E61;
  --slate:       #1E2F42;   /* dark headings / footer */
  --ink:         #0E1217;   /* wordmark / primary text */

  /* Helix tints (from IIS Galicia Sur mark) */
  --helix-1: #3E6E97;
  --helix-2: #5C9BD0;
  --helix-3: #9DB6CE;

  /* Text */
  --fg-1: #0E1217;
  --fg-2: #51606F;
  --fg-3: #8A97A6;
  --on-dark:    #EAF1F8;
  --on-dark-2:  #9DB1C6;

  /* Surfaces */
  --bg:         #FFFFFF;
  --surface:    #F4F7FB;
  --surface-2:  #EEF3F9;
  --line:       #E4E9F0;
  --line-soft:  #EEF2F7;
  --footer-bg:  #122236;
  --footer-line:rgba(255,255,255,.1);

  /* Status */
  --amber: #E0A23B;
  --green: #1F8A5B;

  /* Effects */
  --ring: 0 0 0 3px rgba(47,132,201,.32);
  --shadow-sm: 0 1px 2px rgba(16,30,48,.06), 0 1px 1px rgba(16,30,48,.04);
  --shadow-md: 0 10px 30px -12px rgba(20,40,70,.22);
  --shadow-lg: 0 30px 70px -28px rgba(20,45,80,.34);
  --shadow-card: 0 24px 60px -24px rgba(24,55,95,.28);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 56px);

  /* Type */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ font-size:clamp(13.5px, 3.3vw, 16px); scroll-behavior:smooth; -webkit-text-size-adjust:100%; scroll-padding-top:88px; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--fg-1);
  background:var(--bg);
  line-height:1.6;
  font-size:1.0625rem;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }
h1,h2,h3,h4{ font-family:var(--font-display); color:var(--slate); line-height:1.1; margin:0; letter-spacing:-.02em; font-weight:800; text-wrap:balance; }
p{ margin:0; text-wrap:pretty; }

/* ---- Layout helpers ---- */
.container{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--gutter); }
.section{ padding-block:clamp(44px,5.5vw,76px); }
.eyebrow{
  font-family:var(--font-display);
  font-weight:700;
  font-size:.8rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--blue);
  margin:0 0 14px;
  display:inline-flex; align-items:center; gap:9px;
}
.eyebrow::before{ content:""; width:22px; height:2px; background:var(--blue); border-radius:2px; }
.section-head{ max-width:660px; margin-bottom:clamp(26px,3.2vw,42px); }
.section-head h2{ font-size:clamp(1.9rem,3.8vw,2.85rem); }
.section-head .lead{ margin-top:18px; color:var(--fg-2); font-size:1.12rem; }
.center{ text-align:center; margin-inline:auto; }

/* ---- Buttons ---- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--font-display); font-weight:700; font-size:.98rem;
  border-radius:11px; padding:13px 22px; cursor:pointer; border:1px solid transparent;
  transition:transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-1px); }
.btn:active{ transform:translateY(0); }
.btn svg{ width:18px; height:18px; }
.btn-primary{
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
  box-shadow:0 6px 16px -8px rgba(34,80,126,.55);
}
.btn-primary:hover{
  background:var(--blue-700);
  border-color:var(--blue-800);
  box-shadow:0 10px 22px -10px rgba(34,80,126,.65);
}
.btn-primary:active{ background:var(--blue-800); border-color:var(--blue-800); }
.btn-ghost{
  background:#fff; color:var(--slate); border-color:var(--line);
}
.btn-ghost:hover{ background:var(--surface); border-color:#D4DCE7; }
.btn-lg{ padding:15px 26px; font-size:1.02rem; }
.btn:focus-visible{ outline:none; box-shadow:var(--ring); }

/* ---- Header ---- */
.header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.82);
  backdrop-filter:saturate(150%) blur(14px);
  border-bottom:1px solid transparent;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.header.scrolled{ border-color:var(--line); box-shadow:0 6px 24px -18px rgba(20,40,70,.5); }
.nav{ display:flex; align-items:center; gap:28px; height:74px; }
.brand{ display:flex; align-items:center; gap:11px; flex-shrink:0; }
.brand img{ height:26px; width:auto; }
.nav-links{ display:flex; align-items:center; gap:6px; margin-left:14px; }
.nav-links a{
  font-family:var(--font-display); font-weight:600; font-size:.95rem; color:var(--fg-2);
  padding:9px 14px; border-radius:9px; transition:color .15s, background .15s; white-space:nowrap;
}
.nav-links a:hover{ color:var(--slate); background:var(--surface); }
.nav-actions{ display:flex; align-items:center; gap:12px; margin-left:auto; }
.mobile-links{ display:none; }
.lang{
  display:inline-flex; align-items:center; gap:6px; font-family:var(--font-display);
  font-weight:600; font-size:.9rem; color:var(--fg-2);
  border:1px solid var(--line); border-radius:9px; padding:8px 12px; cursor:pointer; background:#fff;
}
.lang:hover{ border-color:#D4DCE7; }
.nav-toggle{
  display:none; width:42px; height:42px; border:1px solid var(--line); border-radius:10px;
  background:#fff; cursor:pointer; align-items:center; justify-content:center; margin-left:auto;
}
.nav-toggle svg{ width:22px; height:22px; color:var(--slate); }

/* ---- Hero ---- */
.hero{ position:relative; overflow:hidden; background:var(--bg); }
.hero::before{
  content:""; position:absolute; inset:0; z-index:0;
  background-image:
    radial-gradient(60% 70% at 78% 18%, rgba(47,132,201,.14), transparent 60%),
    radial-gradient(50% 60% at 8% 4%, rgba(39,93,145,.10), transparent 55%);
}
.hero-grid{
  content:""; position:absolute; inset:0; z-index:0; opacity:.5;
  background-image:
    linear-gradient(to right, rgba(30,47,66,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30,47,66,.05) 1px, transparent 1px);
  background-size:46px 46px;
  -webkit-mask-image:radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
          mask-image:radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
}
.hero-inner{
  position:relative; z-index:1;
  display:grid; grid-template-columns:1.05fr .95fr; gap:clamp(34px,5vw,72px); align-items:center;
  padding-block:clamp(40px,5vw,76px);
}
.badge{
  display:inline-flex; align-items:center; gap:9px;
  font-family:var(--font-display); font-weight:700; font-size:.78rem; letter-spacing:.12em; text-transform:uppercase;
  color:var(--blue); background:rgba(47,132,201,.10); border:1px solid rgba(47,132,201,.22);
  padding:7px 14px; border-radius:100px;
}
.badge .dot{ width:8px; height:8px; border-radius:50%; background:var(--blue-bright); box-shadow:0 0 0 4px rgba(47,132,201,.18); }
.hero h1{ font-size:clamp(1.85rem,5.2vw,3.7rem); margin:22px 0 0; }
.hero h1 .hl{ color:var(--blue); }
.hero .sub{ margin-top:22px; font-size:1.18rem; color:var(--fg-2); max-width:33em; }
.hero-cta{ display:flex; flex-wrap:wrap; gap:14px; margin-top:32px; }
.hero-meta{ display:flex; flex-wrap:wrap; gap:22px 30px; margin-top:34px; }
.hero-meta .item{ display:flex; align-items:center; gap:10px; color:var(--fg-2); font-size:.95rem; font-weight:500; }
.hero-meta .item svg{ width:20px; height:20px; color:var(--blue); flex-shrink:0; }

/* Quality card */
.quality-card{
  position:relative; background:#fff; border:1px solid var(--line);
  border-radius:var(--r-xl); padding:30px 30px 28px; box-shadow:var(--shadow-card);
}
.quality-card::after{
  content:""; position:absolute; inset:-1px; border-radius:inherit; pointer-events:none;
  background:linear-gradient(140deg, rgba(47,132,201,.30), transparent 40%); -webkit-mask:
    linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; padding:1px; opacity:.0;
}
.qc-head{ display:flex; align-items:baseline; justify-content:space-between; gap:14px; margin-bottom:24px; flex-wrap:wrap; }
.qc-head h3{ font-size:1.18rem; color:var(--slate); }
.qc-meta{
  font-family:var(--font-display); font-weight:700; font-size:.68rem; letter-spacing:.12em;
  color:var(--fg-3); text-transform:uppercase; white-space:nowrap;
  border-left:2px solid var(--blue); padding-left:8px; line-height:1.2;
}
.metric{
  margin-bottom:12px; padding:13px 15px; border-left:3px solid var(--blue);
  border-radius:0 10px 10px 0; background:var(--surface-2);
}
.metric:last-of-type{ margin-bottom:0; }
.metric .label{ display:block; font-weight:700; color:var(--slate); font-size:.92rem; margin-bottom:3px; }
.metric .indicator{ display:block; color:var(--fg-2); font-size:.86rem; line-height:1.45; }
.qc-foot{
  display:flex; gap:10px; align-items:flex-start; margin-top:24px; padding-top:20px; border-top:1px solid var(--line-soft);
  color:var(--fg-2); font-size:.9rem;
}
.qc-foot svg{ width:18px; height:18px; color:var(--green); flex-shrink:0; margin-top:2px; }

/* ---- Partner strip ---- */
.partners{ border-block:1px solid var(--line); background:var(--surface); }
.partners-inner{
  padding-block:clamp(18px,3vw,26px);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:12px; text-align:center;
}
.partners .pl{ font-family:var(--font-display); font-weight:700; font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; color:var(--fg-3); }
.partners .logos{
  display:grid; grid-template-columns:repeat(3, minmax(0, 1fr));
  align-items:center; justify-items:center;
  column-gap:clamp(24px,4vw,48px); width:100%; max-width:920px; margin-inline:auto;
}
.partners .partner-logo{
  display:flex; align-items:center; justify-content:center;
  width:100%; max-width:280px; opacity:.94; transition:opacity .15s ease;
}
.partners .partner-logo:hover{ opacity:1; }
.partners .logos img{ width:auto; max-width:100%; object-fit:contain; display:block; }
.partner-logo--idara img{ height:clamp(46px,5.2vw,54px); }
.partner-logo--fundacion img{ height:clamp(44px,5vw,50px); }
.partner-logo--iisgs img{ height:clamp(78px,10vw,100px); }

/* ---- Beneficios ---- */
.benefits{ background:var(--bg); }
.benefit-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.benefit{
  background:#fff; border:1px solid var(--line); border-radius:var(--r-lg);
  padding:32px 30px; box-shadow:var(--shadow-sm); text-align:left;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.benefit:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:#D9E2EC; }
.icon-tile{
  width:54px; height:54px; border-radius:14px; display:grid; place-items:center;
  margin:0 auto 22px;
  background:linear-gradient(160deg, rgba(47,132,201,.14), rgba(39,93,145,.10));
  border:1px solid rgba(47,132,201,.18); color:var(--blue);
}
.icon-tile svg{ width:26px; height:26px; }
.benefit h3{ font-size:1.3rem; margin-bottom:12px; }
.benefit p{ color:var(--fg-2); font-size:1.01rem; }

/* ---- Casos de uso (interactive tabs) ---- */
.usecases{ background:var(--surface); }
.usecases .section-head{ max-width:none; width:100%; }
.uc{ background:#fff; border:1px solid var(--line); border-radius:var(--r-xl); overflow:hidden; box-shadow:var(--shadow-md); }
.uc-tabs{ display:none; }
.uc-tab{
  display:flex; align-items:center; gap:14px; text-align:left; cursor:pointer;
  background:transparent; border:0; border-right:1px solid rgba(30,47,66,.08);
  padding:22px 24px; color:var(--fg-2); transition:background .18s ease, color .18s ease,
    flex .35s cubic-bezier(.22,1,.36,1), min-width .35s, padding .25s ease;
  position:relative;
}
.uc-tab:last-child{ border-right:0; }
.uc-tab:hover{ background:rgba(255,255,255,.5); color:var(--slate); }
.uc-tab.active{ background:#fff; color:var(--slate); }
.uc-tab.active::after{ content:""; position:absolute; left:0; right:0; bottom:-1px; height:3px; background:var(--blue); z-index:1; }
.uc-tab-icn{
  width:46px; height:46px; flex-shrink:0; border-radius:12px; display:grid; place-items:center;
  background:#fff; border:1px solid var(--line); color:var(--blue); transition:background .18s, color .18s, border-color .18s;
}
.uc-tab.active .uc-tab-icn{ background:var(--blue); border-color:var(--blue); color:#fff; }
.uc-tab-icn svg{ width:24px; height:24px; }
.uc-tab-tx{ font-family:var(--font-display); font-weight:700; font-size:1.02rem; line-height:1.22; min-width:0; }
.uc-tab-n{ display:block; font-size:.72rem; letter-spacing:.1em; color:var(--blue); margin-bottom:4px; }
.uc-tab-label{ display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.uc-stage{ position:relative; }
.uc-panels{ display:block; overflow:hidden; }
.uc-panel{
  display:grid; grid-template-columns:repeat(3,1fr); align-content:start;
  width:100%; background:#fff;
}
.uc-mhead{
  grid-column:1 / -1;
  display:flex; align-items:center; gap:14px; width:100%;
  padding:22px 28px; box-sizing:border-box;
  border-bottom:1px solid var(--line); background:linear-gradient(165deg,#EBF2F9,#E2ECF6);
}
.uc-mhead .uc-tab-tx{ flex:1; min-width:0; }
.uc-mhead .uc-tab-icn{ width:46px; height:46px; }
.uc-mhead .uc-tab-tx{ font-family:var(--font-display); font-weight:700; font-size:1.02rem; line-height:1.22; color:var(--slate); }
.uc-panel.active .uc-tab-icn{ background:var(--blue); border-color:var(--blue); color:#fff; }
.uc-arrow{
  display:grid; place-items:center; position:absolute; top:50%; transform:translateY(-50%);
  z-index:5; width:44px; height:44px; border-radius:50%; cursor:pointer;
  background:rgba(255,255,255,.94); border:1px solid var(--line); color:var(--blue);
  box-shadow:0 6px 20px rgba(15,30,48,.18); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  transition:background .18s ease, opacity .18s ease, transform .18s ease;
}
.uc-arrow--prev{ left:10px; }
.uc-arrow--next{ right:10px; }
.uc-arrow:hover{ background:#fff; }
.uc-arrow:active{ transform:translateY(-50%) scale(.92); }
.uc-arrow svg{ width:20px; height:20px; }
.uc-arrow:disabled{ opacity:0; pointer-events:none; }
.uc-dots{
  display:flex; justify-content:center; gap:9px;
  padding:20px 0 28px; margin-top:16px;
  border-top:1px solid var(--line-soft);
}
.uc-dot{
  width:9px; height:9px; border-radius:50%; border:0; padding:0; cursor:pointer;
  background:var(--line); transition:background .22s ease, width .22s ease;
}
.uc-dot.active{ background:var(--blue); width:24px; border-radius:5px; }
.uc-col{ padding:32px 28px; border-right:1px solid var(--line-soft); box-sizing:border-box; }
.uc-col:last-child{ border-right:0; }
.uc-col h4{
  font-family:var(--font-display); font-weight:700; font-size:.78rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--blue); display:flex; align-items:center; gap:8px; margin-bottom:16px;
}
.uc-col h4 svg{ width:17px; height:17px; }
.uc-col p{ color:var(--fg-2); font-size:1rem; }
.uc-col ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:13px; }
.uc-col li{ position:relative; padding-left:24px; color:var(--fg-2); font-size:.98rem; }
.uc-col li::before{ content:"→"; position:absolute; left:0; top:0; color:var(--blue-bright); font-weight:700; }

/* Tablet & mobile: one slide + side arrows + bottom dots */
@media (max-width:1023px){
  .uc-tabs{ display:none !important; }
  .uc-stage{ position:relative; padding:0; overflow:visible; touch-action:pan-y; }
  .uc-panels{ display:block !important; overflow:hidden; }
  .uc-panel{ display:none !important; grid-template-columns:1fr !important; width:100%; }
  .uc-panel.active{ display:grid !important; }
  .uc-mhead{
    display:flex !important; width:100%; padding:18px 52px; gap:12px;
  }
  .uc-mhead .uc-tab-icn{ width:44px; height:44px; flex-shrink:0; }
  .uc-mhead .uc-tab-tx{ font-size:1rem; flex:1; min-width:0; }
  .uc-mhead .uc-tab-label{
    white-space:normal; overflow:visible; text-overflow:unset; line-height:1.3;
  }
  .uc-col{ padding:22px 52px; width:100%; }
  .uc-arrow{
    display:grid !important; position:absolute; top:50%; transform:translateY(-50%);
    width:40px; height:40px; z-index:6;
  }
  .uc-arrow--prev{ left:8px; }
  .uc-arrow--next{ right:8px; }
  .uc-arrow:active{ transform:translateY(-50%) scale(.92); }
  .uc-dots{
    display:flex !important; margin-top:0;
    padding:18px 0 24px; border-top:1px solid var(--line-soft);
  }
}

/* Desktop: collapsible tab header + full-width content panel */
@media (min-width:1024px){
  .uc-tabs{
    display:flex; align-items:stretch; min-height:88px;
    background:linear-gradient(165deg,#EBF2F9 0%,#E2ECF6 100%);
    border-bottom:1px solid var(--line);
  }
  .uc-tab{
    flex:0 0 88px; min-width:88px; width:88px;
    flex-direction:column; justify-content:center; align-items:center;
    gap:10px; padding:18px 10px; overflow:hidden;
  }
  .uc-tab.active{
    flex:1 1 0; min-width:0; width:auto;
    flex-direction:row; align-items:center; gap:14px;
    padding:22px 28px; background:#fff;
  }
  .uc-tab:not(.active) .uc-tab-label{ display:none; }
  .uc-tab:not(.active) .uc-tab-tx{ text-align:center; }
  .uc-tab:not(.active) .uc-tab-n{ margin-bottom:0; }
  .uc-tab:not(.active):hover{ background:rgba(255,255,255,.55); }
  .uc-stage{ position:static; padding-inline:0; }
  .uc-panels{ display:block; overflow:visible; scroll-snap-type:none; }
  .uc-panel{
    display:none; flex:none; width:100%; min-width:100%;
    scroll-snap-align:none; scroll-snap-stop:normal;
  }
  .uc-panel.active{ display:grid; }
  .uc-mhead{ display:none; }
  .uc-arrow,
  .uc-dots{ display:none !important; }
}

/* ---- Vídeo ---- */
.video-sec{ background:var(--bg); }
.video-frame{
  position:relative; aspect-ratio:16/9; width:100%; max-width:960px; margin:0 auto;
  border-radius:var(--r-xl); overflow:hidden; box-shadow:var(--shadow-lg); border:1px solid var(--line);
  background:linear-gradient(150deg,#16324F 0%, var(--blue) 55%, #16324F 100%);
}
.video-iframe{ width:100%; height:100%; border:0; display:block; }
.video-facade{
  position:absolute; inset:0; width:100%; height:100%; cursor:pointer; border:0; color:#fff;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0;
  background:transparent; overflow:hidden;
}
.vf-grid{
  position:absolute; inset:0; opacity:.5;
  background-image:
    radial-gradient(60% 80% at 80% 10%, rgba(47,132,201,.5), transparent 60%),
    linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size:auto, 44px 44px, 44px 44px;
}
.vf-brand{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:16px; padding:0 24px; }
.vf-brand img{ height:clamp(34px,5vw,52px); width:auto; }
.vf-sub{ font-family:var(--font-display); font-weight:600; font-size:clamp(.82rem,1.6vw,1rem); color:var(--on-dark); letter-spacing:.01em; text-align:center; }
.vf-play{
  position:relative; z-index:1; margin-top:26px; width:74px; height:74px; border-radius:50%;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.35); backdrop-filter:blur(4px);
  display:grid; place-items:center; color:#fff; transition:transform .18s ease, background .18s ease;
}
.vf-play svg{ width:30px; height:30px; margin-left:4px; }
.vf-hint{
  position:absolute; z-index:1; bottom:22px; right:22px; display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-display); font-weight:700; font-size:.86rem; color:#fff;
  background:rgba(0,0,0,.28); border:1px solid rgba(255,255,255,.28); border-radius:999px;
  padding:9px 16px 9px 13px; backdrop-filter:blur(4px); transition:background .18s ease;
}
.vf-hint svg{ width:19px; height:19px; color:#FF4242; }
.video-facade:hover .vf-hint{ background:rgba(0,0,0,.45); }
@media (max-width:560px){ .vf-hint{ bottom:14px; right:14px; font-size:.78rem; padding:7px 13px 7px 11px; } }
.video-facade:hover .vf-play{ transform:scale(1.08); background:rgba(255,255,255,.26); }
.video-facade:focus-visible{ outline:none; box-shadow:inset 0 0 0 3px rgba(47,132,201,.7); }
.video-link{ margin-top:24px; }
.video-link a{ display:inline-flex; align-items:center; gap:7px; font-family:var(--font-display); font-weight:700; color:var(--blue); }
.video-link a:hover{ color:var(--blue-bright); }
.video-link svg{ width:16px; height:16px; }

/* ---- Demo form ---- */
.demo{ background:var(--bg); }
.demo-inner{
  display:grid; grid-template-columns:.95fr 1.05fr; gap:clamp(34px,5vw,64px); align-items:center;
  background:linear-gradient(160deg,#F7FAFD 0%, #EFF4FA 100%);
  border:1px solid var(--line); border-radius:var(--r-xl); padding:clamp(30px,4vw,52px);
}
.demo-copy h2{ font-size:clamp(1.8rem,3.4vw,2.5rem); }
.demo-copy .lead{ margin-top:16px; color:var(--fg-2); font-size:1.1rem; }
.demo-list{ list-style:none; padding:0; margin:26px 0 0; display:flex; flex-direction:column; gap:14px; }
.demo-list li{ display:flex; gap:12px; align-items:flex-start; color:var(--slate); font-weight:500; }
.demo-list svg{ width:22px; height:22px; color:var(--green); flex-shrink:0; }
.form{ background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:clamp(24px,3vw,34px); box-shadow:var(--shadow-md); }
.field{ margin-bottom:18px; }
.field label{ display:block; font-family:var(--font-display); font-weight:600; font-size:.9rem; color:var(--slate); margin-bottom:7px; }
.field label .req{ color:var(--blue-bright); }
.field input, .field textarea{
  width:100%; font-family:inherit; font-size:1rem; color:var(--fg-1);
  background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:12px 14px;
  transition:border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder, .field textarea::placeholder{ color:var(--fg-3); }
.field input:focus, .field textarea:focus{ outline:none; border-color:var(--blue-bright); background:#fff; box-shadow:var(--ring); }
.field textarea{ resize:vertical; min-height:96px; }
.check{ display:flex; gap:11px; align-items:flex-start; margin:6px 0 20px; }
.check input{ width:18px; height:18px; margin-top:3px; accent-color:var(--blue); flex-shrink:0; }
.check label{ font-size:.9rem; color:var(--fg-2); font-weight:400; line-height:1.5; }
.check a{ color:var(--blue); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.link-btn{
  background:none; border:0; padding:0; font:inherit; cursor:pointer;
  color:var(--blue); font-weight:600; text-decoration:underline; text-underline-offset:2px;
}
.link-btn:hover{ color:var(--blue-bright); }

/* ---- Modal ---- */
.modal{ position:fixed; inset:0; z-index:200; display:none; align-items:center; justify-content:center; padding:24px; }
.modal.open{ display:flex; }
.modal-overlay{ position:absolute; inset:0; background:rgba(15,30,48,.55); backdrop-filter:blur(3px); animation:modalFade .2s ease; }
.modal-box{
  position:relative; z-index:1; width:100%; max-width:660px; background:#fff;
  border-radius:var(--r-lg); padding:clamp(28px,4vw,44px); box-shadow:0 30px 80px rgba(15,30,48,.3);
  animation:modalPop .22s cubic-bezier(.2,.9,.3,1.1);
}
.modal-box h3{ font-family:var(--font-display); font-weight:700; font-size:clamp(1.4rem,2.4vw,1.7rem); color:var(--slate); margin-bottom:20px; padding-right:40px; }
.modal-box p{ color:var(--fg-2); font-size:1rem; line-height:1.65; margin-bottom:16px; }
.modal-box p:last-child{ margin-bottom:0; }
.modal-box a{ color:var(--blue); font-weight:600; text-decoration:underline; text-underline-offset:2px; word-break:break-word; }
.modal-close{
  position:absolute; top:18px; right:18px; width:38px; height:38px; border-radius:10px;
  background:var(--surface); border:1px solid var(--line); color:var(--fg-2); cursor:pointer;
  display:grid; place-items:center; transition:background .16s ease, color .16s ease;
}
.modal-close:hover{ background:#E6EDF5; color:var(--slate); }
.modal-close svg{ width:18px; height:18px; }
@keyframes modalFade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes modalPop{ from{ transform:translateY(12px) scale(.98); } to{ transform:none; } }
.form .btn{ width:100%; }
.form-note{ margin-top:14px; font-size:.82rem; color:var(--fg-3); text-align:center; }
.form-err{ margin-top:12px; padding:10px 12px; border-radius:var(--r-sm); background:#FEE2E2; color:#991B1B; font-size:.88rem; text-align:center; }
.form-ok{ display:none; text-align:center; padding:24px 10px; }
.form-ok.show{ display:block; }
.form-ok svg{ width:48px; height:48px; color:var(--green); margin:0 auto 14px; }
.form-ok h3{ font-size:1.3rem; margin-bottom:8px; }
.form-ok p{ color:var(--fg-2); }

/* ---- Funding ---- */
.funding{ background:var(--surface); border-top:1px solid var(--line); }
.funding-inner{ display:block; }
.funding-text{ max-width:none; }
.funding p{ color:var(--fg-2); font-size:1.02rem; margin-bottom:16px; }
.funding p a{ color:var(--blue); font-weight:600; }
.funding .accent{
  border-left:3px solid var(--blue); padding-left:18px; color:var(--slate); font-size:1.06rem; font-weight:500;
}
.funding .accent a{ color:var(--blue); font-weight:600; }
.funding-logos{
  display:flex; flex-direction:row; flex-wrap:wrap; gap:16px;
  align-items:stretch; justify-content:center;
  margin-top:clamp(30px,4.5vw,44px);
}
.logo-real{
  flex:0 1 360px; min-width:min(240px,100%); max-width:360px;
  display:flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid var(--line); border-radius:12px; padding:18px 18px;
  transition:box-shadow .18s ease, transform .18s ease;
}
.logo-real:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); }
.logo-real img{ width:100%; height:auto; max-height:60px; object-fit:contain; display:block; }
.logo-real--prtr{ padding:14px 20px; }
.logo-real--prtr img{ width:100%; height:auto; max-height:clamp(80px,11vw,118px); object-fit:contain; }

/* ---- Contact band ---- */
.contact{ background:var(--bg); }
.contact-card{
  background:var(--slate); color:var(--on-dark); border-radius:var(--r-xl);
  padding:clamp(40px,5.5vw,68px); display:flex; justify-content:center; text-align:center;
  position:relative; overflow:hidden;
}
.contact-inner{ max-width:600px; }
.contact-card::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(70% 120% at 50% -10%, rgba(47,132,201,.32), transparent 60%);
}
.contact-card > *{ position:relative; z-index:1; }
.contact-card h2{ color:#fff; font-size:clamp(1.7rem,3vw,2.3rem); }
.contact-card p{ color:var(--on-dark-2); margin-top:14px; font-size:1.08rem; }
.contact-mail{
  display:inline-flex; align-items:center; gap:10px; margin-top:22px;
  font-family:var(--font-display); font-weight:700; font-size:1.1rem; color:#fff;
}
.contact-mail svg{ width:22px; height:22px; color:var(--blue-bright); }

/* ---- Footer ---- */
.footer{ position:relative; background:var(--footer-bg); color:var(--on-dark-2); padding-block:clamp(48px,6vw,72px) 0; }
.footer-wave{ position:absolute; left:0; right:0; top:0; transform:translateY(-99%); line-height:0; pointer-events:none; }
.footer-wave svg{ display:block; width:100%; height:clamp(38px,5vw,64px); }
.footer-wave path{ fill:var(--footer-bg); }
.footer-funding{
  display:grid; grid-template-columns:minmax(220px,.72fr) minmax(0,1.8fr); gap:clamp(24px,4vw,48px);
  align-items:center; margin-bottom:clamp(40px,5vw,56px); padding:clamp(22px,3vw,32px);
  color:var(--fg-2); background:#fff; border-radius:var(--r-lg); box-shadow:0 14px 36px rgba(4,16,30,.22);
}
.footer-funding-kicker{
  display:block; margin-bottom:9px; font-family:var(--font-display); font-size:.7rem; font-weight:700;
  letter-spacing:.14em; text-transform:uppercase; color:var(--blue);
}
.footer-funding-copy > p{
  color:var(--slate); font-family:var(--font-display); font-size:clamp(1.06rem,2vw,1.3rem); font-weight:700;
}
.footer-funding-ref{ display:flex; flex-direction:column; gap:4px; margin-top:16px; font-size:.74rem; color:var(--fg-3); }
.footer-funding-ref > span{ font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.footer-funding-ref strong{ font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.88rem; color:var(--slate); }
.footer-funding-logos{ display:grid; grid-template-columns:1.45fr .8fr 1.2fr; gap:clamp(12px,2vw,20px); align-items:stretch; }
.footer-funding-logo{ display:flex; align-items:center; justify-content:center; min-height:104px; padding:10px; }
.footer-funding-logo img{ width:100%; height:auto; object-fit:contain; }
.footer-funding-logo--eu img{ max-height:96px; }
.footer-funding-logo--prtr img{ max-height:104px; }
.footer-funding-logo--ministerio img{ max-height:58px; }
.footer-top{ display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:40px; }
.footer-brand img{ height:26px; margin-bottom:18px; }
.footer-brand p{ font-size:.96rem; max-width:34ch; }
.footer h4{ color:#fff; font-size:.82rem; letter-spacing:.1em; text-transform:uppercase; margin-bottom:18px; }
.footer ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.footer ul a, .footer ul span{ color:var(--on-dark-2); font-size:.96rem; transition:color .15s; }
.footer ul a:hover{ color:#fff; }
.footer .contact-li{ display:flex; gap:10px; align-items:flex-start; }
.footer .contact-li svg{ width:17px; height:17px; color:var(--blue-bright); flex-shrink:0; margin-top:3px; }
.footer-bottom{
  margin-top:34px; padding-block:24px; border-top:1px solid rgba(255,255,255,.1);
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:.86rem;
}
.footer-bottom .links{ display:flex; gap:22px; }

/* ===== Motion layer =====
   This editor's offscreen preview freezes the CSS animation/transition clock,
   so entrance reveals are driven by JS (requestAnimationFrame), which keeps
   running everywhere. Decorative CSS animations below animate in real browsers
   and sit static (never blank) in the preview. */
.reveal{ opacity:1; }              /* no-JS / fallback: always visible */
.js .reveal{ opacity:0; }          /* hidden until JS rAF-tweens it in */
.js .reveal.shown{ opacity:1; }    /* hard fallback if tween is skipped */
/* If client scripts fail to load, show content after 3s */
@keyframes aidatamed-reveal-fallback{ to{ opacity:1; } }
.js .reveal:not(.shown){ animation:aidatamed-reveal-fallback 0.01s 3s forwards; }
html.landing-ready .reveal:not(.shown){ animation:none; }
.form .honeypot{ position:absolute; left:-5000px; width:1px; height:1px; overflow:hidden; margin:0; padding:0; border:0; }
.footer-bottom .link-btn{ background:none; border:none; padding:0; font:inherit; color:inherit; cursor:pointer; text-decoration:underline; }
.footer-bottom .link-btn:hover{ color:var(--on-dark); }

.hero-blob{
  position:absolute; z-index:0; right:-8%; top:-12%; width:46vw; max-width:640px; aspect-ratio:1;
  background:radial-gradient(circle at 50% 50%, rgba(47,132,201,.22), rgba(39,93,145,.06) 55%, transparent 72%);
  filter:blur(6px); pointer-events:none; animation:blobDrift 16s ease-in-out infinite;
}
@keyframes blobDrift{ 0%,100%{ transform:translate(0,0) scale(1); } 50%{ transform:translate(-18px,22px) scale(1.06); } }

/* Animated badge dot */
.badge .dot{ position:relative; animation:dotPulse 2.4s ease-in-out infinite; }
@keyframes dotPulse{
  0%,100%{ box-shadow:0 0 0 0 rgba(47,132,201,.45); }
  50%{ box-shadow:0 0 0 6px rgba(47,132,201,0); }
}

/* Hero synthetic-data canvas + visual */
.hero{ position:relative; }
.hero-canvas{
  position:absolute; inset:0; z-index:0; width:100%; height:100%;
  pointer-events:none;
}
.hero-inner{ position:relative; z-index:1; }
.hero-visual{ position:relative; }
.quality-card{ position:relative; z-index:1; transition:transform .4s cubic-bezier(.22,1,.36,1); }
.hero-visual:hover .quality-card{ transform:translateY(-6px); }

/* Benefit icon: static (no hover movement) */

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .js .reveal, .js .benefit-grid .benefit{ opacity:1; transform:none; transition:none; }
  .hero-blob, .badge .dot{ animation:none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:1000px){
  .nav-links{ display:none; }
  .nav-actions .lang{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .nav-actions{ display:none; }
  .header.menu-open .nav-actions{
    display:flex; position:absolute; top:74px; left:0; right:0; flex-direction:column; align-items:stretch;
    background:#fff; border-bottom:1px solid var(--line); padding:18px var(--gutter) 24px; gap:14px;
    box-shadow:var(--shadow-md);
  }
  .header.menu-open .nav-actions .lang{ display:inline-flex; justify-content:center; }
  .header.menu-open .mobile-links{ display:flex; flex-direction:column; gap:4px; }
  .mobile-links{ display:none; }
  .mobile-links a{ font-family:var(--font-display); font-weight:600; color:var(--slate); padding:12px 14px; border-radius:9px; }
  .mobile-links a:hover{ background:var(--surface); }
  .hero-inner{ grid-template-columns:1fr; }
  .quality-card{ max-width:480px; }
  .benefit-grid{ grid-template-columns:1fr; max-width:520px; margin-inline:auto; }
  .demo-inner{ grid-template-columns:1fr; }
  .funding-inner{ grid-template-columns:1fr; }
  .footer-top{ grid-template-columns:1fr 1fr; }
  .footer-brand{ grid-column:1 / -1; }
}
@media (max-width:1040px){
  .uc-panel{ grid-template-columns:1fr; }
  .uc-col{ border-right:0; border-bottom:1px solid var(--line-soft); }
  .uc-col:last-child{ border-bottom:0; }
}
@media (max-width:760px){
  .footer-funding{ grid-template-columns:1fr; }
  .footer-funding-logos{ grid-template-columns:1fr; }
  .footer-funding-logo{ min-height:82px; }
  .footer-funding-logo--eu img{ max-width:340px; }
  .footer-funding-logo--prtr img{ max-width:240px; }
  .footer-funding-logo--ministerio img{ max-width:320px; }
  .footer-top{ grid-template-columns:1fr; gap:32px; }
  .footer-bottom{ flex-direction:column; }
  .hero-cta .btn{ flex:1; }
  .partners .logos{ column-gap:clamp(12px,3vw,20px); max-width:none; }
  .partners .partner-logo{ max-width:none; }
  .partner-logo--idara img{ height:clamp(38px,9vw,46px); }
  .partner-logo--fundacion img{ height:clamp(36px,8.5vw,44px); }
  .partner-logo--iisgs img{ height:clamp(62px,16vw,82px); }
}
@media (max-width:460px){
  .hero .sub{ font-size:1.04rem; }
  .hero-cta{ gap:10px; }
  .hero-meta{ gap:12px 20px; margin-top:26px; }
  .section-head h2{ font-size:clamp(1.5rem,7vw,2rem); }
  .section-head .lead{ font-size:1.02rem; }
  .quality-card{ padding:22px 20px; }
  .benefit{ padding:26px 22px; }
  .benefit h3{ font-size:1.18rem; }
  .uc-mhead{ padding:16px 46px; }
  .uc-col{ padding:20px 46px; }
  .uc-arrow{ width:36px; height:36px; }
  .uc-arrow--prev{ left:6px; }
  .uc-arrow--next{ right:6px; }
  .uc-arrow svg{ width:18px; height:18px; }
  .demo-inner{ padding:24px 20px; }
  .demo-copy h2{ font-size:clamp(1.5rem,6.5vw,2rem); }
  .contact-card{ padding:34px 22px; }
  .contact-card h2{ font-size:clamp(1.45rem,6.5vw,1.9rem); }
  .funding .accent{ font-size:1rem; }
  .logo-real{ padding:14px 12px; }
  .logo-real img{ max-height:46px; }
  .logo-real--prtr img{ max-height:88px; }
  .modal-box{ padding:26px 22px; }
}
