/* ===== IOAI Components: nav, buttons, cards, grids, callouts, timeline, sponsors, footer ===== */

/* --- Navigation --- */
.nav { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.96); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--ioai-border); }
.nav__inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo img { height: 46px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__links > li { position: relative; }
.nav__links a, .nav__links button { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 8px; color: var(--ioai-text); font-weight: 600; font-size: 0.95rem; background: none; border: 0; font-family: inherit; cursor: pointer; text-decoration: none; }
.nav__links a:hover, .nav__links button:hover, .nav__links a.is-active { background: var(--ioai-primary-soft); color: var(--ioai-primary-dark); text-decoration: none; }
.nav__links .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: 0.7; }
.dropdown { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: #fff; border: 1px solid var(--ioai-border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 8px; list-style: none; margin: 0; display: none; }
.dropdown a { display: block; padding: 9px 12px; font-weight: 500; }
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
li.is-open > .dropdown { display: block; }
.nav__cta { margin-left: 8px; }
.nav__toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--ioai-border); border-radius: 8px; background: #fff; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__toggle span { width: 20px; height: 2px; background: var(--ioai-text); border-radius: 2px; }

@media (max-width: 960px) {
  .nav__toggle { display: flex; }
  .nav__links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--ioai-border); padding: 10px 16px 18px; box-shadow: var(--shadow-md); }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a, .nav__links button { width: 100%; justify-content: space-between; }
  .dropdown { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
  .nav__cta { margin: 8px 0 0; }
}

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: 0.98rem; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .15s; font-family: inherit; line-height: 1.2; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--ioai-primary); color: #fff; }
.btn--primary:hover { background: var(--ioai-primary-dark); color: #fff; }
.btn--outline { border-color: var(--ioai-primary); color: var(--ioai-primary); background: #fff; }
.btn--outline:hover { background: var(--ioai-primary-soft); color: var(--ioai-primary-dark); }
.btn--gold { background: var(--ioai-gold); color: #1f2933; }
.btn--gold:hover { background: #d98f18; color: #1f2933; }
.btn--light { background: #fff; color: var(--ioai-primary-dark); }
.btn--light:hover { background: var(--ioai-primary-soft); }
.btn--ghost-light { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn--ghost-light:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn--sm { padding: 8px 14px; font-size: 0.88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4rem 0 0; }

/* --- Page hero (inner pages) --- */
.page-hero { background: linear-gradient(135deg, var(--ioai-primary-dark) 0%, var(--ioai-primary) 60%, var(--ioai-primary-light) 100%); color: #fff; padding: 64px 0 56px; }
.page-hero h1, .page-hero p { color: #fff; }
.page-hero p { font-size: 1.12rem; opacity: 0.92; max-width: 760px; margin: 0.8rem 0 0; }
.page-hero .eyebrow { color: rgba(255,255,255,0.8); }
.breadcrumb { font-size: 0.85rem; opacity: 0.85; margin-bottom: 1rem; }
.breadcrumb a { color: #fff; }

/* --- Prose (article body) --- */
.prose { max-width: 820px; }
.prose h2 { margin: 2.2rem 0 0.9rem; padding-top: 0.4rem; }
.prose h3 { margin: 1.8rem 0 0.7rem; }
.prose h4 { margin: 1.4rem 0 0.5rem; }
.prose img { border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 1.5rem 0; }
.prose figure { margin: 1.5rem 0; }
.prose figcaption { font-size: 0.88rem; color: var(--ioai-text-muted); margin-top: 0.5rem; }
.prose .lead { font-size: 1.18rem; color: var(--ioai-text-secondary); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* --- Cards & grids --- */
.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: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--ioai-border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.card h3, .card h4 { margin: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card--accent { border-top: 4px solid var(--ioai-primary); }
.card--gold { border-top: 4px solid var(--ioai-gold); }
.card--green { border-top: 4px solid var(--ioai-green); }
.card--soft { background: var(--ioai-bg-soft); border-color: transparent; box-shadow: none; }
.card__meta { font-size: 0.85rem; color: var(--ioai-text-muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.card__num { width: 40px; height: 40px; border-radius: 50%; background: var(--ioai-primary); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; }
a.card { color: inherit; }
a.card:hover { text-decoration: none; box-shadow: var(--shadow-md); border-color: var(--ioai-primary-light); transform: translateY(-2px); transition: all .15s; }

/* photo card (editions, galleries) */
.photo-card { border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--ioai-border); box-shadow: var(--shadow-sm); color: inherit; display: block; }
.photo-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.photo-card__body { padding: 18px 20px 20px; }
.photo-card__body h3 { margin: 0 0 4px; font-size: 1.12rem; }
.photo-card__body p { margin: 0; color: var(--ioai-text-secondary); font-size: 0.95rem; }
a.photo-card:hover { text-decoration: none; box-shadow: var(--shadow-md); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 1.5rem 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin: 0; }
.gallery--portrait img { aspect-ratio: 3 / 4; }

/* --- Key/value definition rows (event facts) --- */
.facts { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 0; border: 1px solid var(--ioai-border); border-radius: var(--radius); overflow: hidden; }
.facts > li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--ioai-border); margin: 0; background: #fff; }
.facts > li:last-child { border-bottom: 0; }
.facts > li:nth-child(even) { background: var(--ioai-bg-soft); }
.facts dt, .facts .k { font-weight: 700; color: var(--ioai-primary-dark); }
@media (max-width: 540px) { .facts > li { grid-template-columns: 1fr; gap: 2px; } }

/* --- Callouts --- */
.callout { border-radius: var(--radius); padding: 18px 22px; margin: 0 0 1.5em; border: 1px solid var(--ioai-border); background: var(--ioai-bg-soft); display: flex; gap: 14px; }
.callout__icon { font-size: 1.4rem; line-height: 1.3; }
.callout p:last-child { margin: 0; }
.callout--info { background: var(--ioai-primary-soft); border-color: #cddcf0; }
.callout--gold { background: var(--ioai-gold-soft); border-color: #f3dcae; }
.callout--green { background: var(--ioai-green-soft); border-color: #bfe0c8; }
.callout--warn { background: #fdecea; border-color: #f5c2bd; }

/* --- Chips / badges --- */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--ioai-primary-soft); color: var(--ioai-primary-dark); letter-spacing: 0.02em; }
.chip--gold { background: var(--ioai-gold-soft); color: #9a6410; }
.chip--green { background: var(--ioai-green-soft); color: var(--ioai-green); }
.chip--grey { background: #eef0f3; color: var(--ioai-text-secondary); }

/* --- Stats band --- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.stat { text-align: center; padding: 8px 12px; }
.stat__value { font-size: 2.4rem; font-weight: 800; line-height: 1.1; color: #fff; }
.stat__label { font-size: 0.95rem; opacity: 0.85; margin-top: 4px; }
.section--band .stat__value { color: var(--ioai-gold); }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* --- Timeline / steps --- */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.timeline > li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; margin: 0; position: relative; }
.timeline > li::before { content: ""; position: absolute; left: 27px; top: 56px; bottom: -18px; width: 2px; background: var(--ioai-border-strong); }
.timeline > li:last-child::before { display: none; }
.timeline__marker { width: 56px; height: 56px; border-radius: 50%; background: var(--ioai-primary); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; box-shadow: 0 0 0 6px var(--ioai-primary-soft); }
.timeline__marker--gold { background: var(--ioai-gold); color: #1f2933; box-shadow: 0 0 0 6px var(--ioai-gold-soft); }
.timeline__marker--green { background: var(--ioai-green); box-shadow: 0 0 0 6px var(--ioai-green-soft); }
.timeline__body { background: #fff; border: 1px solid var(--ioai-border); border-radius: var(--radius-lg); padding: 20px 24px; box-shadow: var(--shadow-sm); }
.timeline__body h3 { margin: 0 0 4px; }
.timeline__date { font-weight: 700; color: var(--ioai-primary); font-size: 0.92rem; margin-bottom: 8px; }
.timeline__body p:last-child, .timeline__body ul:last-child { margin-bottom: 0; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 14px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; margin: 0; align-items: start; }
.steps > li::before { content: counter(step); width: 40px; height: 40px; border-radius: 50%; background: var(--ioai-primary); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* --- Accordion (FAQ) --- */
details.faq { border: 1px solid var(--ioai-border); border-radius: var(--radius); padding: 0 20px; margin: 0 0 10px; background: #fff; }
details.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--ioai-primary); font-weight: 400; }
details.faq[open] summary::after { content: "−"; }
details.faq > *:not(summary) { padding-bottom: 16px; }

/* --- Medal list --- */
.medals { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 10px; }
.medals > li { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--ioai-border); border-radius: var(--radius); background: #fff; margin: 0; }
.medals .medal { font-size: 1.6rem; text-align: center; }
.medals .medal__name { font-weight: 700; }
.medals .medal__meta { color: var(--ioai-text-muted); font-size: 0.9rem; }

/* --- Sponsor logos --- */
.sponsor-tier { margin: 0 0 2.2rem; }
.sponsor-tier h3 { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ioai-text-muted); margin: 0 0 14px; text-align: center; }
.logo-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px 40px; }
.logo-row img { max-height: 64px; width: auto; max-width: 240px; object-fit: contain; }
.logo-row--lg img { max-height: 96px; max-width: 360px; }
.logo-row--sm img { max-height: 48px; }

/* --- Forms --- */
.form { display: grid; gap: 14px; max-width: 640px; }
.form label { font-weight: 600; font-size: 0.92rem; display: grid; gap: 6px; }
.form input, .form textarea, .form select { font: inherit; padding: 11px 13px; border: 1px solid var(--ioai-border-strong); border-radius: 8px; width: 100%; background: #fff; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--ioai-primary); outline: 0; box-shadow: 0 0 0 3px var(--ioai-primary-glow); }
.form textarea { min-height: 140px; resize: vertical; }
.form__note { font-size: 0.85rem; color: var(--ioai-text-muted); }

/* --- Artwork band (full-width abstract art, never cropped) --- */
.artwork img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* --- CTA band --- */
.cta-band { background: linear-gradient(135deg, var(--ioai-primary-dark), var(--ioai-primary)); color: #fff; border-radius: var(--radius-lg); padding: 40px 44px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2, .cta-band p { color: #fff; margin: 0; }
.cta-band p { opacity: 0.9; margin-top: 6px; }
@media (max-width: 640px) { .cta-band { padding: 28px 24px; } }

/* --- Footer --- */
.footer { background: #0b1f33; color: rgba(255,255,255,0.85); padding: 56px 0 28px; font-size: 0.93rem; }
.footer a { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer__logo img { height: 40px; width: auto; margin-bottom: 14px; }
.footer h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 0 0 8px; }
.footer__ack { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; font-size: 0.85rem; color: rgba(255,255,255,0.7); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 0.85rem; color: rgba(255,255,255,0.7); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* --- Fade-in --- */
.fade-in { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade-in { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* captioned figures inside a gallery */
.gallery figure { margin: 0; }
.gallery figure img { margin: 0; }
.gallery figcaption { font-size: 0.85rem; color: var(--ioai-text-muted); margin-top: 6px; }

/* responsive 16:9 video embed */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-sm); margin: 0 0 1.5em; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* facts inside a narrow card/aside: stack key over value, drop the outer border */
.card .facts { border: 0; border-radius: 0; }
.card .facts > li { grid-template-columns: 1fr; gap: 2px; padding: 10px 0; background: transparent; border-bottom: 1px solid var(--ioai-border); }
.card .facts > li:last-child { border-bottom: 0; }
