/* =========================================================================
   Academic Conference Theme — Springer/WorldCIST-style
   Shared by MSTIoE and DSMSI prototypes.
   Per-site accent colors are set via the [data-site] attribute on <body>.
   ========================================================================= */

:root {
  --navy:        #0e2a47;
  --navy-deep:   #081d33;
  --accent:      #1f6feb;   /* default, overridden per site */
  --accent-soft: #e7f0fd;
  --ink:         #1a2230;
  --muted:       #5b6675;
  --line:        #e3e8ef;
  --bg:          #ffffff;
  --bg-alt:      #f5f7fa;
  --gold:        #c8962a;
  --ok:          #1f9d6b;
  --maxw:        1140px;
  --radius:      12px;
  --shadow:      0 1px 2px rgba(16,42,71,.06), 0 12px 32px rgba(16,42,71,.07);
  --font-head:   "Georgia", "Times New Roman", serif;
  --font-body:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body[data-site="mstioe"] { --accent: #0a6e63; --accent-soft: #e3f3f0; --navy: #06302b; --navy-deep: #04221e; }
body[data-site="dsmsi"]  { --accent: #1f4e9b; --accent-soft: #e8eefb; --navy: #0e2a47; --navy-deep: #081d33; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; font-weight: 700; }
h2 { font-size: 2rem; margin: 0 0 .35em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 76px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section__head .eyebrow { color: var(--accent); font-family: var(--font-body); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; display: block; margin-bottom: 10px; }
.section__head p { color: var(--muted); font-size: 1.06rem; }

/* ---------- Top bar + nav ---------- */
.topbar { background: var(--navy-deep); color: #cfe0f2; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { color: #fff; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95);
  backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700;
  color: var(--navy); font-size: 1.2rem; text-decoration: none; }
.brand__mark { width: 40px; height: 40px; border-radius: 9px; background: var(--accent);
  color: #fff; display: grid; place-items: center; font-size: .95rem; letter-spacing: .02em; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; color: var(--muted); font-size: .72rem; }
.menu { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
.menu a { color: var(--ink); font-size: .94rem; padding: 8px 13px; border-radius: 8px; font-weight: 500; }
.menu a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.menu a.active { color: var(--accent); }
.menu .btn { margin-left: 8px; }
.nav__toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--navy); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 12px 22px;
  border-radius: 9px; font-weight: 600; font-size: .95rem; border: 1px solid var(--accent); transition: .15s; }
.btn:hover { filter: brightness(.93); text-decoration: none; color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.12); filter: none; }
.btn--outline { background: #fff; color: var(--accent); }
.btn--lg { padding: 15px 30px; font-size: 1.02rem; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; padding: 110px 0 96px;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(255,255,255,.12), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .07;
  background-image: radial-gradient(#fff 1px, transparent 1.4px); background-size: 26px 26px; }
.hero .container { position: relative; z-index: 1; max-width: 920px; }
.hero .pill { display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 6px 15px; border-radius: 999px; font-size: .82rem; letter-spacing: .04em; margin-bottom: 22px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.35rem); margin: 0 0 18px; max-width: 18ch; }
.hero .lead { font-size: 1.18rem; color: #d6e4f5; max-width: 60ch; margin-bottom: 14px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 26px 0 34px; font-size: 1.02rem; }
.hero__meta span { display: inline-flex; align-items: center; gap: 9px; color: #eaf2fd; }
.hero__meta b { color: #fff; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Indexing strip ---------- */
.indexbar { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.indexbar .container { display: flex; align-items: center; justify-content: center; gap: 14px 34px;
  flex-wrap: wrap; padding: 20px 24px; }
.indexbar span { color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.indexbar b { color: var(--navy); font-family: var(--font-head); font-size: 1.18rem; }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 22px; }
.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: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); }
.card h3 { font-family: var(--font-body); font-weight: 700; }
.topic { border-left: 3px solid var(--accent); }
.topic .num { color: var(--accent); font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; }

/* ---------- Important dates ---------- */
.dates { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.date { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  position: relative; box-shadow: var(--shadow); }
.date.is-key { border-color: var(--accent); }
.date .d { font-family: var(--font-head); font-size: 1.5rem; color: var(--navy); font-weight: 700; }
.date .t { color: var(--muted); margin-top: 4px; font-size: .96rem; }
.date .tag { position: absolute; top: 18px; right: 18px; background: var(--accent); color: #fff;
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }

/* ---------- Lists / committee ---------- */
.committee { columns: 2; column-gap: 40px; }
.committee .person { break-inside: avoid; margin-bottom: 14px; }
.committee .person b { color: var(--navy); }
.committee .person span { display: block; color: var(--muted); font-size: .9rem; }
.role-block { margin-bottom: 30px; }
.role-block h3 { color: var(--accent); border-bottom: 2px solid var(--accent-soft); padding-bottom: 8px; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 10px 0 10px 34px; position: relative; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 10px; color: var(--ok); font-weight: 700; }

.prose { max-width: 820px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }

.notice { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 18px 22px; color: var(--navy); }

table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
table.tbl th { background: var(--bg-alt); color: var(--navy); font-family: var(--font-body); }

/* ---------- CTA band ---------- */
.cta { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); color: #fff; text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #d6e4f5; max-width: 54ch; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: #aebfd2; padding: 56px 0 28px; font-size: .94rem; }
.footer a { color: #dce8f6; }
.footer h4 { color: #fff; font-family: var(--font-body); font-size: 1rem; margin-bottom: 14px; }
.footer .grid { gap: 36px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #8aa0ba; }

/* ---------- Mailing form ----------
   Секцію додали спершу вручну на сторінці MSTIoE; перенесено сюди, щоб форма
   виглядала однаково в усіх конференцій і не тягла за собою інлайновий CSS. */
.mailing__form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}
.mailing__input {
  flex: 1 1 280px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .96rem;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
}
.mailing__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mailing__form .btn {
  flex: 0 0 auto;
  cursor: pointer;
}

/* ---------- Partners ---------- */
.partners__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  align-items: stretch;
}
.partners__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.partners__logo:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  text-decoration: none;
}
.partners__logo img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1);
  opacity: .78;
  transition: filter .15s, opacity .15s;
}
.partners__logo:hover img {
  filter: grayscale(0);
  opacity: 1;
}

@media (max-width: 860px) {
  .partners__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
  .partners__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .menu { position: absolute; top: 70px; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; padding: 10px; border-bottom: 1px solid var(--line); display: none; }
  .menu.open { display: flex; }
  .menu .btn { margin: 6px 0 0; text-align: center; }
  .nav__toggle { display: block; }
  .grid--2, .grid--3, .grid--4, .dates { grid-template-columns: 1fr; }
  .committee { columns: 1; }
}
