/* ─── Reset & Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #c9a96e;
  --gold-light:  #e8cc95;
  --gold-dark:   #9b7c4a;
  --bg:          #0f0f13;
  --bg-card:     #16161e;
  --bg-card-2:   #1c1c27;
  --text:        #f0ede6;
  --text-muted:  #8a8495;
  --border:      rgba(201,169,110,0.18);
  --border-used: rgba(255,255,255,0.07);
  --radius-card: 20px;
  --radius-btn:  12px;
  --shadow-gold: 0 0 40px rgba(201,169,110,0.12);
  --transition:  0.25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Install Banner ────────────────────────────────────────────────── */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 1rem 1rem;
  animation: slideUp 0.4s cubic-bezier(.4,0,.2,1);
}

.install-banner.hidden { display: none; }

.install-banner__inner {
  background: linear-gradient(135deg, #1e1e2e, #252535);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,169,110,0.1);
  max-width: 600px;
  margin: 0 auto;
}

.install-banner__icon img {
  border-radius: 12px;
  display: block;
}

.install-banner__text { flex: 1; min-width: 0; }

.install-banner__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1.2;
}

.install-banner__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ios-share-icon {
  display: inline-block;
  font-size: 1em;
  color: var(--gold);
}

.install-banner__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-install {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0f0f13;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn-install:hover { opacity: 0.88; transform: scale(1.02); }

.btn-dismiss {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-dismiss:hover { border-color: var(--gold); color: var(--gold); }

/* ─── Hero ──────────────────────────────────────────────────────────── */
.main { max-width: 720px; margin: 0 auto; padding: 0 1.25rem 4rem; }

.hero {
  position: relative;
  text-align: center;
  padding: 5rem 1rem 3.5rem;
  overflow: hidden;
}

.hero__ornament {
  position: absolute;
  top: 0;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.07;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
}

.hero__ornament--left  { left: -140px; top: -80px; }
.hero__ornament--right { right: -140px; top: -40px; }

.hero__message {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
}

.hero__message .heart {
  color: #e07070;
}

.hero__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--gold-dark);
}

.hero__divider span:not(.hero__divider-gem) {
  display: block;
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--gold-dark));
}

.hero__divider span:last-child {
  background: linear-gradient(90deg, var(--gold-dark), transparent);
}

.hero__divider-gem {
  font-size: 0.5rem;
  color: var(--gold);
}

/* ─── Coupons ───────────────────────────────────────────────────────── */
.coupons { display: flex; flex-direction: column; gap: 2.5rem; }

.coupons__group-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 400;
  padding-left: 2px;
}

.coupons__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.coupons__grid--two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ─── Single Coupon Card ────────────────────────────────────────────── */
.coupon {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem 1.5rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  overflow: hidden;
  min-height: 190px;
  -webkit-tap-highlight-color: transparent;
}

.coupon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,169,110,0.07) 0%, transparent 60%);
  pointer-events: none;
  transition: opacity var(--transition);
  opacity: 0;
  border-radius: inherit;
}

.coupon:hover:not(:disabled)::before,
.coupon:focus-visible:not(:disabled)::before { opacity: 1; }

.coupon:hover:not(:disabled) {
  border-color: rgba(201,169,110,0.5);
  background: var(--bg-card-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold), 0 12px 40px rgba(0,0,0,0.4);
}

.coupon:focus-visible:not(:disabled) {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.coupon:active:not(:disabled) { transform: translateY(-1px) scale(0.99); }

/* Ribbon (decorative top-left corner) */
.coupon__ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, transparent 50%, rgba(201,169,110,0.15) 50%);
  border-top-right-radius: var(--radius-card);
  pointer-events: none;
}

.coupon__icon {
  font-size: 1.75rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.25rem;
}

.coupon__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.coupon__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.5;
  flex: 1;
}

.coupon__badge {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-top: 0.25rem;
  transition: color var(--transition);
}

.coupon:hover:not(:disabled) .coupon__badge { color: var(--gold-light); }

/* ─── Used / Disabled State ─────────────────────────────────────────── */
.coupon:disabled,
.coupon.used {
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--border-used);
  background: rgba(22,22,30,0.5);
  opacity: 0.45;
  transform: none !important;
  box-shadow: none !important;
}

.coupon:disabled::before,
.coupon.used::before { display: none; }

.coupon:disabled .coupon__badge,
.coupon.used .coupon__badge {
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.coupon:disabled .coupon__icon,
.coupon.used .coupon__icon { filter: grayscale(1); }

/* ─── Locked / Timed State ──────────────────────────────────────────── */
.coupon--locked {
  cursor: default;
  pointer-events: none;
  border-color: rgba(255,255,255,0.06);
  background: rgba(15,15,19,0.7);
  transform: none !important;
  box-shadow: none !important;
  overflow: hidden;
}

.coupon--locked::before { display: none; }

/* Blur all content inside locked coupon */
.coupon--locked .coupon__icon,
.coupon--locked .coupon__name,
.coupon--locked .coupon__desc {
  filter: blur(6px);
  user-select: none;
  opacity: 0.6;
}

/* Overlay with lock icon + datum on top of the blurred content */
.coupon--locked::after {
  content: '🔒 Beschikbaar op ' attr(data-unlock-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  padding: 1rem;
  background: rgba(10,10,15,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: var(--radius-card);
  pointer-events: none;
}

.coupon--locked .coupon__badge { display: none; }

.coupon--locked .coupon__ribbon {
  background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.03) 50%);
}

/* ─── Modal ─────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}

@media (min-width: 480px) {
  .modal { align-items: center; }
}

.modal.hidden { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

.modal__box {
  position: relative;
  background: linear-gradient(160deg, #1e1e2e 0%, #17172280 100%),
              linear-gradient(160deg, #1e1e2e, #1e1e2e);
  background-color: #1e1e2e;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.25rem 1.25rem 1.5rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,169,110,0.1);
  animation: modalIn 0.3s cubic-bezier(.4,0,.2,1);
}

@media (min-width: 480px) {
  .modal__box { padding: 2.25rem 2rem 2rem; }
}

.modal__close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), color var(--transition);
}

.modal__close:hover { border-color: var(--gold); color: var(--gold); }

.modal__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.modal__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.modal__field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; width: 100%; }

.modal__label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

.modal__textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.6;
  padding: 0.85rem 1rem;
  resize: vertical;
  min-height: 110px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition), background var(--transition);
}

.modal__textarea::placeholder { color: rgba(255,255,255,0.2); }

.modal__input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Jost', sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.6;
  padding: 0.75rem 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition), background var(--transition);
}

.modal__input::placeholder { color: rgba(255,255,255,0.2); }

.modal__input:focus {
  outline: none;
  border-color: rgba(201,169,110,0.5);
  background: rgba(255,255,255,0.06);
}

/* Date/time inputs: fix native chrome styling on dark bg */
.modal__input[type="date"],
.modal__input[type="time"] {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
}

.modal__massage-fields { margin-bottom: 0.25rem; }
.modal__massage-fields.hidden { display: none; }

.modal__textarea:focus {
  outline: none;
  border-color: rgba(201,169,110,0.5);
  background: rgba(255,255,255,0.06);
}

.modal__char-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

.modal__error {
  font-size: 0.82rem;
  color: #e07070;
  margin-top: 0.5rem;
  text-align: center;
}

.modal__error.hidden { display: none; }

/* Loading state */
.modal__state { display: flex; flex-direction: column; align-items: center; text-align: center; }
.modal__state--form { align-items: flex-start; text-align: left; }
.modal__state.hidden { display: none; }

.modal__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(201,169,110,0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem 0 1.5rem;
}

.modal__loading-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

/* Success state */
.modal__success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a3a2a, #1e2e1e);
  border: 1px solid rgba(100,200,100,0.3);
  color: #80d080;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0 1.25rem;
}

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #0f0f13;
  border: none;
  border-radius: var(--radius-btn);
  padding: 0.85rem 2rem;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  width: 100%;
  margin-top: 0.5rem;
  box-shadow: 0 4px 20px rgba(201,169,110,0.25);
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 30px rgba(201,169,110,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── Footer ─────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.08em;
}

.footer span { color: #e07070; }

/* ─── Animations ─────────────────────────────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes modalIn {
  from { transform: translateY(24px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

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

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 400px) {
  .coupons__grid { grid-template-columns: 1fr; }
  .coupons__grid--two { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0.5rem 2.5rem; }
}
