/* European School of Orbital Physics in Solids */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #FCFAF6;
  --sand: #F4F2EB;
  --teal-deep: #0A4952;
  --teal: #0F7078;
  --orange: #E7884A;
  --on-orange: #0A2E33;
  --ink: #2E3A44;
  --ink-soft: #3E4C57;
  --muted: #5B6670;
  --accent-text: #A94F17;
  --rule: #DDDAD0;
  --rule-light: #E4E1D8;
  --rule-dark: #CFCCC1;
  --on-teal: #D6E1DF;
  --on-teal-muted: #C9D7D6;
  --rule-on-teal: #3A6B72;

  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(20px, 5.5vw, 80px);
  --section-y: clamp(72px, 9vw, 120px);
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--teal-deep); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--teal-deep); color: var(--cream); padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--cream); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--sand { background: var(--sand); }
.section--teal { background: var(--teal-deep); color: var(--cream); }
.section--ruled { border-top: 1px solid var(--rule-light); }

/* Type */
.h2 {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--teal-deep);
}
.h3 { font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--teal-deep); }
.label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.lead { font-size: clamp(19px, 1.6vw, 21px); font-weight: 500; line-height: 1.55; color: var(--teal-deep); }
.text-soft { color: var(--ink-soft); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.section-head p { max-width: 600px; margin-top: 16px; color: var(--ink-soft); }
.link-strong { font-size: 16px; font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 32px; border: 0; border-radius: 999px;
  font: 600 18px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn--orange { background: var(--orange); color: var(--on-orange); }
.btn--orange:hover { background: #EE9761; color: var(--on-orange); }
.btn--teal { background: var(--teal-deep); color: var(--cream); }
.btn--teal:hover { background: var(--teal); color: var(--cream); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule-light); background: var(--cream); position: relative; z-index: 20; }
.site-header .wrap { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--teal-deep); }
.brand img { width: 48px; height: 48px; }
.brand span { font-size: 16px; font-weight: 600; line-height: 1.2; }
.nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 36px); }
.nav a { font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink); padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--teal); }
.nav a[aria-current="page"] { color: var(--teal-deep); border-bottom-color: var(--teal-deep); }
.nav .nav-cta { background: var(--orange); color: var(--on-orange); padding: 12px 24px; border-radius: 999px; border: 0; }
.nav .nav-cta:hover { background: #EE9761; color: var(--on-orange); }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--teal-deep);
  align-items: center; justify-content: center; padding: 0; cursor: pointer; border-radius: 8px;
}
.menu-toggle svg { width: 26px; height: 26px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--rule-light);
    padding: 8px var(--gutter) 24px; box-shadow: 0 16px 32px -24px rgba(10, 46, 51, .35);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--rule-light); font-size: 17px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--rule-light); color: var(--teal); }
  .nav .nav-cta { margin-top: 16px; text-align: center; padding: 16px 24px; }
}
@media (max-width: 420px) {
  .brand img { width: 36px; height: 36px; }
  .brand span { font-size: 13px; }
  .site-header .wrap { min-height: 68px; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 720px;
  display: flex; align-items: center;
  background: var(--cream) url("../img/hero-orbits.webp") right center / auto 100% no-repeat;
}
.hero > .wrap { padding-top: 64px; padding-bottom: 140px; }
.hero h1 {
  font-size: clamp(40px, 4.8vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--teal-deep);
}
.hero-meta { margin-top: 32px; font-size: clamp(18px, 1.7vw, 24px); font-weight: 500; color: var(--ink-soft); }
.hero-actions { margin-top: 40px; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.hero-actions .link-strong { font-size: 18px; }
.hero-tagline { position: absolute; left: 0; right: 0; bottom: 56px; }
.hero-tagline .rule { width: 48px; height: 1px; background: var(--muted); margin-bottom: 14px; }
.hero-tagline p { font-size: 13px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; line-height: 2; color: var(--muted); }

@media (max-width: 1080px) {
  .hero { min-height: 0; background-size: auto 78%; background-position: right bottom; }
  .hero > .wrap { padding-top: 72px; padding-bottom: 300px; }
  .hero-tagline { display: none; }
}
@media (max-width: 720px) {
  .hero h1 br { display: none; }
  .hero { background-size: auto 400px; }
  .hero > .wrap { padding-top: 40px; padding-bottom: 380px; }
  .hero-meta { margin-top: 20px; }
  .hero-actions { margin-top: 28px; gap: 20px; }
  .hero-actions .btn { width: 100%; }
}

/* Page head (inner pages) */
.page-head {
  min-height: 420px; display: flex; align-items: center;
  background: #F8F6F0 url("../img/banner-orbits.webp") right center / auto 100% no-repeat;
  border-bottom: 1px solid var(--rule-light);
}
.page-head .wrap { padding-top: 64px; padding-bottom: 64px; }
.page-head h1 { font-size: clamp(44px, 5.2vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -0.025em; color: var(--teal-deep); }
.page-head p { margin-top: 20px; font-size: 20px; line-height: 1.55; color: var(--ink-soft); max-width: 640px; }
.page-head .mono { margin-top: 20px; font-size: 14px; }
@media (max-width: 900px) {
  .page-head { min-height: 0; background-size: auto 240px; background-position: right bottom; }
  .page-head .wrap { padding-bottom: 260px; }
}

/* Grid helpers */
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }

/* About */
.about-title { grid-column: span 4; }
.about-body { grid-column: 5 / span 8; display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.about-body p:not(.lead) { color: var(--ink-soft); }
.facts { grid-column: span 12; margin-top: 88px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 32px; }
.facts div { border-top: 1px solid var(--teal-deep); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.facts dd { font-size: 18px; font-weight: 600; color: var(--teal-deep); line-height: 1.35; }
@media (max-width: 960px) {
  .about-title, .about-body { grid-column: span 12; }
  .about-title { margin-bottom: 32px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 56px; }
}

/* Lecturers */
.lecturers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 64px 40px; }
.lecturer { display: flex; flex-direction: column; gap: 20px; }
.lecturer h3 { font-size: 21px; font-weight: 700; color: var(--teal-deep); line-height: 1.3; }
.lecturer .course { font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); }
.lecturer .org { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.lecturer-text { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1080px) { .lecturers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .lecturers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; } }
@media (max-width: 460px) {
  .lecturers { grid-template-columns: 1fr; gap: 32px; }
  .lecturer { flex-direction: row; align-items: center; }
}

.avatar { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.avatar img { position: absolute; left: 6px; top: 6px; width: calc(100% - 12px); height: calc(100% - 12px); border-radius: 50%; object-fit: cover; background: #E4EAE7; }
.avatar svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.avatar--sm { width: 88px; height: 88px; }
@media (max-width: 460px) { .lecturer .avatar { width: 96px; height: 96px; } }

/* Schedule */
.orbit-line { width: 100%; height: auto; margin-bottom: -4px; }
.days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; row-gap: 56px; }
.day-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.day-head .date { font-size: 26px; font-weight: 700; color: var(--teal-deep); line-height: 1.2; }
.day-head--dot { flex-direction: row; align-items: center; gap: 14px; }
.day-head--dot::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.sessions li { display: grid; grid-template-columns: 104px 1fr; column-gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); }
.sessions .time { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.sessions .title { display: block; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.sessions .who { display: block; font-size: 15px; color: var(--muted); margin-top: 4px; }
.sessions .break { font-size: 15px; color: var(--muted); }
@media (max-width: 960px) {
  .days { grid-template-columns: 1fr; }
  .orbit-line { display: none; }
  .day-head:not(.day-head--dot) { flex-direction: row; align-items: center; gap: 14px; }
  .day-head:not(.day-head--dot)::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
  .day-head:not(.day-head--dot) .label { order: 2; }
}

/* Audience */
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 56px; row-gap: 48px; }
.three-col > div { display: flex; flex-direction: column; gap: 16px; }
.three-col h2 { font-size: 26px; font-weight: 700; color: var(--teal-deep); line-height: 1.25; }
.three-col p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
@media (max-width: 900px) { .three-col { grid-template-columns: 1fr; } }

/* Apply */
.apply-main { grid-column: span 6; display: flex; flex-direction: column; gap: 24px; }
.apply-main .h2 { color: var(--cream); }
.apply-main p { font-size: 18px; color: var(--on-teal); max-width: 520px; }
.apply-main p.small { font-size: 16px; color: var(--on-teal-muted); }
.apply-main .btn { align-self: flex-start; margin-top: 16px; }
.apply-dates { grid-column: 8 / span 5; display: flex; flex-direction: column; justify-content: center; }
.apply-dates div { display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; border-top: 1px solid var(--rule-on-teal); font-size: 16px; }
.apply-dates div:last-child { border-bottom: 1px solid var(--rule-on-teal); }
.apply-dates dt { color: var(--on-teal-muted); }
.apply-dates dd { font-weight: 600; text-align: right; }
@media (max-width: 960px) {
  .apply-main, .apply-dates { grid-column: span 12; }
  .apply-dates { margin-top: 48px; }
}

/* Venue */
.venue-text { grid-column: span 6; display: flex; flex-direction: column; gap: 22px; }
.venue-text p { color: var(--ink-soft); }
.venue-map { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 22px; padding-top: 70px; }
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: 16px; background: var(--sand); }
address { font-style: normal; font-size: 16px; line-height: 1.6; color: var(--ink); }
address strong { color: var(--teal-deep); font-weight: 700; }
@media (max-width: 960px) {
  .venue-text, .venue-map { grid-column: span 12; }
  .venue-map { padding-top: 40px; }
}

/* Practical */
.practical-travel { grid-column: span 6; display: flex; flex-direction: column; gap: 20px; }
.practical-stay { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 20px; }
.practical-travel > p, .practical-stay > p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.travel-list { margin-top: 8px; }
.travel-list > div { display: grid; grid-template-columns: 140px 1fr; column-gap: 20px; padding: 18px 0; border-top: 1px solid var(--rule-dark); }
.travel-list > div:last-child { border-bottom: 1px solid var(--rule-dark); }
.travel-list dt { font-size: 16px; font-weight: 700; color: var(--teal-deep); }
.travel-list dd { font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.travel-list dd span { display: block; }
.hotel-group { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; border-top: 1px solid var(--rule-dark); }
.hotel-group:last-of-type { padding-bottom: 18px; border-bottom: 1px solid var(--rule-dark); }
.hotel-group ul { font-size: 16px; line-height: 1.6; color: var(--ink); }
@media (max-width: 960px) {
  .practical-travel, .practical-stay { grid-column: span 12; }
  .practical-stay { margin-top: 56px; }
}
@media (max-width: 480px) {
  .travel-list > div { grid-template-columns: 1fr; row-gap: 6px; }
}

/* Contact */
.contact-info { grid-column: span 5; display: flex; flex-direction: column; gap: 32px; }
.org-group { display: flex; flex-direction: column; gap: 16px; }
.org-group + .org-group { padding-top: 24px; border-top: 1px solid var(--rule); }
.person strong { display: block; font-size: 18px; font-weight: 700; color: var(--teal-deep); line-height: 1.4; }
.person span { display: block; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.contact-form { grid-column: 7 / span 6; display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 40px); background: var(--sand); border-radius: 20px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  width: 100%; border: 1px solid #B9BDB8; border-radius: 10px; background: var(--cream);
  font: 400 16px/1.5 var(--sans); color: var(--ink); padding: 12px 14px;
}
.field input { height: 48px; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 15px; line-height: 1.5; min-height: 1.5em; }
.form-status.is-ok { color: var(--teal); font-weight: 600; }
.form-status.is-error { color: #A3361B; font-weight: 600; }
.contact-form .btn { align-self: flex-start; }
@media (max-width: 960px) {
  .contact-info, .contact-form { grid-column: span 12; }
  .contact-form { margin-top: 48px; }
}
@media (max-width: 560px) {
  .contact-form .row { grid-template-columns: 1fr; }
  .contact-form .btn { width: 100%; }
}

/* Acknowledgements */
.ack .wrap { display: flex; align-items: center; gap: 48px 80px; flex-wrap: wrap; }
.ack h2 { font-size: 18px; font-weight: 700; color: var(--teal-deep); width: 240px; flex-shrink: 0; }
.ack-logos { display: flex; align-items: center; gap: 40px 56px; flex: 1 1 520px; justify-content: flex-end; flex-wrap: wrap; }
.ack-logos img { flex-shrink: 0; }
.ack-logos .logo-orbis { height: 104px; width: auto; }
.ack-logos .logo-wide { height: 52px; width: auto; }
@media (max-width: 900px) { .ack-logos { justify-content: flex-start; } .ack h2 { width: auto; } }
@media (max-width: 480px) { .ack-logos { gap: 32px 40px; } .ack-logos .logo-orbis { height: 88px; } .ack-logos .logo-wide { height: 44px; } }

/* Courses */
.course { padding: 48px 0; border-top: 1px solid var(--rule-dark); }
.course-meta { grid-column: span 4; display: flex; flex-direction: column; gap: 10px; }
.course-meta .num { font-family: var(--mono); font-size: 13px; color: var(--accent-text); }
.course-meta h3 { font-size: 30px; font-weight: 700; line-height: 1.15; color: var(--teal-deep); }
.course-meta .mono { line-height: 1.7; }
.course-body { grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 24px; }
.course-person { display: flex; gap: 20px; align-items: center; }
.course-person strong { display: block; font-size: 21px; font-weight: 700; color: var(--teal-deep); }
.course-person span { display: block; font-size: 15px; line-height: 1.5; color: var(--ink-soft); margin-top: 4px; }
@media (max-width: 960px) {
  .course-meta, .course-body { grid-column: span 12; }
  .course-body { margin-top: 28px; }
}

.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 72px; padding-bottom: 72px; }
.cta-band p { font-size: 22px; font-weight: 600; color: var(--teal-deep); }

/* Footer */
.site-footer { background: var(--sand); padding: 48px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.site-footer .brand img { width: 40px; height: 40px; }
.site-footer .brand span { font-size: 15px; }
.footer-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: 15px; color: var(--ink-soft); }
@media (max-width: 600px) { .footer-meta { align-items: flex-start; } }
