@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800&family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: #07132c;
  background: #f8f7f3;
  --paper: #f8f7f3;
  --blue: #0955eb;
  --muted: #596275;
  --line: #d7d9df;
  --gutter: clamp(54px, 10.4vw, 180px);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background-image: repeating-linear-gradient(to bottom, transparent 0 42px, #dce0e6 43px, transparent 44px);
  background-position: 0 35px;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
h1, h2, p { margin: 0; }
.shell { width: min(1340px, calc(100% - var(--gutter) - 5.5vw)); margin-left: var(--gutter); }
.top { height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { font-weight: 900; font-size: clamp(26px, 3vw, 43px); letter-spacing: -.055em; }
.home-page { background-image: linear-gradient(to right, transparent calc(var(--gutter) - 4vw), #559cf2 calc(var(--gutter) - 4vw), #559cf2 calc(var(--gutter) - 4vw + 1px), transparent calc(var(--gutter) - 4vw + 1px)), repeating-linear-gradient(to bottom, transparent 0 46px, #dce0e6 47px, transparent 48px); }
.home-layout { display: grid; gap: 20px; }
.hero { min-width: 0; }
.hero h1 { font-size: clamp(46px, 5.65vw, 84px); font-weight: 900; line-height: .98; letter-spacing: -.07em; }
.hero em { color: var(--blue); font-style: normal; }
.topics { display: flex; flex-wrap: wrap; gap: 10px clamp(16px, 2.1vw, 34px); list-style: none; padding: 0; margin: 30px 0 0; color: #747a86; font-size: clamp(15px, 1.45vw, 22px); font-weight: 600; letter-spacing: -.035em; }
.join { position: relative; border: 1px solid #cfd2da; border-radius: 12px; background: var(--paper); padding: clamp(21px, 2.4vw, 37px); }
.join h2 { max-width: 24ch; font-size: clamp(22px, 2.15vw, 32px); font-weight: 800; letter-spacing: -.045em; line-height: 1.15; }
.join p { margin-top: 13px; max-width: 45ch; color: var(--muted); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.55; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 11px; min-height: 46px; padding: 12px 20px; border: 1px solid transparent; border-radius: 9px; background: var(--blue); color: white; font-weight: 700; cursor: pointer; text-align: center; }
.button:hover { background: #0344c5; }
.button:disabled { opacity: .62; cursor: wait; }
.button-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.button-outline:hover { background: #e6efff; }
.apply-link { margin-top: 19px; padding-inline: 32px; }
.footer { margin-top: clamp(30px, 4vw, 60px); padding-bottom: 28px; }
.footer section { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; }
.footer h2 { font-size: 14px; font-weight: 800; }
.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.contact-links a { color: var(--muted); }
.contact-links a[href] { display: inline-block; padding-block: 6px; color: var(--blue); }
.contact-links a[href]:hover { text-decoration: underline; text-underline-offset: 3px; }

.application-page .shell { width: min(1328px, calc(100% - 10vw)); margin-inline: auto; }
.application-page .application { max-width: 760px; padding-block: clamp(32px, 5vw, 66px) 56px; }
.application h1 { font-family: "Barlow Condensed", Inter, sans-serif; font-size: clamp(56px, 5vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: .95; margin-bottom: 22px; }
.application-steps { display: none; }
.application-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.application-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.application-steps span { display: grid; place-items: center; flex: none; inline-size: 36px; block-size: 36px; border-radius: 50%; border: 1px solid #c8cfdc; background: var(--paper); font-variant-numeric: tabular-nums; line-height: 1; }
.application-steps [aria-current="step"] { color: var(--blue); }
.application-steps [aria-current="step"] span { color: white; background: var(--blue); border-color: var(--blue); }
.form-panel { min-width: 0; padding: clamp(21px, 2.4vw, 36px); background: var(--paper); border: 1px solid #d3d6dd; border-radius: 12px; }
.form-step { display: grid; gap: 15px; }
.form-step h2, #success h2 { font-family: "Barlow Condensed", Inter, sans-serif; font-weight: 800; font-size: clamp(27px, 2.25vw, 36px); line-height: 1.1; }
.experience-step { margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 22px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; }
input:not([type="radio"]), select, textarea { display: block; width: 100%; min-width: 0; padding: 10px 12px; min-height: 43px; border: 1px solid #c3c8d2; border-radius: 7px; background: #fff9; color: inherit; font-size: 16px; font-weight: 400; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #677184; }
input:user-invalid, select:user-invalid { border-color: #b62c38; }
.faculty-reach { border: 0; margin: 0; padding: 0; min-width: 0; }
.faculty-reach legend { padding: 0; font-size: 14px; font-weight: 600; line-height: 1.4; }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.choice-row label { position: relative; cursor: pointer; }
.choice-row input { position: absolute; opacity: 0; margin: 0; width: 100%; height: 100%; pointer-events: none; }
.choice-row span { display: grid; place-items: center; min-width: 53px; min-height: 40px; padding: 5px 12px; border: 1px solid #c3c8d2; border-radius: 8px; background: #fff9; }
.choice-row input:checked + span { background: var(--blue); border-color: var(--blue); color: white; }
.choice-row input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.form-note, .form-error { font-size: 13px; color: var(--muted); line-height: 1.5; }
.form-note { font-weight: 400; }
.form-error { color: #a62231; }
.form-actions { display: flex; gap: 10px; }
.form-actions [type="submit"] { flex: 1; }
.mobile-step-button { display: none; }
#success { text-align: center; padding-block: clamp(20px, 5vw, 72px); }
.success-icon { display: grid; place-items: center; margin: 0 auto 21px; width: 84px; height: 84px; border-radius: 50%; background: var(--blue); color: white; font-size: 39px; }
#success p { max-width: 37ch; margin: 12px auto 22px; line-height: 1.55; color: var(--muted); }

@media (width > 720px) {
  .home-page { background: #f1f4fa; }
  .home-page .shell { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
  .home-page .top { height: 77px; }
  .home-page .brand { font-size: 29px; }
  .home-layout { padding-top: 6px; }
  .hero {
    display: grid;
    align-content: center;
    min-height: clamp(320px, 34vw, 420px);
    padding: 36px 41% 36px clamp(30px, 5vw, 66px);
    border-radius: 18px;
    color: white;
    background: linear-gradient(90deg, #050b24 40%, transparent 73%), url("/study.png") right center / auto 110% no-repeat, #050b24;
  }
  .hero h1 { max-width: 13ch; font-size: clamp(42px, 4.6vw, 68px); line-height: 1.04; letter-spacing: -.06em; }
  .hero em { color: #93b7ff; }
  .topics { gap: 8px 18px; margin-top: 25px; color: #bdc9e5; font-size: 14px; letter-spacing: 0; }
  .join { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; background: #fff; border-color: #dfe5f0; padding: 24px clamp(22px, 4vw, 45px); }
  .join h2 { max-width: none; font-size: clamp(20px, 2.1vw, 29px); }
  .join p { max-width: 58ch; font-size: 15px; margin-top: 7px; }
  .join .apply-link { grid-column: 2; grid-row: 1 / span 2; margin: 0; white-space: nowrap; }
  .home-page .footer { margin-top: 20px; }
}

@media (max-width: 720px) {
  :root { --gutter: clamp(32px, 11vw, 79px); }
  .home-page { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .home-page .top { height: clamp(65px, 14vw, 95px); }
  .home-layout { display: block; padding-top: clamp(16px, 4vw, 28px); }
  .hero h1 { font-size: clamp(39px, 14.6vw, 104px); line-height: .98; }
  .hero em { display: block; }
  .topics { gap: 8px 16px; margin-top: 24px; font-size: 14px; letter-spacing: 0; }
  .home-layout .join { margin-top: clamp(60px, 14vw, 88px); }
  .home-layout .join::before {
    content: "";
    position: absolute;
    left: -1px;
    bottom: 100%;
    width: 105px;
    height: 25px;
    background: #d4e3f7;
    border-radius: 18px 25px 0 0;
    clip-path: polygon(0 0, 80% 0, 100% 100%, 0 100%);
    pointer-events: none;
  }
  .join h2 { font-size: clamp(22px, 5.5vw, 39px); }
  .apply-link { position: fixed; z-index: 2; inset: auto 0 0; margin: 0; padding-block: 16px calc(16px + env(safe-area-inset-bottom)); min-height: 62px; border-radius: 0; font-size: 18px; }
  .footer { margin-top: 24px; padding-bottom: 18px; }
  .footer section { gap: 8px 12px; }
  .application-page .shell { width: calc(100% - 36px); }
  .application-page .application { padding-top: 24px; }
  .application h1 { font-family: Inter, sans-serif; font-size: clamp(38px, 9.5vw, 60px); font-weight: 900; letter-spacing: -.06em; margin: 24px 0 19px; }
  .application-steps { display: block; }
  .application-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .application-steps li { display: flex; flex-direction: column; text-align: center; gap: 5px; font-size: 11px; }
  .form-panel { border: 0; padding: 0; background: transparent; }
  .form-row { grid-template-columns: 1fr; gap: 15px; }
  .form-step { gap: 14px; }
  .form-step h2 { font-family: Inter, sans-serif; font-size: 21px; letter-spacing: -.035em; }
  .experience-step { padding: 0; margin: 0; border: none; }
  .mobile-step-button { display: inline-flex; }
  #next-step { margin-top: 6px; }
  form[data-step="1"] .experience-step, form[data-step="2"] .student-step { display: none; }
  .application:has(form[data-step="2"]) .application-intro { display: none; }
  .application:has(form[data-step="2"]) .form-panel { margin-top: 26px; }
  #success { padding-top: 55px; }
}
