/* Sign in and sign up as the campus gate (Joshua, 2026-11-06: "the sign up and login
   should have similar design to the landing page but more creative").
   The 3D campus (static/campus/campus.js) fills the screen behind: at night with the
   lights on for sign in, at the front gate at dusk for sign up. The form sits on a
   drawing sheet like the landing page's; sign up builds your Webbo3 student pass live
   as you type, and both pages stamp the sheet when you send it. duo.css holds the
   fields, buttons and flashes; this file only lays the gate out. */

:root { --sheet-line: #0b0b09; --lip: 0 6px 0 rgba(11, 11, 9, .14); }
body.gate-page { background: #0d1b3d; }
.campus-stage { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; background: #0d1b3d; overflow: hidden; }
#campus3d { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; }
.campus-ready #campus3d { opacity: 1; }
.no3d .campus-stage { background: #0d1b3d; }   /* never the campus picture (Joshua, 2026-11-20) */
.no3d #campus3d { display: none; }
#campusPins { position: fixed; top: 0; left: 0; width: 0; height: 0; z-index: 1; }
.gate-page .nav { z-index: 60; }
.gate-main { position: relative; z-index: 2; overflow-x: hidden; }
@supports (overflow: clip) { .gate-main { overflow-x: clip; } }
.gate-page footer { position: relative; z-index: 2; }

/* the stop on the tour: the sheet on the right, the campus framed beside it */
.gate-chapter { min-height: calc(100vh - 70px); min-height: calc(100svh - 70px); display: flex; align-items: center; padding: 34px 0 44px; pointer-events: none; }
.gate-wrap { display: flex; justify-content: flex-end; }
.gate-col { width: 100%; max-width: 500px; display: grid; gap: 14px; pointer-events: auto; }

/* the drawing sheet */
.gsheet { position: relative; background: var(--white); border: 2px solid var(--sheet-line); border-radius: 22px; box-shadow: var(--lip); padding: clamp(18px, 2.4vw, 28px); }
.gsheet::before, .gsheet::after { content: ''; position: absolute; width: 14px; height: 14px; border: 2px solid var(--blue); pointer-events: none; }
.gsheet::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.gsheet::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.sheet-top { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 2px solid var(--sheet-line);
  font-weight: 900; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sheet-top .live { color: var(--leaf-d); white-space: nowrap; }
.sheet-top .live::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; animation: gBlink 1.6s ease-in-out infinite; }
@keyframes gBlink { 50% { opacity: .25; } }
.gsheet h1 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.04; letter-spacing: -.02em; }
.gsheet h1 em { font-style: normal; color: var(--blue); }
.gsheet .sub { color: var(--muted); font-size: 15.5px; margin: 8px 0 16px; }
.gate-on { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; font-weight: 800; font-size: 13.5px; color: var(--ink-2); }
.gate-on[hidden] { display: none; }
.gate-on i { width: 9px; height: 9px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }

/* numbered fields, like a form on a plan */
.gsheet .field > label::before { content: attr(data-n); display: inline-block; min-width: 24px; margin-right: 6px; padding: 1px 0; border-radius: 7px;
  background: var(--sky); color: var(--blue); font-size: 10.5px; font-weight: 900; text-align: center; }
.gsheet .field > label:not([data-n])::before { display: none; }

/* the stamp the sheet gets when you send it */
.gstamp { position: absolute; top: 40%; left: 50%; z-index: 5; padding: 8px 18px; border: 5px solid var(--leaf-d); border-radius: 12px; color: var(--leaf-d);
  font: 900 clamp(26px, 5vw, 40px)/1 var(--round); letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .82);
  transform: translate(-50%, -50%) rotate(-12deg) scale(2.2); opacity: 0; pointer-events: none; white-space: nowrap; }
.gstamp, .pass .pstamp { display: none; }               /* only once sent: a hidden scaled stamp widened phones */
.gsheet.stamped .gstamp, .pass.admitted .pstamp { display: block; }
.gsheet.stamped .gstamp { animation: gStamp .45s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes gStamp { to { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }

/* the student pass (sign up builds it live; sign in shows a pass waiting at the gate) */
.pass { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 14px 16px 12px; overflow: hidden;
  background: #0066ff; color: #fff; border: 2px solid var(--sheet-line); border-radius: 20px; box-shadow: 0 6px 0 #0047b3; transform: rotate(-1.2deg); }
.pass::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.pass-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #cfe2ff; }
.pass-top img { width: 22px; height: 22px; border-radius: 7px; background: #fff; padding: 2px; }
.pass-top span { margin-left: auto; color: #fff; background: rgba(255, 255, 255, .18); border-radius: 8px; padding: 3px 7px; }
.pass-photo { width: 64px; height: 64px; border-radius: 16px; border: 3px solid #fff; background: #ffd43b; color: #0b0b09; display: grid; place-items: center;
  font: 900 24px/1 var(--round); overflow: hidden; }
.pass-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; background: #e8f1ff; }
.pass-id { min-width: 0; }
.pass-id small { display: block; font-size: 10px; font-weight: 900; letter-spacing: .14em; color: #cfe2ff; text-transform: uppercase; }
.pass-id b { display: block; font-size: 19px; font-weight: 900; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pass-id b + small { margin-top: 4px; }
.pass-id .h { font-size: 14px; font-weight: 800; color: #e8f1ff; }
.pass-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; padding-top: 8px; border-top: 2px dashed rgba(255, 255, 255, .35);
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: #cfe2ff; text-transform: uppercase; }
.pass-foot b { color: #fff; letter-spacing: .06em; }
.pass-kente { grid-column: 1 / -1; display: flex; height: 8px; margin: 4px -16px -12px; }
.pass-kente i { flex: 1; }
.pass .pstamp { position: absolute; right: 14px; top: 46%; padding: 4px 10px; border: 3px solid #ffd43b; border-radius: 9px; color: #ffd43b;
  font: 900 15px/1 var(--round); letter-spacing: .1em; transform: rotate(-14deg) scale(1.8); opacity: 0; }
.pass.admitted .pstamp { animation: gPass .4s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes gPass { to { opacity: 1; transform: rotate(-14deg) scale(1); } }
.pass.typing .pass-photo { animation: gPop .25s ease; }
@keyframes gPop { 50% { transform: scale(1.08); } }

/* sign-up perks as chips under the pass */
.gate-perks { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.gate-perks button { display: flex; align-items: center; gap: 8px; border: 2px solid var(--sheet-line); border-radius: 14px; background: var(--white); padding: 6px 10px 6px 6px;
  font: 800 13px var(--round); color: var(--ink-2); box-shadow: 0 3px 0 var(--sheet-line); cursor: pointer; }
.gate-perks button:active { transform: translateY(3px); box-shadow: none; }
.gate-perks .code { display: inline-grid; place-items: center; min-width: 42px; height: 24px; padding: 0 6px; border-radius: 8px; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.c-blue { background: var(--blue); } .c-leaf { background: var(--leaf); } .c-amber { background: var(--amber); }

/* wide screens: the sheet near the right edge, the campus gets the rest */
@media (min-width: 1280px) and (orientation: landscape) {
  .gate-page .nav .wrap, .gate-wrap { max-width: calc(1640px + var(--side) * 2); padding-inline: var(--side); }
  :root { --side: clamp(32px, 4.5vw, 96px); }
}
/* phones and tablets held upright: the campus on top, the sheet rises from the bottom
   (campus.js frames the campus in the top part with the same query) */
@media (max-width: 560px), (max-width: 1100px) and (orientation: portrait) {
  .gate-chapter { align-items: flex-end; padding: 26vh 0 18px; padding: 26svh 0 18px; }
  .gate-wrap { justify-content: center; }
  .gate-col { max-width: 560px; }
}
@media (max-width: 520px) {
  .gsheet { padding: 16px; border-radius: 18px; }
  .gsheet h1 { font-size: clamp(27px, 8vw, 32px); }
  .sheet-top { font-size: 10.5px; letter-spacing: .12em; }
  .pass { transform: none; }
  .pass-id b { font-size: 17px; }
}
@media (max-width: 360px) {
  .pass { grid-template-columns: 1fr; }
  .pass-photo { width: 52px; height: 52px; }
  .sheet-top > span:first-child { font-size: 9.5px; }
}
/* phones on their side and short laptops: less padding, the campus still beside */
@media (min-width: 561px) and (max-height: 640px) and (orientation: landscape) {
  .gate-chapter { padding: 18px 0 24px; align-items: flex-start; }
  .gate-col { max-width: min(480px, 58vw); }
  .gsheet { padding: 14px 18px; }
  .gsheet h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet-top .live::before { animation: none; }
  .gsheet.stamped .gstamp, .pass.admitted .pstamp { animation: none; opacity: 1; transform: translate(-50%, -50%) rotate(-12deg); }
  .pass.admitted .pstamp { transform: rotate(-14deg); }
}

/* phones held upright: the form comes first on sign in (the pass waits under it),
   a compact pass on sign up, the perks on one row you can swipe */
@media (max-width: 560px), (max-width: 1100px) and (orientation: portrait) {
  .gate-chapter { padding-top: 18vh; padding-top: 18svh; }
  .gate-col .gsheet { order: 1; }
  .gate-col .pass.at-gate { order: 2; }
  .gate-col .pass:not(.at-gate), .gate-col .gate-perks { order: 0; }
}
@media (max-width: 520px) {
  .pass { padding: 10px 12px 10px; gap: 4px 12px; }
  .pass-photo { width: 50px; height: 50px; font-size: 20px; border-radius: 13px; }
  .pass-id small { font-size: 9px; }
  .pass-id .h { font-size: 13px; }
  .pass-foot { font-size: 9.5px; padding-top: 6px; }
  .pass-kente { margin: 2px -12px -10px; height: 6px; }
  .gate-perks { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .gate-perks::-webkit-scrollbar { display: none; }
  .gate-perks li { flex: none; }
}
