:root {
  --navy: #134275; --teal: #0e7a9b; --sky: #0b7bb0; --green: #047857;
  --bg: #f3f6fa; --ink: #16283a; --muted: #5b6b7b; --line: #dde5ee;
  --nav-w: 248px; --nav-w-small: 76px;
  --topbar-h: calc(72px + env(safe-area-inset-top, 0px));
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.45; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }


/* ============================================================
   SPLASH SCREEN
   ============================================================ */
.splash-container { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%); transition: opacity 0.6s ease-out, visibility 0.6s ease-out; }

.splash-container.fade-out {opacity: 0;visibility: hidden;pointer-events: none;}

.logo-container {display: flex;justify-content: center;margin-bottom: 10px;opacity: 0;transform: scale(0.5) rotateY(180deg);animation: logoAppear 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s forwards;}

.logo-container img {width: 200px;height: 200px;filter: drop-shadow(0 10px 30px rgba(30, 136, 199, 0.3));}

.text-container {text-align: center;display: inline-flex;flex-direction: column;align-items: center;}

.company-name {font-size: clamp(2.5rem, 8vw, 5rem);font-weight: 800;color: var(--navy); text-transform: uppercase;letter-spacing: 0.2rem;margin: .67em 0 8px;line-height: 1.1;opacity: 0;transform: translateY(30px);animation: slideUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 1s forwards;}

.word { display: inline-block; }

.tagline {margin: 0;line-height: 1.2;display: flex;justify-content: space-between;flex-wrap: wrap;width: 100%;font-size: clamp(1rem, 3vw, 1.8rem);font-weight: 300;color: var(--sky);text-transform: uppercase;}

.letter {display: inline-block;opacity: 0;animation: letterDrop 0.5s ease-out forwards;}


@keyframes logoAppear {
    from { opacity: 0; transform: scale(0.5) rotateY(180deg); }
    to   { opacity: 1; transform: scale(1) rotateY(0deg); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes letterDrop {
    from { opacity: 0; transform: translateY(-50px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* ---------- Header (stays at the top on every page) ---------- */
.topbar { position: sticky; top: 0; z-index: 15; height: var(--topbar-h); padding: env(safe-area-inset-top, 0px) 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; box-shadow: 0 2px 10px rgba(19, 66, 117, .1); }
.tb-left { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.welcome { font-size: 1.05rem; font-weight: 800; color: var(--navy); }
.topbar-title { font-size: .95rem; color: var(--navy); }
.tb-right { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1.2; }
.tb-date { font-size: .72rem; font-weight: 700; color: var(--muted); }
.tb-clock { font: 700 1.1rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; color: var(--sky); }
.tb-zone { font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }

/* ---------- Pages ---------- */
.page { display: none; max-width: 980px; margin: 0 auto; padding: 20px 16px calc(120px + env(safe-area-inset-bottom)); overflow-x: clip; }
.page.active { display: block; }
h1 { margin: 0 0 4px; text-align: center; font-size: 1.5rem; font-weight: 800; color: var(--teal); text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Bottom nav (phones) ---------- */
#nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: space-around;
  height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -4px 18px rgba(19, 66, 117, .14); }
.nav-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px; background: none; border: 0; font-family: inherit; text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 600; }
.nav-item.active { color: var(--teal); }
.nav-item.active svg { stroke-width: 2.6; }
.brand { flex: none; align-self: flex-start; margin-top: -30px; width: 78px; height: 78px; border-radius: 50%; background: #fff; border: 3px solid var(--sky);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(18, 160, 215, .35); text-decoration: none; }
.brand img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; padding: 4px; }
.brand-text, #collapse { display: none; }

/* ---------- Today ---------- */
#today { padding-top: 0; }
.today-head { position: sticky; top: var(--topbar-h); z-index: 10; margin: 0 -16px 8px; padding: 14px 16px 8px; background: var(--bg); }
.carousel { position: relative; max-width: 520px; margin: 0 auto; }
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; scrollbar-width: none; padding: 4px; }
.track::-webkit-scrollbar { display: none; }
.today-card { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 14px rgba(19, 66, 117, .1); }
.today-card .photo { flex: none; }
.photo { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--navy); color: #fff; font-weight: 800; font-size: .85rem; letter-spacing: .06em; padding: 5px 12px; border-radius: 8px; text-transform: uppercase; }
.dots { display: flex; justify-content: center; align-items: center; padding: 8px 0 4px; }
.dot { width: 28px; height: 32px; padding: 0; border: 0; background: none; display: grid; place-items: center; transition: width .3s; }
.dot::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: #c5d3e0; transition: width .3s, background .3s; }
.dot.on { width: 36px; }
.dot.on::before { width: 26px; background: var(--c); }
.today-info { flex: 1; display: flex; flex-direction: column; padding: 14px 18px 20px; }
.today-info .where { margin-bottom: 12px; }
.today-info .primary { margin-top: auto; align-self: center; }
.today-info h2 { margin: 0; font-size: 1.8rem; line-height: 1.1; font-weight: 800; color: var(--c); }
.topic { margin: 4px 0 8px; font-size: 1.15rem; font-weight: 700; }
.time { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--muted); font-weight: 700; }
.time span b { display: block; color: var(--muted); }
.where a { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; color: var(--sky); text-decoration: none; font-weight: 700; }
.where a span { display: block; color: var(--muted); font-weight: 400; font-size: .9rem; }
.where a:hover b { text-decoration: underline; }
.primary { margin-top: 12px; border: 0; border-radius: 8px; background: var(--c, var(--navy)); color: #fff; font-weight: 700; padding: 10px 22px; }

.empty { max-width: 640px; margin: 10px auto 0; text-align: center; }
.empty img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; object-fit: cover; border-radius: 18px; background: #fff; }
.empty img.fallback { object-fit: contain; padding: 24px; }
.empty h2 { margin: 16px 0 6px; color: var(--navy); }
.empty p { margin: 0 0 14px; color: var(--muted); }
.empty a.primary { display: inline-block; text-decoration: none; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 10px; }
.cal-head h2 { margin: 0; font-size: 1.3rem; color: var(--navy); }
.cal-head button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 1.5rem; line-height: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekdays span { text-align: center; font-weight: 700; font-size: .8rem; color: var(--muted); padding: 4px 0; }
.cell { min-height: 62px; padding: 5px 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-align: left; display: flex; flex-direction: column; gap: 3px; color: var(--ink); }
.cell.blank { background: transparent; border: 0; }
.cell .num { font-weight: 700; font-size: .9rem; }
.cell.today { border: 2px solid var(--sky); }
.cell.today .num { color: var(--sky); }
button.cell.has:hover { box-shadow: 0 2px 10px rgba(19, 66, 117, .18); }
.chip { display: flex; align-items: center; gap: 5px; min-width: 0; }
.chip i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip b { display: none; font-size: .75rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell.has { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
.cell.has .num { flex: 0 0 100%; }
.hint { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 14px; }
#calendar { touch-action: pan-y pinch-zoom; }
#cal-grid.from-right { animation: cal-in-right .3s ease-out; }
#cal-grid.from-left  { animation: cal-in-left  .3s ease-out; }

/* ---------- Modal ---------- */
dialog { border: 0; padding: 0; width: 100%; max-width: 100%; max-height: 88vh; margin: auto 0 0; border-radius: 22px 22px 0 0; background: var(--bg); color: var(--ink); overflow: auto; }
dialog::backdrop { background: rgba(10, 25, 45, .55); }
dialog[open] { animation: sheet-up .45s cubic-bezier(.22, .9, .3, 1); }
dialog[open]::backdrop { animation: fade-in .35s ease; }
dialog.closing { animation: sheet-down .28s ease-in forwards; }
dialog.closing::backdrop { animation: fade-out .28s ease forwards; }
.modal-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.modal-bar h2 { margin: 0; font-size: 1.1rem; color: var(--navy); }
#modal-close { border: 0; background: var(--bg); width: 44px; height: 44px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--navy); }
#modal-body { padding: 14px 14px 22px; display: grid; gap: 14px; }
.event { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 8px rgba(19, 66, 117, .1); }
.event header { background: var(--c); color: #fff; padding: 14px 16px; }
.event header small { display: block; font-size: .85rem; opacity: .9; font-weight: 600; }
.event header h3 { margin: 2px 0 4px; font-size: 1.4rem; line-height: 1.15; }
.event header p { margin: 0; font-weight: 600; }
.event .body { padding: 14px 16px 18px; }
.event .photo { aspect-ratio: 16 / 9; }
.desc { margin: 12px 0 0; white-space: pre-line; }
.contact-panel { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.contact-panel a { flex: 1 1 150px; text-align: center; text-decoration: none; font-weight: 700; padding: 10px 12px; border-radius: 8px; border: 2px solid var(--c); color: var(--c); }
.contact-panel[hidden] { display: none; }

/* ---------- Locations (accordion) and contacts ---------- */
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
.card { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 1px 8px rgba(19, 66, 117, .08); }
.card h3 { margin: 0 0 4px; font-size: 1.1rem; color: var(--navy); }
.card p { margin: 0 0 10px; color: var(--muted); }
.card a.link { display: inline-flex; align-items: center; gap: 6px; color: var(--sky); font-weight: 700; text-decoration: none; }
.card a.link:hover { text-decoration: underline; }
.contact-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; }
.contact-row:first-of-type { border-top: 0; }
.contact-row small { display: block; color: var(--muted); }
.contact-row strong { font-size: 1.15rem; color: var(--navy); }
.contact-row svg { color: var(--sky); }
.acc { margin-top: 14px; }
.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 16px; background: #fff; border-radius: 14px; box-shadow: 0 1px 8px rgba(19, 66, 117, .08); font-weight: 800; font-size: 1.1rem; color: var(--navy); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ''; width: 10px; height: 10px; margin-right: 4px; border-right: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(45deg); transition: transform .2s; }
.acc[open] summary::after { transform: rotate(-135deg); }
.acc[open] summary { margin-bottom: 12px; }

/* ---------- Animations ---------- */
@keyframes sheet-up     { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down   { from { transform: none; } to { transform: translateY(100%); } }
@keyframes pop-up       { from { opacity: 0; transform: translateY(80px); } to { opacity: 1; transform: none; } }
@keyframes pop-down     { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(50px); } }
@keyframes fade-in      { from { opacity: 0; } }
@keyframes fade-out     { to { opacity: 0; } }
@keyframes cal-in-right { from { opacity: 0; transform: translateX(40px); } }
@keyframes cal-in-left  { from { opacity: 0; transform: translateX(-40px); } }

/* ---------- Tablet and up ---------- */
@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .chip b { display: block; }
  .cell { min-height: 92px; }
  .carousel { margin: 0; }                     /* a single event sits at the start, not the center */
  dialog { max-width: 560px; margin: auto; border-radius: 22px; }
  dialog[open] { animation-name: pop-up; }
  dialog.closing { animation-name: pop-down; }
}

/* ---------- Desktop: side panel, events side by side ---------- */
@media (min-width: 900px) {
  #nav { inset: 0 auto 0 0; width: var(--nav-w); height: auto; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px;
    padding: 16px 12px; border-radius: 0; box-shadow: 2px 0 18px rgba(19, 66, 117, .1); transition: width .2s; }
  .brand { order: -1; align-self: stretch; margin: 0 0 14px; width: auto; height: auto; border: 0; border-radius: 12px; box-shadow: none; justify-content: flex-start; gap: 12px; padding: 4px; }
  .brand img { width: 48px; height: 48px; flex: none; padding: 0; }
  .brand-text { display: block; font-weight: 800; color: var(--navy); line-height: 1.1; font-size: 1.15rem; }
  .brand-text small { display: block; font-weight: 600; color: var(--teal); font-size: .75rem; }
  .nav-item { flex: none; flex-direction: row; gap: 14px; padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
  .nav-item:hover { background: var(--bg); }
  .nav-item.active { background: color-mix(in srgb, var(--sky) 14%, #fff); }
  #collapse { display: flex; align-items: center; gap: 14px; margin-top: auto; padding: 12px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; }
  #collapse:hover { background: var(--bg); }
  #collapse svg { transition: transform .2s; }
  main { margin-left: var(--nav-w); transition: margin-left .2s; }
  .page { padding-bottom: 40px; }

  .carousel { max-width: none; }
  .track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; scroll-snap-type: none; }

  body.collapsed #nav { width: var(--nav-w-small); }
  body.collapsed main { margin-left: var(--nav-w-small); }
  body.collapsed .label, body.collapsed .brand-text { display: none; }
  body.collapsed .nav-item, body.collapsed #collapse { justify-content: center; padding-left: 0; padding-right: 0; }
  body.collapsed .brand { justify-content: center; }
  body.collapsed #collapse svg { transform: rotate(180deg); }
  .dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  dialog, dialog::backdrop, #cal-grid { animation: none !important; }
}

/* ---------- News ---------- */
.news-list { display: grid; gap: 16px; max-width: 640px; margin: 14px auto 0; }
.news-card { --c: var(--teal); background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 14px rgba(19, 66, 117, .1); }
.news-photo { aspect-ratio: 4 / 3; }
.news-info { padding: 16px 18px 20px; }
.news-date { margin: 0 0 4px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.news-info h2 { margin: 0 0 8px; font-size: 1.4rem; line-height: 1.15; color: var(--navy); }
.news-text { margin: 0; white-space: pre-line; }
.news-contact { margin: 14px 0 0; font-weight: 700; color: var(--navy); }

/* ---------- Red dot on News, and the More menu ---------- */
.ico { position: relative; display: grid; place-items: center; }
.dot-new { position: absolute; top: -3px; right: -5px; width: 11px; height: 11px; border-radius: 50%; background: #e11d48; border: 2px solid #fff; }
.dot-new[hidden] { display: none; }
#more-menu { position: fixed; left: 12px; right: 12px; bottom: calc(104px + env(safe-area-inset-bottom)); z-index: 19; display: grid; gap: 4px; padding: 8px;
  background: #fff; border-radius: 20px; box-shadow: 0 8px 30px rgba(19, 66, 117, .25); animation: sheet-up .3s cubic-bezier(.22, .9, .3, 1); }
#more-menu[hidden] { display: none; }
.more-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; text-decoration: none; font-weight: 700; color: var(--navy); }
.more-link.active { background: color-mix(in srgb, var(--sky) 14%, #fff); color: var(--teal); }
#scrim { position: fixed; inset: 0; z-index: 18; background: rgba(10, 25, 45, .45); }
#scrim[hidden] { display: none; }

/* ---------- Locations and Contacts: side panel on desktop, More drawer on phones ---------- */
.desk-only { display: none; }
@media (min-width: 900px) {
  .desk-only { display: flex; }
  #more-btn, #more-menu, #scrim { display: none !important; }
}

/* ---------- Contacts (one card per contact) ---------- */
.card .role, .card .hours { margin: 0; color: var(--muted); font-size: .9rem; }
.card a.contact-row:first-of-type { margin-top: 10px; border-top: 1px solid var(--line); }

.note { grid-column: 1 / -1; margin: 8px 0; text-align: center; color: var(--muted); }

/* ---------- Tooltips ---------- */
#tip { position: fixed; z-index: 10000; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: .85rem; font-weight: 600; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(10, 25, 45, .3); }
#tip[hidden] { display: none; }