@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Sans:ital,opsz,wght@0,9pt..40pt,100..1000;1,9pt..40pt,100..1000&display=swap');

:root {
  --bg: #08080c;
  --surface: rgba(255,255,255,0.025);
  --surface-hover: rgba(255,255,255,0.045);
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.10);
  --text: #f5f5f7;
  --text-secondary: rgba(245,245,247,0.55);
  --text-tertiary: rgba(245,245,247,0.35);
  --accent: #c9963c;
  --accent-glow: rgba(201,150,60,0.18);
  --accent-subtle: rgba(201,150,60,0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }

/* Ambient background — same layers as landing page */
.bg-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(201,150,60,0.04) 0%, transparent 70%),
              radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.015) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.01) 0%, transparent 40%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.12;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 70%);
}

/* Nav — fixed for consistency with landing page */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(8,8,12,0.7);
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem; font-weight: 400; font-style: italic;
  letter-spacing: -0.02em; color: var(--text);
}
.nav-back {
  font-size: 0.85rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--text); }

/* Main layout — centered below fixed nav */
main {
  position: relative; z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 96px 32px 80px;
}

/* Plan badge */
.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-subtle);
  border: 1px solid rgba(201,150,60,0.2);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 24px;
}
.plan-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}
.step-item { display: flex; align-items: center; gap: 10px; }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  background: var(--surface);
  transition: all 0.3s;
}
.step-num.active { background: var(--accent); border-color: var(--accent); color: #0a0a0a; }
.step-num.done { background: var(--accent-subtle); border-color: var(--accent); color: var(--accent); }
.step-label { font-size: 0.8rem; color: var(--text-tertiary); transition: color 0.3s; white-space: nowrap; }
.step-label.active { color: var(--text); }
.step-connector { width: 40px; height: 1px; background: var(--border); margin: 0 8px; }

/* Card */
.checkout-card {
  width: 100%; max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
label {
  display: block;
  font-size: 0.78rem; color: var(--text-secondary);
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 8px;
}
input, select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: inherit; font-size: 0.9rem; color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  appearance: none; -webkit-appearance: none;
}
input::placeholder { color: var(--text-tertiary); }
input:focus, select:focus {
  outline: none;
  border-color: rgba(201,150,60,0.4);
  background: rgba(255,255,255,0.06);
}
input.error, select.error { border-color: rgba(220,50,50,0.5); }
.field-error { font-size: 0.75rem; color: #e05555; margin-top: 5px; display: none; }
.field-error.visible { display: block; }
/* ── Custom Select ── */
.custom-select { position: relative; }
.custom-select-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: inherit; font-size: 0.9rem; color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: left;
}
.custom-select-trigger:hover { border-color: var(--border-strong); }
.custom-select-trigger:focus-visible {
  outline: none;
  border-color: rgba(201,150,60,0.4);
  background: rgba(255,255,255,0.06);
}
.custom-select-trigger.is-open {
  border-color: rgba(201,150,60,0.4);
  background: rgba(255,255,255,0.06);
}
.custom-select-placeholder { color: var(--text-tertiary); }
.custom-select-chevron {
  flex-shrink: 0; color: var(--text-tertiary);
  transition: transform 0.25s ease;
}
.custom-select-trigger.is-open .custom-select-chevron { transform: rotate(180deg); color: var(--accent); }

.custom-select-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: #111118;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 4px;
  overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,150,60,0.08);
}
.custom-select-dropdown.open {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}
.custom-select-option {
  width: 100%; display: block;
  padding: 10px 14px; border-radius: 6px;
  background: none; border: none;
  font-family: inherit; font-size: 0.88rem; color: var(--text-secondary);
  cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.custom-select-option:hover,
.custom-select-option:focus-visible {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  outline: none;
}
.custom-select-option.is-selected {
  background: var(--accent-subtle);
  color: var(--accent);
}
/* Hidden native select for form compatibility — no longer used */

/* Step headers */
.step-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 6px;
}
.step-sub { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 28px; }

/* Buttons */
.btn-row { display: flex; gap: 12px; margin-top: 28px; }
.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #c9963c, #b88632);
  color: #0a0a0a; border: none; border-radius: 8px;
  padding: 13px 24px;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; letter-spacing: 0.01em;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 13px 20px; font-family: inherit; font-size: 0.9rem;
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text); }

/* Review (Step 2) */
.review-section { margin-bottom: 24px; }
.review-section-label {
  font-size: 0.7rem; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.review-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; font-size: 0.88rem; }
.review-key { color: var(--text-secondary); }
.review-val { color: var(--text); text-align: right; max-width: 60%; }
.review-val.price { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 500; color: var(--accent); }

.payment-note {
  background: rgba(201,150,60,0.06); border: 1px solid rgba(201,150,60,0.15);
  border-radius: 8px; padding: 14px 16px;
  font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 24px;
}
.payment-note strong { color: var(--accent); }

.timeline { list-style: none; margin-bottom: 24px; }
.timeline li { display: flex; gap: 12px; font-size: 0.85rem; color: var(--text-secondary); padding: 7px 0; align-items: flex-start; }
.timeline-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-subtle); border: 1px solid rgba(201,150,60,0.25);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: var(--accent); margin-top: 1px;
}

/* 3D Glass State Icons — matches landing page icon style */
.state-icon-wrap {
  position: relative;
  width: 100px; height: 100px;
  margin: 0 auto 32px;
  perspective: 600px;
}
.state-icon-glow {
  position: absolute; inset: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,150,60,0.28) 0%, transparent 70%);
  animation: state-glow-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
.state-icon-error .state-icon-glow {
  background: radial-gradient(circle, rgba(220,50,50,0.22) 0%, transparent 70%);
}
.state-icon-enter {
  animation: state-icon-entrance 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.state-icon {
  width: 100px; height: 100px;
  transform-style: preserve-3d;
  animation: state-icon-float 7s ease-in-out infinite;
}
.state-icon-ring {
  position: absolute; top: 50%; left: 50%;
  width: 80px; height: 80px; margin: -40px 0 0 -40px;
  border-radius: 50%;
  border: 2px solid rgba(201,150,60,0.45);
  background: rgba(201,150,60,0.07);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 0 30px rgba(201,150,60,0.18), inset 0 0 20px rgba(201,150,60,0.05);
}
.state-icon-error .state-icon-ring {
  border-color: rgba(220,50,50,0.4);
  background: rgba(220,50,50,0.06);
  box-shadow: 0 0 30px rgba(220,50,50,0.15), inset 0 0 20px rgba(220,50,50,0.04);
}
.state-icon-ring-outer {
  position: absolute; top: 50%; left: 50%;
  width: 98px; height: 98px; margin: -49px 0 0 -49px;
  border-radius: 50%;
  border: 1px solid rgba(201,150,60,0.13);
}
.state-icon-error .state-icon-ring-outer { border-color: rgba(220,50,50,0.1); }
.state-icon-svg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
@keyframes state-icon-float {
  0%, 100% { transform: rotateX(-8deg) rotateY(-12deg) rotateZ(2deg); }
  33%  { transform: rotateX(-4deg) rotateY(10deg) rotateZ(-3deg) translateZ(10px); }
  66%  { transform: rotateX(-13deg) rotateY(-5deg) rotateZ(4deg) translateZ(-5px); }
}
@keyframes state-icon-entrance {
  from { transform: scale(0.45); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes state-glow-pulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50%       { opacity: 1;    transform: scale(1.12); }
}

/* Kept for legacy reference — new markup uses .state-icon-wrap */
.confirmed-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent-subtle); border: 1px solid rgba(201,150,60,0.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 0 10px rgba(201,150,60,0.04), 0 0 40px rgba(201,150,60,0.12);
}
.order-ref-box {
  background: rgba(201,150,60,0.06); border: 1px solid rgba(201,150,60,0.2);
  border-radius: 8px; padding: 16px; text-align: center; margin-bottom: 20px;
}
.order-ref-label { font-size: 0.75rem; color: var(--text-tertiary); margin-bottom: 6px; }
.order-ref-value { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--accent); letter-spacing: 0.04em; }

.confirmation-steps { list-style: none; margin-bottom: 28px; }
.confirmation-steps li { display: flex; gap: 12px; font-size: 0.85rem; color: var(--text-secondary); padding: 6px 0; align-items: center; }
.confirmation-steps li::before { content: '→'; color: var(--accent); font-size: 0.85rem; flex-shrink: 0; }

.api-error {
  background: rgba(220,50,50,0.08); border: 1px solid rgba(220,50,50,0.2);
  border-radius: 8px; padding: 12px 16px;
  font-size: 0.85rem; color: #e07777; margin-top: 16px; display: none;
}
.api-error.visible { display: block; }

@media (max-width: 600px) {
  .nav { padding: 14px 20px; }
  .nav-logo-text { font-size: 1.15rem; }
  main { padding: 86px 16px 60px; }
  .checkout-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .step-connector { width: 24px; }
  .step-label { display: none; }
}
