:root {
  --ink: #162033;
  --muted: #5c667a;
  --line: #d9dfeb;
  --paper: #f7f9fc;
  --white: #ffffff;
  --navy: #172a4f;
  --blue: #2666c6;
  --gold: #c79a35;
  --green: #1f7a5b;
  --red: #b3263d;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(10, 23, 48, 0.94), rgba(35, 68, 114, 0.78)),
    url("assets/site/gdvmun-page.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

button,
input,
select,
.link-button {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(18px, 3.4vw, 52px) clamp(22px, 4.5vw, 72px);
}

.event-panel {
  color: var(--white);
  max-width: 780px;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-line img {
  width: 118px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.event-copy {
  margin-top: clamp(38px, 7vh, 76px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  max-width: 9ch;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.event-copy p:not(.eyebrow) {
  max-width: 680px;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.55;
}

.event-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: clamp(24px, 5vh, 46px) 0 0;
}

.event-facts div {
  padding: 16px 0 0;
  border-top: 2px solid rgba(199, 154, 53, 0.86);
}

dt {
  color: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

dd {
  margin: 8px 0 0;
  line-height: 1.35;
}

.form-panel {
  width: 100%;
  padding: clamp(22px, 3.2vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 80px rgba(10, 24, 54, 0.28);
  backdrop-filter: blur(12px);
}

.form-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.form-heading p:not(.eyebrow),
.field-hint {
  color: var(--muted);
  line-height: 1.6;
}

form {
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: -6px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select {
  min-width: 0;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--white);
}

input:focus,
select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(38, 102, 198, 0.18);
}

button {
  display: inline-grid;
  place-items: center;
  height: 50px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: var(--white);
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.link-button {
  display: inline-grid;
  place-items: center;
  min-height: 52px;
  border-radius: 8px;
  padding: 0 20px;
  color: var(--white);
  background: var(--green);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

button:hover {
  filter: brightness(0.94);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary-button {
  color: var(--navy);
  background: #e8edf7;
}

.message {
  margin-top: 22px;
  border-radius: 8px;
  padding: 14px 16px;
  line-height: 1.45;
}

.message.success {
  color: var(--green);
  background: rgba(31, 122, 91, 0.1);
}

.message.error {
  color: var(--red);
  background: rgba(179, 38, 61, 0.1);
}

.certificate-card {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--paper);
}

.certificate-kicker {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.certificate-card h3 {
  margin-bottom: 18px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.participant-data {
  display: grid;
  gap: 12px;
  margin: 0;
}

.participant-data div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

#certificate-canvas {
  display: none;
}

@media (max-width: 920px) {
  body {
    background-position: 35% center;
  }

  .page-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .event-copy {
    margin-top: 42px;
  }

  .form-panel {
    max-width: 620px;
  }

  .form-heading h2 {
    max-width: 12ch;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 18px;
  }

  .event-facts,
  .input-row,
  .actions {
    grid-template-columns: 1fr;
  }

  .brand-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .participant-data div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
