:root {
  --emerald: #14b8a6;
  --emerald-dark: #0f766e;
  --coral: #f9736b;
  --amber: #fbbf24;
  --ink: #111827;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --surface: rgba(255, 255, 255, 0.86);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: #fbfcfe;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container,
.nav,
.hero-grid {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 92vh;
  padding: 22px 0 76px;
  color: var(--white);
  background:
    linear-gradient(120deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.92) 48%, rgba(15, 118, 110, 0.9) 100%),
    var(--slate-900);
  overflow: hidden;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--emerald), var(--coral));
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.32);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.nav-links {
  display: flex;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 56px;
  align-items: center;
  padding-top: 96px;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  color: var(--white);
  font-size: clamp(3rem, 7vw, 5.65rem);
  line-height: 1;
  letter-spacing: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: #8ee8db;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subtitle {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  line-height: 1.7;
}

.shorten-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  width: min(720px, 100%);
  margin-top: 34px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.form-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.form-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.42fr);
  gap: 10px;
}

.field-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-control span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.82rem;
  font-weight: 800;
}

.shorten-form input,
.shorten-form select {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  padding: 18px 16px;
  color: var(--ink);
  background: var(--white);
  outline: 3px solid transparent;
  transition: outline-color 180ms ease, box-shadow 180ms ease;
}

.field-control input,
.field-control select {
  padding: 13px 14px;
}

.shorten-form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--slate-600) 50%),
    linear-gradient(135deg, var(--slate-600) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.shorten-form input:focus,
.shorten-form select:focus {
  outline-color: rgba(16, 185, 129, 0.32);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.16);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  min-width: 132px;
  min-height: 58px;
  padding: 0 24px;
  color: var(--slate-950);
  background: linear-gradient(135deg, #99f6e4, #fbbf24);
  box-shadow: 0 14px 28px rgba(251, 191, 36, 0.22);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  background: linear-gradient(135deg, #5eead4, #f59e0b);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.8;
  transform: none;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

.is-loading .button-label {
  display: none;
}

.is-loading .spinner {
  display: block;
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 600;
}

.form-message.error {
  color: #fecaca;
}

.hero-panel,
.result-card,
.feature-card,
.steps article,
.use-case-grid article {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  padding: 22px;
  color: var(--slate-800);
  backdrop-filter: blur(20px);
}

.preview-header {
  display: flex;
  gap: 7px;
}

.preview-header span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--slate-200);
}

.preview-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 6px;
  background: #f5fbfa;
  color: var(--slate-600);
}

.preview-link strong {
  color: var(--emerald-dark);
}

.preview-qr {
  display: grid;
  width: 210px;
  height: 210px;
  place-items: center;
  margin: 26px auto;
  border: 10px solid var(--white);
  box-shadow:
    inset 0 0 0 1px var(--slate-200),
    0 14px 34px rgba(15, 23, 42, 0.12);
}

.qr-grid {
  width: 170px;
  height: 170px;
  background:
    linear-gradient(90deg, var(--slate-900) 10px, transparent 10px) 0 0 / 20px 20px,
    linear-gradient(var(--slate-900) 10px, transparent 10px) 0 0 / 20px 20px,
    var(--white);
}

.preview-metrics,
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.preview-metrics div,
.meta-grid div {
  min-width: 0;
  padding: 14px;
  border-radius: 6px;
  background: #f7fafc;
}

.preview-metrics span,
.meta-grid span {
  display: block;
  color: var(--slate-600);
  font-size: 0.82rem;
  font-weight: 700;
}

.preview-metrics strong,
.meta-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--slate-800);
  font-size: 1.25rem;
}

.result-section {
  margin-top: -44px;
  padding-bottom: 34px;
  position: relative;
  z-index: 3;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 28px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 260ms ease, transform 260ms ease, box-shadow 260ms ease;
}

.result-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.result-card.success-flash {
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16), var(--shadow);
}

.short-url {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--slate-900);
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  font-weight: 800;
  text-decoration-color: rgba(20, 184, 166, 0.35);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.secondary-button {
  min-height: 44px;
  padding: 0 16px;
  color: var(--slate-900);
  background: #e7f7f4;
}

.secondary-button:hover {
  background: #ccfbf1;
}

.qr-card {
  display: grid;
  gap: 16px;
  place-items: center;
  width: 246px;
  min-height: 246px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--slate-50);
}

.qr-code {
  width: 200px;
  height: 200px;
}

.qr-code img,
.qr-code canvas {
  display: block;
  width: 200px;
  height: 200px;
}

.qr-colors {
  display: grid;
  width: 100%;
  gap: 10px;
}

.qr-colors > span {
  color: var(--slate-700);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.qr-colors label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  color: var(--slate-600);
  font-size: 0.82rem;
  font-weight: 700;
}

.qr-colors input {
  width: 44px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}

.original-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  padding: 86px 0;
}

.section.light {
  background: #f4f7fb;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.feature-grid,
.steps,
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.steps article,
.use-case-grid article {
  padding: 24px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.feature-icon,
.steps span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 6px;
  color: var(--slate-950);
  background: #99f6e4;
  font-weight: 900;
}

.feature-card:nth-child(2) .feature-icon,
.steps article:nth-child(2) span {
  background: #fde68a;
}

.feature-card:nth-child(3) .feature-icon,
.steps article:nth-child(3) span {
  background: #fecdd3;
}

.feature-card h3,
.steps h3,
.use-case-grid h3 {
  margin: 18px 0 8px;
  color: var(--slate-900);
  font-size: 1.08rem;
}

.feature-card p,
.steps p,
.use-case-grid p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.65;
}

.use-case-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.footer {
  padding: 28px 20px;
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
  background: var(--slate-950);
}

.footer p {
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .result-card,
  .feature-grid,
  .steps,
  .use-case-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 72px;
  }

  .hero-panel {
    max-width: 480px;
  }

  .qr-card {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container,
  .nav,
  .hero-grid {
    width: min(100% - 28px, 1120px);
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-bottom: 82px;
  }

  .hero-grid {
    gap: 34px;
    padding-top: 58px;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .shorten-form {
    grid-template-columns: 1fr;
    padding: 7px;
  }

  .form-options {
    grid-template-columns: 1fr;
  }

  .primary-button {
    min-height: 54px;
  }

  .preview-metrics,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    padding: 20px;
  }

  .short-url {
    font-size: 1.6rem;
  }

  .section {
    padding: 64px 0;
  }
}
