/* ── First-Visit Welcome Offer — front porch at golden hour ─────────
   Honey-cream ground, peach sky band, terracotta hand-drawn door
   with glowing porch lamp, stitched WELCOME doormat, hanging porch
   sign form, house-key tag code reveal. */

:root {
  --honey: #fdf6e9;
  --honey-deep: #f7ecd6;
  --peach: #f9d9b8;
  --clay: #7a4a33;
  --clay-deep: #5f3826;
  --terracotta: #b65c3d;
  --terracotta-deep: #9a4a2f;
  --brass: #e8b054;
  --leaf: #6a8a5f;
  --ink-soft: #a08a76;
  --err: #c74a30;
  --serif: 'Fraunces', serif;
  --sans: 'Nunito Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--sans);
  color: var(--clay);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--honey), var(--honey-deep));
  background-attachment: fixed;
  min-height: 100vh;
}

.porch { position: relative; min-height: 100vh; display: flex; flex-direction: column; }

.sky {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 260px;
  background: linear-gradient(180deg, var(--peach), transparent);
  pointer-events: none;
}

.wrap { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 24px; }

main { flex: 1 0 auto; padding-bottom: 60px; position: relative; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 44px 24px 8px; }

.door { width: 160px; height: 210px; }

.doormat {
  display: inline-block;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--honey);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 6px, transparent 6px 12px),
    var(--leaf);
  border: 3px dashed rgba(253, 246, 233, 0.5);
  border-radius: 6px;
  padding: 8px 26px;
  margin-top: -6px;
  transform: perspective(200px) rotateX(38deg);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 7.5vw, 3rem);
  line-height: 1.12;
  margin-top: 20px;
  color: var(--clay);
}

.sub { color: var(--ink-soft); max-width: 400px; margin: 12px auto 0; font-weight: 600; }

.sub strong { color: var(--terracotta); }

/* ── Porch sign form ──────────────────────────────────────────────── */
.sign-stage { margin-top: 8px; }

.ropes {
  display: flex;
  justify-content: space-between;
  padding: 0 60px;
}

.ropes span {
  width: 3px;
  height: 34px;
  background: repeating-linear-gradient(180deg, #a68960 0 5px, #8d7350 5px 10px);
  border-radius: 999px;
}

.porch-sign {
  background:
    repeating-linear-gradient(90deg, transparent 0 80px, rgba(95, 56, 38, 0.06) 80px 82px),
    linear-gradient(180deg, #caa273, #b8905f);
  border: 3px solid var(--clay);
  border-radius: 14px;
  padding: 28px 28px 24px;
  box-shadow: 0 14px 30px rgba(122, 74, 51, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.field { margin-bottom: 14px; }

label {
  display: block;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 7px;
  color: var(--clay-deep);
}

input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--clay);
  background: var(--honey);
  border: 2px solid rgba(95, 56, 38, 0.25);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--terracotta); }
input.error { border-color: var(--err); }
input::placeholder { color: #c0a88e; }

/* ── Button ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--honey);
  background: linear-gradient(180deg, var(--terracotta), var(--terracotta-deep));
  border: none;
  border-radius: 12px;
  padding: 15px 32px;
  cursor: pointer;
  transition: transform 0.12s ease;
  box-shadow: 0 5px 0 #6e3421;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.btn-block { width: 100%; }

.form-error { color: #7e2914; font-weight: 800; text-align: center; margin-top: 12px; }

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(253, 246, 233, 0.4);
  border-top-color: var(--honey);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Key tag reveal ───────────────────────────────────────────────── */
.key-stage { text-align: center; margin-top: 10px; }

.key-tag {
  position: relative;
  display: inline-block;
  background: #fff;
  border: 2.5px solid var(--clay);
  border-radius: 16px;
  padding: 34px 38px 28px;
  min-width: 280px;
  box-shadow: 0 16px 34px rgba(122, 74, 51, 0.25);
  animation: dangle 0.9s ease both;
  transform-origin: top center;
}

@keyframes dangle {
  0% { transform: rotate(-5deg) translateY(-10px); opacity: 0; }
  60% { transform: rotate(3deg); opacity: 1; }
  100% { transform: rotate(0); }
}

.key-ring {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 5px solid var(--brass);
  background: var(--honey);
}

.key-label {
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.key-code {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 8vw, 2.3rem);
  letter-spacing: 0.06em;
  color: var(--terracotta);
  word-break: break-all;
}

.copy-btn {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--leaf);
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  cursor: pointer;
  margin-top: 14px;
  transition: transform 0.12s ease;
  box-shadow: 0 4px 0 #52704a;
}

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

.expires { font-size: 0.75rem; color: var(--ink-soft); margin-top: 10px; font-weight: 700; }

.after-line { color: var(--ink-soft); font-weight: 600; max-width: 380px; margin: 20px auto 0; }

/* ── Footer ───────────────────────────────────────────────────────── */
.foot {
  text-align: center;
  padding: 30px 20px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .porch-sign { padding: 22px 18px 18px; }
  .key-tag { min-width: 0; width: 100%; padding: 30px 22px 24px; }
}
