:root {
  --bg: #060a10;
  --bg-soft: #0f1724;
  --surface: rgba(20, 30, 46, 0.78);
  --surface-strong: rgba(15, 24, 39, 0.96);
  --line: rgba(169, 204, 255, 0.2);
  --line-strong: rgba(169, 204, 255, 0.45);
  --text: #edf6ff;
  --muted: #adc0da;
  --primary: #4ee1ff;
  --primary-strong: #16b6e9;
  --accent: #ffb86b;
  --success: #84f7c5;
  --danger: #ff8ea0;
  --shadow: 0 24px 48px rgba(2, 8, 18, 0.4);
  --radius: 1.15rem;
  --font-display: "Futura", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", "Gill Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.55;
  color: var(--text);
  min-height: 100vh;
  background: radial-gradient(circle at 14% 10%, #214477 0, transparent 32%),
    radial-gradient(circle at 90% 18%, #5f2a57 0, transparent 31%),
    radial-gradient(circle at 32% 100%, #154e43 0, transparent 36%), var(--bg);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mix-blend-mode: soft-light;
  opacity: 0.4;
}

a {
  color: #7fe9ff;
}

a:hover,
a:focus-visible {
  color: #bbf6ff;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 200;
  background: #fff;
  color: #000;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

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

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 5px rgba(78, 225, 255, 0.15);
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.94rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  border-color: var(--line-strong);
  background: rgba(150, 214, 255, 0.12);
}

.hero {
  padding: clamp(2.2rem, 5vw, 4.2rem) 0 2.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.hero-copy {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--accent);
  font-size: 0.82rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  margin: 0.55rem 0 0.75rem;
}

h2 {
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  line-height: 1.18;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

.hero-text {
  margin: 0 0 1rem;
  max-width: 58ch;
  color: var(--muted);
}

.hero-points {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hero-points span {
  border: 1px solid var(--line);
  background: rgba(149, 214, 255, 0.08);
  border-radius: 999px;
  font-size: 0.86rem;
  padding: 0.35rem 0.72rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2.8vw, 1.6rem);
}

.generator {
  padding: 1rem 0 2.4rem;
}

.generator-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
  align-items: start;
}

label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.34rem;
}

input,
select,
button {
  font: inherit;
}

input[type="text"],
input[type="number"],
input[type="color"],
select {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: rgba(9, 14, 24, 0.8);
  color: var(--text);
  padding: 0.62rem 0.7rem;
}

input[type="color"] {
  min-height: 2.6rem;
  padding: 0.24rem;
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.field-hint {
  margin: 0.45rem 0 0.95rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.05rem;
}

.advanced-options {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.65rem 0.75rem 0;
  margin-bottom: 1rem;
  background: rgba(8, 12, 22, 0.45);
}

.advanced-options summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.advanced-options[open] summary {
  margin-bottom: 0.85rem;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
}

.toggle-wrap input {
  width: 1.1rem;
  height: 1.1rem;
}

.actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 0.75rem;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0.62rem 1rem;
  font-weight: 700;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.52;
}

.btn-primary {
  color: #001320;
  background: linear-gradient(130deg, var(--primary), #6bf5d8);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(130deg, #63f6ff, #8bffd8);
}

.btn-secondary {
  color: var(--text);
  background: rgba(150, 214, 255, 0.11);
  border-color: var(--line);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(150, 214, 255, 0.22);
}

.btn-ghost {
  color: var(--text);
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.preview-stage {
  border: 1px dashed var(--line-strong);
  border-radius: 0.9rem;
  min-height: 20rem;
  display: grid;
  place-items: center;
  background: rgba(10, 15, 26, 0.65);
  position: relative;
  overflow: hidden;
}

#qr-canvas {
  max-width: min(100%, 24rem);
  width: 100%;
  height: auto;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  border-radius: 0.35rem;
  background: #fff;
  display: block;
}

.preview-overlay {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.24rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(2, 7, 14, 0.78);
  color: #d8ebff;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.preview-overlay.is-final {
  opacity: 0;
}

.preview-actions {
  margin-top: 1rem;
}

.status {
  min-height: 1.4rem;
  color: var(--success);
  margin: 0.85rem 0 0;
}

.status.error {
  color: var(--danger);
}

.ad-shell {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: rgba(8, 13, 22, 0.62);
}

.hero-ad {
  margin-top: 0;
}

.ad-label {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.ad-slot {
  display: block;
  width: 100%;
  min-height: 180px;
  border-radius: 0.5rem;
}

.ad-fallback {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  display: block;
}

.ad-shell:not(.ad-enabled) .ad-slot {
  display: none;
}

.ad-shell.ad-enabled .ad-fallback {
  display: none;
}

.features,
.faq {
  padding: 2.15rem 0;
}

.bottom-ad-wrap {
  padding-bottom: 1.8rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  padding: 1rem;
  background: rgba(16, 24, 37, 0.82);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 0.65rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.1rem 0.9rem;
  background: rgba(16, 24, 37, 0.82);
}

.faq-item summary {
  cursor: pointer;
  padding: 0.8rem 0;
  font-weight: 700;
}

.faq-item p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(6, 10, 16, 0.84);
  backdrop-filter: blur(6px);
}

.legal-main {
  padding: clamp(1.6rem, 4vw, 3.2rem) 0 2.3rem;
}

.legal-card {
  max-width: 52rem;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
}

.legal-card h2 {
  margin-top: 1.35rem;
}

.legal-card h3 {
  margin-top: 0.95rem;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  min-height: 4.6rem;
  flex-wrap: wrap;
  padding: 0.55rem 0;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.footer-grid nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-grid nav a,
.text-button {
  color: var(--text);
  text-decoration: none;
  font-size: 0.93rem;
  padding: 0.2rem 0.4rem;
  border-radius: 0.3rem;
}

.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.footer-grid nav a:hover,
.text-button:hover,
.footer-grid nav a:focus-visible,
.text-button:focus-visible {
  background: rgba(150, 214, 255, 0.15);
}

.cookie-banner {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(56rem, 94vw);
  border-radius: 1rem;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.cookie-content {
  padding: 1rem;
}

.cookie-content h2 {
  margin-bottom: 0.35rem;
}

.cookie-content p {
  margin-top: 0;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cookie-modal {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface-strong);
  color: var(--text);
  width: min(30rem, 92vw);
  box-shadow: var(--shadow);
}

.cookie-modal::backdrop {
  background: rgba(2, 6, 13, 0.65);
}

.cookie-modal-content {
  padding: 1rem;
}

.cookie-option {
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  gap: 0.65rem;
  margin: 0.65rem 0;
  align-items: start;
}

.cookie-option span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.a11y-launcher-wrap {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 85;
}

.a11y-launcher {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: rgba(8, 13, 22, 0.9);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.a11y-panel {
  margin-top: 0.5rem;
  width: min(18rem, 82vw);
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  padding: 0.8rem;
}

.a11y-panel h2 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.a11y-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.4rem 0;
}

.a11y-option input {
  width: 1.1rem;
  height: 1.1rem;
}

.reveal-on-load {
  animation: rise-fade 680ms cubic-bezier(0.24, 0.86, 0.35, 0.99) both;
}

.reveal-on-load:nth-of-type(2n) {
  animation-delay: 120ms;
}

@keyframes rise-fade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .generator-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-ad {
    order: 2;
  }

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

  .main-nav {
    justify-content: flex-start;
  }

  .header-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.6rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-on-load {
    animation: none;
  }
}

html.a11y-large-text {
  font-size: 112.5%;
}

html.a11y-high-contrast {
  --bg: #000;
  --surface: rgba(0, 0, 0, 0.95);
  --surface-strong: rgba(0, 0, 0, 0.98);
  --line: rgba(255, 255, 255, 0.45);
  --line-strong: rgba(255, 255, 255, 0.75);
  --text: #fff;
  --muted: #fff;
  --primary: #00f6ff;
  --accent: #ffd34d;
}

html.a11y-dyslexic-font {
  --font-body: "Verdana", "Tahoma", sans-serif;
  --font-display: "Verdana", "Tahoma", sans-serif;
  letter-spacing: 0.01em;
}

html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
