/* ITFA conference pages: design system ported from the approved mockups
   Palette P3 from ITFA 2026 badges. Fonts: Newsreader (display) + Public Sans (text). */

:root {
  --navy: #16335C;
  --navy-900: #0E2442;
  --navy-700: #1F4274;
  --yellow: #F4C20D;
  --yellow-soft: #FDF3CF;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --text: #2B3547;
  --muted: #5A6B85;
  --line: #DCE1E8;
  --paper: #F6F7F9;
  --ok: #1E7A4C;
  --ok-soft: #E3F3EA;
  --bad: #B3261E;
  --bad-soft: #FBE7E5;
  --warn-soft: #FFF6D6;

  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-text: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(14,36,66,.06), 0 4px 16px rgba(14,36,66,.06);
  --wrap: 1160px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font: 400 17px/1.6 var(--font-text);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.eyebrow { font: 600 .78rem/1.2 var(--font-text); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; display: inline-block; }
.eyebrow--accent { color: var(--navy); border-bottom: 3px solid var(--yellow); padding-bottom: 4px; }
.serif-italic { font-family: var(--font-display); font-style: italic; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 72px 0; }
.section--paper { background: var(--paper); }
.section--navy { background: var(--navy); color: #DCE4F0; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand-name { font: 600 .8rem/1.2 var(--font-text); letter-spacing: .12em; text-transform: uppercase; }
.brand-name small { display: block; font-weight: 400; letter-spacing: .04em; text-transform: none; opacity: .75; font-size: .75rem; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: #DCE4F0; text-decoration: none; font-size: .9rem; padding: 8px 10px; border-radius: var(--radius); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.nav .btn { margin-left: 8px; }
/* ".nav a" outranks ".btn--primary": without this the header button had light text on yellow (contrast 1.3:1, WCAG needs 4.5:1). */
.nav a.btn--primary, .nav a.btn--primary:hover { color: var(--navy-900); }
.nav a.btn--primary:hover { background: #FFD233; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: var(--white); border-radius: var(--radius); padding: 8px 12px; font: inherit; }
@media (max-width: 1180px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: var(--navy-900); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
  .nav.is-open { display: flex; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem/1 var(--font-text); padding: 14px 22px; border-radius: var(--radius); border: 2px solid transparent; text-decoration: none; cursor: pointer; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--yellow); color: var(--navy-900); }
.btn--primary:hover { background: #FFD233; color: var(--navy-900); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-700); color: var(--white); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn--ok { background: var(--ok); color: var(--white); }
.btn--bad { background: var(--white); color: var(--bad); border-color: var(--bad); }
.btn--sm { padding: 9px 14px; font-size: .85rem; }

/* ---------- Hero with trade-routes map ---------- */
.hero { position: relative; background: var(--navy) url('map-trade-routes.jpg') center/cover no-repeat; color: var(--white); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,36,66,.94) 0%, rgba(14,36,66,.75) 45%, rgba(14,36,66,.25) 100%); }
.hero .wrap { position: relative; padding-top: 96px; padding-bottom: 96px; }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero .lead { color: #DCE4F0; }
@media (max-width: 640px) { .hero::before { background: rgba(14,36,66,.88); } .hero .wrap { padding-top: 56px; padding-bottom: 56px; } }

/* ---------- Cards, badges, facts ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card--accent { border-top: 4px solid var(--yellow); }
.card h3 { margin-bottom: .35em; }
.badge { display: inline-block; font: 600 .72rem/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--paper); color: var(--navy); border: 1px solid var(--line); }
.badge--yellow { background: var(--yellow); border-color: var(--yellow); color: var(--navy-900); }
.badge--ok { background: var(--ok-soft); border-color: #BFE3CF; color: var(--ok); }
.badge--bad { background: var(--bad-soft); border-color: #F2C4C0; color: var(--bad); }
.badge--wait { background: var(--warn-soft); border-color: #F3E2A0; color: #7A5B00; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.facts > div { padding: 20px 24px; border-left: 1px solid var(--line); }
.facts > div:first-child { border-left: 0; }
.facts dt { font: 600 .72rem/1.2 var(--font-text); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-family: var(--font-display); font-size: 1.35rem; color: var(--navy); }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, minmax(0,1fr)); } .facts > div:nth-child(3) { border-left: 0; } .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Placeholder marker for unknown data (never invent facts) */
.tbc { background: var(--warn-soft); color: #7A5B00; border: 1px dashed #D9B84A; border-radius: 4px; padding: 0 6px; font-family: var(--font-text); font-size: .85em; white-space: nowrap; }

/* ---------- Timeline (key dates) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; position: relative; }
.timeline li { padding: 28px 16px 0 0; position: relative; border-top: 3px solid var(--line); }
.timeline li::before { content: ""; position: absolute; top: -9px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--navy); }
.timeline .when { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); }
.timeline .what { font-size: .9rem; color: var(--muted); }
@media (max-width: 760px) { .timeline { grid-template-columns: 1fr; } .timeline li { border-top: 0; border-left: 3px solid var(--line); padding: 0 0 24px 24px; } .timeline li::before { top: 2px; left: -9px; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field .hint { font-size: .82rem; color: var(--muted); }
.req { color: var(--bad); }
input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--font-text); color: var(--ink); background: var(--white);
  border: 1px solid #C5CDD9; border-radius: var(--radius); padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(244,194,13,.5); border-color: var(--navy); }
textarea { min-height: 120px; resize: vertical; }
.dropzone { border: 2px dashed #C5CDD9; border-radius: var(--radius-lg); padding: 28px; text-align: center; background: var(--paper); color: var(--muted); }
.dropzone strong { color: var(--navy); }
.choice { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.captcha { display: inline-flex; align-items: center; gap: 12px; border: 1px solid #C5CDD9; border-radius: var(--radius); padding: 12px 16px; background: #FAFAFA; font-size: .9rem; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 24px; }
.steps li { font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.steps li.is-current { background: var(--navy); color: var(--white); }
.steps li.is-done { background: var(--ok-soft); color: var(--ok); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--white); }
th { text-align: left; font: 600 .75rem/1.2 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--paper); padding: 12px 16px; border-bottom: 1px solid var(--line); }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* ---------- Email mock frame ---------- */
.email { max-width: 640px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.email-meta { background: var(--paper); padding: 12px 20px; font-size: .82rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.email-head { background: var(--navy); padding: 20px 28px; display: flex; align-items: center; gap: 12px; color: var(--white); }
.email-head img { height: 32px; }
.email-body { padding: 28px; }
.email-foot { padding: 16px 28px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #AFC0D8; font-size: .9rem; }
.site-footer .wrap { padding-top: 56px; padding-bottom: 32px; }
.site-footer h4 { color: var(--white); font-family: var(--font-text); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.site-footer a { color: #DCE4F0; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8rem; }
