/* Cam^2 Marriage gate — layout modeled on the Epic Hyperspace login screen */

:root {
  --colw: min(800px, 94vw);       /* fixed-width center column; resizing the window
                                     only changes how much of the side images shows */
  --panel: calc((100vw - var(--colw)) / 2);
  --halfpanel: calc(var(--panel) / 2);
  /* chairs.jpg is 2560x1183 (aspect 2.1645); at background-size auto 100% its
     rendered width is 2.1645 * viewport height */
  --imgw: 216.45vh;
  --woman-x: 0.3075;              /* horizontal center of each body in chairs.jpg */
  --man-x: 0.6225;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  overflow-x: hidden;
}

svg[hidden] { display: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

/* --- backgrounds ------------------------------------------------------ */

.bg {
  position: fixed;
  inset: 0;
  background: url("../img/glacier.jpg") center / cover no-repeat;
}

/* In chairs mode each side panel shows one half of the photo, centered on
   one person, so neither body is cut by the center column. */
.side {
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--panel);
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position-y: 0;
}
.side--left  { left: 0; }
.side--right { right: 0; }

body.chairs .side--left {
  background-image: url("../img/chairs.jpg");
  background-position-x: calc(var(--halfpanel) - var(--imgw) * var(--woman-x));
}
body.chairs .side--right {
  background-image: url("../img/chairs.jpg");
  background-position-x: calc(var(--halfpanel) - var(--imgw) * var(--man-x));
}

/* Smile mode: one full photo per side, filling the panel, positioned so both
   faces stay in the visible window. */
body.smile .bg {
  background-image: none;
  background-color: #17171a;
}
body.smile .side--left {
  background-image: url("../img/blacktie.jpg");
  background-size: auto 100%;
  background-position: calc(var(--halfpanel) - 66.9vh) 0;
}
body.smile .side--right {
  background-image: url("../img/desserts.jpg");
  background-size: cover;
  background-position: 34% 30%;
}

/* --- dark layout (any non-glacier mode) -------------------------------- */

body.dark .col {
  background: linear-gradient(#26262b 0%, #202024 65%, #1a1a1f 100%);
}
body.dark .wordmark { color: #d84a7f; }
body.dark .submark,
body.dark .date { color: #9a9aa2; }
body.dark .form input {
  background: #1d1d21;
  border-color: #5a5a62;
  color: #e8e8ea;
}
body.dark .form .login {
  background: #3a3a40;
  border-color: #6a6a72;
  color: #f0f0f2;
}
body.dark .form .login:hover { background: #45454c; }
body.dark .form .login:active { background: #2e2e34; }
body.dark .welcome { color: #c8c8cc; }
body.dark .legal { color: #a8a8ae; }
body.dark .hud button {
  background: #26262a;
  border-color: #4a4a50;
  color: #e8e8ea;
}
body.dark .hud button:hover { background: #303036; }

/* --- center column ---------------------------------------------------- */

.col {
  position: relative;
  z-index: 1;
  width: var(--colw);
  min-width: 320px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 7.4%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(#efeff1 0%, #e7e6ea 65%, #d9d6e2 100%);
}

.logo {
  margin-top: 4.5vh;
  text-align: center;
}

.wordmark {
  margin: 0;
  font-family: "Arial Black", Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: min(13vh, 12vw);
  line-height: 0.9;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.07em;   /* tight enough that the glyphs touch, Epic-style */
  color: #b3245a;
}
.wordmark sup { font-size: 0.42em; }

.submark {
  margin-top: 1.4vh;
  font-size: clamp(14px, 2.6vh, 26px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: #8b8b93;
}
.submark sup { font-size: 0.55em; letter-spacing: 0; }

.date {
  margin-top: 0.8vh;
  font-size: clamp(10px, 1.6vh, 15px);
  color: #8b8b93;
  text-align: right;
}

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

.form {
  margin-top: 14vh;
  width: 65%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form input {
  padding: 12px 10px;
  font-size: 15px;
  font-family: inherit;
  color: #222;
  background: #fdfdfd;
  border: 1px solid #8f8f8f;
}
.form input:focus {
  outline: 2px solid #b3245a;
  outline-offset: -1px;
}

.form .login {
  margin-top: 2px;
  padding: 10px;
  font-size: 14px;
  font-weight: bold;
  font-family: inherit;
  color: #111;
  background: #d6d6d6;
  border: 1px solid #6f6f6f;
  cursor: pointer;
}
.form .login:hover { background: #e2e2e2; }
.form .login:active { background: #c9c9c9; }

.u { text-decoration: underline; }

.welcome {
  margin-top: 4vh;
  font-size: 14px;
  color: #444;
  text-align: center;
}

/* --- footer legalese --------------------------------------------------- */

.legal {
  position: absolute;
  left: 7.4%;
  right: 7.4%;
  bottom: 2.2vh;
  margin: 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: #2b2b2b;
  white-space: nowrap;
  overflow: hidden;
}

/* --- bottom-right hud buttons ------------------------------------------ */

.hud {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hud button {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 2px;
  color: #111;
  cursor: pointer;
}
.hud button:hover { background: #f0f0f0; }
.hud svg { width: 26px; height: 26px; display: block; }
.hud svg[hidden] { display: none; }

/* --- small screens ------------------------------------------------------ */

@media (max-width: 760px) {
  :root { --colw: 92vw; }
  .form { width: 82%; }
  .legal { font-size: 9px; white-space: normal; }
  .hud button { width: 44px; height: 44px; }
  .hud svg { width: 22px; height: 22px; }
}
