:root {
  --fire: #ff4500;
  --amber: #ff8c00;
  --gold: #ffd700;
  --cream: #fffbf5;
  --ink: #1a0a00;
  --muted: #8b6b52;
  --white: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.97);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  background-color: #1a0a00;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* === ANIMATED BACKGROUND === */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, #ff6b00 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, #ff3300 0%, transparent 55%),
    radial-gradient(ellipse at 60% 80%, #ff8c00 0%, transparent 50%), #1a0a00;
  overflow: hidden;
}

.bg-canvas::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg,
    rgba(255, 100, 0, 0.03) 1deg,
    transparent 2deg
  );
  animation: rotateGrad 40s linear infinite;
}

.bg-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(255,200,50,0.08)'/%3E%3C/svg%3E")
    repeat;
  animation: shimmer 8s ease-in-out infinite alternate;
}

@keyframes rotateGrad {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shimmer {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

/* Floating particles */
.particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: floatUp var(--dur) var(--delay) ease-in infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-10vh) translateX(var(--drift)) scale(1.5);
    opacity: 0;
  }
}

/* === LAYOUT === */
.wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.card {
  background: var(--card-bg);
  border-radius: 28px;
  max-width: 860px;
  width: 100%;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 140, 0, 0.2),
    0 40px 100px rgba(255, 69, 0, 0.35),
    0 0 60px rgba(255, 200, 0, 0.1);
  animation: cardReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* === HEADER BAND === */
.card-header {
  background: linear-gradient(135deg, #ff4500 0%, #ff8c00 50%, #ffd700 100%);
  padding: 36px 40px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.04) 10px,
    rgba(255, 255, 255, 0.04) 20px
  );
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
  animation: fadeSlideDown 0.6s 0.2s both;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.headline {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: white;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  animation: fadeSlideDown 0.6s 0.3s both;
}

.headline em {
  font-style: normal;
  color: var(--gold);
}

.subhead {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 10px;
  font-weight: 400;
  animation: fadeSlideDown 0.6s 0.4s both;
}

/* === OFFER PILLS === */
.offer-strip {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 22px 40px;
  background: var(--cream);
  border-bottom: 1px solid rgba(255, 140, 0, 0.12);
  animation: fadeSlideDown 0.6s 0.5s both;
}

.pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: white;
  border: 1.5px solid rgba(255, 140, 0, 0.25);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(255, 100, 0, 0.08);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 100, 0, 0.15);
}
.pill .icon {
  font-size: 16px;
}
.pill strong {
  color: var(--fire);
}

/* === MAGAZINE COVERS === */
.magazines-section {
  padding: 32px 40px;
  background: white;
  animation: fadeSlideUp 0.7s 0.6s both;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  text-align: center;
}

.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mag-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #fff8f0, #fff0e0);
  border: 1px solid rgba(255, 140, 0, 0.15);
  aspect-ratio: 3/4;
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mag-item:hover {
  transform: translateY(-6px) rotate(-1deg) scale(1.02);
  box-shadow: 0 20px 50px rgba(255, 69, 0, 0.2);
}

.mag-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback placeholder if images missing */
.mag-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
}

.mag-placeholder .month {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fire);
}

.mag-placeholder .year-tag {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.1em;
}

.mag-placeholder .cover-icon {
  font-size: 2.4rem;
  margin-bottom: 4px;
}

.mag-ribbon {
  position: absolute;
  top: 10px;
  right: -22px;
  background: var(--fire);
  color: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 28px;
  transform: rotate(45deg);
  text-transform: uppercase;
}

/* === FORM SECTION === */
.form-section {
  padding: 32px 40px 40px;
  background: var(--cream);
  animation: fadeSlideUp 0.7s 0.7s both;
}

.form-title {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  text-align: center;
}

.form-subtitle {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: white;
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  color: var(--ink);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: #c5b0a0;
}

input:focus,
textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
}

input.error-field {
  border-color: #e53e3e;
  box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.08);
}

textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.error-msg {
  font-size: 11px;
  color: #e53e3e;
  font-weight: 500;
  display: none;
}
.error-msg.show {
  display: block;
}

/* CTA Button */
.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 24px;
  margin-top: 20px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: white;
  background: linear-gradient(135deg, #ff4500 0%, #ff8c00 100%);
  box-shadow:
    0 8px 30px rgba(255, 69, 0, 0.4),
    0 2px 8px rgba(255, 69, 0, 0.3);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff6b35, #ffd700);
  opacity: 0;
  transition: opacity 0.3s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 40px rgba(255, 69, 0, 0.5),
    0 4px 14px rgba(255, 69, 0, 0.3);
}

.cta-btn:hover::before {
  opacity: 1;
}
.cta-btn:active {
  transform: translateY(0);
}
.cta-btn span {
  position: relative;
  z-index: 1;
}
.cta-icon {
  position: relative;
  z-index: 1;
  font-size: 20px;
  transition: transform 0.3s;
}
.cta-btn:hover .cta-icon {
  transform: translateX(4px);
}

/* Trust bar */
.trust-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: white;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.trust-item .t-icon {
  font-size: 15px;
}

/* Success state */
.success-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 40px;
  text-align: center;
  animation: fadeSlideUp 0.5s both;
}

.success-overlay.show {
  display: flex;
}
.form-section.hidden,
.magazines-section.hidden {
  display: none;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4500, #ffd700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 12px 40px rgba(255, 69, 0, 0.3);
}

.success-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
}

/* Responsive */
@media (max-width: 620px) {
  .card-header {
    padding: 28px 24px 22px;
  }
  .magazines-section,
  .form-section {
    padding-left: 24px;
    padding-right: 24px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full {
    grid-column: 1;
  }
  .offer-strip {
    padding: 16px 20px;
  }
  .trust-bar {
    padding: 14px 20px;
  }
}

@media (max-width: 400px) {
  .mag-grid {
    gap: 10px;
  }
}
