/*
 * Carebot feedback form, laid out as www.carebot.com/book-a-call.
 * Source: Framer project of carebot.com (carebot-dev/website mirror/framer):
 *   colour and text styles: project.json
 *   layout: pages/book-a-call.json (Form section), components/header-universal (Horizontal variants)
 * Breakpoints as Framer: Desktop >= 1200px, Tablet 810-1199px, Phone < 810px.
 */

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/OpenSans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/OpenSans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* Colour styles */
  --bg-primary: #ffffff;
  --bg-secondary: #ededed;
  --bg-tertiary: #e1e1e1;
  --border: #bdbdbd;
  --accent: #326ab6;
  --dark: #040930;
  --gradient-start: #4c94d9;
  --gradient-end: #383c85;
  --hover: rgba(56, 60, 133, 0.2);
  --success: #38855e;
  --error: #cc687e;
  --error-text: #b22828; /* darker than the site's error pink so small text passes WCAG AA */
  --text-primary: #242424;
  --text-secondary: #3f3f3f;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, var(--gradient-start) -140%, var(--gradient-end) 50%);

  /* Page frame: sections max 1440px with side padding 80 / 40 / 24 */
  --frame: 1440px;
  --gutter: 24px;

  --font-heading: 'FK Grotesk', 'Open Sans', Arial, sans-serif;
  --font-text: 'Open Sans', Arial, sans-serif;
  --font-code: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
@media (min-width: 810px) { :root { --gutter: 40px; } }
@media (min-width: 1200px) { :root { --gutter: 80px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font: 400 17px/1.5 var(--font-text);
  letter-spacing: -0.01em;
}
main { flex: 1; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
  padding-right: var(--gutter);
  padding-left: var(--gutter);
}

/* Text styles */
.h1 {
  margin: 0;
  color: var(--text-primary);
  font: 700 40px/1.05 var(--font-heading);
  letter-spacing: -0.02em;
}
@media (min-width: 810px) { .h1 { font-size: 58px; } }
@media (min-width: 1200px) { .h1 { font-size: 72px; } }
.h4 {
  margin: 0;
  color: var(--text-primary);
  font: 700 28px/1.1 var(--font-heading);
  letter-spacing: -0.02em;
}
@media (min-width: 1200px) { .h4 { font-size: 36px; } }
.body1 { margin: 0; font-size: 17px; line-height: 1.5; }
.body2 { margin: 0; font-size: 15px; line-height: 1.4; }
.label-caps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  margin: 0;
  color: var(--gradient-end);
  font: 600 16px/1.3 var(--font-text);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.label-caps__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
@media (max-width: 479px) {
  .label-caps { flex-direction: column; align-items: flex-start; row-gap: 2px; }
  .label-caps__sep { display: none; }
}
.mono { font-family: var(--font-code); font-size: 15px; letter-spacing: 0; }

/* Floating navigation bar over the header, as on carebot.com */
.nav {
  position: fixed;
  top: 16px;
  right: 0;
  left: 0;
  z-index: 10;
  padding: 0 var(--gutter);
}
.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: calc(var(--frame) - 2 * var(--gutter));
  margin: 0 auto;
  padding: 8px 8px 8px 22px;
  border-radius: 20px;
  background: var(--bg-primary);
  box-shadow: 0 4px 16px rgba(4, 9, 48, 0.08);
}
.nav__logo { display: block; flex: none; width: 96px; height: auto; }

/* Product menu (nav items of carebot.com: FK Grotesk 15px bold). Phones: second row of the bar. */
.products { flex: 1 1 auto; min-width: 0; }
.products__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.products__item { position: relative; }
.products__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font: 700 15px/1.3 var(--font-heading);
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
}
.products__link:hover { background: var(--bg-secondary); }
.products__link[aria-current="true"] { color: var(--gradient-end); background: var(--hover); }

@media (min-width: 810px) {
  .products { margin-left: 32px; }
}
@media (max-width: 809px) {
  .nav__bar { flex-wrap: wrap; row-gap: 4px; padding-bottom: 6px; }
  .products { order: 3; flex-basis: 100%; margin: 0 -8px 0 -14px; padding-top: 4px; border-top: 1px solid var(--bg-tertiary); }
}

/* Segmented control, as the CXR / MMG / Head CT switch on carebot.com */
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-tertiary);
}
.segmented__option {
  min-width: 52px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font: 700 15px/1.3 var(--font-heading);
  letter-spacing: -0.01em;
  cursor: pointer;
}
.segmented__option[aria-pressed="true"] {
  background: var(--white);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(4, 9, 48, 0.12);
}
.segmented__option:hover:not([aria-pressed="true"]) { color: var(--text-primary); }
/* Three languages next to the logo on narrow phones */
@media (max-width: 479px) {
  .segmented__option { min-width: 44px; padding: 0 10px; }
}

/* Header/Universal, horizontal: padding 180/80/80/80 (tablet 180/40/64, phone 140/24/48),
   Part 1 = label + H1 (gap 32), Part 2 = description; X-ray background at 40 % opacity. */
.hero {
  position: relative;
  z-index: 0;
  isolation: isolate;
  /* Clip sideways only: the image is taller than the header and fades out behind the form. */
  overflow-x: clip;
  overflow-y: visible;
}
.hero__image {
  position: absolute;
  z-index: -1;
  top: 0;
  right: -80px;
  width: 547px;
  max-width: none;
  height: auto;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
@media (min-width: 810px) {
  .hero__image { right: -120px; width: 941px; }
}
.hero__content {
  display: flex;
  flex-direction: column;
  gap: 32px; /* label to heading */
  padding-top: 172px; /* web: 140px; +32px for the product row of the phone menu */
  padding-bottom: 48px;
}
.hero__row { display: flex; flex-direction: column; gap: 28px; }
/* Phones: compact header so the form starts within the first screen. */
@media (max-width: 809px) {
  .hero__content { gap: 16px; padding-top: 148px; padding-bottom: 24px; }
  .hero__row { gap: 12px; }
  .hero__title { font-size: 34px; }
  .hero__lead { font-size: 16px; }
}
@media (min-width: 810px) {
  .hero__content { padding-top: 180px; padding-bottom: 64px; }
  .hero__title { white-space: nowrap; } /* one line from tablet up; phones wrap */
}
/* Desktop: heading on one line, description beside it, centred on the heading.
   The heading scales 56-72px so the description keeps at least ~290px. */
@media (min-width: 1200px) {
  .hero__content { padding-bottom: 80px; }
  .hero__row { flex-direction: row; align-items: center; gap: 48px; }
  .hero__title { flex: none; font-size: clamp(56px, 5.4vw, 72px); }
  .hero__lead { flex: 1 1 0; min-width: 0; }
}

/* Form section: padding 8/80/56 (tablet 8/40/80, phone 16/24/48), gap 64,
   desktop: form card 60 % next to the text column. */
.form-section {
  position: relative;
  z-index: 1; /* above the header image */
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-top: 16px;
  padding-bottom: 48px;
}
@media (max-width: 809px) {
  .form-section { gap: 48px; }
}
@media (min-width: 810px) {
  .form-section { padding-top: 8px; padding-bottom: 80px; }
}
@media (min-width: 1200px) {
  .form-section { flex-direction: row; align-items: flex-start; padding-bottom: 56px; }
  .form-section__form { flex: 0 0 60%; min-width: 0; }
  .form-section__info { flex: 1 1 0; min-width: 0; }
}

/* Form card (previous design, kept on request): white card, large feedback label,
   privacy hint with shield icon, examination reference in a bordered tile. */
.card {
  padding: 24px;
  border-radius: 24px;
  background: var(--bg-primary);
}
@media (max-width: 479px) { .card { padding: 20px; } }
@media (min-width: 810px) { .card { padding: 32px; } }

.field + .field { margin-top: 20px; }
.label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-primary);
  font: 700 15px/1.3 var(--font-heading);
  letter-spacing: -0.01em;
}
.label--lg {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.required { color: var(--error-text); }

.hint-list {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.4;
}
.hint-list li + li { margin-top: 4px; }
.hint {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.4;
}
.hint__icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--gradient-end);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

input[type="text"],
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  font: 400 17px/1.4 var(--font-text);
  letter-spacing: -0.01em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 160px; resize: vertical; }
#uid { font-family: var(--font-code); font-size: 15px; letter-spacing: 0; }
/* Phones zoom into inputs under 16px on focus. */
@media (max-width: 809px) { #uid { font-size: 16px; } }
input[type="text"]:hover,
textarea:hover { border-color: var(--text-secondary); }
input[type="text"]:focus,
textarea:focus {
  border-color: var(--gradient-end);
  box-shadow: 0 0 0 3px var(--hover);
  outline: none;
}
input[aria-invalid="true"] { border-color: var(--error); }
/* Values from the QR link: shown, not editable. */
input[readonly],
input[readonly]:hover,
input[readonly]:focus {
  border-color: transparent;
  background: var(--bg-secondary);
  box-shadow: none;
  cursor: default;
}
::placeholder { color: #7a7a7a; }

.error {
  margin: 8px 0 0;
  color: var(--error-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* Submission failed: the message stays in the form, the viewer can retry or write an e-mail. */
.form-error {
  margin: 28px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--error);
  border-radius: 16px;
  background: #fdf3f5;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.4;
}
.form-error p { margin: 0; }
.form-error__title { color: var(--error-text); font-weight: 600; }
.form-error .form-error__text { margin-top: 6px; }
.form-error a { color: var(--accent); font-weight: 600; overflow-wrap: anywhere; }
.form-error + .button--block { margin-top: 16px; }

/* Examination reference tile */
.tile {
  margin: 28px 0 0;
  padding: 20px;
  border: 1px solid var(--bg-tertiary);
  border-radius: 16px;
  background: var(--bg-primary);
}
@media (max-width: 479px) { .tile { padding: 16px; } }
@media (min-width: 810px) { .tile { padding: 24px; } }
.tile__head {
  display: flex;
  align-items: center;
  gap: 12px;
  float: left; /* keeps the legend inside the padded box */
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
}
.tile__title {
  color: var(--text-primary);
  font: 700 20px/1.1 var(--font-heading);
  letter-spacing: -0.02em;
}
.tile__text {
  clear: both;
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.4;
}

/* "Pre-filled" chip with the gradient outline of the site's badge component */
.chip {
  padding: 1px 10px;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: linear-gradient(var(--white), var(--white)) padding-box, var(--gradient) border-box;
  color: var(--gradient-end);
  font: 600 12px/18px var(--font-text);
  letter-spacing: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Button / Button Form components: 48px, radius 16, gradient, dark overlay on hover */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: var(--gradient);
  color: var(--white);
  font: 700 15px/1.3 var(--font-heading);
  letter-spacing: -0.01em;
  cursor: pointer;
}
.button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dark);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.button:hover::after { opacity: 0.2; }
.button:active::after { opacity: 0.5; }
.button--block { display: flex; width: 100%; margin-top: 28px; }
.button:disabled { cursor: progress; opacity: 0.7; }
.button:disabled::after { opacity: 0; }
.button--secondary {
  align-self: flex-start;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
}
.button--secondary::after { background: var(--hover); }
.button--secondary:hover::after { opacity: 1; }

.button:focus-visible,
.segmented__option:focus-visible,
.products__link:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; }
}

/* Confirmation: illustration, thanks, "send another" */
.thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.thanks:focus { outline: none; }
.thanks .button--secondary { align-self: center; margin-top: 8px; }
.thanks__art { width: 160px; height: 120px; }
.thanks__art > circle,
.thanks__art > path { transform-origin: 80px 60px; animation: thanks-pop 0.45s ease-out both; }
.thanks__confetti { transform-origin: 80px 60px; animation: thanks-burst 0.6s ease-out both; }
@keyframes thanks-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes thanks-burst { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .thanks__art > circle,
  .thanks__art > path,
  .thanks__confetti { animation: none; }
}
.icon-box {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-primary);
}
.icon-box svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--gradient-end);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-box--success { border-color: var(--success); }
.icon-box--success svg { stroke: var(--success); stroke-width: 2; }
.icon-box--dark { border-color: rgba(255, 255, 255, 0.3); background: transparent; }
.icon-box--dark svg { stroke: var(--white); }

/* Text column: blocks of Heading 4 + Body 1 (gap 24), 56px apart */
.form-section__info { display: flex; flex-direction: column; gap: 56px; }
.info-block { display: flex; flex-direction: column; gap: 24px; }
.scope { margin: 0 0 12px; padding-left: 20px; }
.scope li + li { margin-top: 6px; }
.scope strong { color: var(--text-primary); font-weight: 600; }
.ident { margin: 0; }
.ident dt { margin-top: 14px; }
.ident dt:first-child { margin-top: 0; }
.ident dd { margin: 2px 0 0; color: var(--text-primary); }

/* Footer (navy, as carebot.com) */
.footer {
  padding: 48px 0 40px;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.4;
}
.footer__logo { display: block; margin-bottom: 32px; }
.support {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}
.support__title {
  margin: 0 0 6px;
  color: var(--white);
  font: 700 20px/1.1 var(--font-heading);
  letter-spacing: -0.02em;
}
.support__text { margin: 0; }
.footer a { color: var(--white); font-weight: 600; }
.footer__note {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

/* Test-environment note above the form (hidden in production). In the flow, not fixed, so it never
   covers the form on a phone. */
.env-tag {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--dark);
  color: var(--white);
  font-size: 13px;
  line-height: 18px;
}
