/* The parent app's front door.
 *
 * Its own stylesheet rather than the app's: this page is seen once, by someone
 * who has never used the app, on whatever phone they happen to hold. It has to
 * carry the school's colours and load on a bad connection, and it shares no
 * component with the signed-in app.
 */

* { box-sizing: border-box; }

:root {
    --ink:      #16203A;
    --ink-soft: #5A6785;
    --line:     #E4E8F2;
    --paper:    #F5F7FC;
    --radius:   16px;
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.page {
    padding-bottom: 40px;
}

/* --- the school, up top ------------------------------------------------- */

/* Curved along the bottom rather than cut straight, so the card below reads as
   sitting on the colour instead of being punched out of it. The curve is a clip
   on the band itself: an overflowing pseudo-element would widen the document
   and give the whole page a sideways scroll on a narrow phone. */
.hero {
    position: relative;
    padding: 44px 24px 74px;
    text-align: center;
    color: var(--on-brand);
    /* Deepened towards the far corner rather than run into the school's second
       colour: the two are chosen independently and a dark-to-pale gradient
       leaves the name unreadable at one end of it. */
    background: linear-gradient(150deg,
                var(--brand) 0%,
                color-mix(in srgb, var(--brand) 74%, var(--brand-2)) 58%,
                color-mix(in srgb, var(--brand) 80%, #000) 100%);
    clip-path: ellipse(150% 100% at 50% 0%);
}

.hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
    display: block;
    margin: 0 auto 18px;
}

.hero h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.hero-sub {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: .85;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* --- the body ------------------------------------------------------------ */

.sheet {
    position: relative;
    z-index: 1;
    max-width: 528px;
    margin: -30px auto 0;
    padding: 0 16px;
}

.cta {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(22, 32, 58, .09);
    padding: 20px 18px 16px;
    text-align: center;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 15px 18px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn .ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary {
    color: var(--on-brand);
    background: var(--brand);
    box-shadow: 0 8px 18px -6px var(--brand);
}

.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
    margin-top: 10px;
    color: var(--ink-soft);
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    padding: 11px;
}

.cta-note {
    margin: 12px 4px 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* --- three steps --------------------------------------------------------- */

.steps {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    counter-reset: none;
}

.steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 0 4px 20px;
    position: relative;
}

/* The thread down the left says these happen in order. It stops at the last
   step so it does not dangle under it. */
.steps li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 30px;
    bottom: 4px;
    width: 2px;
    background: var(--line);
}

.steps li > span {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand);
    color: var(--on-brand);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--paper);
}

.steps li div {
    font-size: 13.5px;
    color: var(--ink-soft);
    padding-top: 2px;
}

.steps li b {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

/* --- what you get -------------------------------------------------------- */

.sec {
    margin: 8px 4px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.feats {
    list-style: none;
    margin: 0;
    padding: 6px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(22, 32, 58, .06);
}

.feats li {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 11px 10px;
}

.feats li + li { border-top: 1px solid var(--line); }

.feat-ico {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 11%, #fff);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feat-ico svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feats div {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ink-soft);
    min-width: 0;
}

.feats b {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
}

/* --- desktop only -------------------------------------------------------- */

/* display: flex would otherwise beat the browser's own [hidden] rule, and the
   card would sit there empty on a phone. */
.qr[hidden] { display: none; }

.qr {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 22px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.qr-code {
    flex: 0 0 auto;
    line-height: 0;
}

.qr-code img {
    display: block;
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
}

.qr b { font-size: 15px; }

.qr p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--ink-soft);
}

.foot {
    margin: 22px 8px 0;
    font-size: 12.5px;
    line-height: 1.6;
    text-align: center;
    color: var(--ink-soft);
}

.foot a { color: var(--brand); }

/* --- the "your browser hides it here" sheet ------------------------------ */

.sheet-back {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(16, 22, 40, .55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.sheet-back[hidden] { display: none; }

.how {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 24px 22px calc(22px + env(safe-area-inset-bottom));
    animation: rise .22s ease-out;
}

@keyframes rise { from { transform: translateY(18px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .how { animation: none; }
}

.how h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.how-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.how-steps {
    margin: 0 0 20px;
    padding-left: 20px;
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--ink-soft);
}

.how-steps b { color: var(--ink); }

.how-steps .u {
    word-break: break-all;
    font-weight: 500;
}

.inl {
    width: 15px;
    height: 15px;
    vertical-align: -3px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- roomier once there is room ------------------------------------------ */

@media (min-width: 700px) {
    .hero { padding-top: 60px; padding-bottom: 84px; }
    .hero h1 { font-size: 24px; }
    .sheet { max-width: 580px; }
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink:      #E9EDF7;
        --ink-soft: #9AA5C0;
        --line:     #2A3350;
        --paper:    #131A2C;
    }

    body { background: var(--paper); }

    .cta, .feats, .qr, .how { background: #1B2439; }
    .how-x { background: #131A2C; }
    .hero-icon { background: #1B2439; }
    .feat-ico { background: color-mix(in srgb, var(--brand) 26%, #1B2439); color: #fff; }
}
