:root {
  color-scheme: light;
  --bg: #f6f1e8;
  --ink: #111418;
  --muted: #5e646d;
  --accent: #0f7b6c;
  --accent-strong: #0b5f54;
  --accent-warm: #d86a4a;
  --panel: rgba(255, 255, 255, 0.86);
  --stroke: rgba(18, 24, 33, 0.14);
  --shadow: 0 28px 80px rgba(18, 24, 33, 0.18);
  --radius: 28px;
  --radius-lg: 34px;
  --qr-size: clamp(220px, 32vw, 320px);
  --body-font: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display-font: "Fraunces", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.9), transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(250, 222, 196, 0.7), transparent 40%),
    linear-gradient(140deg, #f7f1e6 0%, #f3f7f8 52%, #f9e6d7 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.24) 0,
      rgba(255, 255, 255, 0.24) 1px,
      transparent 1px,
      transparent 24px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(18, 24, 33, 0.06) 0,
      rgba(18, 24, 33, 0.06) 1px,
      transparent 1px,
      transparent 28px
    );
  opacity: 0.6;
  pointer-events: none;
}

.formspark-target {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  padding: 48px clamp(20px, 4vw, 72px) 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: grid;
  gap: 20px;
  margin-bottom: 36px;
}

.brand-mark {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--stroke);
  padding: 10px;
  box-shadow: var(--shadow);
}

.brand-copy h1 {
  font-family: var(--display-font);
  font-size: clamp(28px, 4vw, 48px);
  margin: 6px 0 4px;
  letter-spacing: -0.5px;
}


.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.24em;
  margin: 0;
  color: var(--accent-strong);
  font-weight: 600;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.partner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.partner-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.8;
}

.partner-text {
  font-weight: 600;
  color: var(--ink);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  padding: 28px clamp(20px, 3vw, 36px);
  backdrop-filter: blur(16px);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.panel-header h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.panel-header p {
  margin: 0 0 20px;
  color: var(--muted);
}

form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  padding: 6px 0 2px;
}

.turnstile-wrap .cf-turnstile {
  transform: scale(0.98);
  transform-origin: center;
}

label {
  font-size: 14px;
  font-weight: 600;
}

input {
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px 16px;
  font-size: 15px;
  font-family: var(--body-font);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: rgba(15, 123, 108, 0.6);
  box-shadow: 0 0 0 3px rgba(15, 123, 108, 0.16);
}

.qr-status {
  min-height: 16px;
  font-size: 12px;
  color: var(--muted);
}

.qr-status.is-error {
  color: #b00020;
}


.primary,
.ghost {
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--body-font);
  cursor: pointer;
}

.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-warm));
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 123, 108, 0.25);
}

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

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

.ghost {
  background: transparent;
  border: 1px solid rgba(15, 123, 108, 0.4);
  color: var(--accent-strong);
}

.fine {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.form-error {
  margin: 6px 0 0;
  font-size: 13px;
  color: #b00020;
}

.form-error.hidden {
  display: none;
}

.qr-panel {
  display: grid;
  gap: 22px;
  align-content: start;
}

.qr-shell {
  display: grid;
  gap: 16px;
}

.qr-frame {
  background: #fff;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid var(--stroke);
  display: grid;
  place-items: center;
}

.qr-target {
  width: var(--qr-size);
  height: var(--qr-size);
  display: grid;
  place-items: center;
}

.qr-target canvas,
.qr-target img,
.qr-target table {
  width: 100% !important;
  height: 100% !important;
}

.qr-meta {
  display: grid;
  gap: 6px;
}

.qr-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--muted);
}

.qr-number {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

.qr-name {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.qr-instructions h3 {
  margin: 0;
  font-size: 22px;
}

.qr-instructions {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.qr-instructions p {
  margin: 0;
  color: var(--muted);
}

.qr-tip {
  font-size: 13px;
}

.qr-placeholder {
  display: grid;
  gap: 14px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
  border-radius: 24px;
  border: 1px dashed rgba(18, 24, 33, 0.2);
}

.qr-placeholder-box {
  width: var(--qr-size);
  height: var(--qr-size);
  border-radius: 20px;
  border: 1px dashed rgba(18, 24, 33, 0.2);
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(15, 123, 108, 0.08), rgba(216, 106, 74, 0.08));
}

.qr-placeholder p {
  margin: 6px 0 0;
}

.qr-placeholder strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

body[data-mode="qr"] .stage {
  grid-template-columns: minmax(0, 1fr);
}

body[data-mode="qr"] .form-panel {
  display: none;
}

body[data-mode="qr"] .qr-panel {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  animation: reveal 0.6s ease;
}

body[data-mode="qr"] .qr-shell,
body[data-mode="qr"] .qr-instructions {
  justify-items: center;
}

.hidden {
  display: none;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .stage {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .brand-logo {
    margin: 0 auto;
  }

  .partner {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .primary {
    animation: none !important;
    transition: none !important;
  }
}
