/* =========================================================
   POLYGAMEZ — single-page site
   Palette pulled from PolyTowerz:
   - bg deep navy  #0a0e1a / #0d1424
   - panel        #111a2e
   - cyan accent  #22d3ee  (primary neon)
   - teal soft    #0e6677
   - magenta      #ff3d7f  (hearts / lives)
   - amber        #facc15  (coins)
   - violet       #8b5cf6
   ========================================================= */

:root {
  --bg:        #070b16;
  --bg-2:      #0b1224;
  --panel:     #111a2e;
  --panel-2:   #15203b;
  --line:      rgba(34, 211, 238, 0.16);
  --line-soft: rgba(255, 255, 255, 0.06);

  --ink:       #e7eefc;
  --ink-dim:   #93a3c2;
  --ink-mute:  #5d6e8e;

  --cyan:      #22d3ee;
  --cyan-2:    #67e8f9;
  --teal:      #0e6677;
  --magenta:   #ff3d7f;
  --amber:     #facc15;
  --violet:    #8b5cf6;

  --radius:    16px;
  --radius-lg: 24px;

  --shadow:    0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.45);

  --max:       1180px;
  --max-narrow: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a {
  color: var(--cyan-2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover { color: var(--cyan); }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--max-narrow); }

.muted { color: var(--ink-dim); }
.small { font-size: 13px; }

.grad {
  background: linear-gradient(120deg, var(--cyan) 0%, var(--violet) 60%, var(--magenta) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-2);
  background: rgba(34, 211, 238, 0.06);
}

/* ============== NAV ============== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(7, 11, 22, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 18px;
}
.nav__brand:hover { color: var(--ink); }
.logo-mark { width: 28px; height: 28px; color: var(--cyan); display: inline-block; }
.logo-mark svg { width: 100%; height: 100%; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.55)); }
.logo-text { font-weight: 800; }
.logo-accent { color: var(--cyan); }

.nav__links {
  display: flex;
  gap: 26px;
  font-size: 14px;
}
.nav__links a {
  color: var(--ink-dim);
  font-weight: 500;
}
.nav__links a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .nav { padding: 12px 18px; }
  .nav__links { gap: 16px; font-size: 13px; }
  .nav__links a:nth-child(3) { display: none; } /* hide Coming Soon on small screens */
}

/* ============== HERO ============== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1200px 600px at 50% 0%, rgba(34, 211, 238, 0.10), transparent 70%),
    radial-gradient(900px 500px at 80% 80%, rgba(139, 92, 246, 0.12), transparent 70%),
    radial-gradient(900px 500px at 20% 70%, rgba(255, 61, 127, 0.08), transparent 70%),
    var(--bg);
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}
.hero__glow--a {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 60%);
  top: -120px; left: -100px;
}
.hero__glow--b {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--violet) 0%, transparent 60%);
  bottom: -160px; right: -120px;
}

.hero__shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute;
  display: block;
  opacity: 0.55;
  filter: drop-shadow(0 0 12px currentColor);
  animation: float 9s ease-in-out infinite;
}
.shape--tri {
  width: 22px; height: 22px;
  top: 22%; left: 12%;
  background: var(--cyan);
  color: var(--cyan);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation-delay: -1s;
}
.shape--sq {
  width: 18px; height: 18px;
  top: 70%; left: 18%;
  background: var(--magenta);
  color: var(--magenta);
  border-radius: 4px;
  animation-delay: -3s;
}
.shape--circ {
  width: 16px; height: 16px;
  top: 28%; right: 14%;
  background: var(--violet);
  color: var(--violet);
  border-radius: 50%;
  animation-delay: -5s;
}
.shape--hex {
  width: 24px; height: 24px;
  top: 65%; right: 16%;
  background: var(--amber);
  color: var(--amber);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0% 50%);
  animation-delay: -7s;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(8deg); }
}

.hero__content {
  position: relative;
  max-width: 820px;
}
.hero__title {
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 8px 0 22px;
  font-weight: 800;
}
.hero__sub {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-dim);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-2) 100%);
  color: #00161d;
  box-shadow: var(--glow-cyan);
}
.btn--primary:hover {
  transform: translateY(-2px);
  color: #00161d;
  box-shadow: 0 0 36px rgba(34, 211, 238, 0.65);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan-2);
  transform: translateY(-2px);
}
.btn[aria-disabled="true"] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ============== SECTIONS ============== */
.section {
  padding: 110px 0;
  position: relative;
}
.section--alt {
  background:
    linear-gradient(180deg, transparent, rgba(17, 26, 46, 0.5) 20%, rgba(17, 26, 46, 0.5) 80%, transparent),
    var(--bg);
}
.section__title {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 18px;
}
.section__lead {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--ink-dim);
  max-width: 680px;
  margin: 0 0 56px;
}

/* ============== FEATURED GAME ============== */
.game {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}
.game__phones {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  perspective: 1400px;
}
.phone {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  border: 2px solid rgba(34, 211, 238, 0.18);
  background: #000;
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 0 8px #0d1424,
    0 0 60px -20px rgba(34, 211, 238, 0.35);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.phone img { width: 100%; height: auto; display: block; }
.phone__notch {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 22px;
  background: #000;
  border-radius: 999px;
  z-index: 2;
}
.phone--a { transform: translateY(20px) rotate(-3deg); }
.phone--b { transform: translateY(-12px); z-index: 2; }
.phone--c { transform: translateY(20px) rotate(3deg); }

.phone:hover {
  transform: translateY(-8px) rotate(0);
  box-shadow:
    0 40px 90px -20px rgba(0, 0, 0, 0.85),
    0 0 0 8px #0d1424,
    0 0 80px -10px rgba(34, 211, 238, 0.6);
}

.game__features {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 18px;
}
.game__features li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--ink-dim);
}
.game__features strong { color: var(--ink); font-weight: 600; margin-right: 6px; }
.dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.8);
}
.game__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .game { grid-template-columns: 1fr; gap: 48px; }
  .game__phones { max-width: 560px; margin: 0 auto; }
}

/* ============== ABOUT (portrait + bio) ============== */
.about {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: start;
  margin-top: 12px;
}

.about__portrait {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 30%, rgba(34, 211, 238, 0.10), transparent 70%),
    linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  isolation: isolate;
}
.about__portrait::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), transparent 40%, rgba(139, 92, 246, 0.25));
  z-index: -1;
  opacity: 0.6;
  filter: blur(14px);
}
.about__portrait img {
  width: 100%;
  display: block;
  border-radius: 14px;
  filter: drop-shadow(0 18px 40px rgba(34, 211, 238, 0.25));
}

.about__copy {
  padding-top: 4px;
}
.about__lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 16px;
}

.about__values {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 12px;
}
.about__values li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.03);
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.55;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.about__values li:hover {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.06);
}
.about__values strong {
  color: var(--ink);
  font-weight: 700;
  margin-right: 4px;
}
.about__values-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.10);
  color: var(--cyan);
}
.about__values-icon svg { width: 18px; height: 18px; }

@media (max-width: 880px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__portrait { max-width: 280px; margin: 0 auto; }
}

/* ============== CONTACT FORM ============== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(34, 211, 238, 0.08), transparent 70%),
    linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

.field input,
.field textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(7, 11, 22, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-mute);
}
.field input:hover,
.field textarea:hover {
  border-color: rgba(34, 211, 238, 0.35);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(7, 11, 22, 0.85);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 61, 127, 0.55);
}

.contact-form__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.contact-form__actions button {
  border: none;
  font: inherit;
}

@media (max-width: 600px) {
  .contact-form { padding: 22px; }
  .field-row { grid-template-columns: 1fr; gap: 18px; }
}

/* ============== FOOTER ============== */
.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding: 48px 0 36px;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.footer__brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800;
  font-size: 16px;
}
.footer__brand .logo-mark { width: 22px; height: 22px; }
.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer__links a,
.footer-link {
  color: var(--ink-dim);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}
.footer__links a:hover,
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--cyan);
  outline: none;
}
.footer-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer__copy {
  margin: 0;
  font-size: 12px;
  color: var(--ink-mute);
  max-width: 640px;
}

/* ============== MODAL (CSS-only) ============== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
/* Bind each toggle to its modal via [data-for] — all siblings under <body> */
#m-disclaimer:checked ~ .modal[data-for="m-disclaimer"],
#m-privacy:checked    ~ .modal[data-for="m-privacy"],
#m-terms:checked      ~ .modal[data-for="m-terms"],
#m-imprint:checked    ~ .modal[data-for="m-imprint"] {
  display: flex;
  animation: modalFade 0.2s ease-out;
}
/* Lock body scroll when any modal is open */
body:has(.modal__toggle:checked) {
  overflow: hidden;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(34, 211, 238, 0.12), transparent 70%),
    linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  box-shadow:
    0 40px 90px -20px rgba(0, 0, 0, 0.8),
    0 0 80px -20px rgba(34, 211, 238, 0.25);
  animation: modalPop 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  z-index: 2;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.modal__close:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  transform: rotate(90deg);
}

.modal__content {
  padding: 36px 36px 32px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal__content h3 {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 40px; /* avoid close button */
}
.modal__content h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 26px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  border-radius: 4px;
}
.modal__content h4 {
  margin: 32px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.modal__content h4:first-of-type {
  border-top: none;
  padding-top: 8px;
}
.modal__content h5 {
  margin: 20px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.modal__content p,
.modal__content ul {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.65;
}
.modal__content ul { padding-left: 20px; margin: 0 0 1em; }
.modal__content li { margin-bottom: 8px; }
.modal__content strong { color: var(--ink); font-weight: 600; }

/* scrollbar polish (WebKit) */
.modal__content::-webkit-scrollbar { width: 8px; }
.modal__content::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.25);
  border-radius: 4px;
}
.modal__content::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, 0.5); }

@keyframes modalFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalPop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@media (max-width: 560px) {
  .modal { padding: 12px; }
  .modal__content { padding: 28px 22px 24px; }
  .modal__content h3 { font-size: 22px; }
}
