/* Toastmasters brand colors: Loyal Blue, True Maroon, Cool Gray, Happy Yellow */
:root {
  --blue: #004165;
  --blue-dark: #00304b;
  --maroon: #772432;
  --gray: #a9b2b1;
  --yellow: #f2df74;
  --ink: #1d2327;
  --muted: #56616a;
  --line: #dde2e4;
  --bg: #ffffff;
  --bg-soft: #f4f6f7;
  --radius: 10px;
  --wrap: 1100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 'Source Sans 3', system-ui, sans-serif;
}
h1, h2, h3, .brand, .btn, .eyebrow, .tile-num { font-family: Montserrat, system-ui, sans-serif; }
h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.15; margin: 0 0 .5rem; color: var(--blue); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.5rem); line-height: 1.25; margin: 0 0 .6rem; color: var(--blue); }
h3 { font-size: 1.08rem; line-height: 1.3; margin: 0 0 .4rem; }
a { color: var(--blue); }
a:hover { color: var(--maroon); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--yellow); padding: 8px 12px; z-index: 10; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: #333d44; max-width: 62ch; margin: 0 0 1rem; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--maroon); margin: 0 0 .4em; }
.plain { list-style: none; padding: 0; margin: .5em 0; }
.plain li { padding: .2em 0; }

/* Header */
.site-header { background: var(--blue); color: #fff; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
.brand span { display: block; font-size: .75rem; font-weight: 600; color: var(--yellow); letter-spacing: .04em; }
.brand:hover { color: #fff; }
.site-header nav ul { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.menu-toggle { display: none; }
.site-header nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--yellow); color: #fff; }

/* Buttons */
.btn { display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid transparent; }
.btn-maroon { background: var(--maroon); color: #fff; }
.btn-maroon:hover { background: #5e1c28; color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--blue-dark); }
.btn-yellow:hover { background: #fff; color: var(--blue-dark); }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--blue); }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.2em; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--bg-soft), #fff); padding: 48px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero-photo { margin: 0; }
.hero-photo img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 65, 101, .18); max-height: 560px; width: 100%; object-fit: cover; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fact { background: var(--bg-soft); border-top: 4px solid var(--maroon); border-radius: var(--radius); padding: 18px 20px; }
.fact h2 { margin: 0 0 .4em; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.fact p { margin: .3em 0; }

.next-preview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border: 1px solid var(--line); border-left: 6px solid var(--yellow); border-radius: var(--radius); }
.next-preview h2 { margin: 0 0 .2em; }
.next-preview p { margin: 0; }

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.two-col .card { margin-top: 0; }

.map-wrap { margin-top: 2.5rem; }
.map-wrap iframe { display: block; width: 100%; height: 320px; border: 0; }

/* CTA band */
.band { padding: 40px 0; }
.band-blue { background: var(--blue); color: #fff; }
.band-blue h2 { color: #fff; margin-top: 0; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta p { margin: 0; max-width: 60ch; }
.cta .cta-buttons { margin-top: 0; }

/* Inner pages */
main > section + section, main > section + section.wrap, main > div + section.wrap { margin-top: 2.5rem; }
.page-head { padding-top: 2.5rem; }
.jump-wrap + .page-head { padding-top: 1.5rem; }
.hero + section, .hero + section.wrap { margin-top: 2rem; }
.prose > * { max-width: 760px; }
.prose > * + * { margin-top: 1rem; }
.prose ul { padding-left: 1.2em; }
main > section > :last-child { margin-bottom: 0; }
main > section:not(.band):last-of-type { margin-bottom: 3.5rem; }
.band { margin-top: 3.5rem; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { font-family: Montserrat, system-ui, sans-serif; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 2px solid var(--blue); }
.agenda td ul { margin: .3em 0 0; padding-left: 1.1em; }
.agenda td p { margin: .2em 0 0; }
.agenda .time { font-weight: 700; color: var(--maroon); white-space: nowrap; width: 4.5em; }
.agenda .who { font-weight: 600; width: 11em; }
.agenda tr.break td { background: var(--bg-soft); color: var(--muted); padding: 6px 12px; }
.simple tbody th { font-weight: 600; white-space: nowrap; }
.open { color: var(--maroon); font-weight: 600; }

.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 1rem 0 0; }
.roles > div { background: var(--bg-soft); border-radius: var(--radius); padding: 14px 16px; }
.roles dt { font-weight: 700; color: var(--blue); }
.roles dd { margin: .3em 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--yellow); color: var(--blue-dark); font-weight: 600; padding: 6px 12px; border-radius: 999px; font-size: .95rem; }
.note { background: var(--bg-soft); border-left: 4px solid var(--blue); padding: 12px 16px; border-radius: 4px; margin: 1.25rem 0 0; }
.two-col > .note { grid-column: 1 / -1; }

/* Stats */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { background: var(--bg-soft); border-radius: var(--radius); padding: 16px 18px; }
.tile-num { display: block; font-size: 2rem; font-weight: 700; color: var(--blue); line-height: 1.1; }
.tile-label { color: var(--muted); font-size: .95rem; }
.chart { max-width: 100%; height: auto; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .bar-members { fill: var(--blue); }
.chart .bar-guests { fill: var(--yellow); }
.chart .bar-value { font: 700 13px Montserrat, sans-serif; fill: var(--ink); }
.chart .bar-label { font: 400 12px 'Source Sans 3', sans-serif; fill: var(--muted); }
.legend { font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 10px; }
.swatch:first-child { margin-left: 0; }
.swatch-members { background: var(--blue); }
.swatch-guests { background: var(--yellow); }
.stats-table td { text-align: center; font-variant-numeric: tabular-nums; }
.stats-table thead th:not(:first-child) { text-align: center; }
.zero { color: #b8c0c4; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.meeting-card h3 { color: var(--blue); }
.awards li span { display: inline-block; min-width: 9.5em; color: var(--muted); font-size: .92rem; }

/* Members */
.member-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.member { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.member img, .avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; object-fit: cover; object-position: 50% 22%; }
.avatar { display: grid; place-items: center; background: var(--blue); color: var(--yellow); font: 700 1.1rem Montserrat, sans-serif; }
.member p { margin: 0; }
.member-name { font-weight: 700; }
.member-office { color: var(--maroon); font-size: .92rem; font-weight: 600; }
.member-links { font-size: .9rem; }

/* FAQ */
.faq > * { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; color: var(--blue); }
.faq details p { margin: .6em 0 0; }

/* Footer */
.site-footer { background: var(--blue-dark); color: #d5e1e8; padding: 36px 0 24px; font-size: .95rem; }
.band + .site-footer, main + .site-footer { margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer-name { font-weight: 700; color: #fff; }
.disclaimer { font-size: .8rem; color: #9fb4c1; margin-top: 20px; }

.event-preview { border-left-color: var(--maroon); }
.event-card img { border-radius: 6px; margin: .6em 0; }
.event-card h3 { color: var(--blue); }

/* Jump links within a page */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 72px; }
/* sticks to the top of the screen once you scroll past it */
/* in-page menu bar: sticks to the top and marks the section you're in */
.jump-wrap {
  position: sticky; top: 0; z-index: 25;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); transition: box-shadow .2s ease;
}
.jump-wrap.stuck { box-shadow: 0 4px 14px rgba(0, 65, 101, .08); }
.jump { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.jump::-webkit-scrollbar { display: none; }
.jump a {
  flex: none; padding: 14px 0 12px; border: 0; border-bottom: 3px solid transparent;
  font: 600 .95rem Montserrat, system-ui, sans-serif; color: var(--muted);
  text-decoration: none; background: none; border-radius: 0;
}
.jump a:hover { color: var(--blue); background: none; border-bottom-color: var(--line); }
.jump a.current { color: var(--blue); border-bottom-color: var(--maroon); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Mobile menu */
@media (max-width: 820px) {
  .header-inner { flex-wrap: nowrap; gap: 8px 12px; }
  .brand { font-size: 1.05rem; white-space: nowrap; }
  .brand span { font-size: .7rem; }
  .js-nav .menu-toggle {
    display: flex; align-items: center; gap: 10px; white-space: nowrap;
    cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    position: relative; z-index: 30;
    background: none; color: #fff; font: 700 .95rem Montserrat, system-ui, sans-serif;
    padding: 8px 11px; border: 2px solid rgba(255, 255, 255, .5); border-radius: 8px;
  }
  .js-nav .menu-toggle[aria-expanded="true"] { border-color: var(--yellow); }
  /* the three bars become an X while the menu is open */
  .menu-toggle[aria-expanded="true"] .bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }
  .bars::before, .bars::after { transition: transform .15s ease, top .15s ease; }
  .menu-label { min-width: 3.2em; text-align: left; }
  .menu-toggle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; }
  .bars { position: relative; flex: none; }
  .bars::before, .bars::after { content: ''; position: absolute; left: 0; }
  .bars::before { top: -6px; }
  .bars::after { top: 6px; }
  .site-header nav { flex: none; }
  .js-nav #site-nav:not(.open) > ul { display: none; }
  .site-header #site-nav.open > ul {
    position: absolute; left: 0; right: 0; z-index: 20;
    flex-direction: column; gap: 0; background: var(--blue-dark);
    padding: 4px 16px 12px; box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
  }
  #site-nav.open > ul li { border-top: 1px solid rgba(255, 255, 255, .15); }
  #site-nav.open > ul li:first-child { border-top: 0; }
  #site-nav.open > ul a { display: block; padding: 12px 0; font-size: 1rem; border-bottom: 0; }
  #site-nav.open > ul a[aria-current="page"] { color: var(--yellow); }
}

@media (max-width: 820px) {
  main > section + section, main > section + section.wrap, main > div + section.wrap { margin-top: 2rem; }
  .page-head { padding-top: 1.75rem; }
  .band { margin-top: 2.5rem; padding: 2rem 0; }
  .hero { padding-top: 28px; }
  .hero-grid, .two-col, .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-photo img { max-height: 420px; }
  .facts { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .two-col .card { margin-top: 0; }
  .agenda .who { width: auto; }
}

/* Members' meeting log */
.log-form { display: grid; gap: 16px; max-width: 760px; }
.log-form label { display: grid; gap: 6px; font-weight: 600; }
.log-form input, .log-form select, .log-form textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #b9c3c8; border-radius: 8px; background: #fff; width: 100%;
}
.log-form h2 { margin-top: .75rem; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.log-form .speech { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 16px; display: grid; gap: 12px; }
.log-form .speech legend { font: 700 .9rem Montserrat, sans-serif; color: var(--maroon); padding: 0 6px; }
.log-form button { justify-self: start; border: 0; cursor: pointer; font-size: 1rem; }
.log-form button:disabled { opacity: .6; cursor: wait; }
.log-form [hidden] { display: none; }
.log-form .guest-name { border-color: var(--maroon); }
.log-form .check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.log-form .check input { width: 18px; height: 18px; flex: none; }
.photo-preview { display: flex; gap: 16px; align-items: center; }
.portal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.portal-grid li { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px 24px; }
.portal-grid h2 { margin-top: 0; }
.portal-grid h2 a { text-decoration: none; }
.portal-grid .btn { margin-top: .25rem; }
.photo-preview img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; flex: none; }

/* Guest form */
.guest-form { max-width: 560px; display: grid; gap: 16px; }
.guest-form label { display: grid; gap: 6px; font-weight: 600; }
.guest-form input:not([type=checkbox]), .guest-form select, .guest-form textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid #b9c3c8; border-radius: 8px; background: #fff; width: 100%;
}
.guest-form input:focus, .guest-form select:focus, .guest-form textarea:focus { outline: 3px solid var(--yellow); border-color: var(--blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guest-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.guest-form .check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.guest-form button { justify-self: start; border: 0; cursor: pointer; font-size: 1rem; }
.guest-form button:disabled { opacity: .6; cursor: wait; }
.req { color: var(--maroon); }
.optional { font-weight: 400; color: var(--muted); }
.form-error { background: #fbeaec; color: var(--maroon); border-radius: 8px; padding: 10px 14px; margin: 0; }
.small { font-size: .9rem; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.guest-form [hidden] { display: none; }
