/* Animatable accent colours — the page glow fades to the active app's colours */
@property --a1 { syntax: "<color>"; inherits: true; initial-value: #8b5cf6; }
@property --a2 { syntax: "<color>"; inherits: true; initial-value: #d946ef; }

:root {
  --bg: #09080f;
  --text: #f4f3fa;
  --muted: #a3a1b5;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-w: clamp(270px, 30vw, 380px);
  transition: --a1 900ms ease, --a2 900ms ease;
}

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

html, body { min-height: 100%; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }

.bg__glow {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.32;
  animation: drift 22s ease-in-out infinite alternate;
}
.bg__glow--a { background: var(--a1); top: -30vmax; left: -15vmax; }
.bg__glow--b { background: var(--a2); bottom: -38vmax; right: -20vmax; animation-delay: -11s; }

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

@keyframes drift {
  to { transform: translate(8vmax, 6vmax) scale(1.1); }
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 64px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 26px; height: auto; }
.brand__name {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.nav__cta {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  transition: background 200ms, border-color 200ms;
}
.nav__cta:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: clamp(8px, 2vh, 28px) 20px 0;
  max-width: 820px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.grad-text {
  background: linear-gradient(100deg, var(--a1), var(--a2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 16px auto 0;
  max-width: 540px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.6;
}

/* ---------- Carousel ---------- */
.showcase {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(20px, 4vh, 44px);
}

.stage {
  position: relative;
  width: 100%;
  height: 445px;
  perspective: 1600px;
  touch-action: pan-y;
  user-select: none;
}

.card {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--card-w);
  margin-left: calc(var(--card-w) / -2);
  padding: 28px 28px 26px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--card-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  transition:
    transform 750ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 750ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 750ms ease,
    border-color 400ms;
  cursor: pointer;
  will-change: transform, opacity;
}

.card.is-active {
  cursor: default;
  border-color: color-mix(in srgb, var(--c1) 45%, transparent);
  box-shadow:
    0 40px 100px -24px color-mix(in srgb, var(--c1) 55%, transparent),
    0 30px 80px -20px rgba(0,0,0,0.6);
}

/* Coloured sheen along the top edge of each card */
.card::before {
  content: "";
  position: absolute;
  inset: 0 24px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c1), var(--c2), transparent);
  opacity: 0.8;
}

.logo-tile {
  width: 84px;
  height: 84px;
  border-radius: 23px;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--c1) 70%, transparent);
  transition: transform 750ms cubic-bezier(0.22, 1, 0.36, 1);
}
.card.is-active .logo-tile { transform: translateY(-4px) scale(1.04); }
.logo-tile svg { width: 52%; height: auto; }
.logo-tile svg.logo--flask { width: 70%; }
.logo-tile img { width: 100%; height: 100%; object-fit: cover; }

.card__name {
  margin-top: 20px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.card__tag {
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card__desc {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
  min-height: 4.8em;
}

.card__features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.card__features li {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #d8d6e6;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(100deg, var(--c1), var(--c2));
  transition: transform 200ms, box-shadow 200ms;
}
.card__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -8px var(--c1);
}
.card__cta svg { width: 16px; height: 16px; transition: transform 200ms; }
.card__cta:hover svg { transform: translateX(3px); }

/* Autoplay progress bar on the active card */
.card__progress {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
}
.card.is-active .card__progress { opacity: 1; }
.card__progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--c1), var(--c2));
}
.card.is-active .card__progress span { animation: progress var(--autoplay, 5s) linear forwards; }
.stage.is-paused .card__progress span { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }

/* Side cards are inert apart from being clickable */
.card:not(.is-active) .card__cta { pointer-events: none; }

/* ---------- Arrows ---------- */
.arrow {
  position: absolute;
  z-index: 50;
  top: 190px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(15, 13, 24, 0.6);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 200ms, transform 200ms, border-color 200ms;
}
.arrow:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); transform: scale(1.06); }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arrow--prev { left: clamp(10px, 4vw, 60px); }
.arrow--next { right: clamp(10px, 4vw, 60px); }

/* ---------- Switcher ---------- */
.switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px 56px;
}

.switcher button {
  display: flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color 250ms, background 250ms, border-color 250ms;
}
.switcher button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  opacity: 0.5;
  transition: opacity 250ms, transform 250ms;
}
.switcher button:hover { color: var(--text); }
.switcher button[aria-current="true"] {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: var(--card-border);
}
.switcher button[aria-current="true"]::before { opacity: 1; transform: scale(1.3); }

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 64px);
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  :root { --card-w: 82vw; }
  .arrow { display: none; }
  .card { padding: 28px 24px 26px; }
  .stage { height: 460px; }
}

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

/* ---------- Enquiry form ---------- */
.nav__cta, .footer__link { font-family: inherit; color: var(--text); cursor: pointer; }
.footer__link { background: none; border: 0; font-size: inherit; color: var(--muted); }
.footer__link:hover { color: var(--text); }

.enquiry {
  margin: auto;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 40px clamp(22px, 5vw, 44px) 36px;
  border-radius: 28px;
  border: 1px solid var(--card-border);
  background: linear-gradient(160deg, #191626, #0f0d18);
  color: var(--text);
  box-shadow: 0 40px 120px -20px color-mix(in srgb, var(--a1) 45%, transparent);
  overflow-y: auto;
}
.enquiry[open] { animation: pop 420ms cubic-bezier(0.22, 1, 0.36, 1); }
.enquiry::backdrop {
  background: rgba(5, 4, 10, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.enquiry[open]::backdrop { animation: fade 300ms ease; }

@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes fade { from { opacity: 0; } }

.enquiry::before {
  content: "";
  position: absolute;
  inset: 0 32px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--a1), var(--a2), transparent);
}

.enquiry h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  letter-spacing: -0.03em;
}
.enquiry .eyebrow { margin-bottom: 10px; }
.enquiry__lede { margin-top: 8px; color: var(--muted); line-height: 1.6; }

.enquiry__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 200ms, background 200ms;
}
.enquiry__close:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.enquiry__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
.field--full { grid-column: 1 / -1; }

.field span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cfcde0;
  margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  outline: none;
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus {
  border-color: color-mix(in srgb, var(--a1) 70%, white);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 22%, transparent);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: #f87171; }

.enquiry__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.enquiry__error { min-height: 1.4em; margin-top: 14px; font-size: 0.88rem; color: #fca5a5; }

.enquiry__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  min-width: 170px;
  padding: 14px 24px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(100deg, var(--a1), var(--a2));
  transition: transform 200ms, box-shadow 200ms, opacity 200ms;
}
.enquiry__submit:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px var(--a1); }
.enquiry__submit:disabled { opacity: 0.7; cursor: wait; transform: none; }

.enquiry__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  animation: spin 700ms linear infinite;
}
.is-sending .enquiry__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.enquiry__done { text-align: center; padding: 20px 0 4px; }
.enquiry__done .enquiry__submit { margin-top: 26px; }
.enquiry__tick {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 16px 40px -10px var(--a1);
}
.enquiry__tick svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .enquiry__submit { width: 100%; }
}
