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

:root {
  --bg: #06070d;
  --bg-2: #0a0c16;
  --surface: rgba(15, 19, 30, 0.62);
  --surface-solid: #0f131e;
  --border: rgba(120, 150, 200, 0.14);
  --border-bright: rgba(0, 200, 255, 0.45);

  --blue: #22cfff;
  --blue-deep: #2f7bff;
  --blue-dim: rgba(34, 207, 255, 0.12);
  --blue-glow: rgba(34, 207, 255, 0.35);

  --yellow: #ffd400;
  --amber: #ff9e2c;
  --yellow-glow: rgba(255, 212, 0, 0.35);

  --text: #e9edf7;
  --text-dim: #a6b0c8;
  --text-muted: #616c86;

  --danger: #ff4d6a;
  --success: #4dffb0;

  --mono: 'Space Mono', ui-monospace, monospace;
  --sans: 'Syne', 'Segoe UI', system-ui, sans-serif;
  --radius: 6px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 clamp(16px, 4vw, 40px) 48px;
  touch-action: manipulation;
  overflow-x: hidden;
}

/* ---- WebGL swarm canvas + atmospheric overlays ---------------------- */

#swarm {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* Fallback backdrop when WebGL2 is unavailable. */
.no-webgl2 #swarm { display: none; }
.no-webgl2 body,
body.no-webgl2 {
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(47, 123, 255, 0.22), transparent 60%),
    radial-gradient(900px 620px at 100% 0%, rgba(255, 158, 44, 0.14), transparent 55%),
    radial-gradient(1200px 800px at 50% 120%, rgba(34, 207, 255, 0.10), transparent 60%),
    var(--bg);
}

/* Vignette + faint scanlines for cyberpunk depth, above the canvas. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -10%, transparent 55%, rgba(3, 4, 9, 0.55) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0px, rgba(0, 0, 0, 0.16) 1px, transparent 2px, transparent 3px);
  background-size: 100% 100%, 100% 3px;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

header, main, footer { position: relative; z-index: 2; }

/* ---- header --------------------------------------------------------- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding: 16px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 20, 33, 0.72), rgba(9, 11, 20, 0.62));
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 12px;
}

.logo { display: flex; align-items: center; gap: 10px; }

.logo-mark {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  text-shadow: 0 0 22px rgba(34, 207, 255, 0.25);
}

.logo-mark span {
  color: var(--blue);
  display: inline-block;
  animation: pulse-arrow 2.4s ease-in-out infinite;
}

@keyframes pulse-arrow {
  0%, 100% { opacity: 0.55; transform: translateX(0); text-shadow: 0 0 6px var(--blue-glow); }
  50%      { opacity: 1;    transform: translateX(2px); text-shadow: 0 0 18px var(--blue); }
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-right: auto;
  margin-left: 32px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav-link:hover, .nav-link:active, .nav-link.active {
  color: var(--blue);
  background: var(--blue-dim);
  box-shadow: inset 0 0 0 1px rgba(34, 207, 255, 0.25);
}

.nav-cta {
  color: var(--yellow) !important;
}
.nav-cta:hover {
  background: rgba(255, 212, 0, 0.1) !important;
  box-shadow: inset 0 0 0 1px var(--yellow-glow) !important;
}

/* ---- shared display type -------------------------------------------- */

main { margin-top: 34px; flex: 1; }

.section-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--blue) 0%, #bfe9ff 40%, var(--yellow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

.section-subtitle {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 26px;
  letter-spacing: 0.02em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid rgba(34, 207, 255, 0.3);
  border-radius: 999px;
  background: var(--blue-dim);
}

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

.hero-section {
  text-align: center;
  padding: clamp(48px, 8vw, 92px) 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 16, 27, 0.55), rgba(7, 9, 17, 0.35));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero-section h1 {
  font-size: clamp(38px, 7vw, 78px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--text);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

.hero-section h1 .accent {
  background: linear-gradient(100deg, var(--blue), var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-section p {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 34px;
  line-height: 1.6;
}

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

.hero-keywords span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: rgba(10, 13, 22, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-keywords span::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
  vertical-align: middle;
}
.hero-keywords span:nth-child(2)::before { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.hero-keywords span:nth-child(3)::before { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

/* ---- catalog -------------------------------------------------------- */

.catalog-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 64px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.apps-grid { grid-template-columns: 1fr; }

/* ---- product cards (glass HUD) -------------------------------------- */

.tool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
  -webkit-tap-highlight-color: transparent;
}

/* animated dual-tone top edge */
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--yellow), transparent);
  opacity: 0.35;
  transition: opacity 0.25s;
}

/* cyberpunk corner brackets */
.tool-card::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  pointer-events: none;
  background:
    linear-gradient(var(--blue), var(--blue)) top left / 16px 2px no-repeat,
    linear-gradient(var(--blue), var(--blue)) top left / 2px 16px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) bottom right / 2px 16px no-repeat;
  opacity: 0;
  transition: opacity 0.25s;
}

.tool-card:hover, .tool-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--border-bright);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(34, 207, 255, 0.2), 0 0 40px rgba(34, 207, 255, 0.12);
  outline: none;
}
.tool-card:hover::before, .tool-card:focus-visible::before { opacity: 1; }
.tool-card:hover::after, .tool-card:focus-visible::after { opacity: 0.85; }

.tool-card:active { transform: translateY(-2px); }

/* product artwork frame */
.card-art {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(47, 123, 255, 0.16), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgba(255, 158, 44, 0.12), transparent 55%),
    #070a12;
  margin-bottom: 16px;
  aspect-ratio: 16 / 9;
}
.card-art svg { display: block; width: 100%; height: 100%; }

/* scanline shimmer on hover */
.card-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}
.tool-card:hover .card-art::after { transform: translateX(120%); }

.tool-card h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 0 4px 8px;
  color: var(--text);
  letter-spacing: 0.01em;
}
.tool-card:hover h3 {
  color: var(--blue);
  text-shadow: 0 0 18px var(--blue-glow);
}

.tool-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 4px 12px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.card-meta .tag {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--blue);
  background: var(--blue-dim);
}
.card-meta .play {
  margin-left: auto;
  color: var(--yellow);
}

/* Transcription card keeps its raster logo tidy */
.tool-card.app-card .card-art { display: flex; align-items: center; justify-content: center; }
.tool-card.app-card .card-art img {
  width: auto;
  max-width: 55%;
  max-height: 70%;
  filter: drop-shadow(0 0 20px rgba(34, 207, 255, 0.35));
}

/* ---- about ---------------------------------------------------------- */

.about-section {
  text-align: left;
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 16, 27, 0.6), rgba(7, 9, 17, 0.42));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 40px;
}
.about-section .about-copy { flex: 1; min-width: 300px; }
.about-section h2 {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 16px;
  color: var(--text);
}
.about-section p { color: var(--text-dim); line-height: 1.7; max-width: 640px; }
.about-visual {
  flex: 1;
  min-width: 280px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #070a12;
}
.about-visual svg { width: 100%; height: 100%; display: block; }

/* ---- support -------------------------------------------------------- */

.support-section {
  margin-bottom: 40px;
  text-align: center;
  padding: clamp(32px, 6vw, 56px) 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 16, 27, 0.55), rgba(7, 9, 17, 0.4));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.support-section h2 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 14px; color: var(--text); }
.support-section p { color: var(--text-dim); margin-bottom: 26px; }

.btn-action {
  display: inline-block;
  padding: 15px 34px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #05070d;
  background: linear-gradient(100deg, var(--blue), var(--yellow));
  border: none;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 30px rgba(34, 207, 255, 0.25);
  transition: box-shadow 0.25s, transform 0.15s, filter 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-action:hover { box-shadow: 0 0 26px var(--blue-glow), 0 0 40px var(--yellow-glow); filter: brightness(1.06); }
.btn-action:active { transform: translateY(1px); }

/* ---- footer --------------------------------------------------------- */

footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ---- responsive ----------------------------------------------------- */

@media (max-width: 960px) {
  .catalog-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  header { flex-direction: column; align-items: flex-start; top: 8px; }
  .nav-menu { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark span,
  .card-art::after,
  .tool-card { animation: none; transition: none; }
}

/* ---- support form --------------------------------------------------- */

.logo-link { text-decoration: none; }

.support-hero { margin-bottom: 30px; }
.support-hero h1 {
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  background: linear-gradient(100deg, var(--blue), var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.form-wrap {
  max-width: 680px;
  margin: 0 auto 64px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(22px, 4vw, 40px);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.field label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.field label .optional { color: var(--text-muted); text-transform: none; letter-spacing: 0; }

.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  background: rgba(7, 10, 18, 0.72);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--border-bright);
  box-shadow: 0 0 0 3px var(--blue-dim);
}

.field input:disabled {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 13px;
  cursor: not-allowed;
  opacity: 0.85;
}

.form-card .btn-action {
  align-self: flex-start;
  cursor: pointer;
}

.form-status {
  font-family: var(--mono);
  font-size: 13px;
  min-height: 18px;
  margin: 0;
  color: var(--text-dim);
}
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }

.captcha-refresh {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--blue);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 3px 8px;
  margin-left: 8px;
  vertical-align: middle;
  transition: border-color 0.2s, color 0.2s, transform 0.3s;
}
.captcha-refresh:hover { border-color: var(--border-bright); color: var(--yellow); }
.captcha-refresh:active { transform: rotate(180deg); }

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-dim);
  border: 1px solid rgba(34, 207, 255, 0.3);
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.file-btn:hover {
  border-color: var(--border-bright);
  color: var(--yellow);
  background: rgba(255, 212, 0, 0.08);
}

.file-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
  min-width: 0;
}

.file-clear {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  transition: border-color 0.2s, color 0.2s;
}
.file-clear:hover { border-color: var(--danger); color: var(--danger); }
