/* ============================================================
   WISCr — Winter School in Soft & Continuum Robotics
   Shared stylesheet. Brand palette + Chelsy display font.
   ============================================================ */

@font-face {
  font-family: "Chelsy";
  src: url("../assets/fonts/Chelsy.otf") format("opentype"),
       url("../assets/fonts/Chelsy.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colours — sampled from the official logo files */
  --blue-700: #0072a3;   /* hover / pressed */
  --blue-600: #00a0e3;   /* primary brand blue */
  --blue-100: #dcf1fb;   /* light tint, section backgrounds */
  --blue-50:  #f0f9fd;

  --red-700: #b8161b;    /* hover / pressed */
  --red-600: #e31e24;    /* primary brand red */
  --red-100: #fbe1e1;
  --red-50:  #fdf1f1;

  /* Sunburst gradient sampled from the logo's rays: red -> warm neutrals -> teal -> blue */
  --sunburst: linear-gradient(90deg, #e31e24, #c0614e, #b17061, #9f7d74, #4997ae, #009bc1, #00a0e3);

  --ink-900: #262424;
  --ink-700: #434242;    /* brand "dark" swatch (C0 M0 Y0 K100 as printed) */
  --ink-500: #6c6969;
  --ink-300: #a6a3a3;
  --ink-100: #e2dfdf;

  --paper:      #ffffff;
  --paper-alt:  #f7f8fa;
  --paper-line: #e7e5e5;

  --radius-sm: 6px;
  --radius-md: 14px;

  --content-width: 1120px;
  --content-narrow: 760px;

  --shadow-sm: 0 1px 2px rgba(38, 36, 36, 0.07), 0 1px 1px rgba(38, 36, 36, 0.05);
  --shadow-md: 0 8px 24px rgba(38, 36, 36, 0.10);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red-600); }
h1, h2, h3, h4 {
  font-family: "Baloo 2", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-900);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
table { border-collapse: collapse; width: 100%; }
code, kbd { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.92em; }

/* Display font — used sparingly for the wordmark feel: hero eyebrow tags, big stat numbers */
.display {
  font-family: "Chelsy", "Baloo 2", sans-serif;
  font-weight: normal;
  letter-spacing: 0.01em;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--ink-900); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 200; transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

/* ---------- Sunburst rule ---------- */
.sunburst-rule {
  height: 5px;
  background: var(--sunburst);
}

/* ---------- Draft banner ---------- */
.draft-banner {
  background: var(--red-50);
  color: var(--red-700);
  border-bottom: 1px solid var(--red-100);
  font-size: 0.88rem;
  text-align: center;
  padding: 8px 24px;
}
.draft-banner strong { color: var(--ink-900); }

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--paper-line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--content-width);
  margin: 0 auto;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 100px;
  text-decoration: none;
  color: var(--ink-900);
}
.brand:hover { color: var(--ink-900); }
.brand-mark {
  height: 40px;
  width: auto;
  flex: none;
}
.brand-mark1 {
  height: 50px;
  width: auto;
  flex: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text .sub {
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  color: var(--ink-500);
  max-width: 22ch;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink-900);
}
.nav-toggle svg { display: block; width: 20px; height: 20px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-700);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
}
.nav-links a:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-links a[aria-current="page"] {
  color: var(--blue-700);
  background: var(--blue-100);
}
.nav-cta {
  background: var(--red-600) !important;
  color: #fff !important;
  padding: 9px 18px !important;
}
.nav-cta:hover { background: var(--red-700) !important; color: #fff !important; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--paper-line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 8px; }
  .nav-cta { margin-top: 6px; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--blue-50);
  border-bottom: 1px solid var(--paper-line);
  padding: 56px 0 52px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-700);
  background: var(--blue-100);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.eyebrow.eyebrow--red { color: var(--red-700); background: var(--red-100); }
.hero p.lede {
  font-size: 1.15rem;
  color: var(--ink-700);
  max-width: 58ch;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-logo {
  width: 100%;
  max-width: 380px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* ---------- Brand cluster: WISCr + partner institution logos ----------
   WISCr's mark is rendered at 2x the height of the partner marks. */
.brand-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.brand-cluster .wiscr-mark {
  height: auto;
  width: auto;
}
.brand-cluster-divider {
  width: 0px;
  align-self: stretch;
  min-height: 60px;
  background: var(--paper-line);
}
.partner-marks {
  display: flex;
  align-items: center;
  gap: 150px;
  flex-wrap: wrap;
}
.partner-marks .partner-mark {
  height: 80px;
  width: auto;
}

.partner-marks .partner-mark2 {
  height: 60px;
  width: auto;
}

/* Footer variant: half the scale, laid out horizontally */
.brand-cluster--footer {
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}
.brand-cluster--footer .wiscr-mark { height: 46px; }
.brand-cluster--footer .brand-cluster-divider { min-height: 30px; }
.brand-cluster--footer .partner-marks { gap: 140px; }
.brand-cluster--footer .partner-marks .partner-mark { height: 23px; }

@media (max-width: 800px) {
  .brand-cluster { justify-content: flex-start; }
}

/* ---------- Countdown ---------- */
.countdown-banner {
  background: var(--blue-600);
  color: #fff;
  padding: 26px 0;
  text-align: center;
}
.countdown-label {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.92;
  margin: 0 0 16px;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.countdown-tile {
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 12px 22px;
  min-width: 82px;
}
.countdown-value {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
}
.countdown-unit {
  display: block;
  font-size: 0.74rem;
  margin-top: 4px;
  opacity: 0.88;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--red-600); color: #fff; }
.btn-primary:hover { background: var(--red-700); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--blue-700); border-color: var(--blue-600); }
.btn-secondary:hover { background: var(--blue-50); color: var(--blue-700); }
.btn-blue { background: var(--blue-600); color: #fff; }
.btn-blue:hover { background: var(--blue-700); color: #fff; }

/* ---------- Fact strip ---------- */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--paper-line);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.fact {
  background: var(--paper);
  padding: 18px 16px;
  text-align: center;
}
.fact .value {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-700);
  display: block;
}
.fact .label {
  font-size: 0.8rem;
  color: var(--ink-500);
  margin-top: 2px;
}
@media (max-width: 720px) {
  .fact-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section--alt { background: var(--paper-alt); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.section-head { max-width: 68ch; margin-bottom: 34px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head p { color: var(--ink-700); font-size: 1.05rem; }

/* ---------- Cards / grids ---------- */
.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); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card .icon {
  width: 38px; height: 38px;
  margin-bottom: 14px;
  color: var(--blue-600);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-700); margin-bottom: 0; font-size: 0.97rem; }

.card--pillar {
  border-top: 4px solid var(--blue-600);
}

/* Day / project cards */
.sprint-card {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sprint-number {
  font-family: "Baloo 2", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red-600);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sprint-metric {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--paper-line);
  font-size: 0.88rem;
  color: var(--blue-700);
}
.sprint-metric strong { color: var(--ink-900); }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  margin-left: 8px;
  padding-left: 28px;
  border-left: 2px solid var(--blue-100);
}
.timeline-item {
  position: relative;
  padding-bottom: 28px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -35px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--blue-600);
}
.timeline-item.is-key::before { border-color: var(--red-600); }
.timeline-item .when {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.timeline-item p { margin-top: 4px; color: var(--ink-700); }

/* Day-arc list */
.day-list { display: flex; flex-direction: column; gap: 16px; }
.day-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 20px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
}
.day-item .day-num {
  font-family: "Baloo 2", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue-600);
}
.day-item h3 { margin-bottom: 6px; }
.day-item p { margin-bottom: 0; color: var(--ink-700); }
@media (max-width: 560px) {
  .day-item { grid-template-columns: 1fr; }
  .day-item .day-num { font-size: 1.3rem; -webkit-text-stroke: 1px var(--blue-600); }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--paper-line); border-radius: var(--radius-md); }
.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--paper-line);
  vertical-align: top;
}
.data-table thead th {
  background: var(--blue-600);
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: var(--paper-alt); }
.data-table tfoot td {
  font-weight: 700;
  background: var(--blue-50);
  color: var(--ink-900);
}

/* ---------- Badges / tags ---------- */
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  margin: 0 6px 6px 0;
}
.tag--red { background: var(--red-100); color: var(--red-700); }
.tag--tbd { background: var(--paper-alt); color: var(--ink-500); border: 1px dashed var(--ink-300); }

/* ---------- Person / placeholder cards ---------- */
.person-card {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: left;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.avatar-placeholder {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
  display: flex; align-items: center; justify-content: center;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
}
.person-card h3 { margin-bottom: 2px; font-size: 1.05rem; }
.person-card .role { color: var(--ink-500); font-size: 0.86rem; margin-bottom: 6px; display: block; }
.person-card p { margin-bottom: 0; font-size: 0.92rem; color: var(--ink-700); }

/* ---------- Callout ---------- */
.callout {
  background: var(--ink-900);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.callout::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 5px;
  background: var(--sunburst);
}
.callout h2, .callout p { color: #fff; }
.callout p { color: var(--ink-100); margin-bottom: 0; }
@media (max-width: 700px) {
  .callout { grid-template-columns: 1fr; text-align: left; }
}

.note-box {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 0.94rem;
  color: var(--ink-700);
}
.note-box strong { color: var(--blue-700); }
.note-box.note-box--red { background: var(--red-50); border-color: var(--red-100); }
.note-box.note-box--red strong { color: var(--red-700); }

/* ---------- FAQ (details/summary) ---------- */
.faq-item {
  border-bottom: 1px solid var(--paper-line);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink-900);
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus {
  flex: none;
  width: 22px; height: 22px;
  border: 2px solid var(--blue-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-600);
  font-size: 1rem;
  transition: transform 0.15s ease;
}
.faq-item[open] summary .plus { transform: rotate(45deg); background: var(--blue-600); color: #fff; }
.faq-item .faq-answer { margin-top: 10px; color: var(--ink-700); max-width: 70ch; }

/* ---------- Forms (contact) ---------- */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink-900);
}
.form-field input, .form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.96rem;
  background: var(--paper);
  color: var(--ink-900);
}
.form-field input:focus, .form-field textarea:focus {
  outline: 2px solid var(--blue-600);
  outline-offset: 1px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--paper-line);
  background: var(--blue-50);
  padding: 40px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h4 {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink-700); font-size: 0.94rem; text-decoration: none; }
.footer-grid a:hover { color: var(--blue-700); text-decoration: underline; }
.footer-logo { height: 34px; width: auto; margin-bottom: 12px; }
.footer-bottom {
  max-width: var(--content-width);
  margin: 28px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--paper-line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--ink-500);
}

/* ---------- Page header (non-home pages) ---------- */
.page-header {
  background: var(--blue-50);
  border-bottom: 1px solid var(--paper-line);
  padding: 44px 0 36px;
}
.page-header p.lede { color: var(--ink-700); max-width: 70ch; font-size: 1.05rem; }
.breadcrumb { font-size: 0.85rem; color: var(--ink-500); margin-bottom: 10px; }
.breadcrumb a { color: var(--ink-500); }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
