/* Education Test App - one hero, one door.
 *
 * Tokens first: this page is a standalone static site (it does not load a product
 * shell), so the palette is declared here and referenced by name everywhere below.
 * Nothing is inline in the HTML - the vhost's CSP has no `style-src 'unsafe-inline'`,
 * so an inline style attribute would simply be dropped.
 */

:root {
  /* ink panel */
  --ink-900: #0a1122;
  --ink-800: #101a37;
  --ink-700: #1b2950;
  --ink-line: rgba(255, 255, 255, 0.055);

  /* paper column */
  --paper: #fbf7ee;
  --paper-deep: #f2ecdf;
  --card: #fffdf8;

  /* type */
  --text: #16203a;
  --text-soft: #46536f;
  --muted: #6a7590;
  --on-ink: #eef1f8;
  --on-ink-soft: #b9c4dc;

  /* accents */
  --accent: #c9713a;
  --accent-deep: #a8571f;
  --gold: #f0c070;
  --gold-soft: #f5c96f;
  --ok: #2f7d5d;
  --warn: #a8452f;
  --focus: #2c5fd6;

  --hairline: rgba(20, 33, 61, 0.11);
  --hairline-strong: rgba(20, 33, 61, 0.18);

  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 28px 64px -32px rgba(10, 17, 34, 0.5), 0 2px 6px rgba(10, 17, 34, 0.05);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------------ stage */

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 48px);
  padding: clamp(24px, 3.2vw, 44px) clamp(24px, 4vw, 64px);
  color: var(--on-ink);
  background:
    radial-gradient(120% 90% at 8% -12%, #26376b 0%, rgba(38, 55, 107, 0) 56%),
    radial-gradient(86% 66% at 96% 4%, rgba(240, 192, 112, 0.2) 0%, rgba(240, 192, 112, 0) 62%),
    linear-gradient(158deg, var(--ink-800) 0%, #0d1730 58%, var(--ink-900) 100%);
}

/* Ruled paper, inverted: the faintest suggestion of a notebook behind everything. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: repeating-linear-gradient(to bottom, var(--ink-line) 0 1px, transparent 1px 34px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 76%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 76%);
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.seal { width: 27px; height: 27px; color: var(--gold); flex: 0 0 auto; }

.wordmark {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.chip {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--on-ink-soft);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}

.hero-body {
  position: relative;
  z-index: 2;
  max-width: 33rem;
  margin-top: clamp(4px, 3vh, 40px);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero .eyebrow { color: var(--gold-soft); }

.hero h1 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.1vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-lede {
  margin: 0;
  max-width: 30rem;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.62;
  color: var(--on-ink-soft);
}

.marks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: clamp(26px, 4vh, 44px) 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--on-ink-soft);
}

.marks li { display: flex; align-items: baseline; gap: 8px; }

.marks .num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--gold);
  opacity: 0.85;
}

/* the illustration, bled off the corner so the page feels larger than the frame */
.scene {
  position: absolute;
  right: clamp(-90px, -4vw, -24px);
  bottom: clamp(-70px, -3vw, -12px);
  z-index: 1;
  width: min(620px, 76%);
  margin: 0;
  pointer-events: none;
  opacity: 0.96;
}

.scene svg { display: block; width: 100%; height: auto; }

.hero-foot {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(185, 196, 220, 0.62);
}

.hero-foot .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ------------------------------------------------------------------- pane */

.pane {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(28px, 4.5vw, 64px) clamp(20px, 3.6vw, 48px);
  background:
    radial-gradient(120% 90% at 100% 0%, #fffdf7 0%, rgba(255, 253, 247, 0) 58%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  box-shadow: inset 1px 0 0 var(--hairline);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink-800);
  color: var(--on-ink);
  font-size: 13px;
  text-decoration: none;
}

.skip:focus { left: 12px; z-index: 5; }

.card {
  /* The accent is a background layer, not an overlaid bar. A 3px pseudo-element cannot
   * follow an 18px radius - it squares off the top-left corner - whereas a background
   * is clipped by the card's own border-radius, so the stripe follows the curve. */
  --card-accent: linear-gradient(90deg, var(--accent) 0%, var(--gold) 52%, rgba(240, 192, 112, 0) 100%);

  position: relative;
  width: 100%;
  max-width: 25.5rem;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.5s cubic-bezier(0.22, 0.7, 0.28, 1) both;

  background-color: var(--card);
  background-image: var(--card-accent), linear-gradient(var(--card), var(--card));
  background-repeat: no-repeat;
  background-size: 100% 3px, 100% 100%;
  background-position: left top, left top;
  background-clip: border-box;
}

.card h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 550;
  font-size: clamp(24px, 2.4vw, 29px);
  line-height: 1.16;
  letter-spacing: -0.018em;
  color: var(--text);
}

.lede {
  margin: 0 0 22px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* ------------------------------------------------------------------- cta */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: auto;
  max-width: 22rem;
  padding: 12px 20px;
  border: 1px solid rgba(10, 17, 34, 0.6);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--ink-700) 0%, var(--ink-800) 60%, var(--ink-900) 100%);
  color: #fffdf8;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 22px -14px rgba(10, 17, 34, 0.85);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -16px rgba(10, 17, 34, 0.9);
}

.cta:active { transform: translateY(0); }

.cta-arrow {
  font-size: 15px;
  line-height: 1;
  color: var(--gold);
  transition: transform 0.16s ease;
}

.cta:hover .cta-arrow { transform: translateX(3px); }

.cta.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--hairline-strong);
  box-shadow: none;
}

.cta.ghost:hover {
  background: rgba(20, 33, 61, 0.045);
  box-shadow: none;
}

.cta:focus-visible,
.skip:focus-visible {
  outline: 3px solid rgba(44, 95, 214, 0.45);
  outline-offset: 3px;
}

/* ------------------------------------------------------------- the form */

.auth { margin: 0; }

.field { margin-bottom: 14px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  background: #fffefb;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:hover { border-color: rgba(20, 33, 61, 0.3); }

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 113, 58, 0.16);
}

.form-error {
  margin: 10px 0 0;
  min-height: 1.2em;
  font-size: 12.5px;
  color: var(--warn);
}

.form-error:empty { min-height: 0; }

/* "or" between the two doors: a rule that keeps the card calm. */
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.cta.sso { width: auto; max-width: 100%; }

/* The brokered provider wears this card's button, not Google's: same shape, same
 * border, same type. Only the mark is Google's, set in our ink. */
.cta.google {
  margin-top: 10px;
  color: var(--text);
  border-color: var(--hairline-strong);
  background: transparent;
  box-shadow: none;
}

.cta.google:hover {
  background: rgba(20, 33, 61, 0.045);
  box-shadow: none;
}

.g-mark {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: currentColor;
  opacity: 0.82;
}

.cta.google:hover .g-mark { opacity: 1; }

.hint {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.hint b { font-family: var(--mono); font-weight: 600; color: var(--text-soft); }

/* ------------------------------------------------------------ card detail */

.fine {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.01em;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.trust {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.trust .lock {
  color: var(--ok);
  font-size: 8px;
  line-height: 1.9;
  flex: 0 0 auto;
}

.eyebrow-ok { color: var(--ok); }
.eyebrow-warn { color: var(--warn); }

.card-warn {
  --card-accent: linear-gradient(90deg, var(--warn) 0%, #d99a6a 60%, rgba(217, 154, 106, 0) 100%);
}

.card-warn .cta {
  background: linear-gradient(180deg, #8f3a28 0%, var(--warn) 70%);
  border-color: rgba(120, 40, 26, 0.6);
}

.facts {
  margin: 0 0 24px;
  border-top: 1px solid var(--hairline);
}

.facts div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}

.facts dt {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------- motion */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .scene svg { animation: settle 14s ease-in-out infinite alternate; }

  @keyframes settle {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-8px, -10px, 0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .cta, .cta-arrow { transition: none; }
}

/* ---------------------------------------------------------- narrow screens */

@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); }

  .hero {
    gap: 22px;
    min-height: 0;
    padding: 24px 22px 30px;
  }

  .hero-body { margin-top: 6px; max-width: none; }

  .hero h1 { font-size: clamp(29px, 7.4vw, 38px); margin-bottom: 14px; }

  .hero-lede { font-size: 14.5px; }

  .marks { margin-top: 20px; padding-top: 14px; gap: 8px 20px; font-size: 12px; }

  .scene {
    right: -56px;
    bottom: -58px;
    width: min(360px, 74%);
    opacity: 0.7;
  }

  .hero-foot { display: none; }

  .pane {
    box-shadow: inset 0 1px 0 var(--hairline);
    padding: 28px 20px 40px;
    place-items: start center;
  }

  .card { max-width: 30rem; }
}

@media (max-width: 560px) {
  .chip { margin-left: 0; order: 3; }
  .marks li:nth-child(3) { display: none; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .scene { width: min(300px, 70%); opacity: 0.55; }
}
