:root {
  --ink: #071b1f;
  --ink-2: #0d2c33;
  --foam: #e8f7f4;
  --mist: #b7d9d2;
  --lime: #c8f135;
  --lime-deep: #9fc40a;
  --coral: #ff6b4a;
  --glass: rgba(232, 247, 244, 0.08);
  --stroke: rgba(232, 247, 244, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Syne", "Avenir Next", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--foam);
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(200, 241, 53, 0.18), transparent 55%),
    radial-gradient(900px 600px at -10% 20%, rgba(255, 107, 74, 0.16), transparent 50%),
    linear-gradient(160deg, #041316 0%, var(--ink) 42%, #0a2730 100%);
  background-attachment: fixed;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 0;
}

a {
  color: var(--lime);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
  color: var(--foam);
  text-decoration: none;
}

.brand span {
  color: var(--lime);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--mist);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--foam);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: var(--lime);
  color: #10240a;
  box-shadow: 0 10px 30px rgba(200, 241, 53, 0.25);
}

.btn-primary:hover {
  background: #d7f85c;
}

.btn-ghost {
  background: transparent;
  color: var(--foam);
  border: 1px solid var(--stroke);
}

.btn-ghost:hover {
  background: var(--glass);
}

.hero {
  min-height: calc(100vh - 5rem);
  display: grid;
  align-items: end;
  padding: 2rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  max-width: 34rem;
  animation: rise 0.9s var(--ease) both;
}

.brand-hero {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin: 0 0 1rem;
}

.brand-hero em {
  font-style: normal;
  color: var(--lime);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  max-width: 18ch;
}

.hero p {
  margin: 0 0 1.5rem;
  color: var(--mist);
  max-width: 34ch;
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: absolute;
  right: -4%;
  top: 12%;
  width: min(52vw, 520px);
  aspect-ratio: 1;
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  background:
    linear-gradient(145deg, rgba(200, 241, 53, 0.85), rgba(255, 107, 74, 0.55) 55%, rgba(13, 44, 51, 0.2)),
    radial-gradient(circle at 30% 30%, #fff8, transparent 40%);
  filter: saturate(1.1);
  animation: morph 12s ease-in-out infinite, float 6s ease-in-out infinite;
  box-shadow: var(--shadow);
}

.hero-visual::after {
  content: "CoDi QR";
  position: absolute;
  inset: 18%;
  border-radius: 24px;
  border: 1px dashed rgba(7, 27, 31, 0.45);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: rgba(7, 27, 31, 0.75);
  letter-spacing: -0.04em;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 10px,
      rgba(7, 27, 31, 0.08) 10px 12px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 10px,
      rgba(7, 27, 31, 0.08) 10px 12px
    );
}

.panel {
  margin: 1.5rem 0 3rem;
  padding: 1.5rem;
  border: 1px solid var(--stroke);
  background: rgba(7, 27, 31, 0.55);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  animation: rise 0.7s var(--ease) both;
}

.panel h1,
.panel h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.lede {
  color: var(--mist);
  margin: 0 0 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--mist);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--foam);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(200, 241, 53, 0.45);
  border-color: transparent;
}

.qr-stage {
  display: none;
  margin-top: 1.5rem;
  text-align: center;
  animation: rise 0.6s var(--ease) both;
}

.qr-stage.visible {
  display: block;
}

.qr-stage img {
  width: min(280px, 70vw);
  border-radius: 16px;
  background: white;
  padding: 0.75rem;
  box-shadow: var(--shadow);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-size: 0.85rem;
  color: var(--mist);
}

.status-pill.ok {
  border-color: rgba(200, 241, 53, 0.45);
  color: var(--lime);
}

.status-pill.warn {
  border-color: rgba(255, 107, 74, 0.5);
  color: var(--coral);
}

.stack {
  display: grid;
  gap: 1rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.tip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.tip-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--stroke);
}

.tip-list strong {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.muted {
  color: var(--mist);
  font-size: 0.9rem;
}

.error {
  color: var(--coral);
  margin-top: 0.75rem;
}

.success {
  color: var(--lime);
  margin-top: 0.75rem;
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes morph {
  0%,
  100% {
    border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  }
  50% {
    border-radius: 55% 45% 40% 60% / 50% 55% 45% 50%;
  }
}

@media (max-width: 820px) {
  .hero {
    align-items: start;
    padding-top: 1rem;
  }

  .hero-visual {
    position: relative;
    right: auto;
    top: auto;
    width: min(78vw, 320px);
    margin: 0 0 1.75rem;
    animation: morph 12s ease-in-out infinite;
  }

  .hero-copy {
    order: 2;
  }
}
