/* SCANOSS → Earnie handover site
   Colours and type from the earnie-brand / earnie-scanoss-cobrand skills (Earnie-led). */

@font-face {
  font-family: "Noto Sans";
  src: url("fonts/NotoSans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62.5% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0B1F3A;          /* Deep Ink */
  --ink-raised: #1A3354;   /* Navy raised */
  --paper: #F4EFE6;        /* Warm Paper */
  --orange: #FF6A1A;       /* Signature Orange */
  --orange-deep: #E2510C;  /* Orange Deep */
  --text-muted: rgba(244, 239, 230, 0.82);
  --text-faint: rgba(244, 239, 230, 0.6);
  --hairline: rgba(244, 239, 230, 0.12);
  --divider: rgba(244, 239, 230, 0.25);
  --max: 1160px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  font-family: "Noto Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- header ---------- */

.site-header { border-bottom: 1px solid var(--hairline); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: 68px;
  flex-wrap: wrap;
}

.cobrand {
  display: flex;
  align-items: center;
  gap: 26px;
  text-decoration: none;
  padding: 14px 0;
}

.cobrand .earnie { height: 34px; width: auto; }
.cobrand .scanoss { height: 29px; width: auto; }

.cobrand-divider {
  width: 1px;
  align-self: stretch;
  background: var(--divider);
}

.site-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li + li { border-left: 1px solid var(--divider); }

.site-nav a {
  display: block;
  padding: 2px 22px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--paper);
  transition: color 0.15s;
}

.site-nav li:last-child a { padding-right: 0; }

/* mobile menu button (shown at 640px and below) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s, background 0.2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
.nav-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--orange); }

/* ---------- homepage hero ---------- */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-top: 100px;
  padding-bottom: 110px;
}

.hero h1 {
  margin: 0 0 32px;
  font-size: clamp(42px, 5.6vw, 66px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.accent { color: var(--orange); }

.hero p {
  margin: 0 0 40px;
  max-width: 34em;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
}

.hero-mascot { justify-self: center; width: min(100%, 470px); }

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border-radius: 8px;
  background: var(--orange);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}

.button:hover { background: var(--orange-deep); }
.button:focus-visible, .site-nav a:focus-visible, .cobrand:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

/* ---------- inner pages ---------- */

.page-head .wrap { padding-top: 88px; padding-bottom: 56px; }

.page-head h1 {
  margin: 0 0 20px;
  max-width: 16em;
  font-size: clamp(36px, 4.8vw, 56px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.page-head p { margin: 0; max-width: 36em; font-size: 19px; color: var(--text-muted); }

.page-head .actions { margin-top: 36px; }

.section { border-top: 1px solid var(--hairline); }
.page-head + .section { border-top: 0; }
.page-head + .section > .wrap { padding-top: 24px; }
.partners-logos + .section { border-top: 0; }
.section.partners-logos > .wrap { padding-bottom: 24px; }
.section > .wrap { padding-top: 72px; padding-bottom: 72px; }

.section h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.section h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; line-height: 1.3; }

.section p { margin: 0 0 16px; color: var(--text-muted); }

.lead { max-width: 40em; font-size: 19px; }

/* two-column: heading left, content right */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; }

/* numbered rows */
.rows { list-style: none; margin: 0; padding: 0; counter-reset: row; }
.rows li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
  counter-increment: row;
}
.rows li::before {
  content: counter(row, decimal-leading-zero);
  color: var(--orange);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rows p { margin: 0; }

/* partner logo carousel */
.logo-marquee {
  display: flex;
  margin-top: 24px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 64px, #000 calc(100% - 64px), transparent);
}
.logo-track {
  display: flex;
  flex-shrink: 0;
  gap: 16px;
  margin: 0;
  padding: 0 16px 0 0;
  list-style: none;
  animation: logo-scroll 45s linear infinite;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-track li {
  flex-shrink: 0;
  width: 190px;
  height: 96px;
  padding: 8px 12px;
  background: var(--paper);
  border-radius: 8px;
}
.logo-track img { width: 100%; height: 100%; object-fit: contain; }
@keyframes logo-scroll { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .logo-marquee { -webkit-mask-image: none; mask-image: none; }
  .logo-track { animation: none; flex-wrap: wrap; padding: 0; flex-shrink: 1; }
  .logo-track[aria-hidden="true"] { display: none; }
}

/* 2x2 grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; margin-top: 40px; }
.grid-2 > div { border-top: 2px solid var(--orange); padding-top: 20px; }

/* statement */
.statement {
  margin: 0;
  max-width: 24em;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.statement + p { margin-top: 20px; font-size: 19px; }

/* path cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 40px 0; }
.card { background: var(--ink-raised); padding: 32px 28px; border-radius: 8px; }
.card h3 { font-size: 24px; }
.card p { margin: 0; }

/* lists with ticks */
.ticks { list-style: none; margin: 0 0 20px; padding: 0; }
.ticks li { position: relative; padding: 8px 0 8px 28px; color: var(--text-muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--orange); font-weight: 700; }
.panel p:last-child { color: var(--paper); font-weight: 600; margin: 0; }

/* event page (gotc2026) */
.page-head .subhead { margin: 0 0 16px; font-size: 22px; font-weight: 700; color: var(--paper); }
.link-list { list-style: none; margin: 36px 0 0; padding: 0; max-width: 40em; }
.link-list li { border-top: 1px solid var(--hairline); }
.link-list li:last-child { border-bottom: 1px solid var(--hairline); }
.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.link-list a:hover { color: var(--orange); }
.link-list a span { color: var(--orange); }
.link-list a:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; }
.stats dt {
  font-size: clamp(44px, 5.6vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.stats dd { margin: 12px 0 0; max-width: 18em; color: var(--text-muted); }
.split > .statement { color: var(--paper); }
.callout { max-width: 46em; padding: 40px 44px; background: var(--ink-raised); border-left: 4px solid var(--orange); border-radius: 8px; }
.callout p { margin: 0; font-size: 19px; }
.section a:not(.button) { text-underline-offset: 3px; }
.section a:not(.button):hover { color: var(--orange); }

/* form */
.form-panel { background: var(--paper); color: var(--ink); border-radius: 8px; padding: 32px; }

/* legal pages */
.legal { max-width: 46em; }
.legal h2 { margin: 56px 0 16px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.legal h3 { margin: 32px 0 10px; font-size: 19px; font-weight: 700; }
.legal p, .legal li { color: var(--text-muted); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal strong { color: var(--paper); }
.legal a { color: var(--orange); text-underline-offset: 3px; }
.legal .toc { margin: 32px 0 0; padding: 24px 28px; background: var(--ink-raised); border-radius: 8px; }
.legal .toc ol { margin: 8px 0 0; padding-left: 22px; }
.legal .toc p { margin: 0; color: var(--paper); }
.legal address { font-style: normal; color: var(--text-muted); margin: 0 0 16px; }
.legal .updated { color: var(--text-faint); font-size: 15px; }
.legal .see-also { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--hairline); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--hairline); font-size: 14px; color: var(--text-faint); }
.site-footer > .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--orange); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 56px; padding-top: 64px; padding-bottom: 72px; }
  .hero-mascot { justify-self: start; width: 240px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .site-header { position: relative; }
  .site-header .wrap { min-height: 60px; flex-wrap: nowrap; }
  .cobrand { gap: 16px; padding: 12px 0; }
  .cobrand .earnie { height: 28px; }
  .cobrand .scanoss { height: 24px; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--ink);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
  .site-nav li + li { border-left: 0; border-top: 1px solid var(--hairline); }
  .site-nav a, .site-nav li:last-child a { padding: 14px 0; font-size: 17px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 56px; gap: 44px; }
  .hero h1 { margin-bottom: 24px; }
  .hero p, .page-head p, .lead, .statement + p { font-size: 17px; }
  .hero p { margin-bottom: 32px; }
  .hero-mascot { width: 180px; }
  .page-head .wrap { padding-top: 56px; padding-bottom: 40px; }
  .section > .wrap { padding-top: 56px; padding-bottom: 56px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .logo-track li { width: 150px; height: 76px; }
  .logo-marquee { -webkit-mask-image: none; mask-image: none; }
  .form-panel { padding: 20px 16px; }
  .page-head .subhead { font-size: 19px; }
  .callout { padding: 28px 20px; }
  .callout p { font-size: 17px; }
}
.legal .download { margin-top: 32px; }
.legal a.button { color: var(--ink); text-decoration: none; }

/* EU funding logos (FEDER / CDTI): official logos on white, as supplied */
.funding-band { display: block; background: #fff; text-decoration: none; }
.funding-band .wrap { display: block; padding-top: 22px; padding-bottom: 22px; }
.funding-logos { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.funding-logos > span { display: flex; justify-content: center; }
.funding-logos img { width: auto; height: 48px; max-width: 100%; }
.site-footer .funding-band .wrap { padding-top: 16px; padding-bottom: 16px; }
.site-footer .funding-logos img { height: 28px; }
.site-footer .funding-band:focus-visible { outline: 2px solid var(--orange); outline-offset: -4px; }
.result { color: var(--paper) !important; font-weight: 600; }
.rows h3 { margin-bottom: 6px; }
.rows p + p { margin-top: 8px; }
.europa-logo { width: 220px; padding: 16px 20px; background: #fff; border-radius: 8px; }
.section > .wrap + .wrap { padding-top: 0; }
@media (max-width: 640px) {
  .funding-band .wrap, .site-footer .funding-band .wrap { padding-top: 12px; padding-bottom: 12px; }
  .funding-logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .funding-logos > span { padding: 18px 0; }
  .funding-logos img { height: auto; max-height: 50px; }
  .site-footer .funding-logos img { height: auto; max-height: 46px; }
}

/* FEDER / CDTI page: type scale matched to the original page */
.feder .page-head .wrap { padding-top: 56px; padding-bottom: 8px; }
.feder .intro { margin: 0 0 14px; font-size: 16px; font-style: italic; color: var(--text-muted); }
.feder h1, .feder .section h2 { max-width: none; margin: 0 0 16px; font-size: 35px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.feder .page-head p, .feder .section p, .feder .lead { font-size: 16px; }
.feder .page-head p:not(.intro) { max-width: 46em; }
.feder .section > .wrap { padding-top: 48px; padding-bottom: 48px; }
.feder .section > .wrap + .wrap { padding-top: 0; }
.feder .stats dt { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); line-height: 1.4; }
.feder .stats dd { margin: 6px 0 0; font-size: 20px; font-weight: 600; color: var(--paper); }
.feder .cards { margin: 8px 0 32px; gap: 20px; }
.feder .card { padding: 24px; }
.feder .card h3, .feder .rows h3 { font-size: 16px; }
.feder .rows li { grid-template-columns: 44px minmax(0, 1fr); padding: 20px 0; }
@media (max-width: 640px) {
  .feder h1, .feder .section h2 { font-size: 30px; }
  .feder .page-head .wrap { padding-top: 40px; }
  .feder .section > .wrap { padding-top: 40px; padding-bottom: 40px; }
}
