/* Academy of Financial Markets — booking UI
   Motif: the dot-matrix "A" from the mark. Availability, selection and the
   left rail all speak in gold dots. Times are set in mono, like a board. */

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

:root {
  --ink: #171C2E;
  --muted: #6A7089;
  --line: #E3DFD4;
  --line-soft: #EDEAE2;
  --white: #FFFFFF;
  --radius: 12px;
  --shadow: 0 18px 50px -28px rgba(14, 22, 55, .45);
  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; }

::selection { background: var(--gold-soft); color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- layout */

.stage {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------------------------------------------------------------- rail */

.rail {
  position: relative;
  background: var(--navy);
  color: #E8EAF3;
  overflow: hidden;
  isolation: isolate;
}

.rail::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 50%, transparent 100%);
}

/* the dot matrix, echoing the logo mark */
.rail-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(214, 164, 57, .55) 1px, transparent 1.4px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 42%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 42%);
  opacity: .5;
  z-index: -1;
}

.rail-inner {
  padding: 40px 38px 34px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 4px;
}

.rail-logo { display: block; margin-bottom: 34px; }
.rail-logo img { width: 240px; max-width: 78%; }

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.eyebrow.tight { margin-top: 30px; }

.rail-title {
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(30px, 3.2vw, 39px);
  line-height: 1.06;
  letter-spacing: -.02em;
  color: #fff;
}

.rail-sub {
  margin: 0 0 26px;
  color: #AFB6CF;
  font-size: 15px;
  max-width: 34ch;
}

.facts {
  margin: 0 0 4px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  display: grid;
  gap: 11px;
}
.facts div { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: baseline; }
.facts dt {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7F88A9;
}
.facts dd { margin: 0; font-size: 14.5px; color: #EDEFF6; }

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.points li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: #C6CBDE;
}
.points li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 164, 57, .18);
}

.rail-meta {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 2px;
  padding: 0;
  list-style: none;
}
.rail-meta li {
  font-size: 12px;
  letter-spacing: .04em;
  color: #DDE1EE;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 100px;
  padding: 5px 12px;
}

.rail-foot {
  margin-top: auto;
  padding-top: 34px;
  display: grid;
  gap: 4px;
  font-size: 13.5px;
  color: #98A0BE;
}
.rail-foot a { color: #D8DCEA; text-decoration: none; }
.rail-foot a:hover { color: var(--gold-soft); }

/* ---------------------------------------------------------------- panel */

.panel {
  background: var(--paper);
  padding: 30px clamp(20px, 4vw, 56px) 26px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px 6px 8px;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: .16s;
}
.back-link:hover { color: var(--navy); border-color: var(--line); background: #fff; }

.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #9A9384;
}
.steps { justify-content: flex-start; }
.steps li { display: inline-flex; align-items: center; gap: 7px; padding-right: 12px; flex: 0 0 auto; }
.steps li span {
  display: grid;
  place-items: center;
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 11px;
  font-family: var(--f-mono);
  background: #fff;
}
.steps li.on { color: var(--navy); font-weight: 500; }
.steps li.on span { background: var(--navy); color: #fff; border-color: var(--navy); }
.steps li.done span { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.step { display: none; animation: rise .34s cubic-bezier(.2, .7, .3, 1); }
.step.is-active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .step, .slot, .day { animation: none !important; transition: none !important; }
}

.step-h {
  margin: 0 0 20px;
  font-family: var(--f-display);
  font-size: clamp(22px, 2.4vw, 27px);
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--navy);
}
.step-h.big { font-size: clamp(28px, 3.4vw, 38px); }

/* ---------------------------------------------------------------- picker */

.picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 292px);
  gap: 24px;
  align-items: start;
}

.cal-wrap {
  max-width: 560px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.cal-month {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -.01em;
}
.nav {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: .15s;
}
.nav:hover:not(:disabled) { background: var(--navy); color: #fff; border-color: var(--navy); }
.nav:disabled { opacity: .3; cursor: not-allowed; }

.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .12em;
  color: #A9A395;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 8px;
}

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

.day {
  position: relative;
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  font-size: 14px;
  color: #B8B2A4;
  cursor: default;
  transition: .14s;
  font-variant-numeric: tabular-nums;
}
.day.pad { visibility: hidden; }

.day.open {
  color: var(--navy);
  background: #FBFAF7;
  border-color: var(--line);
  cursor: pointer;
  font-weight: 500;
}
.day.open::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.day.open:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.day.open:hover::after { background: var(--gold-soft); }

.day.today { box-shadow: inset 0 0 0 1px var(--gold-soft); }

.day.sel {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}
.day.sel::after { background: var(--gold); box-shadow: 0 0 0 3px rgba(214, 164, 57, .3); }

.cal-grid.loading { opacity: .4; pointer-events: none; }

.tz-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.tz-row select {
  flex: 1;
  min-width: 150px;
  font: inherit;
  font-size: 12.5px;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

/* ---------------------------------------------------------------- slots */

.slots-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 8px;
  box-shadow: var(--shadow);
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.slots-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.slots-date { font-weight: 600; font-size: 14.5px; color: var(--navy); }
.slots-count {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.slots {
  display: grid;
  gap: 7px;
  overflow-y: auto;
  max-height: 392px;
  padding-bottom: 14px;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(#000 92%, transparent 100%);
  mask-image: linear-gradient(#000 92%, transparent 100%);
}

.slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: .15s;
  text-align: left;
}
.slot::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .55;
  flex: none;
  transition: .15s;
}
.slot span { flex: 1; }
.slot em {
  font-style: normal;
  font-family: var(--f-body);
  font-size: 11.5px;
  color: transparent;
  transition: .15s;
}
.slot:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
  transform: translateX(2px);
}
.slot:hover::before { opacity: 1; box-shadow: 0 0 0 3px rgba(214, 164, 57, .25); }
.slot:hover em { color: var(--gold-soft); }

.empty {
  margin: 0;
  padding: 26px 6px;
  color: #9A9384;
  font-size: 13.5px;
  text-align: center;
}
.empty strong { display: block; color: var(--navy); font-size: 15px; margin-bottom: 4px; }

.skeleton { display: grid; gap: 7px; }
.skeleton i {
  display: block;
  height: 41px;
  border-radius: 9px;
  background: linear-gradient(90deg, #F2F0EA 25%, #E8E5DC 37%, #F2F0EA 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------------------------------------------------------------- form */

.ghost-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.ghost-back:hover { color: var(--navy); }

.chosen {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.chosen .c-day {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.chosen .c-main { font-family: var(--f-display); font-size: 19px; font-weight: 600; line-height: 1.2; }
.chosen .c-meta { font-size: 12.5px; color: #A8AFCB; margin-top: 2px; }
.chosen .c-mark {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 8px;
  background-image: radial-gradient(circle, var(--gold) 1.2px, transparent 1.6px);
  background-size: 7px 7px;
  opacity: .9;
}

#bookForm { max-width: 640px; }

.field { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 6px;
}
.req { color: var(--gold); }
.opt { color: #A9A395; font-weight: 400; font-size: 12px; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: .15s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #B4AEA0; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(14, 22, 55, .09);
}
.field.bad input, .field.bad textarea, .field.bad select { border-color: #C0392B; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
select { appearance: none; -webkit-appearance: none; padding-right: 36px; }

#fHoney { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.err { margin: 6px 0 0; font-size: 12.5px; color: #C0392B; min-height: 0; }
.err:empty { display: none; }
.form-err { margin-bottom: 12px; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  margin: 4px 0 18px;
  cursor: pointer;
}
.consent input { margin-top: 3px; accent-color: var(--navy); width: 16px; height: 16px; flex: none; }

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 26px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  transition: .18s;
  overflow: hidden;
}
.cta::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.cta:hover::after { transform: scaleX(1); }
.cta:hover { background: var(--navy-soft); }
.cta[disabled] { opacity: .6; cursor: wait; }
.cta.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.cta.ghost:hover { background: #fff; border-color: var(--navy); }

.spinner {
  display: none;
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.cta.busy .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.fineprint { margin: 12px 0 0; font-size: 12.5px; color: #9A9384; text-align: center; }

/* ---------------------------------------------------------------- done */

.step.done { text-align: center; max-width: 560px; margin: 10px auto 0; }
.tick { color: var(--gold); display: flex; justify-content: center; margin-bottom: 16px; }
.tick path { stroke-dasharray: 48; stroke-dashoffset: 48; animation: draw .5s .18s forwards ease-out; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-body { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.chosen.final { text-align: left; }
.done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
#refLine { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; }

.panel-foot {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #A29B8C;
}
.panel-foot a { text-decoration: none; }
.panel-foot a:hover { color: var(--navy); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .picker { grid-template-columns: 1fr; }
  .slots { max-height: none; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .slots-wrap { min-height: 0; }
  .slot em { display: none; }
}

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; }
  .rail { padding-bottom: 4px; }
  .rail-inner { padding: 22px 20px 24px; }
  .rail-logo { margin-bottom: 18px; }
  .rail-logo img { width: 186px; }
  .rail-title { font-size: 25px; margin-bottom: 10px; }
  .rail-sub { font-size: 14px; margin-bottom: 14px; max-width: none; }
  .facts, .points, .eyebrow.tight, .rail-foot { display: none; }
  .rail-meta { display: flex; }
  .rail-dots { -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 60%); mask-image: linear-gradient(160deg, #000 0%, transparent 60%); }
  .panel { padding: 22px 18px 26px; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .done-actions { grid-template-columns: 1fr; }
  .steps { margin: 16px 0 20px; }
}

@media (max-width: 420px) {
  .day { min-height: 36px; font-size: 13px; }
  .cal-wrap { padding: 14px 12px 10px; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .slot { padding: 10px 11px; font-size: 13px; }
  .chosen { gap: 10px; padding: 13px 14px; }
}
