:root {
  --navy-900: #060c1f;
  --navy-800: #0b1530;
  --aurora-green: #5cffb1;
  --aurora-purple: #b48bff;
  --aurora-cyan: #7df0ff;
  --text: #eaf1ff;
  --text-dim: #9fb0d4;
  --text-faint: #6f80a6;
  --panel: rgba(10, 18, 42, 0.72);
  --panel-border: rgba(180, 139, 255, 0.22);
  --focus: #7df0ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- background ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("../images/bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.bg-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      ellipse at 50% 38%,
      rgba(6, 12, 31, 0.0) 0%,
      rgba(6, 12, 31, 0.35) 50%,
      rgba(6, 12, 31, 0.85) 100%
    );
  pointer-events: none;
}

/* ---------- layout ---------- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  animation: rise 900ms ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(3.25rem, 13vw, 8rem);
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.025em;
  background: linear-gradient(
    100deg,
    var(--aurora-green) 0%,
    var(--aurora-cyan) 45%,
    var(--aurora-purple) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 32px rgba(124, 240, 255, 0.18));
}

.tagline {
  margin: 1.5rem 0 0;
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  color: var(--text-dim);
  letter-spacing: 0.03em;
  font-weight: 400;
}

/* ---------- bottom strip ---------- */

.bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding-top: 2rem;
  animation: fade 1200ms ease-out 200ms both;
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.games {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bottom-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  font-weight: 500;
}

.game-link {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.25;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  max-width: 32rem;
  transition: color 180ms ease;
}

.game-link .arrow {
  display: inline-block;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  color: var(--aurora-cyan);
}

.game-link:hover,
.game-link:focus-visible {
  color: var(--aurora-cyan);
  outline: none;
}

.game-link:hover .arrow,
.game-link:focus-visible .arrow {
  transform: translateX(4px);
}

.bottom-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.contact-btn {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.contact-btn:hover,
.contact-btn:focus-visible {
  border-color: var(--aurora-cyan);
  color: var(--aurora-cyan);
  outline: none;
}

.copyright {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* ---------- modal ---------- */

.modal {
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text);
  max-width: 460px;
  width: calc(100% - 2rem);
  margin: auto;
}

.modal::backdrop {
  background: rgba(6, 12, 31, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal[open] {
  animation: modal-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.contact-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.75rem 1.75rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  line-height: 1;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.modal-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-lead {
  margin: -0.25rem 0 0.25rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ---------- form fields ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.field input,
.field textarea {
  font: inherit;
  color: var(--text);
  background: rgba(6, 12, 31, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  resize: vertical;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(125, 240, 255, 0.18);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #ff8aa6;
  box-shadow: 0 0 0 3px rgba(255, 138, 166, 0.15);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.submit {
  align-self: flex-start;
  font: inherit;
  font-weight: 600;
  color: var(--navy-900);
  background: linear-gradient(100deg, var(--aurora-green), var(--aurora-cyan));
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.3rem;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(92, 255, 177, 0.5);
}

.submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(125, 240, 255, 0.45);
}

.submit:disabled {
  filter: grayscale(0.4) brightness(0.85);
  cursor: progress;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  min-height: 1.2em;
  color: var(--text-dim);
}

.form-status.is-success { color: var(--aurora-green); }
.form-status.is-error   { color: #ff8aa6; }

/* ---------- a11y ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .bottom-right {
    align-items: flex-start;
  }
  .contact-form {
    padding: 1.75rem 1.25rem 1.25rem;
  }
}
