/* ============================================
   MATTRADES — Premium Forex Coaching Booking
   ============================================ */

:root {
  --bg: #06080a;
  --bg-2: #0a0d12;
  --card: rgba(18, 22, 28, 0.55);
  --card-hi: rgba(28, 34, 42, 0.65);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f5f7;
  --muted: #8b8d97;
  --muted-2: #5b5d66;
  --accent: #00ff88;
  --accent-2: #00d4ff;
  --grad: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(0,255,136,0.18) 0%, rgba(0,212,255,0.18) 100%);
  --shadow-glow: 0 20px 60px -20px rgba(0, 255, 136, 0.35);
  --radius: 20px;
  --radius-sm: 12px;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* =========== ANIMATED BACKGROUND =========== */

.bg-aurora {
  position: fixed;
  inset: -10%;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%,  rgba(0, 255, 136, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 25%,  rgba(0, 212, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(0, 255, 136, 0.10), transparent 70%),
    radial-gradient(ellipse 40% 30% at 95% 90%,  rgba(0, 212, 255, 0.08), transparent 60%);
  animation: auroraDrift 24s ease-in-out infinite alternate;
  filter: blur(8px);
}

@keyframes auroraDrift {
  0%   { transform: translate(0, 0)     scale(1);    opacity: 0.95; }
  50%  { transform: translate(-24px, 16px) scale(1.04); opacity: 1; }
  100% { transform: translate(20px, -12px) scale(1.02); opacity: 0.9; }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* =========== LAYOUT =========== */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}

@media (max-width: 540px) {
  .page { padding: 36px 18px 24px; }
}

/* =========== HERO =========== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 56px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.22em;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 28px;
  transition: all 0.25s ease;
  cursor: pointer;
}
.brand:hover {
  border-color: rgba(0, 255, 136, 0.35);
  background: rgba(0, 255, 136, 0.05);
  transform: translateY(-1px);
}
.brand-logo, .brand svg { width: 22px; height: 22px; flex-shrink: 0; }

.badge-wrap { margin-bottom: 28px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.22);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 6.5vw, 60px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
}
.grad-text::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad);
  filter: blur(40px);
  opacity: 0.2;
  z-index: -1;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* =========== STEPPER =========== */

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 32px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dot-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dot em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.25s;
}

.dot.active .dot-num {
  background: var(--grad);
  border-color: transparent;
  color: #06080a;
  box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.12), 0 0 24px rgba(0, 255, 136, 0.5);
  transform: scale(1.05);
}
.dot.active em { color: var(--text); font-weight: 600; }

.dot.done .dot-num {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
  color: var(--accent);
}
.dot.done em { color: var(--text); }

.bar {
  flex: 0 0 60px;
  height: 1.5px;
  background: linear-gradient(to right, transparent, var(--border-strong), transparent);
  align-self: flex-start;
  margin-top: 19px;
}

@media (max-width: 480px) {
  .bar { flex-basis: 32px; }
  .dot em { font-size: 10px; }
}

/* =========== CARDS =========== */

.card {
  background: var(--card);
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 14px;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: -0.015em;
}

.muted { color: var(--muted); font-weight: 400; font-size: 14px; }

.hidden { display: none !important; }

@media (max-width: 480px) {
  .card { padding: 20px 18px; border-radius: 18px; }
}

/* =========== CALENDAR =========== */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}
.icon-btn:hover {
  background: rgba(0, 255, 136, 0.08);
  border-color: rgba(0, 255, 136, 0.35);
  color: var(--accent);
}
.icon-btn:active { transform: scale(0.94); }

.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-weekdays {
  margin-bottom: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.day {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.018);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  transition: all 0.18s ease;
  user-select: none;
  position: relative;
}

.day:hover:not(.disabled):not(.empty) {
  background: rgba(0, 255, 136, 0.06);
  border-color: rgba(0, 255, 136, 0.3);
  transform: translateY(-1px);
}

.day.today {
  border-color: rgba(0, 212, 255, 0.4);
}
.day.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-2);
}

.day.selected {
  background: var(--grad);
  color: #06080a;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 8px 24px -6px rgba(0, 255, 136, 0.5);
  transform: translateY(-1px);
}
.day.selected.today::after { background: #06080a; }

.day.disabled {
  color: var(--muted-2);
  cursor: not-allowed;
  background: transparent;
}
.day.disabled:hover { transform: none; border-color: transparent; }

.day.closed {
  position: relative;
  background: rgba(255,255,255,0.012);
}
.day.closed::before {
  content: '';
  position: absolute;
  width: 60%;
  height: 1px;
  background: rgba(255,255,255,0.12);
  transform: rotate(-22deg);
}

.day.empty {
  background: transparent;
  cursor: default;
}

/* =========== TIME SLOTS =========== */

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 8px;
}

.slot {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 8px;
  text-align: center;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.slot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
}

.slot:hover:not(.taken) {
  border-color: rgba(0, 255, 136, 0.4);
  transform: translateY(-1px);
  color: var(--accent);
}

.slot.selected {
  border-color: transparent;
  color: #06080a;
  font-weight: 700;
  box-shadow: 0 8px 24px -6px rgba(0, 255, 136, 0.5);
  transform: translateY(-1px);
}
.slot.selected::before { opacity: 1; }

.slot.taken {
  color: var(--muted-2);
  text-decoration: line-through;
  cursor: not-allowed;
  opacity: 0.45;
  background: transparent;
}

/* =========== FORM =========== */

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

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

.float {
  display: block;
  position: relative;
  margin-bottom: 12px;
}

.float input,
.float textarea {
  width: 100%;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 22px 14px 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.float textarea {
  padding-top: 28px;
  resize: vertical;
  min-height: 88px;
  font-family: inherit;
  line-height: 1.5;
}
.float input:focus,
.float textarea:focus {
  border-color: rgba(0, 255, 136, 0.5);
  background: rgba(255,255,255,0.04);
}

.float > span {
  position: absolute;
  left: 14px;
  top: 16px;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
  transition: all 0.2s ease;
  font-weight: 400;
  max-width: calc(100% - 28px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.float input:focus + span,
.float input:not(:placeholder-shown) + span,
.float textarea:focus + span,
.float textarea:not(:placeholder-shown) + span {
  top: 7px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary {
  background: var(--grad-soft);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--text);
}
.summary strong {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--accent);
}

/* =========== BUTTONS =========== */

.btn-cta {
  width: 100%;
  background: var(--grad);
  color: #06080a;
  border: 0;
  border-radius: 14px;
  padding: 16px 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.005em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-cta::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 50%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  transform: translateX(-200%) skewX(-20deg);
  transition: transform 0.7s ease;
  z-index: -1;
}
.btn-cta:hover::after { transform: translateX(400%) skewX(-20deg); }

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -8px rgba(0, 255, 136, 0.55);
}
.btn-cta:active { transform: translateY(0) scale(0.99); }

.btn-cta:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 22px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-ghost:hover {
  background: rgba(0, 255, 136, 0.06);
  border-color: rgba(0, 255, 136, 0.3);
  color: var(--accent);
}

/* =========== SUCCESS =========== */

.success { text-align: center; padding: 44px 28px 36px; }
.success h2 {
  margin-top: 18px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.check-anim {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-soft);
}
.check-anim svg { width: 100%; height: 100%; }

.check-anim circle {
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: drawCircle 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.check-anim path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck 0.45s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck  { to { stroke-dashoffset: 0; } }

#confirmation-text {
  color: var(--muted);
  margin: 14px auto 26px;
  font-size: 15px;
  max-width: 440px;
  line-height: 1.55;
}

/* =========== FOOTER =========== */

.foot {
  text-align: center;
  padding: 36px 24px 28px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.foot .brand.small {
  font-size: 11px;
  padding: 5px 11px;
  margin: 0;
  letter-spacing: 0.2em;
}
.foot .brand.small svg { width: 16px; height: 16px; }

.foot .sep { color: var(--muted-2); }

/* =========== HONEYPOT (anti-spam) =========== */

.hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* =========== A11Y =========== */

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.day:focus-visible,
.slot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
