/* HecatoNet — colours follow the logo kit's dark-ground palette (ice, blue, amber). */

:root {
  --bg: #070e16;
  --bg-deep: #04090f;
  --surface: #0c1925;
  --surface-2: #112232;
  --field: #08131d;
  --line: rgba(188, 215, 236, 0.13);
  --line-strong: rgba(188, 215, 236, 0.28);

  --ice: #eef6ff;
  --blue: #bcd7ec;
  --muted: #8ea6ba;
  --faint: #6d8599;
  --amber: #f2b04a;
  --amber-hover: #f6c472;
  --amber-ink: #1d1406;
  --ok: #7fd6a0;
  --error: #ff8f80;

  --radius: 14px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ice);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--amber-hover); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; color: var(--amber-ink); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 14, 22, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark { width: 28px; height: 28px; }
.brand-word { width: auto; height: 13px; }

.site-nav ul {
  display: flex;
  gap: clamp(18px, 4vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ice); }

@media (max-width: 480px) {
  .brand-word { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(32px, 6vw, 64px) 0 clamp(56px, 8vw, 96px);
  text-align: center;
  background:
    radial-gradient(ellipse 70% 80% at 50% 35%, #122638 0%, #0c1925 38%, rgba(7, 14, 22, 0) 78%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.hero-logo {
  position: relative;
  width: min(440px, 82vw);
  margin: 0 auto;
}
.hero-logo img { width: 100%; }

/* Animated network (assets/js/network-logo.js) drawn over the static logo. */
.hero-logo canvas { display: none; }
.hero-logo.is-live canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The static logo stays hidden while the animation loads, and fades back in if it never does. */
.js-net .hero-logo img { opacity: 0; animation: logo-fallback 0.4s ease 2.5s forwards; }
.js-net .hero-logo.is-live img { opacity: 0; animation: none; }
@keyframes logo-fallback { to { opacity: 1; } }

.tagline {
  max-width: 40ch;
  margin: 4px auto 28px;
  text-wrap: balance;
  color: var(--blue);
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 0.975rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn .icon { flex: none; width: 20px; height: 20px; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.65; cursor: progress; }

.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-hover); color: var(--amber-ink); }

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(238, 246, 255, 0.03);
  color: var(--ice);
}
.btn-ghost:hover {
  border-color: var(--blue);
  background: rgba(238, 246, 255, 0.07);
  color: var(--ice);
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--line); }

/* Section labels drawn as a node on a network line. */
.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 32px;
  color: var(--blue);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.section-title::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(242, 176, 74, 0.15);
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.lede {
  max-width: 56ch;
  margin: -12px 0 28px;
  color: var(--muted);
}

/* ---------- Games ---------- */

.games { display: grid; gap: 20px; }

.game {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
@media (min-width: 860px) {
  .game { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; }
}

.game-art {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}
.game-art img { width: 100%; transition: transform 0.4s ease; }
.game-art:hover img { transform: scale(1.025); }

.game-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 8px 8px;
}
@media (min-width: 860px) {
  .game-body { padding: 16px 20px 16px 0; }
}

.game-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px;
  border: 1px solid rgba(242, 176, 74, 0.4);
  border-radius: 999px;
  background: rgba(242, 176, 74, 0.08);
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.game-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.game-status.is-out {
  border-color: rgba(127, 214, 160, 0.4);
  background: rgba(127, 214, 160, 0.08);
  color: var(--ok);
}

.game-title {
  margin: 0;
  font-size: clamp(1.625rem, 3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.game-desc { margin: 0; color: var(--blue); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.game-body .btn { margin-top: 6px; }

.game-next {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.game-next img { flex: none; width: 52px; height: 52px; }
.game-next h3 { margin: 0 0 4px; font-size: 1.0625rem; }
.game-next p { margin: 0; color: var(--muted); }

@media (max-width: 520px) {
  .game-next { flex-direction: column; align-items: flex-start; }
}

/* ---------- Follow ---------- */

.socials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ice);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
a.social:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ice);
  transform: translateY(-2px);
}

.social-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(188, 215, 236, 0.08);
}
.social-icon .icon { width: 24px; height: 24px; }
.social-icon .icon-x { width: 20px; height: 20px; }

.social-text { display: flex; flex-direction: column; min-width: 0; }
.social-name { font-weight: 600; }
.social-meta { color: var(--muted); font-size: 0.875rem; }

.social .icon-arrow {
  flex: none;
  width: 20px;
  height: 20px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.15s, color 0.15s;
}
a.social:hover .icon-arrow { color: var(--amber); transform: translateX(3px); }

.social.is-soon { border-style: dashed; }
.social.is-soon .social-icon,
.social.is-soon .social-name { opacity: 0.6; }

.soon-badge {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 56px; }
}

.contact-intro p { max-width: 40ch; margin: 0 0 14px; color: var(--muted); }
.contact-intro .contact-lead {
  color: var(--ice);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.35;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3.5vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.field-row { display: grid; gap: 20px; }
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { color: var(--blue); font-size: 0.875rem; font-weight: 600; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--field);
  color: var(--ice);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 170px; line-height: 1.5; resize: vertical; }

.field select {
  padding-right: 44px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bcd7ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(242, 176, 74, 0.2);
}

.field.has-error input,
.field.has-error textarea { border-color: var(--error); }
.field-error { margin: 0; color: var(--error); font-size: 0.875rem; }

/* Honeypot: hidden from people, visible to naive bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.form-note { margin: 0; color: var(--muted); font-size: 0.8125rem; }

.notice {
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 0.9375rem;
}
.notice strong { display: block; }
.notice-ok { border-color: rgba(127, 214, 160, 0.4); background: rgba(127, 214, 160, 0.08); color: #c9f0d7; }
.notice-error { border-color: rgba(255, 143, 128, 0.45); background: rgba(255, 143, 128, 0.08); color: #ffd3cc; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px 0 40px;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer-inner p { margin: 0; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a { color: var(--blue); text-decoration: none; }
.footer-links a:hover { color: var(--ice); }

.footer-inner .legal { flex-basis: 100%; color: var(--faint); font-size: 0.75rem; }

/* ---------- Motion ---------- */

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