/* Fonts are self-hosted: no request to Google, so visitors' IP addresses are not shared with it. */
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/fraunces.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400 600; font-style: normal; font-display: swap; src: url("/fonts/sourcesans3.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/spacegrotesk.woff2") format("woff2"); }

:root {
  --bg: #f6f1e4; --side: #14151a; --text: #1c1b17; --soft: #55524a;
  --field: #fffdf7; --field-line: #6b665a; --link: #0b4f94;
  --btn: #1c1b17; --btn-text: #f6f1e4; --mark: #fabc13; --sel: #c6d8ea;
  --err-bg: #fbe3df; --err-text: #8c1d18; --err-line: #e7aaa3; --focus: #2b7fd4;
  --theme-fg: var(--text); --theme-sel: var(--sel);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171612; --side: #0c0d10; --text: #f3eedf; --soft: #bdb8a8;
    --field: #0f0e0b; --field-line: #8a8575; --link: #8dc1ff;
    --btn: #fabc13; --btn-text: #171612; --mark: rgba(250,188,19,.38); --sel: #2d4a6b;
    --err-bg: #3a1f1d; --err-text: #ffb4ab; --err-line: #7a3a35; --focus: #6db3ff;
  }
}
:root[data-theme="dark"] {
  --bg: #171612; --side: #0c0d10; --text: #f3eedf; --soft: #bdb8a8;
  --field: #0f0e0b; --field-line: #8a8575; --link: #8dc1ff;
  --btn: #fabc13; --btn-text: #171612; --mark: rgba(250,188,19,.38); --sel: #2d4a6b;
  --err-bg: #3a1f1d; --err-text: #ffb4ab; --err-line: #7a3a35; --focus: #6db3ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); font-size: 18px; line-height: 1.5; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
input:focus { outline: 3px solid var(--focus); outline-offset: 2px; }

.page { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* --- brand panel --- */
.brand { position: relative; overflow: hidden; background: var(--side); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.ring { position: absolute; right: -180px; bottom: -180px; width: 520px; height: 520px; border-radius: 50%; border: 44px solid #fabc13; opacity: .14; }
.brand-id, .brand-copy, .brand-note { position: relative; }
.brand-id { display: flex; align-items: center; gap: 16px; }
.brand-id img { display: block; width: 112px; height: 112px; }
.brand-name { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 32px; line-height: 1.1; letter-spacing: .1px; }
.brand-copy { max-width: 540px; }
.hoot { margin: 0 0 20px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: clamp(48px, 5.6vw, 80px); line-height: 1.02; letter-spacing: -1.2px; }
.hoot-sub { margin: 0; font-size: 26px; line-height: 1.45; color: #c9ccd4; }
.brand-note { margin: 0; font-size: 15px; color: #b3b7c1; }

/* --- theme selector: top-right corner --- */
.theme { position: absolute; top: 16px; right: 32px; z-index: 2; display: flex; gap: 6px; }
.theme-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: var(--theme-fg); cursor: pointer; }
.theme-btn[aria-pressed="true"] { background: var(--theme-sel); }

/* --- sign-in area --- */
.main { display: flex; align-items: center; justify-content: center; padding: 88px 32px 56px; }
.box { width: 100%; max-width: 420px; }
h1 { margin: 0 0 14px; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 56px; line-height: 1.04; letter-spacing: -.5px; }
h1.pending { visibility: hidden; }
.mark { box-shadow: inset 0 -.3em 0 var(--mark); }
.lede { margin: 0 0 32px; font-size: 18px; line-height: 1.5; color: var(--soft); }
.alert { margin: 0 0 20px; padding: 12px 14px; border-radius: 6px; background: var(--err-bg); color: var(--err-text); border: 1px solid var(--err-line); font-size: 16px; }
.field { margin-bottom: 20px; }
label { display: block; font-weight: 600; font-size: 16px; margin-bottom: 8px; }
input[type="email"], input[type="password"], input[type="text"] { width: 100%; height: 52px; padding: 0 14px; font: inherit; font-size: 18px; color: var(--text); background: var(--field); border: 2px solid var(--field-line); border-radius: 6px; }
.pw { position: relative; }
.pw input { padding-right: 80px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--link); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 28px; font-size: 16px; }
.check { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: #b88400; }
.row a, .help a { color: var(--link); }
.primary { width: 100%; height: 56px; border: 0; border-radius: 6px; background: var(--btn); color: var(--btn-text); font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; }
.primary[disabled] { opacity: .7; cursor: progress; }
.help { margin: 24px 0 0; font-size: 15px; color: var(--soft); text-align: center; }
.noscript { margin: 0; padding: 12px 16px; background: #fbe3df; color: #8c1d18; text-align: center; }

/* --- phone and narrow windows: the brand panel becomes a band across the top --- */
@media (max-width: 899px) {
  .page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .brand { grid-row: 1; padding: 24px; min-height: 232px; justify-content: flex-end; gap: 14px; }
  .main { grid-row: 2; align-items: flex-start; padding: 28px 24px 32px; }
  .ring { right: -90px; top: -90px; bottom: auto; width: 240px; height: 240px; border-width: 24px; }
  .brand-id { flex-direction: column; align-items: flex-start; gap: 14px; }
  .brand-id img { width: 84px; height: 84px; }
  .brand-name { font-size: 30px; }
  .brand-copy, .brand-note { display: none; }
  .theme { right: 12px; top: 12px; --theme-fg: #fff; --theme-sel: #35557a; }
  h1 { font-size: 40px; }
  .lede { font-size: 17px; margin-bottom: 22px; }
  .field { margin-bottom: 14px; }
  .row { margin-bottom: 20px; font-size: 15px; }
}
