/* postgrads.app — one stylesheet for every page. Brand tokens mirror lib/theme.ts. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #1d1b3a;
  --muted: #5d5b72;
  --brand: #5b4fe8;
  --brand-deep: #4338ca;
  --lavender: #eef0ff;
  --paper: #f7f7f7;
  --white: #ffffff;
  --line: #e4e3ee;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --error: #b42318;

  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { display: block; max-width: 100%; }

a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-deep); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--white);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- header ---------- */

.site-header {
  padding: 1.25rem 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; }
.brand:hover { color: var(--ink); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.site-nav a { font-weight: 600; text-decoration: none; }
.site-nav .plain { color: var(--ink); }
.site-nav .plain:hover { color: var(--brand); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--brand-deep); color: var(--white); }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- home: hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--lavender) 0%, #f4f4f8 55%, var(--paper) 100%);
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(3rem, 8vw, 6.5rem);
}
.is-home .site-header { background: var(--lavender); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 16ch;
}
.hero .lede {
  margin: 1.5rem 0 2rem;
  max-width: 33rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--muted);
}
.hero .note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* The match card: the moment the app is built around. */
.match {
  justify-self: center;
  width: min(100%, 22rem);
  background: var(--white);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow:
    0 1px 2px rgba(29, 27, 58, 0.06),
    0 24px 48px -16px rgba(67, 56, 202, 0.28);
  rotate: -2.5deg;
}
.match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}
.match-top span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--ink);
}
.match-top img { width: 20px; height: 20px; }
.match-pill {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.85rem;
}
.match-title {
  margin: 0.6rem 0 0.15rem;
  font-size: 1.9rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.match-when { margin: 0; color: var(--muted); }
.match-people {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.4rem 0;
}
.faces { display: flex; }
.faces span {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 3px solid var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  margin-left: -0.6rem;
}
.faces span:first-child { margin-left: 0; }
.faces span:nth-child(1) { background: #5b4fe8; }
.faces span:nth-child(2) { background: #8b7ff0; }
.faces span:nth-child(3) { background: #2f2a7a; }
.faces span:nth-child(4) { background: #a99ff5; }
.match-people p { margin: 0; font-size: 0.95rem; color: var(--muted); }
.match-cta {
  display: block;
  text-align: center;
  padding: 0.8rem;
  border-radius: 14px;
  background: var(--brand);
  color: var(--white);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .match { animation: arrive 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 150ms both; }
  @keyframes arrive {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- home: steps ---------- */

.steps { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.steps h2,
.waitlist h2 {
  margin: 0 0 2.25rem;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.steps li {
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem;
}
.step-n {
  display: block;
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.04em;
}
.steps h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}
.steps p { margin: 0; color: var(--muted); max-width: 22rem; }

/* ---------- home: waitlist ---------- */

.waitlist {
  background: var(--brand);
  color: var(--white);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.waitlist .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.waitlist h2 { margin-bottom: 1rem; }
.waitlist .wrap > div > p { margin: 0; max-width: 26rem; color: #e3e0ff; font-size: 1.15rem; }

.form { display: grid; gap: 1rem; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.field .hint { font-weight: 400; color: #d6d2ff; }
.field input {
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.field input:focus-visible { outline-color: var(--white); border-color: var(--ink); }
.form .button {
  justify-self: start;
  background: var(--ink);
  min-height: 3rem;
  padding: 0 1.5rem;
}
.form .button:hover { background: #000; }
.form-status {
  margin: 0;
  min-height: 1.6em;
  font-weight: 600;
}
.form-status.is-error { color: #ffe1dd; }
.done {
  background: var(--white);
  color: var(--ink);
  border-radius: 20px;
  padding: 1.5rem;
}
.done h3 { margin: 0 0 0.35rem; font-size: 1.35rem; letter-spacing: -0.02em; }
.done p { margin: 0; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- inner pages ---------- */

.page {
  padding: clamp(2rem, 6vw, 4rem) 0 clamp(4rem, 8vw, 6rem);
}
.page .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.page h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.page .meta { margin: 0 0 2.5rem; color: var(--muted); }
.page h2 {
  margin: 2.5rem 0 0.6rem;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.page p,
.page ul,
.page ol { margin: 0 0 1rem; }
.page li { margin-bottom: 0.35rem; }
.page .lede { font-size: 1.2rem; color: var(--muted); }

.qa { border-top: 1px solid var(--line); padding: 1.25rem 0; }
.qa:last-of-type { border-bottom: 1px solid var(--line); }
.qa h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.qa p { margin: 0; }

.contact {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: 20px;
  background: var(--lavender);
}
.contact p { margin: 0 0 0.25rem; }
.contact a { font-weight: 700; font-size: 1.2rem; }

.status-card {
  margin-top: 1rem;
  padding: 1.75rem;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(29, 27, 58, 0.06), 0 16px 32px -20px rgba(67, 56, 202, 0.3);
}
.status-card .badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--ok-bg);
  color: #166534;
}
.status-card.is-error .badge { background: #fee4e2; color: var(--error); }
.status-card h1 { margin: 0.9rem 0 1rem; }
.status-card p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--brand); }
.site-footer p { margin: 0; }

/* ---------- small screens ---------- */

@media (max-width: 52rem) {
  .hero .wrap,
  .waitlist .wrap { grid-template-columns: minmax(0, 1fr); }
  .match { justify-self: start; rotate: -1.5deg; }
  .steps ol { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
  .site-nav .plain { display: none; }
  .form .button { justify-self: stretch; }
}
