/* ═══════════════════════════════════════════════
   SOLAR — shared styles (home + agenda)
   ═══════════════════════════════════════════════ */

/* ═══════════ RESET ═══════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { min-height: 100dvh; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }

/* ═══════════ TOKENS ═══════════ */
:root {
  --canvas:   #DAD5D0;
  --canvas-2: #E4E0DB;
  --navy:     #1d4458;
  --navy-dk:  #143345;
  --orange:   #f69320;
  --orange-lt:#fbaf3c;
  --sky:      #00aeef;
  --teal:     #58a7b1;
  --white:    #ffffff;

  /* organ colors, from the logo illustration */
  --brain:    #4a8fa0;
  --liver:    #c86040;
  --heart:    #b05040;
  --gut:      #d87090;

  --line:     rgba(29,68,88,.14);
  --gap:      clamp(10px, 1.563vw, 30px);
  --gutter:   clamp(22px, 5vw, 72px);
  --maxw:     1240px;
  --r:        24px;
  --r-sm:     14px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 75px;   /* sticky header once scrolled; agenda pills sit under it */

  --font-round: "M PLUS Rounded 1c", system-ui, sans-serif;
  --font-body:  "Hanken Grotesk", system-ui, -apple-system, sans-serif;
}

/* ═══════════ BODY ═══════════ */
body {
  background: var(--canvas);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════ LAYOUT ═══════════ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 8vw, 110px) 0; }

/* ═══════════ REVEAL ═══════════ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ═══════════ HEADER ═══════════ */
/* Original Duda layout: centred logo, nav split either side, dot separators. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(218,213,208,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
  padding-top: env(safe-area-inset-top);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
}
.header-logo img { height: 68px; width: auto; transition: height .3s var(--ease); }
.site-header.scrolled .header-logo img { height: 50px; }
.header-nav { display: flex; align-items: center; }
.nav-left  { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }
.header-nav a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 10px 4px;
  transition: color .18s var(--ease);
}
.header-nav a + a::before {
  content: "·";
  display: inline-block;
  margin: 0 clamp(8px, 1.2vw, 16px);
  color: rgba(29,68,88,.45);
}
.header-nav a:hover,
.header-nav a[aria-current="page"] { color: var(--orange); }
.header-nav a + a:hover::before { color: rgba(29,68,88,.45); }

.menu-btn { display: none; }
.mobile-menu { display: none; }

@media (max-width: 900px) {
  :root { --header-h: 69px; }
  .header-inner { grid-template-columns: 44px 1fr 44px; padding: 10px var(--gutter); }
  .header-nav { display: none; }
  .header-logo { grid-column: 2; justify-self: center; }
  .header-logo img, .site-header.scrolled .header-logo img { height: 48px; }
  .menu-btn {
    grid-column: 3;
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    color: var(--navy);
  }
  .menu-btn svg { width: 28px; height: 28px; }
  .menu-btn .i-close { display: none; }
  .menu-btn[aria-expanded="true"] .i-open { display: none; }
  .menu-btn[aria-expanded="true"] .i-close { display: block; }
  .mobile-menu:not([hidden]) {
    display: block;
    border-top: 1px solid var(--line);
    padding: 8px var(--gutter) calc(20px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--header-h));
    background: var(--canvas);
    overflow-y: auto;
  }
  .mobile-menu a {
    display: block;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu a[aria-current="page"] { color: var(--orange); }
  .mobile-menu .mm-cta { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
  .mobile-menu .mm-cta a { border: 0; text-transform: none; letter-spacing: 0; font-size: 15px; }
  .mobile-menu .mm-cta .btn { display: flex; font-size: 16px; }
  .mobile-menu .mm-phone { text-align: center; color: rgba(29,68,88,.7); font-size: 15px; }
}

[hidden] { display: none !important; }
main [id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ═══════════ BUTTONS ═══════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 14.5px;
  padding: 13px 26px;
  border-radius: 999px;
  transition: transform .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
  appearance: none;
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: var(--orange-lt); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dk); }
.btn-outline { border: 2px solid var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ═══════════ FOOTER ═══════════ */
.site-footer {
  margin-top: clamp(64px, 8vw, 110px);
  border-top: 1px solid var(--line);
  padding: 44px 0 calc(36px + env(safe-area-inset-bottom));
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-logo img { height: 40px; width: auto; }
.footer-tag { font-size: 14px; color: rgba(29,68,88,.55); max-width: 40ch; }
.footer-links { display: flex; gap: 22px; }
.footer-links a {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 13px;
  color: rgba(29,68,88,.6);
  transition: color .18s var(--ease);
}
.footer-links a:hover { color: var(--orange); }

/* ═══════════ TYPE HELPERS ═══════════ */
/* page title on every inner page (agenda, recordings, faculty, sponsors, abstracts, contact) */
.ag-h1 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}
.h2 {
  font-family: var(--font-round);
  font-weight: 900;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.lede { font-size: clamp(16px, 1.6vw, 18px); color: rgba(29,68,88,.66); max-width: 58ch; }

/* ═══════════ FORMS + CONTACT DETAILS (home, contact) ═══════════ */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.updates { background: var(--canvas-2); border: 1px solid var(--line); padding: clamp(24px, 3.5vw, 40px); }
.updates-h { font-family: var(--font-body); font-weight: 700; font-size: clamp(22px, 2.3vw, 27px); line-height: 1.25; margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.field b { color: #c0392b; font-weight: 700; }
.field input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* ≥16px stops iOS zoom on focus */
  color: var(--navy);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid rgba(29,68,88,.45);
  padding: 8px 2px;
  border-radius: 0;
  min-height: 44px;
}
.field input:focus { outline: none; border-bottom-color: var(--orange); }
.field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--navy); background: transparent;
  border: 0; border-bottom: 1.5px solid rgba(29,68,88,.45); padding: 8px 2px; border-radius: 0; resize: vertical; min-height: 96px;
}
.field textarea:focus { outline: none; border-bottom-color: var(--orange); }
.form-note { font-size: 13px; color: rgba(29,68,88,.7); margin-top: 12px; }
.form-note a { text-decoration: underline; }
.updates-form .btn { margin-top: 6px; text-transform: uppercase; min-width: 160px; }
.updates-form .btn[disabled] { opacity: .6; pointer-events: none; }
.form-error { margin-top: 14px; color: #a52a1a; font-size: 14px; }
.form-error a { text-decoration: underline; }
.updates-done p { color: rgba(29,68,88,.8); }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 26px; }
.contact-list li { display: flex; align-items: center; gap: 18px; }
.contact-list a { line-height: 1.45; font-size: 16px; }
.contact-list a:hover strong { color: var(--orange); }
.contact-list .cl { font-size: 14px; color: rgba(29,68,88,.75); }
.ci {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 6px;
  background: var(--navy);
  color: var(--orange);
  display: grid; place-items: center;
}
.ci svg { width: 26px; height: 26px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }



/* "2027 agenda coming soon!" under a past year's page title (bin/build.mjs pastYear) */
.soon {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
}
