/* Mile High Club — Broncos orange × Vikings purple, after dark. */
:root {
  --orange: #fb4f14;      /* Broncos orange */
  --orange-soft: #ff7a45;
  --purple: #4f2683;      /* Vikings purple */
  --purple-bright: #8a55d6;
  --gold: #ffc62f;        /* Vikings gold, used sparingly */
  --rose: #d6336c;        /* the sunset between the two */

  --bg: #0e0918;
  --surface: #1a1129;
  --surface-2: #241838;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f2fb;
  --muted: #b8a9cc;
  --faint: #7f7193;
  --danger: #ff6b6b;

  --sunset: linear-gradient(120deg, var(--gold) -10%, var(--orange) 30%, var(--rose) 62%, var(--purple-bright) 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }
/* `hidden` must always win; otherwise rules like .chip-btn { display: inline-flex } keep
   "hidden" elements on screen (that's how "Get the app" showed inside the installed app). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

/* iOS 26 home-screen app bug (WebKit 301108): with viewport-fit=cover and the black-translucent
   status bar, the viewport comes out one status-bar shorter than the screen, so the fixed app
   shell stops short and leaves a strip under the bottom tabs. Making the page at least
   screen-height makes iOS use the full screen. min() keeps it from overshooting where
   100lvh is already the full screen. iOS-only (-webkit-touch-callout) so Android is untouched. */
@media (display-mode: standalone) {
  @supports (-webkit-touch-callout: none) {
    html { min-height: min(100lvh, calc(100% + env(safe-area-inset-top))); }
  }
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ambient sunset glows */
.glow { position: fixed; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: 0.45; pointer-events: none; }
.glow-a { width: 420px; height: 420px; background: var(--orange); top: -180px; right: -160px; opacity: 0.32; }
.glow-b { width: 520px; height: 520px; background: var(--purple); bottom: -220px; left: -220px; opacity: 0.55; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 12px) 18px 12px;
  background: linear-gradient(var(--bg) 60%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; }
.brand img { border-radius: 9px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04);
  color: var(--text); font: 600 13px var(--font-body); cursor: pointer;
}
.chip-btn:hover { border-color: var(--orange); }

/* ---------- layout ---------- */
main { max-width: 560px; margin: 0 auto; padding: 18px 18px 48px; }
.eyebrow {
  margin: 18px 0 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange-soft);
}
.display {
  margin: 0 0 14px;
  font: 700 clamp(32px, 8.5vw, 44px)/1.08 var(--font-display);
  letter-spacing: -0.015em;
}
.display em {
  font-style: italic; font-weight: 500;
  background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 0 0 22px; font-size: 17px; color: var(--muted); }
.lead strong { color: var(--text); }
.section-title {
  margin: 34px 0 14px;
  font: 600 13px var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}
.fineprint, .hint { font-size: 13px; color: var(--faint); margin: 10px 0 0; }
.center { text-align: center; }

/* ---------- form controls ---------- */
.checks { display: grid; gap: 10px; margin-top: 30px; }
.check {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line);
  font-weight: 600;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line-strong);
  display: grid; place-items: center; transition: 0.15s;
}
.check input:checked + .box { background: var(--orange); border-color: var(--orange); }
.check input:checked + .box::after { content: '✓'; color: #fff; font-size: 15px; font-weight: 800; }
.check input:focus-visible + .box { outline: 2px solid var(--gold); outline-offset: 2px; }
.check-sm { margin-top: 8px; padding: 10px 12px; font-size: 14px; font-weight: 500; background: transparent; }
.check-sm .box { width: 20px; height: 20px; }

.field { display: block; margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 15px; padding: 0; }
input[type='text'], input[type='tel'], input[type='email'], input[type='password'], textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  font: 16px/1.4 var(--font-body); transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 120px; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(251, 79, 20, 0.2); }
input:disabled { opacity: 0.5; }
.counter { display: block; text-align: right; font-size: 12px; color: var(--faint); margin-top: 4px; }
.field .hint { margin: -2px 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  padding: 9px 14px; border-radius: 999px; cursor: pointer; user-select: none;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03); color: var(--text);
  font: 600 14px var(--font-body); transition: 0.15s;
}
.chip[aria-pressed='true'] { background: linear-gradient(120deg, var(--orange), var(--rose)); border-color: transparent; }

/* ---------- photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo, .photo-add { position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); overflow: hidden; }
.photo { background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .remove {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(14, 9, 24, 0.75); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
.photo.is-uploading img { opacity: 0.4; }
.photo.is-uploading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--orange); animation: spin 0.8s linear infinite; }
.photo-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  border: 2px dashed var(--line-strong); color: var(--muted); font-weight: 600; font-size: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.photo-add:hover { border-color: var(--orange); color: var(--text); }
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-add[hidden] { display: none; }
.photo-main { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; font-weight: 600; pointer-events: none; }
.photo-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.photo-hint[hidden] { display: none; }
.photo[data-id] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.photo-grid.is-sorting .photo:not(.is-dragging) { transition: opacity 0.15s; opacity: 0.85; }
.photo.is-dragging { z-index: 2; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); cursor: grabbing; opacity: 0.95; }
.photo.is-dragging .remove, .photo.is-dragging .photo-main { visibility: hidden; }

/* ---------- buttons ---------- */
.actions { display: flex; gap: 10px; margin-top: 30px; }
.btn {
  flex: 1; padding: 16px 20px; border-radius: 14px; border: 0; cursor: pointer;
  font: 700 16px var(--font-body); letter-spacing: 0.01em; transition: transform 0.1s, filter 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--sunset); background-size: 140% 100%; color: #fff; box-shadow: 0 10px 30px -10px rgba(251, 79, 20, 0.6); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { filter: grayscale(0.6) brightness(0.8); cursor: wait; }
.btn-ghost { flex: 0 0 auto; background: transparent; color: var(--muted); border: 1px solid var(--line-strong); }
.actions .btn-ghost:only-child { flex: 1; }

.error { color: var(--danger); font-weight: 600; font-size: 14px; margin: 14px 0 0; min-height: 0; }
.error:empty { display: none; }
.saved { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.saved.show { opacity: 1; }

/* ---------- done + install ---------- */
.center-card { text-align: center; padding-top: 60px; }
.center-card img { border-radius: 18px; margin-bottom: 18px; }

.install-card { margin-top: 26px; padding: 22px; border-radius: var(--radius); background: linear-gradient(160deg, rgba(79, 38, 131, 0.55), var(--surface) 70%); border: 1px solid var(--line-strong); }
.install-card:empty { display: none; }
.install-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.install-head img { border-radius: 14px; }
.install-head h2 { margin: 0; font: 700 21px/1.2 var(--font-display); }
.install-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.install-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.install-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(14, 9, 24, 0.55); counter-increment: s; font-size: 15px; }
.install-steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); font-weight: 800; font-size: 13px; }
.install-steps svg { flex: none; color: #4ea1ff; vertical-align: middle; }
.install-steps b { color: var(--text); }
.install-steps small { display: block; margin-top: 2px; color: var(--faint); font-size: 13px; }
.install-steps small svg { width: 18px; height: 18px; color: var(--muted); }
.install-ok { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); }
.install-card .btn { width: 100%; }
.install-card .btn + .hint { text-align: center; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(5, 3, 10, 0.7); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s; }
.sheet-backdrop[hidden] { display: none; }
.sheet { position: relative; width: 100%; max-width: 560px; padding: 26px 20px calc(env(safe-area-inset-bottom) + 24px); border-radius: 26px 26px 0 0; background: var(--surface); border-top: 1px solid var(--line-strong); animation: slideup 0.3s ease; }
.sheet .install-card { margin: 0; padding: 0; background: none; border: 0; }
.sheet-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 22px; cursor: pointer; }
@keyframes fade { from { opacity: 0; } }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }

.loader { margin: 30vh auto; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--orange); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- invite flow: full-screen swipeable slides ---------- */
/* Pinned to the screen edges instead of height: 100dvh — in an iPhone home-screen app,
   100dvh comes up one status-bar short, leaving an empty strip under the bottom bar. */
body.flow { position: fixed; inset: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding-bottom: 0; }
body.flow .topbar { position: relative; flex: none; background: none; padding-bottom: 6px; transition: opacity 0.4s; }
body.flow .brand { font-size: 15px; }
body.flow.at-intro .topbar .brand { opacity: 0; }

/* clip (not just hidden): a hidden box can still be scrolled by the browser to show a focused
   field, which slid the wrong slide into view. clip can't be scrolled at all. */
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; overflow: clip; touch-action: pan-y; }
.track { display: flex; height: 100%; transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1); will-change: transform; }
.track.dragging { transition: none; }
.slide { flex: 0 0 100%; height: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; padding: 0 22px; }
.slide-inner { width: 100%; max-width: 460px; margin: auto; padding: 12px 0 20px; }

.slide-title { margin: 0 0 22px; font: 700 clamp(30px, 8.6vw, 40px)/1.08 var(--font-display); letter-spacing: -0.015em; }
.slide-title + .lead { margin-top: -8px; }
.slide-title em, .intro-title em {
  font-style: italic; font-weight: 500;
  background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.slide-sub { margin: 30px 0 12px; font: 600 13px var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.slide-note { margin: -10px 0 20px; color: var(--muted); font-size: 16px; }

.yes-list, .no-list, .vibes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.yes-list li, .no-list li { position: relative; padding-left: 32px; font-size: 18px; line-height: 1.4; }
.yes-list li::before { content: '✦'; position: absolute; left: 2px; top: 1px; color: var(--orange); }
.no-list li { color: var(--muted); }
.aside { color: var(--muted); }
.slide .chips + .hint { margin-top: 0; }
.hint-top { margin: 0 0 12px; }
.photo-name { margin-top: 32px; }
.photo-name + .field { margin-top: 32px; }
/* Breathing room between the vanilla and sexy interests. */
.interests-spicy { margin-top: 34px; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; min-width: 0; }
.add-row .chip { flex: none; padding: 0 18px; }
.chip-custom { display: inline-flex; align-items: center; gap: 8px; }
.chip-custom b { font-size: 17px; line-height: 1; opacity: 0.85; }
.label .optional { color: var(--faint); font-weight: 500; }
.no-list li::before { content: '✕'; position: absolute; left: 4px; color: var(--faint); font-weight: 700; }
.vibes li { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 17px; font-weight: 600; }
.vibes span { font-size: 22px; }
.vibes-text { gap: 10px; }
.vibes-text li { align-items: flex-start; gap: 12px; padding: 11px 14px; font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--muted); }
.vibes-text p { margin: 0; }
.vibes-text b { color: var(--text); }
/* Long heading that should stay on one line on a phone. */
.slide-title-sm { margin-bottom: 16px; font-size: clamp(24px, 6.6vw, 40px); }
.purpose-end { margin: 14px 0 0; font: 700 20px/1.3 var(--font-display); text-align: center; }
.slide .checks { margin-top: 26px; }
.slide .field { margin-bottom: 18px; }
.slide textarea { min-height: 150px; }
.slide .photo-grid { gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* intro */
.slide-intro { flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.scene { width: min(78vw, 320px); height: auto; margin-bottom: 10px; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.scene .sun { animation: sunrise 1.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.scene .far { animation: rise-in 1s ease both; }
.scene .near { animation: rise-in 1s 0.1s ease both; }
.intro-kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--orange-soft); animation: fade-up 0.7s 1.1s ease both; }
.intro-title { margin: 6px 0 12px; font: 700 clamp(42px, 13vw, 60px)/1 var(--font-display); letter-spacing: -0.02em; animation: fade-up 0.8s 1.35s ease both; }
.intro-hey { margin: 0; font-size: 18px; color: var(--muted); animation: fade-up 0.7s 1.8s ease both; }
.btn-block { display: block; width: 100%; text-align: center; text-decoration: none; }
.intro-go { flex: none; width: min(100%, 320px); margin-top: 34px; animation: fade-up 0.6s 2.3s ease both; }
@keyframes sunrise { from { transform: translateY(190px); } }
@keyframes rise-in { from { transform: translateY(16px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }

/* bottom nav */
.flow-nav { flex: none; padding: 8px 22px calc(env(safe-area-inset-bottom) + 14px); }
.flow-nav[hidden] { display: none; }
.flow-nav .error { text-align: center; margin: 0 0 8px; }
.flow-nav-row { display: flex; align-items: center; gap: 14px; max-width: 460px; margin: 0 auto; }
.nav-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); color: var(--text); cursor: pointer; }
.nav-btn:disabled { opacity: 0.3; cursor: default; }
.nav-next { flex: 0 0 auto; min-width: 120px; padding: 15px 24px; }
.dots { flex: 1; display: flex; gap: 5px; max-width: 150px; margin: 0 auto; }
/* Equal segments that fill in as you go. Only the colour animates: Safari on iPhone left
   stale orange blocks behind when dots changed width. */
.dots span { flex: 1; height: 5px; border-radius: 3px; background: var(--line-strong); transition: background-color 0.3s; }
.dots span.on, .dots span.past { background: var(--orange); }
.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* done */
.done-logo { border-radius: 18px; margin-bottom: 16px; box-shadow: 0 16px 40px -14px rgba(251, 79, 20, 0.6); }
.slide .install-card { margin-top: 12px; text-align: left; padding: 18px; }
.slide .install-head { margin-bottom: 12px; }
.slide .install-head img { width: 44px; height: 44px; }
.slide .install-head h2 { font-size: 19px; }
.slide .install-steps li { padding: 10px 12px; }
.saved { bottom: calc(env(safe-area-inset-bottom) + 92px); }
/* The finished screen stays hidden until they've tapped Send (it sits next to the last step). */
body.flow:not(.submitted) [data-slide="done"] { visibility: hidden; }
.done-title { margin-bottom: 48px; }
.done-secondary { margin-top: 10px; padding: 14px 20px; }
.link-btn { margin-top: 16px; padding: 10px; border: 0; background: none; color: var(--muted); font: 600 14px var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Short phones (iPhone SE etc.): keep the finished screen on one screen. */
@media (max-height: 740px) {
  .done-logo { display: none; }
  .slide .install-card { padding: 14px; }
  .slide .install-head { margin-bottom: 8px; }
  .slide .install-head p { display: none; }
  .slide .install-steps { gap: 6px; }
  .slide .install-steps li { padding: 8px 10px; font-size: 14px; }
  .slide .link-btn { margin-top: 6px; }
}

/* /login */
.login-card { padding-top: 40px; }
.login-card .lead { margin-bottom: 28px; }
.login-page-form { max-width: 400px; margin: 0 auto; }
.login-help { margin: 18px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.member-signin { display: inline-block; margin-top: 8px; color: var(--orange-soft); font-weight: 600; }
