/* ===========================================================================
   Book a demo — contract-styled booking page. Rides on styles.css (frame, fonts,
   palette, .doc, .doc-head, .annex-head/.clause-num/.clause-title, .page-frame).
   =========================================================================== */

/* Clear "back to homepage" pill in the header (top of every form page) */
.demo-topback {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: #fff;
  text-decoration: none; border: 1px solid var(--line-hi); border-radius: 999px;
  padding: 6px 13px;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.demo-topback:hover { border-color: var(--blue); color: var(--blue); background: rgba(71, 82, 252, 0.08); }

/* ---- the contract body ---- */
.demo-contract { margin-top: 30px; display: flex; flex-direction: column; gap: 18px; }

.demo-clause {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(8, 30, 71, 0.4);
  padding: 18px 22px 22px;
}
.demo-clause .annex-head { margin-bottom: 16px; }
.demo-clause .clause-title em { font-style: italic; color: var(--muted); font-weight: 400; }

.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.demo-field { display: flex; flex-direction: column; gap: 7px; }
.demo-field-wide { margin-top: 16px; }
.demo-field > span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.demo-field input,
.demo-field select,
.demo-field textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(2, 8, 30, 0.45); color: #fff;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 13px; font-family: var(--mono); font-size: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.demo-field textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.demo-field input::placeholder,
.demo-field textarea::placeholder { color: rgba(255, 255, 255, 0.32); }
.demo-field select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.demo-field input:focus,
.demo-field select:focus,
.demo-field textarea:focus { outline: none; border-color: var(--blue); background: rgba(2, 8, 30, 0.7);
  box-shadow: 0 0 0 3px rgba(71,82,252,.16), 0 4px 18px rgba(71,82,252,.18); }
.demo-field input:invalid:not(:placeholder-shown) { border-color: rgba(226, 75, 74, .6); }

.demo-error { color: #ff6b8a; font-family: var(--mono); font-size: 13px; margin: 2px 0 0; }

/* ---- invite colleagues (extra attendees) ---- */
.demo-attendees { margin-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.demo-sublabel { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.demo-sublabel em { text-transform: none; letter-spacing: 0; font-style: italic; opacity: .8; }
.demo-attendee-rows { display: flex; flex-direction: column; gap: 9px; }
.demo-attendee {
  width: 100%; box-sizing: border-box;
  background: rgba(2, 8, 30, 0.45); color: #fff;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 13px; font-family: var(--mono); font-size: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.demo-attendee::placeholder { color: rgba(255, 255, 255, 0.32); }
.demo-attendee:focus { outline: none; border-color: var(--blue); background: rgba(2, 8, 30, 0.7); }
.demo-addguest {
  align-self: flex-start; background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em;
  padding: 2px 0; transition: color .15s ease;
}
.demo-addguest:hover { color: var(--blue); }

/* ---- required-field marker ---- */
.demo-field .req,
.demo-reqnote .req { color: #ff6b8a; font-style: normal; font-weight: 600; }
.demo-reqnote { margin: 12px 0 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---- collapsible clause ("The background") ---- */
.demo-clause .demo-clause-toggle {
  grid-template-columns: 54px 1fr auto; align-items: center;
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  padding: 0; margin: 0; color: inherit; font: inherit;
}
.demo-clause-toggle .clause-title em { font-style: italic; color: var(--muted); font-weight: 400; }
.demo-chevron {
  width: 9px; height: 9px; justify-self: end;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .25s ease, border-color .2s ease;
}
.demo-clause-toggle:hover .demo-chevron { border-color: var(--blue); }
.demo-collapse.open .demo-chevron { transform: rotate(-135deg); }
.demo-clause-body { max-height: 0; overflow: hidden; transition: max-height .32s ease; }
.demo-clause-bodyinner { padding-top: 16px; }

/* ---- invalid required fields: red border + pulse ---- */
.demo-field input.demo-invalid,
.demo-field select.demo-invalid,
.demo-field textarea.demo-invalid { border-color: #ff6b8a; animation: demo-pulse 1.1s ease-in-out infinite; }
@keyframes demo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 138, 0); }
  50% { box-shadow: 0 0 0 4px rgba(255, 107, 138, 0.22); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-field input.demo-invalid, .demo-field select.demo-invalid, .demo-field textarea.demo-invalid { animation: none; }
}

/* ---- invite-colleagues disclosure ---- */
.demo-attendees-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  padding: 0; margin: 0; color: inherit; font: inherit;
}
.demo-attendees-toggle .demo-chevron { flex: none; }
.demo-attendees-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; display: flex; flex-direction: column; gap: 9px; }

/* ---- clause headings echo the contract nav tabs (ref + title + corner stamp) ---- */
.demo-clause .annex-head.demo-head { grid-template-columns: 54px 1fr auto; align-items: center; margin-bottom: 28px; }
.demo-head-titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.demo-head-titles .clause-title { line-height: 1.3; }
.demo-head-titles .tab-ref { color: var(--muted); }
.demo-head-right { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.demo-head .tab-stamp { position: static; }
.demo-stamp-req { color: #e3aa48; border-color: rgba(227, 170, 72, 0.5); }
.demo-stamp-action { color: #9aa6ff; border-color: rgba(71, 82, 252, 0.55); border-style: solid; }

/* ---- billing schedule (the joke under the actions) — terms as nav-tab stamps ---- */
/* Clause 03 — two parallel "ways to execute" choice cards (makes the booking decision obvious) */
.demo-route-intro { margin: 2px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.demo-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.demo-route { display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 22px 22px 24px; border-radius: 14px; border: 1px solid var(--line); background: rgba(8, 30, 71, 0.34);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease; }
.demo-route-primary { border-color: rgba(71, 82, 252, 0.55);
  background: linear-gradient(180deg, rgba(71, 82, 252, 0.1), rgba(71, 82, 252, 0.02));
  box-shadow: 0 0 30px -10px rgba(71, 82, 252, 0.6); }
.demo-route:hover { transform: translateY(-3px); border-color: rgba(71, 82, 252, 0.5); box-shadow: 0 14px 32px -16px rgba(71, 82, 252, 0.7); }
.demo-route-term { position: static; }
.demo-route-h { display: flex; align-items: center; gap: 9px; font-family: var(--head); font-weight: 700; font-size: 16px; color: #fff; }
.demo-route-hi { width: 17px; height: 17px; flex: none; color: #8a98ff; }
.demo-route-primary .demo-route-hi { color: #aab4ff; }
.demo-route-desc { margin: 0; flex: 1 1 auto; font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1.55; }
.demo-route .demo-btn { width: 100%; justify-content: center; margin-top: 6px; }

/* ---- confirmation skip button ---- */
.demo-skip { margin-top: 16px; font-size: 13px; padding: 9px 20px; }
.demo-done-btn { margin-top: 26px; }

/* ---- intro: text left, compact Tim preview in the right white space ---- */
.demo-intro { display: flex; align-items: flex-start; gap: 30px; }
.demo-intro-text { flex: 1 1 auto; min-width: 0; }
.demo-hero { flex: 0 0 auto; width: 268px; margin: 60px 0 0; }
.demo-hero-svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 32px rgba(2, 8, 30, 0.4)); }
.demo-hero-cap { margin: 12px 2px 0; font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--muted); }
.tim-lego-canvas { display: block; width: 100%; height: 300px; }
@media (max-width: 820px) {
  .demo-intro { flex-direction: column; gap: 0; }
  .demo-hero { width: 100%; max-width: 320px; margin: 22px 0 4px; }
}
@media (max-width: 640px) { .demo-routes { grid-template-columns: 1fr; } }

/* ---- actions ---- */
.demo-actions-clause .annex-head { margin-bottom: 20px; }
.demo-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.demo-btn {
  font-family: var(--head); font-weight: 600; font-size: 15px; cursor: pointer;
  border-radius: 12px; padding: 13px 26px; border: 1px solid transparent;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  text-decoration: none; display: inline-flex; align-items: center; gap: 9px;
}
.demo-btn-primary { background: linear-gradient(180deg, #5b66ff 0%, var(--blue) 100%); color: #fff; box-shadow: 0 10px 26px -12px rgba(71, 82, 252, .9); }
.demo-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(71, 82, 252, 1); }
.demo-btn-ghost { background: none; color: var(--muted); border-color: var(--line-hi); }
.demo-btn-ghost:hover { color: var(--blue); border-color: var(--blue); }
.demo-btn[disabled] { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.demo-fineprint { margin: 14px 0 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* careers: glowing clause-head icon badge (replaces the plain clause number) */
.demo-head-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: #9aa6ff;
  background: radial-gradient(circle at 40% 30%, rgba(71,82,252,.34), rgba(71,82,252,.05));
  border: 1px solid rgba(120,140,255,.34); box-shadow: 0 0 22px rgba(71,82,252,.2), inset 0 0 13px rgba(71,82,252,.17); }
.demo-head-ico svg { width: 20px; height: 20px; }

/* careers: centre the final submit action + its fineprint */
#applyForm .demo-actions { justify-content: center; }
#applyForm .demo-fineprint { text-align: center; }

/* ---- careers: "why join" perks — borderless feature row (distinct from the boxed nav tabs) ---- */
.join-perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 12px 0 4px; }
.join-perk { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 6px 26px; }
.join-perk + .join-perk::before { content: ""; position: absolute; left: 0; top: 10%; bottom: 10%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.14), transparent); }
.join-perk-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #9aa6ff;
  background: radial-gradient(circle at 42% 32%, rgba(71,82,252,.4), rgba(71,82,252,.04));
  border: 1px solid rgba(120,140,255,.36); box-shadow: 0 0 26px rgba(71,82,252,.22), inset 0 0 16px rgba(71,82,252,.18);
  transition: transform .25s ease, box-shadow .25s ease; }
.join-perk:hover .join-perk-ico { transform: translateY(-5px) scale(1.06); box-shadow: 0 0 36px rgba(71,82,252,.42), inset 0 0 16px rgba(71,82,252,.26); }
.join-perk-ico svg { width: 23px; height: 23px; }
.join-perk-t { font-family: var(--head); font-weight: 700; font-size: 14px; color: #fff; line-height: 1.2; }
.join-perk-s { font-family: var(--head); font-weight: 500; font-size: 11.5px; color: var(--muted); line-height: 1.4; max-width: 165px; }

.demo-actions-clause .demo-btn-primary { padding: 14px 30px; font-size: 14px;
  box-shadow: 0 10px 30px rgba(71,82,252,.45), inset 0 1px 0 rgba(255,255,255,.28); }

@media (max-width: 620px) {
  .join-perks { grid-template-columns: 1fr 1fr; gap: 30px 0; }
  .join-perk + .join-perk::before { display: none; }
}

/* careers page-specific spacing for the shared blue connector (.sec-div lives in styles.css) */
.title-block .sec-div { margin: 52px 0 46px; }

/* careers Lego Tim sits higher (book-demo hero keeps its lower offset) */
.demo-hero:has(.tim-lego-canvas) { margin-top: -10px; }

/* ---- steps (picker / confirmation) ---- */
.demo-step-title { font-family: var(--head); font-weight: 700; font-size: 30px; letter-spacing: -0.01em; color: #fff; margin: 4px 0 10px; }

/* ---- slot picker ---- */
.demo-picker { margin-top: 22px; display: flex; flex-direction: column; gap: 20px; }
.demo-loading { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.slot-day { display: flex; flex-direction: column; gap: 10px; }
.slot-day-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #9aa6ff; }
.slot-times { display: flex; flex-wrap: wrap; gap: 9px; }
.slot {
  font-family: var(--mono); font-size: 13px; color: #fff; cursor: pointer;
  background: rgba(8, 30, 71, 0.5); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.slot:hover { border-color: var(--blue); background: rgba(71, 82, 252, 0.16); transform: translateY(-1px); }
.slot[aria-busy="true"] { opacity: .6; cursor: default; }

/* ---- calendar day-picker: pick a day, then a time ---- */
.demo-sched { display: flex; gap: 30px; align-items: flex-start; flex-wrap: wrap; }
.demo-cal { width: 330px; max-width: 100%; }
.demo-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.demo-cal-title { font-family: var(--head); font-weight: 700; font-size: 16px; color: #fff; }
.demo-cal-nav { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: rgba(8, 30, 71, 0.5); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.demo-cal-nav:hover:not(:disabled) { color: #fff; border-color: var(--blue); background: rgba(71, 82, 252, 0.16); }
.demo-cal-nav:disabled { opacity: .3; cursor: default; }
.demo-cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 7px; }
.demo-cal-wd span { text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--muted); }
.demo-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.demo-cal-cell { aspect-ratio: 1 / 1; display: grid; place-items: center; border: 1px solid transparent; border-radius: 10px; background: none; font-family: var(--head); font-size: 13.5px; color: var(--muted); cursor: default; padding: 0; }
.demo-cal-cell.empty { visibility: hidden; }
.demo-cal-cell.off { color: rgba(255, 255, 255, 0.16); }
.demo-cal-cell.avail { color: #fff; font-weight: 600; background: rgba(71, 82, 252, 0.14); border-color: rgba(71, 82, 252, 0.42); cursor: pointer; transition: background .15s ease, transform .12s ease; }
.demo-cal-cell.avail:hover { background: rgba(71, 82, 252, 0.3); transform: translateY(-1px); }
.demo-cal-cell.sel { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 14px rgba(71, 82, 252, 0.6); }
.demo-cal-times { flex: 1 1 250px; min-width: 240px; }
.demo-cal-times-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #9aa6ff; margin-bottom: 14px; }
.demo-tz { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.demo-tz-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.demo-tz-select { font-family: var(--head); font-size: 13px; font-weight: 500; color: #fff; background: rgba(8, 30, 71, 0.6); border: 1px solid var(--line); border-radius: 9px; padding: 9px 14px; cursor: pointer; }
.demo-tz-select:hover { border-color: var(--line-hi); }
.demo-tz-select:focus { outline: none; border-color: var(--blue); }
@media (max-width: 620px) { .demo-cal { width: 100%; } .demo-cal-times { flex-basis: 100%; } }
.demo-pickerback { margin-top: 22px; }
.demo-formback { margin-top: 24px; display: inline-block; }
.demo-picker-note { font-family: var(--mono); font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ---- confirmation ---- */
.demo-redirect-note { margin-top: 24px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.demo-redirect-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; transition: color .15s ease; }
.demo-redirect-note a:hover { color: var(--blue); }

@media (max-width: 640px) {
  .demo-grid { grid-template-columns: 1fr; }
  .demo-actions { flex-direction: column; align-items: stretch; }
  .demo-btn { justify-content: center; }
}
