/* FRBB Wi-Fi Portal — shared identity (frbb.llc look & feel) */

:root {
  color-scheme: dark;
  box-sizing: border-box;
  --bg: #060503;
  --panel: #0d0b07;
  --gold: #d7a94f;
  --gold-bright: #ecd092;
  --gold-dim: rgba(215, 169, 79, .38);
  --gold-faint: rgba(215, 169, 79, .14);
  --text: #f3ede1;
  --muted: #b7ab92;
  --error: #e0906c;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "EB Garamond", Georgia, "Times New Roman", serif;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); height: 100%; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* sweeping gold lines, like the frbb.llc background */
.lines {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 44px 24px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.emblem { display: block; margin: 0 auto 26px; width: 148px; height: auto; }

h1 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--gold);
  font-size: clamp(32px, 8vw, 42px);
  line-height: 1.12;
  text-align: center;
  margin: 0 0 6px;
}

.unit-label {
  font-style: italic;
  text-align: center;
  color: var(--gold-bright);
  font-size: 18px;
  letter-spacing: .04em;
  margin: 0 0 14px;
}
.unit-label:empty { display: none; }

.lede {
  text-align: center;
  color: var(--text);
  margin: 0 auto 34px;
  max-width: 38ch;
}

form { display: grid; gap: 22px; }

.field label {
  display: block;
  font-style: italic;
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  padding: 13px 14px;
  transition: border-color .18s ease;
}
.field input::placeholder { color: rgba(183, 171, 146, .55); }
.field input:focus { outline: none; border-color: var(--gold); }
.field input[type="date"] { min-height: 51px; }
.field input::-webkit-calendar-picker-indicator { filter: invert(.75) sepia(.4) saturate(2) hue-rotate(-10deg); cursor: pointer; }

:is(button, a, input):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.checkline {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
}
.checkline input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  background: var(--panel);
  cursor: pointer;
  position: relative;
  transition: border-color .18s ease, background .18s ease;
}
.checkline input:checked { background: var(--gold); border-color: var(--gold); }
.checkline input:checked::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #14100a;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.checkline span { font-size: 15.5px; color: var(--muted); }
.checkline a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.error {
  display: none;
  color: var(--error);
  font-size: 15px;
  margin: -8px 0 0;
}
.error.show { display: block; }

button.connect {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .02em;
  color: #171207;
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 14px 18px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
button.connect:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
button.connect:disabled { opacity: .7; cursor: default; }

/* success */
.success { display: none; text-align: center; }
.success.show { display: block; }
.success h2 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--gold);
  font-size: clamp(30px, 7vw, 38px);
  margin: 18px 0 10px;
}
.success p { color: var(--text); margin: 0 auto 8px; max-width: 36ch; }
.success .small { color: var(--muted); font-size: 15.5px; }
.check-ring { width: 86px; height: 86px; }
.check-ring circle, .check-ring path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (prefers-reduced-motion: no-preference) {
  .success.show .check-ring circle {
    stroke-dasharray: 264; stroke-dashoffset: 264;
    animation: draw .7s ease forwards;
  }
  .success.show .check-ring path {
    stroke-dasharray: 60; stroke-dashoffset: 60;
    animation: draw .45s ease .55s forwards;
  }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.socials { display: grid; gap: 12px; max-width: 320px; margin: 24px auto 0; }
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  padding: 13px 16px;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: .02em;
  transition: border-color .18s ease, background .18s ease;
}
.social:hover { border-color: var(--gold); background: var(--gold-faint); }
.social svg { width: 21px; height: 21px; flex: none; }

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  padding: 18px 24px calc(22px + env(safe-area-inset-bottom, 0px));
}
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.rule {
  width: 54px; height: 1px;
  background: var(--gold-dim);
  margin: 0 auto 14px;
}

/* terms dialog */
dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  max-width: min(560px, calc(100vw - 40px));
  width: 100%;
  padding: 28px 26px;
  margin: auto;
}
dialog::backdrop { background: rgba(0, 0, 0, .72); }
dialog h2 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--gold);
  font-size: 26px;
  margin: 0 0 12px;
}
dialog p { font-size: 15.5px; color: var(--muted); margin: 0 0 12px; }
dialog p strong { color: var(--text); font-weight: 500; }
dialog .dialog-actions { text-align: right; margin-top: 18px; }
dialog button {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  color: #171207;
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 2px;
  padding: 9px 22px;
  cursor: pointer;
}
dialog button:hover { background: var(--gold-bright); }
