/* ═══════════════════════════════════════════════════════════
   SWAG WIRE — Tactical Key Gate
   Dark scanline canvas · Chamfered inputs & CTA · Monochrome Chrome Platinum accent
   ═══════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  --ac: #d6dbe5;
  --ac2: #f1f4f9;
  --ac3: #9ba3b4;
  --ac-ink: #090b0f;
  --ac-soft: rgba(214, 219, 229, 0.085);
  --ac-glow: rgba(232, 236, 244, 0.30);

  --warn: #e0a848;
  --warn-soft: rgba(224, 168, 72, 0.09);

  --bg: #07080a;
  --bg-radial: rgba(214, 219, 229, 0.09);

  --tx: #f4f6ff;
  --tx-sub: #8289a0;
  --tx-muted: #60677e;

  --in-bg: #0e1014;
  --in-bdr: rgba(255, 255, 255, 0.24);
  --in-tx: #f3f4f6;
  --in-ph: rgba(165, 170, 180, 0.55);

  --paste-bg: #181a1f;
  --paste-bdr: rgba(255, 255, 255, 0.08);

  --err-tx: #fca5a5;
  --err-bg: rgba(239, 68, 68, 0.10);
  --err-bdr: rgba(239, 68, 68, 0.36);

  --ok-tx: #86efac;
  --ok-bg: rgba(34, 197, 94, 0.10);
  --ok-bdr: rgba(34, 197, 94, 0.34);

  --ui: 'Chakra Petch', 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Orbitron', 'Tektur', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 68% 45% at 50% 42%, var(--bg-radial) 0%, transparent 65%),
    var(--bg);
  color: var(--tx);
  font: 14px/1.55 var(--ui);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(214, 219, 229, 0.30);
  color: #fff;
}

/* Full-screen subtle horizontal CRT scanlines */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 3px);
}

/* ── Top status / maintenance bar + diagonal stripe divider ── */
.notice-bar {
  position: relative;
  z-index: 10;
  width: 100%;
  background: var(--ac-soft);
}

.notice-top-line {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, rgba(214, 219, 229, 0.25) 0%, var(--ac2) 50%, rgba(214, 219, 229, 0.25) 100%);
}

.notice-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}

html {
  -webkit-text-size-adjust: 100%
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font: 14px/1.6 var(--ui);
  color: var(--tx);
  background: var(--page-bg);
  overflow-x: hidden;
  transition: background .3s;
}

::selection {
  background: rgba(214, 219, 229, .28);
  color: #fff
}

.notice-badge {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: var(--ac2);
  color: #090b0f;
  font: 800 13px/1 var(--mono);
  box-shadow: 0 0 14px rgba(241, 244, 249, 0.32);
}

.notice-text {
  margin: 0;
  font: 500 12.5px/1.45 var(--ui);
  color: #e6e9f0;
  letter-spacing: 0.01em;
}

.notice-stripes {
  height: 4px;
  width: 100%;
  background: repeating-linear-gradient(-55deg,
      rgba(214, 219, 229, 0.68) 0px,
      rgba(214, 219, 229, 0.68) 7px,
      transparent 7px,
      transparent 16px);
}

/* Maintenance warning state */
.notice-bar.is-warn {
  background: var(--warn-soft);
}

.seg-ic {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none
}

.seg-btn:hover:not([aria-pressed="true"]) {
  color: var(--tx)
}

.seg-btn[aria-pressed="true"] {
  background: var(--ac);
  color: var(--ac-ink);
}

.seg-btn:focus-visible {
  outline: 2px solid var(--ac2);
  outline-offset: 2px
}

@media(max-width:420px) {
  .seg-btn span {
    display: none
  }

  .seg-btn {
    padding: 8px
  }
}

.notice-bar.is-warn .notice-top-line {
  background: linear-gradient(90deg, rgba(224, 168, 72, 0.35) 0%, var(--warn) 50%, rgba(224, 168, 72, 0.35) 100%);
}

.notice-bar.is-warn .notice-badge {
  background: var(--warn);
  color: #141008;
  box-shadow: 0 0 14px rgba(224, 168, 72, 0.32);
}

.notice-bar.is-warn .notice-text {
  color: #f4e6cc;
}

.notice-bar.is-warn .notice-stripes {
  background: repeating-linear-gradient(-55deg,
      rgba(224, 168, 72, 0.82) 0px,
      rgba(224, 168, 72, 0.82) 7px,
      transparent 7px,
      transparent 16px);
}

/* ── Main container ── */
.gate {
  position: relative;
  z-index: 3;
  flex: 1;
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 14px max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

/* ── Top-right language pill ── */
.top-utility {
  display: flex;
  justify-content: flex-end;
  position: relative;
  z-index: 20;
}

.lang-wrap {
  position: relative;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e4e7ee;
  font: 600 11.5px/1 var(--mono);
  letter-spacing: 0.08em;
  cursor: pointer;
  appearance: none;
  transition: border-color .16s, background .16s, color .16s;
}

.lang-pill:hover,
.lang-pill[aria-expanded="true"] {
  border-color: rgba(214, 219, 229, 0.55);
  background: rgba(214, 219, 229, 0.14);
  color: #ffffff;
}

.brand-edition {
  display: block;
  margin-top: 6px;
  font: 700 9px/1.3 var(--ui);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--tx-muted);
}

.lang-pill:focus-visible {
  outline: 2px solid var(--ac2);
  outline-offset: 2px;
}

.form-head h1 {
  margin: 0 0 9px;
  font: 800 27px/1.2 var(--brand);
  letter-spacing: -.03em;
  color: var(--tx);
}

.form-head p {
  margin: 0;
  font: 400 14px/1.65 var(--ui);
  color: var(--tx-sub)
}

.lang-ic {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  opacity: 0.85;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 142px;
  padding: 4px;
  border-radius: 7px;
  background: #12141a;
  border: 1px solid rgba(214, 219, 229, 0.24);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-menu[hidden] {
  display: none;
}

.lang-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #b8becb;
  font: 600 11.5px/1.3 var(--mono);
  cursor: pointer;
  transition: background .14s, color .14s;
}

.lang-opt:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.input-wrap:focus-within .input-ic {
  opacity: 1
}

input[type=text] {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px 14px 46px;
  background: var(--in-bg);
  color: var(--in-tx);
  border: 1.5px solid var(--in-bdr);
  border-radius: 14px;
  font: 600 15px/1.4 var(--ui);
  letter-spacing: .02em;
  appearance: none;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

input[type=text]::placeholder {
  color: var(--in-ph);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0
}

input[type=text]:hover {
  border-color: var(--in-hover)
}

input[type=text]:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 4px var(--ac-ring);
  background: var(--card-bg)
}

input[type=text][aria-invalid="true"] {
  border-color: var(--err-bdr);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .14)
}

input[type=text]:-webkit-autofill {
  -webkit-text-fill-color: var(--in-tx);
  box-shadow: 0 0 0 100px var(--in-bg) inset;
}

#cf_token {
  display: none
}

.f-hint {
  margin: 8px 0 0;
  font: 400 12px/1.6 var(--ui);
  color: var(--tx-hint)
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  min-height: 65px
}

.turnstile-wrap:empty {
  opacity: .4
}

.lang-opt.is-active {
  background: rgba(214, 219, 229, 0.18);
  color: #ffffff;
}

/* ── Centerpiece Hero ── */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 0 26px;
  min-height: 270px;
}

.hero-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  width: min(82vw, 370px);
  height: min(82vw, 370px);
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: grayscale(1) brightness(0.28) contrast(1.45);
  opacity: 0.20;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.25) 78%, transparent 100%);
  mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.25) 78%, transparent 100%);
}

.submit:focus-visible {
  outline: 3px solid var(--ac2);
  outline-offset: 3px
}

.submit:disabled {
  opacity: .45;
  cursor: wait
}

.btn-arr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  flex: none;
  transition: transform .2s;
}

.btn-arr svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round
}

.submit:hover:enabled .btn-arr {
  transform: translateX(3px)
}

form[aria-busy="true"] .submit::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
  flex: none;
}


@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.hero-core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: hero-in .48s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes spop {
  from {
    opacity: 0;
    transform: translateY(-6px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

#status.show {
  display: block
}

#status.error {
  color: var(--err-tx);
  background: var(--err-bg);
  border: 1px solid var(--err-bdr)
}

#status.ok {
  color: var(--ok-tx);
  background: var(--ok-bg);
  border: 1px solid var(--ok-bdr)
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.hero-logo {
  display: block;
  width: 106px;
  height: 106px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px var(--ac-glow));
}

.hero-title {
  margin: 18px 0 11px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(24px, 6.4vw, 35px);
  line-height: 1.08;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: skewX(-9deg);
  filter: drop-shadow(0 0 18px rgba(214, 219, 229, 0.24));
}

.gate-foot span {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tx-muted)
}

.hero-title .w1 {
  background: linear-gradient(180deg, #ffffff 0%, #e4e8f0 65%, #b8c0ce 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title .w2 {
  background: linear-gradient(180deg, #e8ecf4 0%, #aeb6c5 55%, #6b7384 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0;
  font: 500 10.5px/1.6 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tx-sub);
}

/* ── Form & Footer Stack ── */
.access-panel {
  width: 100%;
  max-width: 416px;
  margin: 0 auto;
  padding-top: 8px;
}

form {
  margin: 0;
}

.f-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9ea4b0;
  transition: color .18s;
}

.f-label .sq {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--ac);
  box-shadow: 0 0 6px rgba(214, 219, 229, 0.45);
}

.f-wrap:focus-within .f-label {
  color: #f3f4f6;
}

/* Sharp corners except bottom-right 45-deg chamfered cut */
.key-shell {
  padding: 1px;
  background: var(--in-bdr);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: background .18s;
}

.key-shell:hover {
  background: rgba(214, 219, 229, 0.55);
}

.key-shell:focus-within {
  background: var(--ac);
}

.key-shell.is-error {
  background: rgba(239, 68, 68, 0.85);
}

.key-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 6px 8px 6px 16px;
  background: var(--in-bg);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.key-inner input[type=text] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--in-tx);
  font: 500 15px/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  appearance: none;
}

.key-inner input[type=text]::placeholder {
  color: var(--in-ph);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.key-inner input[type=text]:-webkit-autofill {
  -webkit-text-fill-color: var(--in-tx);
  box-shadow: 0 0 0 100px var(--in-bg) inset;
}

.key-inner input[type=text]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.paste-btn {
  flex: none;
  padding: 11px 16px;
  border-radius: 2px;
  border: 1px solid var(--paste-bdr);
  background: var(--paste-bg);
  color: #f3f4f6;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}

.paste-btn:hover:enabled {
  background: rgba(214, 219, 229, 0.18);
  border-color: rgba(241, 244, 249, 0.65);
  color: #ffffff;
}

.paste-btn:active:enabled {
  transform: scale(0.97);
}

.paste-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.paste-btn:focus-visible {
  outline: 2px solid var(--ac2);
  outline-offset: 2px;
}

/* Turnstile */
.turnstile-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0 2px;
  min-height: 65px;
}

.turnstile-wrap:empty {
  opacity: 0.4;
}

#cf_token {
  display: none;
}

/* Chamfered UNLOCK CTA button */
.submit-wrap {
  margin-top: 18px;
  filter: drop-shadow(0 6px 18px rgba(214, 219, 229, 0.18));
  transition: filter .18s;
}

.submit-wrap:hover {
  filter: drop-shadow(0 8px 24px rgba(241, 244, 249, 0.30));
}

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border: 0;
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
  background: linear-gradient(180deg, #f3f5fa 0%, #b8c0ce 100%);
  color: #090b0f;
  font: 700 18px/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .18s, transform .12s, opacity .18s;
}

.submit:hover:enabled {
  background: linear-gradient(180deg, #ffffff 0%, #cfd6e2 100%);
}

.submit:active:enabled {
  transform: scale(0.988);
}

.submit:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

form[aria-busy="true"] .submit {
  cursor: wait;
}

form[aria-busy="true"] .submit::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(9, 11, 15, 0.28);
  border-top-color: #090b0f;
  border-radius: 50%;
  animation: spin .75s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Status Banner ── */
#status {
  display: none;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 5px;
  font: 500 12.5px/1.55 var(--mono);
  overflow-wrap: anywhere;
  animation: spop .2s ease both;
}

@keyframes spop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

#status.show {
  display: block;
}

#status.error {
  color: var(--err-tx);
  background: var(--err-bg);
  border: 1px solid var(--err-bdr);
}

#status.ok {
  color: var(--ok-tx);
  background: var(--ok-bg);
  border: 1px solid var(--ok-bdr);
}

/* ── Footer notes ── */
.gate-foot {
  margin-top: 18px;
  text-align: center;
}

.foot-primary {
  margin: 0;
  font: 400 12.5px/1.5 var(--ui);
  color: #b4bcd4;
}

.foot-secondary {
  margin: 4px 0 0;
  font: 400 11.5px/1.5 var(--ui);
  color: var(--tx-muted);
}

/* ── Responsive tuning ── */
@media (min-height: 820px) {
  .gate {
    padding-bottom: 44px;
  }
}

@media (max-width: 390px) {
  .hero-logo {
    width: 92px;
    height: 92px;
  }

  .hero-title {
    font-size: 21px;
    letter-spacing: 0.08em;
  }

  .hero-sub {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .key-inner {
    padding-left: 12px;
  }

  .paste-btn {
    padding: 9px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important
  }
}

@media (max-height: 700px) {
  .notice-inner { padding: 9px 16px; gap: 10px; }
  .gate { padding-top: 10px; padding-bottom: 18px; }
  .hero { min-height: 150px; padding: 12px 0 10px; }
  .hero-logo { width: 80px; height: 80px; }
  .hero-watermark { width: min(52vh, 260px); height: min(52vh, 260px); }
  .hero-title { margin: 12px 0 8px; }
  .turnstile-wrap { margin: 10px 0; min-height: 58px; }
  .gate-foot { margin-top: 12px; }
}

@media (max-height: 580px) {
  .notice-inner { padding: 7px 14px; }
  .notice-text { font-size: 11.5px; }
  .gate { padding-top: 8px; padding-bottom: 14px; }
  .hero { min-height: 110px; padding: 6px 0 8px; flex: 0 1 auto; }
  .hero-logo { width: clamp(54px, 12dvh, 72px); height: clamp(54px, 12dvh, 72px); }
  .hero-watermark { width: min(44dvh, 200px); height: min(44dvh, 200px); }
  .hero-title { margin: 8px 0 4px; font-size: clamp(19px, 4.5dvh, 25px); }
  .hero-sub { font-size: 9.5px; letter-spacing: 0.12em; }
  .access-panel { padding-top: 4px; }
  .f-label { margin-bottom: 6px; }
  .key-inner { min-height: 46px; }
  .submit-wrap { margin-top: 12px; }
  .submit { min-height: 46px; padding: 10px 16px; font-size: 16px; }
  .gate-foot { margin-top: 10px; }
}

@media (min-width: 768px) {
  .gate { width: min(100%, 520px); }
  .access-panel { max-width: 440px; }
}

@media (max-width: 360px) {
  .gate { padding-left: 14px; padding-right: 14px; }
  .notice-inner { padding: 10px 14px; gap: 10px; }
  .hero-title { font-size: 19px; letter-spacing: 0.07em; }
  .hero-sub { font-size: 9px; letter-spacing: 0.1em; }
  #license_key { font-size: 13px; }
}