:root {
  --sunrise-start: #ff3131;
  --sunrise-end: #ff914d;
  --orange: #ff914d;
  --white: #ffffff;
  --sand: #faeddb;
  --lime: #9eff1f;
  --soft-lime: #c1ff72;
  --shale: #292929;
  --shale-muted: rgb(41 41 41 / 0.7);
  --shale-border: rgb(41 41 41 / 0.1);
  --black: #000000;
}

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

html,
body {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
}

/* Top nav */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  padding: 24px 16px;
  line-height: 1.5;
}

.site-header .home {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 28px;
  text-decoration: none;
  color: inherit;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-header nav a {
  font-size: 18px;
  color: inherit;
  text-decoration: none;
}

.site-header a:hover,
.site-header a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 640px) {
  .site-header {
    padding: 24px 32px;
  }
}

/* Shared components */

.label {
  margin: 0 0 8px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--shale-muted);
}

.highlight {
  background-image: linear-gradient(var(--orange), var(--orange));
  background-repeat: no-repeat;
  background-position: 0 90%;
  background-size: 100% 0.3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 2px 12px;
  border-radius: 999px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--orange);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--shale);
  background: var(--lime);
  text-decoration: none;
  cursor: pointer;
}

.button:active {
  opacity: 0.7;
}

.button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.button:focus-visible {
  outline: 2px solid var(--shale);
  outline-offset: 2px;
}

/* Home */

.page-home {
  display: flex;
  flex-direction: column;
  color: var(--shale);
  background: var(--sand);
}

.page-home .site-header {
  background: var(--white);
}

.page-home main {
  flex: 1;
}

/* Fills the first screen below the 90px site header */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 90px);
  min-height: calc(100dvh - 90px);
  padding: 96px 24px;
  text-align: center;
  color: var(--white);
  background: var(--sunrise-end);
  background-image: linear-gradient(
    to right,
    var(--sunrise-start),
    var(--sunrise-end)
  );
}

.hero h1 {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(4rem, 20vw, 16rem);
  line-height: 1;
}

.hero p {
  width: 100%;
  max-width: 32ch;
  margin: 1.5rem auto 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
}

/* Thin lime rule between title and subtitle */
.hero p::before {
  content: "";
  display: block;
  width: 400px;
  max-width: 80%;
  height: 2px;
  margin: 0 auto 1.5rem;
  background: var(--lime);
}

.hero .button {
  margin-top: 48px;
}

.pitch {
  max-width: calc(65ch + 48px);
  margin: 0 auto;
  padding: 96px 24px 64px;
  font-size: 18px;
  line-height: 1.6;
}

.pitch h2 {
  margin: 0 0 16px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

.pitch > p:not(.label) {
  margin: 0;
}

.pitch > p:not(.label) + .label {
  margin-top: 64px;
}

.pitch .button {
  margin-top: 48px;
}

/* Home: email signup */

.signup {
  max-width: calc(65ch + 48px);
  margin: 0 auto;
  padding: 32px 24px 64px;
  font-size: 18px;
  line-height: 1.6;
}

.signup h2 {
  margin: 0 0 16px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

.signup > p:not(.label) {
  margin: 0;
}

.signup-card {
  margin-top: 40px;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
}

.signup-card form {
  display: grid;
  gap: 24px;
}

.signup-card .field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 16px;
  line-height: 1.5;
}

.signup-card legend {
  padding: 0;
  margin-bottom: 8px;
}

.signup-more {
  display: grid;
  gap: 24px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .signup-more {
    animation: signup-reveal 200ms ease-out;
  }
}

@keyframes signup-reveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.signup-card .optional {
  color: var(--shale-muted);
}

.signup-card input[type="text"],
.signup-card input[type="email"],
.signup-card textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid var(--shale);
  border-radius: 12px;
  font: inherit;
  color: var(--shale);
  background: var(--white);
}

.signup-card textarea {
  resize: vertical;
}

.signup-card input:focus-visible,
.signup-card textarea:focus-visible {
  outline: 2px solid var(--shale);
  outline-offset: 2px;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Secondary button styling. The radio is invisible but must stay focusable for keyboard users */
.choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid var(--shale);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice:has(input:checked) {
  background: var(--soft-lime);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--shale);
  outline-offset: 2px;
}

.signup-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup-status {
  margin: 0;
  font-size: 16px;
}

.signup-status:empty {
  display: none;
}

.signup-card .button {
  justify-self: start;
}

.signup-thanks h3 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.signup-thanks p {
  margin: 0;
}

.signup-thanks:focus {
  outline: none;
}

@media (min-width: 640px) {
  .signup-card {
    padding: 40px;
  }
}

.home-footer {
  display: flex;
  justify-content: center;
  padding: 32px 24px 48px;
}

.home-footer img {
  width: 96px;
  height: auto;
  border-radius: 22px;
}

/* Content pages */

.page-content {
  font-size: 18px;
  line-height: 1.6;
  color: var(--shale);
  background: var(--white);
}

.page-content main {
  max-width: 65ch;
  margin: 0 auto;
  padding: 32px 16px 96px;
}

.page-content h1,
.page-content h2,
.page-content h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  line-height: 1.25;
}

.page-content h1 {
  margin: 0 0 8px;
  font-size: 40px;
  font-weight: 700;
}

.page-content h2 {
  margin: 40px 0 8px;
  font-size: 30px;
  font-weight: 700;
}

.page-content h3 {
  margin: 32px 0 8px;
  font-size: 22px;
  font-weight: 500;
}

.page-content .label + h2 {
  margin-top: 0;
}

.page-content .meta {
  margin: 0 0 32px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--shale-muted);
}

.page-content main a:not(.button) {
  color: inherit;
  text-underline-offset: 3px;
}

.page-content blockquote {
  margin: 64px 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

/* About */

.page-about h1 {
  margin-bottom: 24px;
}

/* Student Advisory Cohort */

.page-cohort h1 {
  margin-bottom: 24px;
}

.apply-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 40px 0;
  padding: 32px;
  border-radius: 24px;
  color: var(--black);
  background: var(--sunrise-end);
  background-image: linear-gradient(
    to right,
    var(--sunrise-start),
    var(--sunrise-end)
  );
}

.apply-banner .deadline {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

.apply-banner .questions {
  margin: 4px 0 0;
  font-size: 16px;
}

.accordion {
  border-top: 1px solid var(--shale-border);
}

.accordion details {
  border-bottom: 1px solid var(--shale-border);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary h2 {
  margin: 0;
  font-size: 24px;
}

.accordion summary i {
  flex-shrink: 0;
  font-size: 24px;
  transition: transform 150ms ease;
}

.accordion details[open] summary i {
  transform: rotate(180deg);
}

.accordion .panel {
  padding: 0 0 32px;
}

.accordion .panel > :first-child {
  margin-top: 0;
}

.accordion .panel h3 {
  margin-bottom: 8px;
}

.accordion .panel .label {
  margin: 32px 0 0;
}

.accordion .panel .label + h3 {
  margin-top: 0;
}

.accordion .panel li + li {
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .accordion summary i {
    transition: none;
  }
}
