/* ==========================================================================
   AI Factory Antenna Ireland — site styles
   Brand tokens and components per AIF-Antenna-Brand-Pack guidelines.
   ========================================================================== */

:root {
  /* Primary palette */
  --navy: #0B2545;
  --teal: #00A5B5;
  --bright-teal: #00D4E8; /* dark backgrounds only */
  --ink: #1A1A2E;

  /* Irish tricolour accent (used together only, never split as brand colour) */
  --green: #169B62;
  --orange: #FF883E;

  /* Neutrals */
  --cloud: #F5F7FA;
  --mist: #E8EEF2;
  --steel: #6B7280;
  --graphite: #374151;
  --white: #FFFFFF;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 8px 24px rgba(11, 37, 69, .06);
  --shadow-lg: 0 12px 40px rgba(11, 37, 69, .14);
  --header-h: 72px;
}

/* --- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--graphite);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { color: var(--graphite); }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Layout helpers ----------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(48px, 8vw, 88px); }
.section--cloud { background: var(--cloud); }
.section--navy { background: var(--navy); color: #C9D6E5; }
.section--navy h2, .section--navy h3 { color: var(--white); }

.section-head { max-width: 760px; margin-bottom: 40px; }
.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 12px;
}
.section--navy .eyebrow { color: var(--bright-teal); }
.lead { font-size: 1.12rem; color: var(--steel); }
.section--navy .lead { color: #C9D6E5; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* --- Tricolour accent bar ----------------------------------------------- */
.tricolour { display: inline-flex; gap: 0; vertical-align: middle; }
.tricolour span { width: 34px; height: 5px; }
.tricolour span:nth-child(1) { background: var(--green);  border-radius: 3px 0 0 3px; }
.tricolour span:nth-child(2) { background: var(--white);  border-block: 1px solid var(--mist); }
.tricolour span:nth-child(3) { background: var(--orange); border-radius: 0 3px 3px 0; }
.tricolour--lg span { width: 46px; height: 6px; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 13px 24px; border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #0093a1; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--mist); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-onnavy { background: var(--bright-teal); color: var(--navy); }
.btn-onnavy:hover { background: #5fe6f4; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* --- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--mist);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 16px;
}
.nav__brand { display: inline-flex; align-items: center; }
.nav__brand img { height: 38px; width: auto; }
.nav__brand:hover { text-decoration: none; }

.nav__toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; background: none; border: 1px solid var(--mist);
  border-radius: 9px; cursor: pointer; padding: 0;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--navy); margin-inline: auto; transition: .2s; }

.nav__menu { display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; }
.nav__menu a {
  display: inline-block; padding: 9px 14px; border-radius: 8px;
  color: var(--graphite); font-weight: 600; font-size: .98rem;
}
.nav__menu a:hover { color: var(--navy); background: var(--cloud); text-decoration: none; }
.nav__menu a[aria-current="page"] { color: var(--teal); }
.nav__menu .btn { padding: 10px 18px; }
.nav__menu .btn:hover { background: #0093a1; }

/* --- Hero --------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(0,165,181,.30), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(0,212,232,.12), transparent 55%),
    var(--navy);
  color: #C9D6E5;
  padding-block: clamp(64px, 11vw, 132px);
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero h1 .accent { color: var(--bright-teal); font-weight: 400; }
.hero__intro { font-size: 1.2rem; max-width: 56ch; margin-top: 22px; color: #C9D6E5; }
.hero .tricolour { margin-bottom: 26px; }
.hero__meta { margin-top: 30px; font-size: .95rem; color: #9DB1C7; }

/* --- Cards / grids ------------------------------------------------------ */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--mist); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); height: 100%;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--steel); font-size: .98rem; }
.card__icon {
  width: 46px; height: 46px; border-radius: 11px; margin-bottom: 16px;
  display: grid; place-items: center; background: rgba(0,165,181,.10);
  color: var(--teal); font-size: 1.4rem;
}
.card--link { transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
a.card--link:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(0,165,181,.4); }
.card--link .more { display: inline-block; margin-top: 14px; color: var(--teal); font-weight: 600; }

.section--navy .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); box-shadow: none; }
.section--navy .card p { color: #B6C5D8; }
.section--navy .card__icon { background: rgba(0,212,232,.14); color: var(--bright-teal); }

/* --- Funding strip ------------------------------------------------------ */
.funding {
  display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px;
  justify-content: space-between;
}
.funding__text { flex: 1 1 320px; }
.funding__amount { font-size: 2.4rem; font-weight: 800; color: var(--navy); line-height: 1; }
.funding__amount small { display: block; font-size: .95rem; font-weight: 500; color: var(--steel); margin-top: 8px; }

/* --- Partner / funder logo grid ----------------------------------------- */
.partner-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.partner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; min-height: 120px;
  background: #fff; border: 1px solid var(--mist); border-radius: var(--radius); padding: 22px 18px;
}
.partner img { max-height: 52px; width: auto; object-fit: contain; }
/* Missing logos are hidden by main.js so the name text stands in cleanly. */
.partner__name { font-weight: 700; color: var(--navy); font-size: 1rem; line-height: 1.3; }
.partner__role { font-size: .8rem; color: var(--steel); letter-spacing: .04em; text-transform: uppercase; }
.partner--lead { border-color: rgba(0,165,181,.45); box-shadow: var(--shadow); }
/* Partner cards that are links */
a.partner { text-decoration: none; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
a.partner:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(0,165,181,.55); }
a.partner:hover .partner__name { color: var(--teal); }

/* --- Definition list / fact rows ---------------------------------------- */
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.facts li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--mist); align-items: flex-start; }
.facts li:last-child { border-bottom: 0; }
.facts .facts__icon { flex: 0 0 28px; font-size: 1.3rem; line-height: 1.3; }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; color: var(--steel); }

/* --- Event detail card -------------------------------------------------- */
.event-card {
  background: #fff; border: 1px solid var(--mist); border-left: 6px solid var(--teal);
  border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow);
}
.event-card dl { display: grid; gap: 0; margin: 0; }
.event-card .row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--mist); }
.event-card .row:last-child { border-bottom: 0; }
.event-card dt { font-weight: 700; color: var(--navy); }
.event-card dd { margin: 0; color: var(--graphite); }
.event-card dd a { font-weight: 600; }

/* --- Bullets ------------------------------------------------------------ */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--graphite); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--teal);
}
.section--navy .ticks li::before { background: var(--bright-teal); }
.section--navy .ticks li { color: #C9D6E5; }

/* --- Prose width -------------------------------------------------------- */
.prose { max-width: 70ch; }
.prose p + p { margin-top: 18px; }
.prose p { color: var(--graphite); }

/* --- Footer ------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #9DB1C7; padding-block: 56px 32px; }
.site-footer .tricolour { margin-bottom: 22px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer img.footer-logo { height: 52px; width: auto; margin-bottom: 16px; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #C9D6E5; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-funders { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 4px; }
.footer-funders img { height: 40px; background: #fff; border-radius: 6px; padding: 6px 8px; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: .85rem; color: #7E92A8;
}
.footer-note { font-size: .92rem; color: #9DB1C7; max-width: 40ch; }

/* --- Utilities ---------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.center .section-head { margin-inline: auto; }
.stack > * + * { margin-top: 18px; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--mist);
    padding: 12px var(--gutter) 18px; box-shadow: var(--shadow);
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { padding: 12px 12px; }
  .nav__menu .btn { margin-top: 6px; justify-content: center; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .event-card .row { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
