/* ============ SAIEMM Landing — base styles ============ */
:root {
  --navy-950: #061322;
  --navy-900: #07182b;
  --navy-850: #0a2540;
  --navy-800: #0d2c4d;
  --navy-700: #123a63;
  --line: rgba(150, 197, 235, 0.14);
  --line-strong: rgba(150, 197, 235, 0.28);

  --sky: #0ea5e9;
  --sky-bright: #38bdf8;
  --amber: #f59e0b;
  --green: #10b981;

  /* accent is swappable via Tweaks */
  --accent: var(--sky);
  --accent-bright: var(--sky-bright);
  --accent-soft: rgba(14, 165, 233, 0.16);

  --text: #eaf3fb;
  --text-soft: rgba(225, 238, 250, 0.74);
  --text-faint: rgba(206, 226, 244, 0.5);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-950);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); width: 100%; }

/* eyebrow / mono label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px 2px var(--accent);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px;
  padding: 14px 24px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: all .25s cubic-bezier(.2,.7,.3,1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #04141f;
  box-shadow: 0 6px 24px -6px var(--accent), inset 0 0 0 1px rgba(255,255,255,.15);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -6px var(--accent), inset 0 0 0 1px rgba(255,255,255,.25); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255,255,255,.09); border-color: var(--accent); transform: translateY(-2px); }
.btn svg { width: 17px; height: 17px; }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 19, 34, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; position: relative;
  background: linear-gradient(135deg, var(--accent), var(--navy-700));
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--line-strong), 0 6px 18px -6px var(--accent);
}
.brand .mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 14.5px; color: var(--text-soft); transition: color .2s; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 16px; }
.lang-pill { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; color: var(--text-faint); border: 1px solid var(--line); padding: 6px 11px; border-radius: 8px; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ============ Hero (shared) ============ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.hero-bg::after { content: ""; position: absolute; inset: 0; }
.hero-content { position: relative; z-index: 3; width: 100%; padding-top: 96px; padding-bottom: 64px; }
.hero h1 {
  font-size: clamp(40px, 6.6vw, 86px); max-width: 16ch; margin: 22px 0 0;
  text-wrap: balance;
}
.hero[data-style="fullbleed"] .hero-text h1,
.hero[data-style="fullbleed"] .hero-text .hero-sub { text-shadow: 0 2px 30px rgba(4,14,24,.65); }
.hero h1 .hl { color: var(--accent-bright); }
.hero-sub { font-size: clamp(17px, 1.8vw, 20px); color: var(--text-soft); max-width: 46ch; margin: 26px 0 0; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-trust { display: flex; align-items: center; gap: 12px; margin-top: 30px; font-size: 13.5px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: .04em; }
.hero-trust .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* layout: full-bleed (default) */
.hero[data-style="fullbleed"] .hero-bg { background-image: var(--hero-img); }
.hero[data-style="fullbleed"] .hero-bg::after {
  background:
    linear-gradient(100deg, rgba(6,19,34,.97) 0%, rgba(6,19,34,.93) 38%, rgba(6,19,34,.78) 54%, rgba(6,19,34,.40) 78%, rgba(6,19,34,.58) 100%),
    linear-gradient(0deg, rgba(6,19,34,.95) 4%, rgba(6,19,34,0) 48%);
}
.hero[data-style="fullbleed"] .hero-grid-half { display: none; }
.hero[data-style="fullbleed"] .hero-text { max-width: 760px; }

/* layout: spotlight (centered, image as glow panel) */
.hero[data-style="spotlight"] { text-align: center; }
.hero[data-style="spotlight"] .hero-bg { background-image: var(--hero-img); opacity: .42; transform: scale(1.05); }
.hero[data-style="spotlight"] .hero-bg::after {
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(6,19,34,.30), rgba(6,19,34,.86) 70%, var(--navy-950) 100%),
    linear-gradient(0deg, var(--navy-950), rgba(6,19,34,0) 30%);
}
.hero[data-style="spotlight"] .hero-text { max-width: 900px; margin: 0 auto; }
.hero[data-style="spotlight"] .hero-sub { margin-left: auto; margin-right: auto; }
.hero[data-style="spotlight"] .hero-actions { justify-content: center; }
.hero[data-style="spotlight"] .hero-trust { justify-content: center; }
.hero[data-style="spotlight"] .eyebrow { justify-content: center; }
.hero[data-style="spotlight"] .hero-grid-half { display: none; }

/* layout: split (text left, framed image right) */
.hero[data-style="split"] .hero-bg { display: none; }
.hero[data-style="split"] .hero-content > .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero[data-style="split"] .hero-text { max-width: 600px; }
.hero[data-style="split"] .hero-h1 { font-size: clamp(38px, 4.6vw, 68px); }
.hero-figure { display: none; position: relative; }
.hero[data-style="split"] .hero-figure { display: block; }
.hero-figure .frame {
  border-radius: 22px; overflow: hidden; position: relative;
  box-shadow: 0 30px 80px -24px rgba(0,0,0,.7), 0 0 0 1px var(--line-strong);
  aspect-ratio: 4 / 3.4;
  background-image: var(--hero-img); background-size: cover; background-position: center;
}
.hero-figure .frame::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(6,19,34,0) 50%, rgba(6,19,34,.45)); }
.hero-chip {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px;
  background: rgba(8, 24, 42, .82); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); border-radius: 13px; padding: 11px 14px;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.6);
}
.hero-chip .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-bright); }
.hero-chip .ic svg { width: 17px; height: 17px; }
.hero-chip .v { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.1; }
.hero-chip .k { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: .03em; }
.hero-chip.c1 { top: 8%; left: -4%; }
.hero-chip.c2 { bottom: 12%; right: -5%; }
@media (max-width: 880px) {
  .hero[data-style="split"] .hero-content > .wrap { grid-template-columns: 1fr; }
  .hero[data-style="split"] .hero-figure { display: none; }
}

/* grid texture overlay (toggle) */
.grid-tex {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.no-texture .grid-tex { display: none; }

/* ============ Section scaffolding ============ */
section { position: relative; }
.sec-pad { padding: clamp(72px, 11vh, 140px) 0; }
.sec-head { max-width: 720px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 52px); margin-top: 16px; }
.sec-head p { color: var(--text-soft); font-size: 18px; margin-top: 18px; }

/* ============ Counter strip ============ */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(13,44,77,.34), rgba(13,44,77,0)); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 40px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat .num { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5vw, 62px); line-height: 1; letter-spacing: -0.03em; color: var(--text); display: flex; align-items: baseline; }
.stat .num .suf { font-size: .42em; color: var(--accent-bright); margin-left: 4px; }
.stat .lab { margin-top: 12px; font-size: 14px; color: var(--text-soft); }
.stat .sub { margin-top: 4px; font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: .04em; }
@media (max-width: 820px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(odd) { border-left: none; } .stat:nth-child(n+3){ border-top: 1px solid var(--line);} }

/* ============ Features ============ */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
@media (max-width: 920px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .feat-grid { grid-template-columns: 1fr; } }
.card {
  position: relative; padding: 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18,58,99,.30), rgba(10,37,64,.30));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s, background .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px 220px at var(--mx,50%) var(--my,0%), var(--accent-soft), transparent 70%);
}
.card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.card .icon {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-bright);
  border: 1px solid var(--line-strong); margin-bottom: 22px;
}
.card .icon svg { width: 25px; height: 25px; }
.card h3 { font-size: 21px; }
.card p { color: var(--text-soft); font-size: 15.5px; margin-top: 11px; line-height: 1.55; }
.card .tag { margin-top: 18px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }

/* ============ Project / cross-border ============ */
.project { background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); border-top: 1px solid var(--line); }
.proj-grid { display: grid; grid-template-columns: 1fr 0.92fr; gap: clamp(36px, 6vw, 84px); align-items: center; }
@media (max-width: 900px) { .proj-grid { grid-template-columns: 1fr; } }
.proj-points { margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }
.proj-point { display: flex; gap: 16px; }
.proj-point .n { font-family: var(--font-mono); font-size: 13px; color: var(--accent-bright); padding-top: 3px; min-width: 28px; }
.proj-point h4 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0; }
.proj-point p { color: var(--text-soft); font-size: 15px; margin: 6px 0 0; }

/* cross-border visual */
.xb {
  position: relative; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 70% 10%, rgba(14,165,233,.14), transparent 55%), linear-gradient(180deg, rgba(13,44,77,.5), rgba(7,24,43,.4));
  padding: 34px; overflow: hidden; min-height: 360px;
}
.xb-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-faint); }
.xb-countries { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.xb-c { flex: 1; border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: rgba(255,255,255,.02); }
.xb-c .flag { width: 38px; height: 26px; border-radius: 4px; overflow: hidden; display: block; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.xb-c .cn { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-top: 12px; }
.xb-c .cd { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }
.xb-link { display: grid; place-items: center; color: var(--accent-bright); }
.xb-link svg { width: 28px; height: 28px; }
.xb-note { margin-top: 24px; font-size: 14px; color: var(--text-soft); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 20px; }

/* ============ Funding / partners ============ */
.funding { border-top: 1px solid var(--line); }
.fund-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  padding: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: auto 1fr; gap: clamp(28px,4vw,56px); align-items: center;
}
@media (max-width: 760px) { .fund-card { grid-template-columns: 1fr; } }
.fund-logos { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.eu-emblem { display: flex; align-items: center; gap: 14px; }
.eu-emblem .stars { width: 64px; height: 43px; border-radius: 4px; }
.eu-emblem .cap { font-size: 12.5px; line-height: 1.35; color: var(--text-soft); max-width: 140px; }
.interreg { display: flex; align-items: center; gap: 12px; padding-left: 26px; border-left: 1px solid var(--line-strong); }
.interreg .ig-mark { display: flex; gap: 3px; }
.interreg .ig-mark span { width: 7px; height: 30px; border-radius: 2px; display: block; }
.interreg .ig-txt { line-height: 1.1; }
.interreg .ig-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.interreg .ig-sub { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: .05em; margin-top: 3px; }
.fund-text p { color: var(--text-soft); font-size: 14.5px; line-height: 1.6; margin: 0; }
.fund-text .disc { font-size: 12px; color: var(--text-faint); margin-top: 14px; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); background: var(--navy-950); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; } }
.foot-brand p { color: var(--text-soft); font-size: 14.5px; max-width: 36ch; margin: 16px 0 0; }
.foot-col h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 16px; }
.foot-col a, .foot-col .li { display: block; color: var(--text-soft); font-size: 14.5px; padding: 6px 0; transition: color .2s; }
.foot-col a:hover { color: var(--accent-bright); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 22px 0 34px; }
.foot-bottom .copy { font-size: 13px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: .03em; }
.foot-bottom .mini { display: flex; gap: 22px; }
.foot-bottom .mini a { font-size: 13px; color: var(--text-faint); }
.foot-bottom .mini a:hover { color: var(--text); }

/* contact inline form */
.contact-row { display: flex; gap: 12px; margin-top: 18px; max-width: 420px; }
.contact-row input {
  flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 13px 20px; color: var(--text); font-family: var(--font-body); font-size: 14.5px; outline: none; transition: border-color .2s;
}
.contact-row input:focus { border-color: var(--accent); }
.contact-row input::placeholder { color: var(--text-faint); }
.contact-msg { margin-top: 12px; font-size: 13px; font-family: var(--font-mono); display: none; }
.contact-msg.show { display: block; }
.contact-msg.ok { color: var(--green); }
.contact-msg.err { color: #f87171; }
.contact-msg.err a { color: var(--accent-bright); text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay: .08s; } .reveal[data-d="2"]{ transition-delay: .16s; }
.reveal[data-d="3"]{ transition-delay: .24s; } .reveal[data-d="4"]{ transition-delay: .32s; }
.reveal[data-d="5"]{ transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* hero entrance */
@keyframes heroUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.hero-text > * { animation: heroUp .8s cubic-bezier(.2,.7,.3,1) both; }
.hero-text > *:nth-child(1){ animation-delay:.05s; } .hero-text > *:nth-child(2){ animation-delay:.15s; }
.hero-text > *:nth-child(3){ animation-delay:.25s; } .hero-text > *:nth-child(4){ animation-delay:.35s; }
.hero-text > *:nth-child(5){ animation-delay:.45s; }
@media (prefers-reduced-motion: reduce){ .hero-text > * { animation: none; } }

/* ambient glow blobs */
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; z-index: 0; }
