/* SchoolTutor squeeze home page (RC9-site.2): one screen, one job (the Early Access List).
   Phone first (360 px up), then tablet and desktop (fits 1280x720 and 1440x900 without scrolling).
   SchoolTutor identity: night violet, brand violet and sunshine yellow; the system font stack
   (no external fonts or assets). Logical properties only, so dir="rtl" needs no new rules except
   the poster's fade direction. No inline styles (CSP style-src 'self'). Colours meet WCAG AA:
   white and #e6e1ff on #21174a, #1d1b3a and #4b4775 on white, #21174a on #ffc94a. */

:root {
  --night: #21174a;
  --night-2: #2c1f5e;
  --brand: #5b4cdb;
  --brand-ink: #3f2aa8;
  --sun: #ffd166;
  --sun-deep: #ffc23d;
  --ink: #1d1b3a;
  --ink-2: #4b4775;
  --paper: #ffffff;
  --field: #fbfaff;
  --line: #c9c0ec;
  --alert: #9b1c1c;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sq {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(60rem 40rem at 0% 0%, rgb(255 209 102 / 16%), transparent 60%),
    radial-gradient(50rem 40rem at 100% 100%, rgb(122 102 240 / 38%), transparent 65%),
    linear-gradient(165deg, #2f2170 0%, var(--night) 55%, #170f36 100%);
  background-attachment: fixed;
  font-family: ui-rounded, "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
.sq-card :focus-visible { outline-color: var(--brand-ink); }

.sq-wrap { width: 100%; max-width: 78rem; margin-inline: auto; padding-inline: 16px; }

.sq-skip {
  position: absolute; inset-inline-start: 8px; inset-block-start: -90px; z-index: 50;
  padding: 12px 16px; border-radius: 12px; background: var(--paper); color: var(--brand-ink); font-weight: 800;
}
.sq-skip:focus { inset-block-start: 8px; }

/* ---------- Brand ---------- */
.sq-top-row { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.sq-brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px;
  color: #fff; text-decoration: none; font-weight: 900; font-size: 1.18rem; letter-spacing: -0.01em;
}
.sq-brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 4px 14px rgb(0 0 0 / 30%); }
.sq-tag { margin-inline-start: auto; color: var(--sun); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.04em; white-space: nowrap; }

/* ---------- Main ---------- */
.sq-main { flex: 1 0 auto; padding-block: 6px 22px; }
.sq-grid { display: grid; gap: 22px; }
.sq-pitch { min-width: 0; }

.sq-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px;
  background: rgb(255 209 102 / 14%); box-shadow: inset 0 0 0 1px rgb(255 209 102 / 35%);
  color: var(--sun); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
}
.sq-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgb(255 209 102 / 22%); }

.sq-pitch h1 {
  margin: 0 0 12px; font-size: clamp(1.6rem, 7.4vw, 2.4rem); line-height: 1.1; font-weight: 900; letter-spacing: -0.02em;
  text-wrap: balance;
}
.sq-pitch h1::after {
  content: ""; display: block; width: 72px; height: 5px; margin-block-start: 12px; border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), var(--sun-deep));
}
.sq-lead { margin: 0 0 16px; color: #e6e1ff; font-size: 1rem; line-height: 1.5; max-width: 40rem; }
.sq-ai { color: var(--sun); font-weight: 800; white-space: nowrap; }

/* ---------- 16:9 film (poster until an approved film exists) ---------- */
.sq-film { position: relative; margin: 0; }
.sq-frame {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 20px;
  background:
    radial-gradient(circle at 14% 26%, rgb(255 209 102 / 55%) 0 3px, transparent 4px),
    radial-gradient(circle at 24% 62%, rgb(255 255 255 / 45%) 0 2px, transparent 3px),
    radial-gradient(circle at 8% 78%, rgb(255 209 102 / 35%) 0 5px, transparent 6px),
    radial-gradient(28rem 18rem at 10% 20%, rgb(255 209 102 / 22%), transparent 70%),
    linear-gradient(135deg, #4a37b0 0%, #2c1f5e 55%, #1a1240 100%);
  box-shadow: 0 24px 60px rgb(8 4 30 / 55%), 0 0 0 1px rgb(255 255 255 / 12%);
}
/* The approved portrait, shown whole and unaltered (no crop), at the end of the frame; only its
   first sliver (the bookshelf) fades into the frame. */
.sq-poster {
  position: absolute; inset-block: 0; inset-inline-end: 0; height: 100%; width: auto; max-width: none;
  aspect-ratio: 900 / 745; object-fit: contain;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%);
  mask-image: linear-gradient(to right, transparent 0, #000 16%);
}
[dir="rtl"] .sq-poster {
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 16%);
  mask-image: linear-gradient(to left, transparent 0, #000 16%);
}
.sq-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.sq-caption {
  position: absolute; inset-inline-start: 12px; inset-block-end: 12px; max-width: calc(100% - 24px);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgb(255 255 255 / 94%); color: var(--ink); font-size: 0.82rem; font-weight: 800; line-height: 1.3;
  box-shadow: 0 6px 18px rgb(8 4 30 / 30%);
}
.sq-caption::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgb(91 76 219 / 25%); }
.sq-film:has(.sq-video) .sq-caption { display: none; }

/* ---------- Early Access card ---------- */
.sq-join { min-width: 0; }
.sq-card {
  background: var(--paper); color: var(--ink); border-radius: 24px; padding: 18px 16px 10px;
  border-block-start: 5px solid var(--sun);
  box-shadow: 0 30px 70px rgb(6 3 25 / 45%), 0 0 0 1px rgb(255 255 255 / 40%);
}
.sq-card:focus { outline: none; }
.sq-card h2 { margin: 0 0 2px; font-size: 1.32rem; line-height: 1.2; font-weight: 900; color: var(--night-2); letter-spacing: -0.01em; }
.sq-intro { margin: 0 0 12px; color: var(--ink-2); font-size: 0.92rem; }
.sq-wait { margin: 0 0 10px; color: var(--ink-2); font-weight: 700; }

.sq-form { display: grid; gap: 10px; }
.sq-pair { display: grid; gap: 10px; }
.sq-field { display: grid; gap: 4px; margin: 0; min-width: 0; }
.sq-field label { font-size: 0.9rem; font-weight: 800; line-height: 1.3; }
.sq-optional { font-weight: 600; color: var(--ink-2); }
.sq-input {
  width: 100%; min-height: 46px; padding-inline: 14px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--field); color: var(--ink); font: inherit; font-size: 1rem;
}
.sq-input::placeholder { color: #6e6992; }
.sq-input:hover { border-color: #a89ce0; }
.sq-input:focus-visible { border-color: var(--brand); outline-offset: 1px; }
.sq-input[aria-invalid="true"] { border-color: var(--alert); border-style: dashed; background: #fff6f6; }

.sq-consents { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.sq-consents legend { padding: 0; margin-block-end: 6px; font-size: 0.9rem; font-weight: 800; }
.sq-checkrow { display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; align-items: start; }
.sq-checkrow label { font-size: 0.875rem; line-height: 1.4; color: var(--ink); cursor: pointer; }
.sq-check { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--brand); cursor: pointer; }
.sq-check:disabled { cursor: not-allowed; }
.sq-check:disabled + label { color: var(--ink-2); cursor: not-allowed; }
.sq-hint { grid-column: 2; font-size: 0.8rem; font-weight: 700; color: var(--brand-ink); }
.sq-hint[hidden] { display: none; }
.sq-age { margin: 0; font-size: 0.84rem; color: var(--ink-2); line-height: 1.4; }
.sq-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.sq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 8px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 900; line-height: 1.2; cursor: pointer; text-align: center;
}
.sq-btn--go {
  width: 100%; min-height: 54px; font-size: 1.1rem; color: var(--night);
  background: linear-gradient(180deg, #ffdb7d 0%, var(--sun-deep) 100%); border-color: #f0b02a;
  box-shadow: 0 10px 24px rgb(255 180 40 / 38%), inset 0 -3px 0 rgb(0 0 0 / 8%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sq-btn--go::after { content: "\2192"; content: "\2192" / ""; font-size: 1.15em; }
[dir="rtl"] .sq-btn--go::after { content: "\2190"; content: "\2190" / ""; }
.sq-btn--go:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgb(255 180 40 / 45%), inset 0 -3px 0 rgb(0 0 0 / 8%); }
.sq-btn--go[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.sq-btn--quiet { background: transparent; color: var(--brand-ink); border-color: var(--brand); }
.sq-btn--quiet:hover { background: #f1edff; }

.sq-status { margin: 0; font-size: 0.92rem; font-weight: 800; color: var(--alert); }
.sq-status:empty { display: none; }

.sq-more { font-size: 0.84rem; color: var(--ink-2); }
.sq-more > summary {
  list-style: none; cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 2px 10px; text-align: center; border-radius: 10px;
}
.sq-more > summary::-webkit-details-marker { display: none; }
.sq-trust { font-weight: 800; color: var(--ink); }
.sq-more-link { color: var(--brand-ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.sq-more[open] .sq-more-link { text-decoration: none; }
.sq-more p { margin: 2px 0 8px; line-height: 1.45; }
.sq-more a { color: var(--brand-ink); font-weight: 800; }

/* The confirmation that replaces the form (no navigation). */
.sq-card.is-done { text-align: center; padding-block: 26px 22px; }
.sq-card.is-done h2 { font-size: 1.5rem; }
.sq-done p { margin: 0 0 8px; }
.sq-done-next { color: var(--ink-2); font-size: 0.95rem; }
.sq-done-mark {
  position: relative; display: block; width: 68px; height: 68px; margin: 4px auto 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe7a3, var(--sun-deep)); box-shadow: 0 10px 26px rgb(255 180 40 / 45%);
  animation: sq-pop 0.45s ease-out both;
}
.sq-done-mark::after {
  content: ""; position: absolute; inset-inline-start: 24px; inset-block-start: 15px; width: 18px; height: 32px;
  border: solid var(--night); border-width: 0 6px 6px 0; transform: rotate(45deg); border-radius: 2px;
}
@keyframes sq-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Footer ---------- */
.sq-foot { padding-block: 4px 12px; }
.sq-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 20px; }
.sq-links a {
  display: inline-flex; align-items: center; min-height: 44px; color: #d9d3ff; text-decoration: none; font-size: 0.9rem; font-weight: 700;
}
.sq-links a:hover { color: #fff; text-decoration: underline; }
.sq-mail { color: #fff; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .sq-btn--go, .sq-btn--go:hover { transition: none; transform: none; }
  .sq-done-mark { animation: none; }
}

/* ---------- Larger phones and small tablets ---------- */
@media (min-width: 480px) {
  .sq-pair { grid-template-columns: 1fr 1fr; }
  .sq-card { padding: 20px 20px 10px; }
}
@media (min-width: 640px) {
  .sq-wrap { padding-inline: 24px; }
  .sq-grid { max-width: 40rem; margin-inline: auto; }
  .sq-pitch h1 { font-size: 2.5rem; }
  .sq-lead { font-size: 1.06rem; }
}

/* ---------- Desktop: one viewport, pitch beside the form ---------- */
@media (min-width: 900px) {
  .sq-wrap { padding-inline: 32px; }
  .sq-main { display: flex; align-items: center; padding-block: 4px 8px; }
  .sq-grid {
    max-width: 78rem; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 44px; align-items: center;
  }
  .sq-pitch h1 { font-size: clamp(2rem, 3.1vw, 3.1rem); line-height: 1.08; }
  .sq-pitch h1::after { margin-block-start: 14px; }
  .sq-lead { font-size: 1.06rem; margin-block-end: 18px; }
  /* The film keeps 16:9 and never pushes the page past the viewport height. */
  .sq-film { max-width: calc((100vh - 370px) * 16 / 9); max-width: calc((100svh - 370px) * 16 / 9); min-width: 22rem; }
  .sq-card { padding: 18px 22px 8px; }
  .sq-top-row { min-height: 52px; }
  .sq-foot { padding-block: 0 6px; }
}
/* Short desktop screens (1280x720 and similar): the same layout, a little tighter, never below
   44 px targets or 0.84 rem text. */
@media (min-width: 900px) and (max-height: 780px) {
  .sq-form { gap: 8px; }
  .sq-pair { gap: 8px; }
  .sq-input { min-height: 44px; }
  .sq-consents { gap: 6px; }
  .sq-checkrow label { font-size: 0.84rem; line-height: 1.35; }
  .sq-intro { margin-block-end: 10px; }
  .sq-pitch h1 { font-size: clamp(2rem, 2.9vw, 2.8rem); }
  .sq-pitch h1::after { margin-block-start: 10px; }
  .sq-lead { margin-block-end: 14px; }
}
@media (min-width: 900px) and (min-height: 860px) {
  .sq-main { padding-block: 12px 20px; }
  .sq-card { padding: 24px 26px 12px; }
  .sq-form { gap: 12px; }
  .sq-pitch h1 { font-size: clamp(2.4rem, 3.4vw, 3.4rem); }
}
