/* =========================================================
   TRIAL LOOK: Spatial UI (like Apple Vision Pro: content sits in
   floating frosted windows with real depth, over a soft, dim
   "room" background; cards lift towards you on hover)
   Loaded after styles.css. Remove the <link> to spatial.css to go back.
   ========================================================= */

:root {
  --radius: 30px;
  --window-radius: 44px;
  --window-light: rgba(255, 255, 255, 0.9);
  --window-dark: rgba(20, 33, 61, 0.78);
  --window-edge: rgba(255, 255, 255, 0.55);
  --window-blur: blur(30px) saturate(160%);
  /* Two soft shadows = the window floats off the background
     (kept to two layers so phones draw it quickly) */
  --depth-window:
    0 4px 10px rgba(0, 0, 0, 0.12),
    0 28px 56px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --depth-card:
    0 1px 2px rgba(20, 33, 61, 0.08),
    0 8px 20px rgba(20, 33, 61, 0.10),
    0 24px 48px rgba(20, 33, 61, 0.10);
  --depth-card-lifted:
    0 2px 4px rgba(20, 33, 61, 0.10),
    0 16px 32px rgba(20, 33, 61, 0.16),
    0 40px 70px rgba(20, 33, 61, 0.18);
}

/* ---------- The "room": a dim, softly lit scene behind every window ----------
   SPEED: the glows are already soft gradients, so no blur filter is needed.
   It is one fixed layer, drawn once and reused while you scroll. */
body {
  background: #101A30;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(800px 600px at 15% 10%, rgba(214, 40, 40, 0.30), transparent 60%),
    radial-gradient(900px 700px at 90% 30%, rgba(74, 120, 230, 0.35), transparent 60%),
    radial-gradient(900px 700px at 40% 100%, rgba(120, 160, 220, 0.25), transparent 60%),
    linear-gradient(160deg, #1C2C50 0%, #101A30 60%, #0B1224 100%);
  pointer-events: none;
}

/* ---------- Header: a floating control bar ---------- */
.site-header {
  background: transparent;
  border-bottom: none;
  padding: 14px 16px 0;
}

.header-inner {
  position: relative;
  isolation: isolate;
  background: var(--window-light);
  border: 1px solid var(--window-edge);
  border-radius: 999px;
  box-shadow: var(--depth-window);
  padding-left: 28px;
  padding-right: 20px;
}

.header-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  -webkit-backdrop-filter: var(--window-blur);
  backdrop-filter: var(--window-blur);
}

/* ---------- Every section becomes a floating window ----------
   SPEED: no frosted-glass blur on these big windows. Behind them is only
   the smooth room gradient, so blurring it looked the same but made the
   browser redraw large areas while scrolling. Only the small header bar,
   which page content slides under, keeps real frosting. */
.hero,
.page-hero,
.cta,
.section,
.trust,
.site-footer {
  max-width: calc(var(--max-width) + 48px);
  margin: 28px auto;
  border-radius: var(--window-radius);
  border: 1px solid var(--window-edge);
  box-shadow: var(--depth-window);
}

.section,
.section-grey,
.trust {
  background: var(--window-light);
}

.section {
  padding: 72px 0;
}

.hero,
.page-hero,
.cta,
.site-footer {
  /* Solid navy base (keeps text contrast steady), with a soft glass highlight on top */
  background-color: var(--navy);
  background-image:
    linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 45%),
    radial-gradient(600px 400px at 90% 0%, rgba(74, 120, 230, 0.22), transparent 60%);
  border-color: rgba(255, 255, 255, 0.18);
}

.site-footer {
  margin-bottom: 20px;
}

/* ---------- Cards sit on the window and lift towards you ---------- */
.course-card,
.info-card,
.step,
.side-card,
.helper,
.faq details,
.table-wrap,
.form,
.section-grey .info-card {
  background: #FFFFFF;
  border: 1px solid rgba(20, 33, 61, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--depth-card);
}

.course-card,
.info-card,
.step {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.course-card:hover,
.info-card:hover,
.step:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--depth-card-lifted);
}

.form {
  padding: 28px;
}

.faq details {
  padding: 0 24px;
  margin-bottom: 14px;
}

.course-card .photo {
  border-radius: var(--radius) var(--radius) 0 0;
}

.photo,
.split > .photo,
.course-detail .photo,
.hero .photo {
  border-radius: var(--radius);
  box-shadow: var(--depth-card);
}

.hero .photo {
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15);
}

.tag,
.info-icon,
.step-number {
  border-radius: 999px;
}

/* ---------- Buttons: rounded, with a gentle glow when you point at them ---------- */
.btn {
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.03);
}

.btn-red {
  box-shadow: 0 10px 24px rgba(214, 40, 40, 0.35);
}

.btn-red:hover {
  box-shadow: 0 14px 32px rgba(214, 40, 40, 0.45);
}

.btn-navy {
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.3);
}

.btn-white {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- Form fields ---------- */
.field input,
.field select,
.field textarea {
  background: #F4F6FB;
  border: 1px solid rgba(20, 33, 61, 0.10);
  border-radius: 16px;
}

.tabs {
  background: #EEF1F7;
  border: none;
  border-radius: 999px;
  padding: 6px;
}

.tab {
  border: none;
  border-radius: 999px;
}

.tab[aria-selected="true"] {
  background: #FFFFFF;
  box-shadow: var(--depth-card);
}

.footer-logo img,
.badge {
  border-radius: 18px;
}

.chat-float {
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Current page in the menu: a slightly deeper red, so it stays readable
   (4.5:1 or better) on the light, see-through header bar */
.nav a[aria-current="page"] {
  color: #B01E1E;
}

/* "Which course does my workplace need?" (Home page only).
   Its white card lines up with the "How it works" cards above:
   same container gutters, no narrower max-width, and even space
   above and below the card. */
.section.section-helper {
  padding: 24px 0;
}

.section-helper .helper {
  max-width: none;
}

.section-helper .lead {
  max-width: 68ch;
}

/* Phone menu: a solid floating panel under the control bar */
@media (max-width: 860px) {
  .nav {
    left: 8px;
    right: 8px;
    top: calc(100% + 10px);
    background: #F8FAFD;
    border: 1px solid var(--window-edge);
    border-radius: 28px;
    box-shadow: var(--depth-window);
  }

  .menu-toggle {
    border: none;
    border-radius: 999px;
    background: #EEF1F7;
  }
}

/* Smaller gaps and corners on phones */
@media (max-width: 1290px) {
  .hero,
  .page-hero,
  .cta,
  .section,
  .trust,
  .site-footer {
    margin-left: 16px;
    margin-right: 16px;
  }
}

@media (max-width: 640px) {
  .hero,
  .page-hero,
  .cta,
  .section,
  .trust,
  .site-footer {
    margin: 14px 8px;
    border-radius: 30px;
    box-shadow:
      0 3px 8px rgba(0, 0, 0, 0.14),
      0 16px 32px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }

  .section {
    padding: 48px 0;
  }

  .site-header {
    padding: 8px 8px 0;
  }
}

/* People who turn off motion get no lifting effects */
@media (prefers-reduced-motion: reduce) {
  .course-card:hover,
  .info-card:hover,
  .step:hover,
  .btn:hover {
    transform: none;
  }
}

/* Browsers without frosting get solid windows, still readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header-inner {
    background: #F8FAFD;
  }
}
