/* Beyond Vibe Coding — Summer School 2026
   Minimal, responsive, no framework. */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f1ea;
  --fg: #1a1a1a;
  --muted: #5f5f5f;
  --accent: #1f5f8b;
  --accent-dark: #164766;
  --border: #e2ded5;
  --max: 1040px;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.06);
  font-size: 17px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.4em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 0; }
h3 { font-size: 1.15rem; margin-top: 1.5em; }
p  { margin: 0 0 1em; }
a  { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}
.section-alt {
  background: var(--bg-alt);
  max-width: none;
  padding: 0;
}
.section-alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.section-alt > :first-child { padding-top: 3.5rem; }
.section-alt > :last-child  { padding-bottom: 3.5rem; }

.lead { font-size: 1.08rem; color: #2a2a2a; }
.muted { color: var(--muted); font-size: 0.95rem; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #164766 0%, #1f5f8b 60%, #3a8ab8 100%);
  color: #fff;
  padding: 5rem 1.25rem 4rem;
}
.hero.hero-compact {
  padding: 2.5rem 1.25rem 2rem;
}
.hero.hero-compact h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.hero-inner { max-width: var(--max); margin: 0 auto; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 0.8rem;
}
.hero h1 { margin-bottom: 0.3em; }
.tagline { font-size: 1.2rem; max-width: 60ch; margin-bottom: 1.6em; opacity: 0.95; }

/* In-page hero navigation */
.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
}
.hero-nav a {
  display: inline-block;
  padding: 0.4em 0.9em;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hero-nav a:hover,
.hero-nav a:focus {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
  color: #fff;
}

/* Offset anchored targets so headings aren't hidden under the top edge */
:target { scroll-margin-top: 1.5rem; }

.btn {
  display: inline-block;
  background: #fff;
  color: var(--accent-dark);
  padding: 0.75em 1.4em;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.08), 0 10px 22px rgba(0,0,0,0.1); }

/* Course cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; color: var(--accent-dark); }

/* Weather forecast widget (same-origin iframe -> weather.php) */
.weather-frame {
  width: 100%;
  max-width: 640px;
  min-height: 320px;
  border: none;
  display: block;
  margin: 0 0 0.5rem;
  overflow: hidden;
}

/* Schedule table */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0;
}
.schedule-wrap {
  margin: 1.5rem auto 0;
  overflow-x: auto;            /* horizontal scroll on narrow screens */
  -webkit-overflow-scrolling: touch;
}
.schedule-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 760px;            /* keeps columns readable; scrolls if narrower */
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  line-height: 1.4;
}
.schedule-table th,
.schedule-table td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0.6rem 0.7rem;
  vertical-align: top;
}
.schedule-table thead th {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-weight: 600;
  border-right-color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}
.schedule-table thead th:last-child { border-right: none; }
.col-date {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 0.1rem;
}
.schedule-table th[scope="row"] {
  background: var(--bg-alt);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
  white-space: nowrap;
  width: 4.5rem;
}
.schedule-table td:last-child,
.schedule-table th[scope="row"] + td:last-child { border-right: none; }
.schedule-table tbody tr:last-child th,
.schedule-table tbody tr:last-child td { border-bottom: none; }
.schedule-table .ev-title {
  display: block;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 0.15rem;
}
.schedule-table td.lecture { background: #fbf3d9; }
.schedule-table td.project { background: #f6ddd6; }
.schedule-table td.leisure { background: #e2ebf3; }
.schedule-table td.empty   { background: #fafafa; }
.schedule-table td a { color: var(--accent-dark); }

.schedule-legend {
  list-style: none;
  padding: 0;
  margin: 1rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.schedule-legend li { display: flex; align-items: center; gap: 0.45rem; }
.schedule-legend .sw {
  width: 0.95rem; height: 0.95rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  display: inline-block;
}
.schedule-legend .sw.lecture { background: #fbf3d9; }
.schedule-legend .sw.project { background: #f6ddd6; }
.schedule-legend .sw.leisure { background: #e2ebf3; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}
.gallery figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* Organizers */
.organizers {
  list-style: none;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.5rem 1.5rem;
}
.organizers li { padding: 0.3rem 0; border-bottom: 1px dotted var(--border); }

/* Form */
.regform {
  display: grid;
  gap: 1rem;
  max-width: 720px;
  margin-top: 1.5rem;
}
.regform label { display: block; font-weight: 500; font-size: 0.95rem; }
.regform input[type="text"],
.regform input[type="email"],
.regform textarea {
  width: 100%;
  font: inherit;
  padding: 0.55em 0.7em;
  border: 1px solid #bfbfbf;
  border-radius: var(--radius);
  margin-top: 0.25em;
  background: #fff;
}
.regform input:focus, .regform textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.regform textarea { resize: vertical; font-family: inherit; }
.regform .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) {
  .regform .row { grid-template-columns: 1fr; }
}
.regform fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8em 1em;
  background: #fafafa;
}
.regform legend { font-weight: 500; padding: 0 0.3em; }
.regform label.inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 400;
  margin-right: 1em;
  margin-top: 0.3em;
}
.regform .consent {
  background: #fafafa;
  padding: 0.7em;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Each radio / top-level option on its own line. */
.regform label.stacked {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 400;
  margin-top: 0.35em;
}

/* Nested bike-type checkboxes — always visible, active only when
   "I bring my bike" is selected. */
.bike-subchoices {
  margin: 0.25em 0 0.35em 1.8em;
  padding-left: 0.8em;
  border-left: 2px solid var(--accent);
  display: block;
}
.regform label.sub {
  font-size: 0.93rem;
  color: #3a3a3a;
}
.bike-subchoices.disabled label.sub {
  color: #9a9a9a;
  cursor: not-allowed;
}
.status {
  min-height: 1.4em;
  font-weight: 500;
}
.status.success { color: #1a6d3a; }
.status.error   { color: #b23a3a; }

.regform .btn {
  background: var(--accent);
  color: #fff;
  justify-self: start;
}
.regform .btn:hover { background: var(--accent-dark); }
.regform .btn:disabled { opacity: 0.6; cursor: wait; }

/* Travel information */
.travel-inner {
  /* single centred column so the styled boxes below align with the body text */
}
.travel-route {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1em;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6em 1em;
  box-shadow: var(--shadow);
}
.travel-route span { color: var(--accent); font-weight: 400; }

.travel-address {
  font-style: normal;
  line-height: 1.5;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.8em 1em;
  margin: 0 0 1em;
  max-width: 22rem;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.4rem;
}
.link-list li {
  padding-left: 1.3em;
  position: relative;
}
.link-list li::before {
  content: "\2192";           /* → */
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Footer */
footer {
  background: #1a1a1a;
  color: #cfcfcf;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  margin-top: 3rem;
}
footer a { color: #cfcfcf; }
