/* Opal school-invite landing — from Figma nodes 1:31 (mobile) and 1:120 (desktop) */

:root {
  --cta-gradient-start: #FFC1AD;
  --cta-gradient-end: #FF5D4E;
  --white-60: rgba(255, 255, 255, 0.6);
  --space-xs: 8px;
  --space-s: 12px;
  --space-l: 24px;
  --space-xxl: 40px;
  --bg-width: 1220px;
  --bg-height: 657px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: #000;
  overflow-x: clip;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100dvh;
}

/* ---------- Background (pre-rendered stage, see bg-capture.html) ---------- */

.bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: top center;
  width: var(--bg-width);
  height: var(--bg-height);
  pointer-events: none;
  user-select: none;
}

.bg-img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Page layout ---------- */

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 63px 24px calc(48px + env(safe-area-inset-bottom));
}

.logo {
  display: block;
  width: 71px;
  height: 33px;
}

/* The crest asset ships with its ghost treatment baked in (white artwork at
   ~12% alpha, emboss included) — render it plainly, no extra opacity */
.crest {
  position: relative;
  width: 202.7px;
  height: 202px;
  margin-top: 48px;
}

.crest-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.content {
  margin-top: 42px;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xxl);
}

.copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  text-align: center;
  overflow-wrap: break-word;
}

.title {
  font-size: 17px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.255px;
  color: #fff;
}

.subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0.0656px;
  color: var(--white-60);
}

.divider {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-l);
}

.cta-gradient {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0.0656px;
  text-align: center;
  background: linear-gradient(183.56deg, var(--cta-gradient-start) 0%, var(--cta-gradient-end) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.badges {
  display: flex;
  gap: var(--space-s);
  align-items: flex-start;
  justify-content: center;
}

.badge {
  display: block;
  transition: opacity 0.15s ease;
}

.badge:hover {
  opacity: 0.85;
}

.badge img {
  display: block;
  height: 44px;
  width: auto;
}

.qr-card {
  background: #fff;
  border-radius: 32px;
  padding: 20px;
}

.qr,
.qr svg {
  display: block;
  width: 193px;
  height: 193px;
}

/* ---------- Variant switching ----------
   JS sets html.platform-mobile / html.platform-desktop from the user agent.
   Without JS, viewport width decides. */

html.platform-mobile .desktop-only { display: none; }
html.platform-desktop .mobile-only { display: none; }

@media (min-width: 768px) {
  html:not(.platform-mobile) .mobile-only { display: none; }
}

@media (max-width: 767.98px) {
  html:not(.platform-desktop) .desktop-only { display: none; }
}

/* Desktop rhythm: no crest, so the content sits closer to the logo (Figma: 39px) */
html.platform-desktop .content { margin-top: 39px; }

@media (min-width: 768px) {
  html:not(.platform-mobile) .content { margin-top: 39px; }
}
