:root {
  --night: #090e1c;
  --night-deep: #050914;
  --surface: #10172a;
  --surface-light: #171f35;
  --ink: #f7f8ff;
  --muted: #adb6cc;
  --line: rgba(255, 255, 255, 0.16);
  --blue: #1686ff;
  --violet: #8f35ff;
  --lilac: #b996ff;
  --green: #2ed58c;
  --focus: #ffdf6b;
  --radius: 14px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--night-deep);
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--night-deep);
  font-family: "Trebuchet MS", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
[role="button"] {
  cursor: pointer;
}

button {
  font: inherit;
}

button:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.gate-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  overflow: clip;
  background: var(--night-deep);
}

.gate-backdrop {
  position: absolute;
  z-index: -3;
  inset: 0;
  background-color: var(--night);
  background-image: url("../images/flirtinglocal-background.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

.gate-backdrop::before {
  position: absolute;
  content: "";
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 9, 20, 0.04) 0%, rgba(5, 9, 20, 0.08) 45%, rgba(5, 9, 20, 0.82) 72%, rgba(5, 9, 20, 0.99) 100%),
    linear-gradient(90deg, rgba(5, 9, 20, 0.28), transparent 34%, transparent 70%, rgba(5, 9, 20, 0.34));
}

.gate-topline {
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, 1380px);
  margin: 0 auto;
  padding: 18px 0;
}

.gate-topline::before {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b1020;
  content: "";
  transform: translateX(-50%);
}

.gate-brandline {
  display: flex;
  align-items: center;
  gap: 11px;
}

.gate-brandline img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.gate-brand {
  color: #9b66ff;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.gate-location {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #eef2ff;
  background: rgba(9, 14, 28, 0.86);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gate-location::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(46, 213, 140, 0.16);
  content: "";
}

.gate-user {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(9, 14, 28, 0.88);
  font-weight: 800;
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.gate-user:hover {
  border-color: var(--lilac);
  background: var(--surface);
  transform: translateY(-1px);
}

.gate-space {
  min-height: 180px;
}

.gate-dock {
  position: relative;
  z-index: 2;
  width: min(100% - 48px, 1380px);
  margin: 0 auto 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 14, 28, 0.97);
  box-shadow: var(--shadow);
}

.gate-dock-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: stretch;
}

.gate-message {
  padding: 30px 38px 28px 42px;
}

.gate-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 11px;
  color: var(--lilac);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gate-eyebrow::after {
  width: 48px;
  height: 1px;
  background: rgba(185, 150, 255, 0.48);
  content: "";
}

.gate-title {
  max-width: 18ch;
  margin: 0;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.97;
  text-wrap: balance;
}

.gate-title em {
  color: var(--lilac);
  font-style: italic;
  font-weight: 400;
}

.gate-copy {
  max-width: 62ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.53;
  text-wrap: pretty;
}

.gate-convert {
  display: grid;
  align-content: center;
  gap: 17px;
  padding: 28px 34px;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.gate-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gate-proof-item {
  min-width: 0;
  padding: 10px 6px;
  border-block: 1px solid var(--line);
  color: #dde3f1;
  text-align: center;
}

.gate-proof-item b {
  display: block;
  color: white;
  font-family: Georgia, serif;
  font-size: 1.2rem;
  line-height: 1;
}

.gate-proof-item span {
  display: block;
  margin-top: 5px;
  color: #8f9ab1;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gate-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.gate-primary,
.gate-more {
  min-height: 54px;
  border-radius: 9px;
  font-weight: 900;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.gate-primary {
  border: 0;
  color: white;
  background: linear-gradient(100deg, var(--blue), var(--violet));
}

.gate-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.gate-more {
  width: 54px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  font-size: 1.3rem;
}

.gate-more:hover {
  border-color: var(--lilac);
  color: var(--lilac);
}

.gate-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  color: #939eb4;
  font-size: 0.7rem;
  line-height: 1.35;
  text-align: center;
}

.gate-note strong {
  color: var(--green);
}

.gate-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100% - 48px, 1380px);
  margin: 0 auto;
  padding: 0 0 18px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
}

.gate-footer strong {
  color: rgba(255, 255, 255, 0.88);
}

.gate-footer-links {
  display: flex;
  gap: 17px;
}

.gate-footer-links span {
  white-space: nowrap;
}

.gate-popup {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  align-items: end;
  visibility: hidden;
  opacity: 0;
  background: rgba(3, 6, 14, 0.78);
  transition: visibility 0s linear 220ms, opacity 220ms ease;
}

.gate-popup.is-visible {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.gate-sheet {
  position: relative;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--surface);
  box-shadow: 0 -26px 80px rgba(0, 0, 0, 0.58);
  transform: translateY(100%);
  transition: transform 240ms ease;
}

.gate-popup.is-visible .gate-sheet {
  transform: translateY(0);
}

.gate-sheet::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  content: "";
}

.gate-sheet-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.75fr);
  gap: 48px;
  align-items: center;
  width: min(100% - 64px, 1180px);
  min-height: 278px;
  margin: 0 auto;
  padding: 38px 0 34px;
}

.gate-popup-kicker {
  margin: 0 0 10px;
  color: var(--lilac);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.gate-popup-title {
  max-width: 18ch;
  margin: 0;
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.gate-popup-copy {
  max-width: 58ch;
  margin: 13px 0 0;
  color: var(--muted);
  line-height: 1.55;
  text-wrap: pretty;
}

.gate-popup-side {
  display: grid;
  gap: 11px;
}

.gate-popup-accept,
.gate-popup-refuse {
  min-height: 54px;
  border-radius: 9px;
  font-weight: 900;
}

.gate-popup-accept {
  border: 0;
  color: white;
  background: linear-gradient(100deg, var(--blue), var(--violet));
}

.gate-popup-accept:hover {
  filter: brightness(1.12);
}

.gate-popup-refuse {
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.gate-popup-refuse:hover {
  border-color: var(--lilac);
  color: var(--lilac);
}

.gate-popup-close {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: var(--surface-light);
  font-size: 1.25rem;
  line-height: 1;
}

.gate-popup-close:hover {
  border-color: var(--lilac);
  color: var(--lilac);
}

/* SEO Content */
details {
  position: absolute;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}

details summary {
  display: none;
}

details article {
  max-width: 760px;
}

@media (max-width: 980px) {
  .gate-dock-inner {
    grid-template-columns: 1fr;
  }

  .gate-message {
    padding: 26px 32px 20px 36px;
  }

  .gate-title {
    max-width: 24ch;
    font-size: clamp(2.1rem, 6vw, 3.8rem);
  }

  .gate-convert {
    grid-template-columns: minmax(230px, 0.75fr) minmax(300px, 1fr);
    align-items: center;
    padding: 18px 28px 22px 34px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .gate-note {
    grid-column: 1 / -1;
  }

  .gate-sheet-inner {
    grid-template-columns: 1fr 0.72fr;
    width: min(100% - 48px, 900px);
  }
}

@media (max-width: 680px) {
  .gate-backdrop {
    background-position: 28% top;
    background-size: auto 58%;
  }

  .gate-backdrop::before {
    background: linear-gradient(180deg, rgba(5, 9, 20, 0.05) 0%, rgba(5, 9, 20, 0.22) 34%, rgba(5, 9, 20, 0.98) 55%, rgba(5, 9, 20, 1) 100%);
  }

  .gate-topline,
  .gate-dock,
  .gate-footer {
    width: min(100% - 28px, 620px);
  }

  .gate-topline {
    padding: 12px 0;
  }

  .gate-location {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 0.65rem;
  }

  .gate-user {
    min-height: 40px;
    padding-inline: 13px;
    font-size: 0.76rem;
  }

  .gate-space {
    min-height: 150px;
  }

  .gate-dock {
    margin-bottom: 10px;
    border-radius: 11px;
  }

  .gate-message {
    padding: 21px 19px 16px 23px;
  }

  .gate-eyebrow {
    margin-bottom: 8px;
  }

  .gate-title {
    max-width: 17ch;
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .gate-copy {
    margin-top: 10px;
    font-size: 0.84rem;
    line-height: 1.43;
  }

  .gate-convert {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 14px 18px 16px 23px;
  }

  .gate-proof {
    gap: 4px;
  }

  .gate-proof-item {
    padding-block: 7px;
  }

  .gate-proof-item b {
    font-size: 1rem;
  }

  .gate-proof-item span {
    font-size: 0.57rem;
  }

  .gate-primary,
  .gate-more {
    min-height: 48px;
  }

  .gate-note {
    font-size: 0.64rem;
  }

  .gate-footer {
    padding-bottom: 9px;
  }

  .gate-footer-links {
    display: none;
  }

  .gate-sheet-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    width: calc(100% - 36px);
    min-height: 0;
    padding: 42px 0 22px;
  }

  .gate-popup-title {
    max-width: 16ch;
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  .gate-popup-copy {
    margin-top: 10px;
    font-size: 0.9rem;
    line-height: 1.48;
  }

  .gate-popup-side {
    grid-template-columns: 1fr 0.6fr;
  }

  .gate-popup-close {
    top: 11px;
    right: 14px;
  }
}

@media (max-width: 390px) and (max-height: 820px) {
  .gate-location {
    display: none;
  }

  .gate-brandline {
    gap: 7px;
  }

  .gate-brandline img {
    width: 30px;
    height: 30px;
  }

  .gate-brand {
    font-size: 0.86rem;
  }

  .gate-topline {
    padding-block: 8px;
  }

  .gate-space {
    min-height: 125px;
  }

  .gate-message {
    padding-block: 17px 13px;
  }

  .gate-title {
    font-size: 2.1rem;
  }

  .gate-copy {
    font-size: 0.79rem;
  }

  .gate-convert {
    padding-block: 11px 13px;
  }

  .gate-note {
    display: none;
  }

  .gate-footer {
    padding-bottom: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
