/* CMEET 2027 — Congress on Mechanical Engineering and Emerging Technologies
   Shared stylesheet. Colours and type are set as tokens below. */

:root {
  --navy: #0E2A4E;
  --navy-deep: #091D38;
  --gold: #C9A227;
  --gold-soft: #F3E7BF;
  /* Conference colours: logo colour (accents, text) and fill colour (blocks with white text) */
  --aris: #03205C;
  --aris-fill: #1F3F8F;   /* lighter than the logo so it stands out on the navy hero */
  --gts: #1B7A2D;
  --gts-text: #1B7A2D;
  --emsm: #B94A08;
  --emsm-text: #B94A08;
  --ink: #1A2433;
  --muted: #566276;
  --line: #D8DFE9;
  --mist: #F1F4F8;
  --white: #FFFFFF;

  --display: "Archivo", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --body: "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--aris); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-stretch: 112%;
  line-height: 1.12;
  color: var(--navy);
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1.1em; max-width: 72ch; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: .35em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--navy-deep); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* ---------- Header ---------- */
.tri { display: flex; height: 5px; }
.tri span { flex: 1; }
.tri .a { background: var(--aris); } .tri .g { background: var(--gts); } .tri .e { background: var(--emsm); }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy); }
.brand img { width: 84px; }
.brand-text { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: 1.2rem; line-height: 1; letter-spacing: .01em; }
.brand-text small { display: block; white-space: nowrap; font-stretch: 100%; font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: 0; margin-top: .3rem; }

.nav-toggle { display: none; white-space: nowrap; flex: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; font: 600 .95rem var(--body); color: var(--navy); cursor: pointer; }
.nav-toggle svg { vertical-align: -3px; margin-right: .35rem; }

.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; align-items: center; }
.main-nav li { margin: 0; position: relative; }
.main-nav a, .main-nav button.sub-toggle {
  display: block; white-space: nowrap; padding: .55rem .62rem; font: 600 .93rem/1.2 var(--body); color: var(--ink);
  text-decoration: none; border-radius: var(--radius); background: none; border: 0; cursor: pointer;
}
.main-nav a:hover, .main-nav button.sub-toggle:hover { background: var(--mist); color: var(--navy); }
.main-nav a[aria-current="page"], .main-nav .has-sub.is-active > button { color: var(--navy); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.main-nav .cta { background: var(--navy); color: var(--white); margin-left: .4rem; }
.main-nav .cta:hover { background: var(--navy-deep); color: var(--white); }
.main-nav .cta[aria-current="page"] { box-shadow: none; border-radius: var(--radius); background: var(--gold); color: var(--navy-deep); }
.sub-toggle::after { content: ""; display: inline-block; width: .42em; height: .42em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: .45em; vertical-align: .2em; }

.submenu { list-style: none; margin: 0; padding: .4rem; position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px -12px rgba(14,42,78,.35); display: none; }
.has-sub.open > .submenu { display: block; }
.submenu a { font-weight: 500; padding: .55rem .75rem; }
.submenu .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .55rem; vertical-align: .05em; }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); max-height: calc(100vh - 77px); overflow-y: auto; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; }
  .main-nav a, .main-nav button.sub-toggle { width: 100%; text-align: left; padding: .8rem .5rem; }
  .main-nav a[aria-current="page"], .main-nav .has-sub.is-active > button { box-shadow: inset 3px 0 0 var(--gold); }
  .submenu { position: static; box-shadow: none; border: 0; border-left: 1px solid var(--line); margin-left: .6rem; border-radius: 0; padding: 0 0 0 .4rem; }
  .main-nav .cta { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Hero (home) ---------- */
.hero { background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
.hero::before { /* faint engineering grid */
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: linear-gradient(var(--white) 1px, transparent 1px), linear-gradient(90deg, var(--white) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero h1 { color: var(--white); margin-bottom: .45em; }
.hero .host { color: var(--gold); font-weight: 600; margin-bottom: 1.1rem; }
.hero .when { font-size: 1.15rem; margin-bottom: 2rem; color: #DCE4EF; }
.hero .when strong { color: var(--white); }

.btn { display: inline-block; padding: .85rem 1.35rem; font: 700 .98rem/1.1 var(--body); border-radius: var(--radius); text-decoration: none; border: 2px solid transparent; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #DDB63A; color: var(--navy-deep); }
.btn-line { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-line:hover { border-color: var(--white); background: rgba(255,255,255,.08); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Parallel lanes graphic */
.lanes { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 1rem; }
.lanes-days { display: grid; grid-template-columns: 5.2rem repeat(3, 1fr); gap: .4rem; margin-bottom: .55rem; font-size: .8rem; color: #B9C6D8; }
.lanes-days span:not(:first-child) { border-left: 1px dashed rgba(255,255,255,.25); padding-left: .5rem; }
.lanes-days b { display: block; color: var(--white); font-family: var(--display); font-stretch: 112%; font-size: 1.05rem; }
.lane { display: grid; grid-template-columns: 5.2rem 1fr; gap: .4rem; align-items: stretch; margin-bottom: .45rem; text-decoration: none; color: var(--white); }
.lane:last-child { margin-bottom: 0; }
.lane-tag { display: flex; align-items: center; font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: 1.05rem; letter-spacing: .03em; }
.lane-bar { border-radius: 5px; padding: .7rem .85rem; display: flex; align-items: center; gap: .7rem; min-height: 64px; transition: transform .15s ease; }
.lane-bar img { width: auto; height: 36px; flex: none; }
.lane-bar span { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.lane:hover .lane-bar { transform: translateX(4px); }
.lane.aris .lane-bar { background: var(--aris-fill); }
.lane.gts .lane-bar { background: var(--gts); }
.lane.emsm .lane-bar { background: var(--emsm); }
.lane.shared .lane-bar { background: transparent; border: 1px dashed var(--gold); min-height: 44px; color: var(--gold-soft); }
.lane.shared .lane-tag { color: var(--gold); font-size: .8rem; font-stretch: 100%; font-weight: 700; letter-spacing: 0; }
.lanes-note { font-size: .78rem; color: #9FB0C6; margin: .7rem 0 0; }

@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }
@media (max-width: 460px) {
  .lanes-days, .lane { grid-template-columns: 3.6rem 1fr; }
  .lanes-days { grid-template-columns: 3.6rem repeat(3, 1fr); }
  .lane-tag { font-size: .85rem; }
  .lane-bar img { height: 28px; }
}

/* ---------- Page banner (inner pages) ---------- */
.banner { background: var(--navy); color: var(--white); padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem); position: relative; }
.banner h1 { color: var(--white); font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: .35em; }
.banner p { color: #D5DEEA; font-size: 1.12rem; margin: 0; }
.crumbs { font-size: .85rem; margin-bottom: 1rem; color: #AFC0D6; }
.crumbs a { color: #D5DEEA; }
.banner .crumbs + .banner-track { margin-top: 1.6rem; }
.banner-track { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.2rem, 4vw, 2.5rem); align-items: center; }
.banner-track img { width: clamp(90px, 14vw, 150px); }
.banner.t-aris { background: var(--aris-fill); }
.banner.t-gts { background: var(--gts); }
.banner.t-emsm { background: var(--emsm); }
.banner .acr { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 1rem; letter-spacing: .12em; color: rgba(255,255,255,.8); margin-bottom: .4rem; display: block; }
@media (max-width: 560px) { .banner-track { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.alt { background: var(--mist); }
.section-head { max-width: 760px; margin-bottom: 2.2rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.facts { margin: 0; display: grid; gap: 0; border-top: 2px solid var(--navy); }
.facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; color: var(--ink); }

/* Conference blocks */
.confs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.conf { background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--c); padding: 1.6rem 1.5rem 1.5rem; display: flex; flex-direction: column; }
.conf.aris { --c: var(--aris); --ct: var(--aris); }
.conf.gts { --c: var(--gts); --ct: var(--gts-text); }
.conf.emsm { --c: var(--emsm); --ct: var(--emsm-text); }
.conf img { height: 104px; width: auto; align-self: flex-start; margin-bottom: 1.3rem; }
.conf .acr { font-family: var(--display); font-stretch: 125%; font-weight: 800; color: var(--ct); letter-spacing: .06em; font-size: .95rem; }
.conf h3 { color: var(--ct); margin: .25rem 0 .7rem; }
.conf p { color: var(--muted); font-size: .98rem; }
.conf ul { margin: 0 0 1.4rem; padding-left: 1.1em; font-size: .95rem; }
.conf li::marker { color: var(--c); }
.conf .more { margin-top: auto; font-weight: 700; color: var(--ct); }
@media (max-width: 900px) { .confs { grid-template-columns: 1fr; } }

/* Timeline (a real sequence, so numbered) */
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--navy); }
.timeline li { counter-increment: step; padding: 1.1rem 1rem 1.2rem 0; margin: 0; position: relative; }
.timeline li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: var(--white); font: 700 .9rem var(--display); margin: -2.15rem 0 .8rem; }
.timeline .what { font-weight: 700; color: var(--navy); display: block; line-height: 1.3; }
.timeline .date { color: var(--muted); font-size: .95rem; }
.timeline li.final::before { background: var(--gold); color: var(--navy-deep); }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--navy); margin-left: 1rem; }
  .timeline li { padding: 0 0 1.5rem 1.8rem; }
  .timeline li::before { position: absolute; left: -1.05rem; top: -.15rem; margin: 0; }
  .timeline li:last-child { padding-bottom: 0; }
}

.tba { display: inline-block; background: var(--gold-soft); color: #6B5410; font-size: .78rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; vertical-align: .1em; }
.placeholder { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; color: var(--muted); background: var(--white); }
.placeholder p:last-child { margin-bottom: 0; }

/* Generic content blocks */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; background: var(--white); }
.panel h3 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul li::marker { color: var(--gold); }

.themes { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.themes li { padding: 1rem 0 1rem 1.4rem; border-bottom: 1px solid var(--line); margin: 0; position: relative; }
.themes li::before { content: ""; position: absolute; left: 0; top: 1.45rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c, var(--gold)); }
.themes strong { color: var(--navy); }

.side-box { background: var(--mist); border-radius: var(--radius); padding: 1.5rem; }
.side-box h3 { font-size: 1.1rem; }
.side-box dl { margin: 0; }
.side-box dt { font-weight: 700; color: var(--navy); font-size: .9rem; }
.side-box dd { margin: 0 0 .9rem; }

/* People cards (keynotes, committees) */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.person { text-align: left; }
.person .photo { aspect-ratio: 4 / 5; background: var(--mist); border-radius: var(--radius); display: grid; place-items: center; margin-bottom: .9rem; color: #A7B3C4; border: 1px dashed var(--line); }
.person h3 { font-size: 1.08rem; margin-bottom: .2rem; }
.person p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .97rem; }
th, td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy); color: var(--white); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td.day { font-weight: 700; color: var(--navy); white-space: nowrap; }
td.c-aris { border-left: 4px solid var(--aris); }
td.c-gts { border-left: 4px solid var(--gts); }
td.c-emsm { border-left: 4px solid var(--emsm); }

/* Sponsorship tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.5rem; display: flex; flex-direction: column; background: var(--white); position: relative; }
.tier .name { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: 1.25rem; color: var(--m); }
.tier .price { font-family: var(--display); font-weight: 700; font-size: 2.1rem; color: var(--navy); margin: .3rem 0 1.2rem; line-height: 1; }
.tier .price small { font-size: .95rem; font-weight: 600; color: var(--muted); margin-right: .3rem; }
.tier h4 { font-size: .95rem; margin: 1rem 0 .3rem; color: var(--navy); }
.tier p { font-size: .96rem; margin: 0; color: var(--muted); }
.tier::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 6px; background: var(--m); border-radius: var(--radius) var(--radius) 0 0; }
.tier.bronze { --m: #A8642A; }
.tier.silver { --m: #7D8896; }
.tier.gold { --m: #B08A12; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }

/* Contact strip */
.contact-strip { background: var(--navy); color: #D5DEEA; border-top: 5px solid var(--gold); }
.contact-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 2.2rem; padding-bottom: 2.2rem; }
.contact-strip h2 { color: var(--white); margin: 0 0 .3rem; font-size: 1.6rem; }
.contact-strip p { margin: 0; }
.contact-strip a:not(.btn) { color: var(--white); }

.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.contact-card { border-left: 4px solid var(--gold); padding: .3rem 0 .3rem 1.1rem; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.contact-card p { margin: 0; color: var(--muted); }

.map-frame { border: 0; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); background: var(--mist); }

/* Track switcher on conference pages */
.switcher { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.switcher a { display: flex; align-items: center; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.3; }
.switcher a:hover { border-color: var(--navy); }
.switcher a[aria-current="page"] { background: var(--mist); border-color: var(--navy); }
.switcher img { width: 44px; flex: none; }
@media (max-width: 760px) { .switcher { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #C3CFDF; font-size: .95rem; }
.site-footer a { color: #E3EAF3; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2rem; padding: 3.5rem 0 2.5rem; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand img { width: 62px; flex: none; }
.footer-brand strong { display: block; color: var(--white); font-family: var(--display); font-stretch: 112%; font-size: 1.05rem; line-height: 1.3; margin-bottom: .4rem; }
.site-footer h4 { color: var(--white); font-size: .95rem; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.footer-base { border-top: 1px solid rgba(255,255,255,.12); padding: 1.2rem 0 1.6rem; font-size: .85rem; color: #8FA1B8; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

@media print {
  .site-header, .site-footer, .contact-strip { display: none; }
  .hero, .banner { background: none !important; color: var(--ink); }
  .hero h1, .banner h1, .banner p { color: var(--navy); }
}
@media (max-width: 400px) { .brand img { width: 64px; } .brand-text { font-size: 1.05rem; } }
@media (max-width: 520px) { .facts div { grid-template-columns: 6.5rem 1fr; } }
