:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #111827;
  --primary-hover: #020617;
  --accent: #f59e0b;
  --success: #047857;
  --danger: #b91c1c;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #e0f2fe 0, transparent 34rem), var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.hero {
  padding: 1.25rem;
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.03em;
  font-size: 1.2rem;
}

.coffee,
.primary-link,
.button,
.secondary {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.coffee,
.primary-link,
.button {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.coffee:hover,
.primary-link:hover,
.button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.hero-grid {
  max-width: 1180px;
  margin: 5rem auto 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--success);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.055em;
  margin-bottom: 1rem;
}

.subhead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  margin-bottom: 2rem;
}

.hero-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(14px);
}

.hero-card strong {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

.hero-card span {
  color: var(--muted);
}

main {
  padding: 0 1.25rem 4rem;
}

.panel,
.content-grid,
footer {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  gap: 1.5rem;
  align-items: start;
}

.form-card,
.preview-card,
.content-grid article {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

label {
  display: block;
  font-weight: 750;
  margin: 1rem 0 0.4rem;
}

label:first-child {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 0.85rem 0.95rem;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.1);
}

.advanced {
  margin: 1.25rem 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem;
}

.advanced summary {
  cursor: pointer;
  font-weight: 800;
}

.button {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 1.02rem;
}

.status {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: var(--muted);
}

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

.status.success {
  color: var(--success);
}

.preview-card {
  position: sticky;
  top: 1rem;
}

.qr-preview {
  min-height: 320px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  overflow: hidden;
}

.qr-preview canvas,
.qr-preview svg,
.qr-preview img {
  max-width: 100%;
  height: auto;
}

.download-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
}

.secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.secondary:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 1rem 0 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.content-grid article {
  background: #fff;
}

.content-grid h2 {
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.content-grid p {
  color: var(--muted);
  margin-bottom: 0;
}

footer {
  padding: 2rem 1.25rem 3rem;
  color: var(--muted);
  text-align: center;
}

.field-help {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.checkbox-row input {
  width: auto;
}

@media (max-width: 900px) {
  .hero-grid,
  .app-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    margin-top: 3rem;
  }

  .preview-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .coffee {
    width: 100%;
    text-align: center;
  }

  .download-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.35rem, 15vw, 4rem);
  }
}
