/* ==========================================================================
   Bewerber-Umfrage – HOUSE of AI
   Mobile-first, single-column funnel on an animated aurora background.
   ========================================================================== */

/* Poppins is self-hosted (latin subset) so no visitor data ever reaches a
   font CDN. Glyphs outside the subset (✓, emoji) fall back to Segoe UI. */
@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/poppins-400.woff2") format("woff2");
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/poppins-600.woff2") format("woff2");
}

@font-face {
  font-family: Poppins;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/poppins-700.woff2") format("woff2");
}

:root {
  --magenta: #E5006E;
  --magenta-deep: #B3005C;
  --pink: #FF74B4;
  --ink: #14001f;

  --shell-width: 480px;

  /* Vertical rhythm scales with viewport height so the funnel fits without
     scrolling from a 568px-tall phone up to a desktop window. */
  --pad-top: clamp(14px, 4dvh, 34px);
  --pad-bottom: clamp(14px, 3.6dvh, 32px);
  --gap-l: clamp(16px, 4.6dvh, 40px);
  --gap-m: clamp(14px, 3.4dvh, 36px);
  --gap-s: clamp(12px, 2.4dvh, 22px);
}

* { box-sizing: border-box; }

/* Class-level `display` rules would otherwise outrank the UA's [hidden]. */
[hidden] { display: none !important; }

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink);
}

body {
  font-family: Poppins, "Segoe UI", system-ui, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* The frame is exactly one viewport tall, so the document never scrolls —
     which also stops the mobile URL bar from resizing it mid-funnel. */
  overflow: hidden;
  overscroll-behavior: none;
}

a { text-decoration: none; }

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Stage + aurora
   -------------------------------------------------------------------------- */

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(130% 110% at 80% 96%,
      var(--magenta-deep) 0%,
      #7A0146 30%,
      #35013A 58%,
      var(--ink) 100%);
}

.blobs {
  position: absolute;
  inset: -25%;
  pointer-events: none;
  filter: blur(60px);
  animation: hueShift 30s ease-in-out infinite;
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.blob--a {
  left: 40%;
  top: 52%;
  width: 80%;
  height: 60%;
  background: radial-gradient(circle, rgba(229, 0, 110, 0.55) 0%, rgba(229, 0, 110, 0) 68%);
  animation: blobA 24s ease-in-out infinite;
}

.blob--b {
  left: 8%;
  top: 30%;
  width: 85%;
  height: 55%;
  background: radial-gradient(circle, rgba(104, 0, 150, 0.4) 0%, rgba(104, 0, 150, 0) 70%);
  animation: blobB 31s ease-in-out infinite;
}

.blob--c {
  left: 34%;
  top: 60%;
  width: 70%;
  height: 50%;
  background: radial-gradient(circle, rgba(180, 0, 80, 0.4) 0%, rgba(180, 0, 80, 0) 70%);
  animation: blobC 38s ease-in-out infinite;
}

/* The dark blob deepens the top-left corner, so it must not blend to screen. */
.blob--d {
  left: -18%;
  top: -12%;
  width: 80%;
  height: 60%;
  mix-blend-mode: normal;
  background: radial-gradient(circle, rgba(12, 0, 24, 0.9) 0%, rgba(12, 0, 24, 0) 72%);
  animation: blobD 27s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

/* Three-part frame: brand and footer are fixed-size bookends, the screen in
   between absorbs every difference in question length. The footer therefore
   sits at exactly the same height on every step. */
.shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: var(--pad-top) 24px var(--pad-bottom);
}

.brand,
.progress,
.footer {
  flex: 0 0 auto;
}

/* Sized by height, not width: the logo's share of the vertical budget is what
   matters on a phone. 108px reproduces the design's 300px width.
   align-self is essential — the shell is a column flexbox, so the default
   `stretch` would blow an auto-width image out to full width and squash it.
   object-fit covers the other direction, when max-width caps the width. */
.brand {
  display: block;
  align-self: flex-start;
  height: clamp(62px, 13dvh, 108px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.progress {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: var(--gap-l);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  transition: width 260ms ease, background 260ms ease;
}

.dot.is-done { background: rgba(229, 0, 110, 0.65); }

.dot.is-current {
  width: 30px;
  background: var(--magenta);
}

/* The only elastic band in the frame, and the scroll port of last resort for
   very small viewports or very large system font sizes. */
.screen {
  flex: 1 1 auto;
  min-height: 0;
  animation: rise 0.5s ease both;
}

/* Set by app.js only when the content genuinely does not fit — a hidden
   scrollbar over cropped content would read as a broken layout. */
.screen.is-scrollable {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 116, 180, 0.6) transparent;
}

.screen.is-scrollable::-webkit-scrollbar {
  display: block;
  width: 3px;
}

.screen.is-scrollable::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 116, 180, 0.6);
}

/* Auto margins on the first and last child of the design collapse to a
   vertically centred block — expressed here as plain centring. min-height
   keeps that centring from clipping the top when content does overflow. */
.pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

/* --------------------------------------------------------------------------
   Question
   -------------------------------------------------------------------------- */

.topic {
  margin: 0;
  font-size: clamp(12px, 3.4vw, 14px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink);
}

.headline {
  margin: clamp(12px, 2dvh, 16px) 0 0;
  font-size: clamp(20px, 6.2vw, 27px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.headline:focus { outline: none; }

.actions {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8dvh, 14px);
  margin-top: var(--gap-l);
}

.btn {
  font: inherit;
  font-size: clamp(17px, 4.6vw, 19px);
  font-weight: 700;
  color: #fff;
  padding: clamp(13px, 2.3dvh, 21px) 28px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.btn--solid {
  background: var(--magenta);
  box-shadow: 0 16px 40px rgba(229, 0, 110, 0.4);
  transition: transform 160ms ease;
}

.btn--solid:hover { transform: translateY(-2px); }
.btn--solid:active { transform: translateY(1px); }

.btn--outline {
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 160ms ease, background 160ms ease;
}

.btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* The success CTA is an anchor wearing the primary button's clothes. */
.btn--as-link {
  display: block;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Result
   -------------------------------------------------------------------------- */

.result__icon {
  margin: 0;
  font-size: clamp(28px, 5.6dvh, 46px);
  line-height: 1;
}

.result__rule {
  width: 64px;
  height: 7px;
  margin-top: var(--gap-s);
  background: var(--magenta-deep);
}

.result__title {
  margin-top: clamp(14px, 3dvh, 26px);
  font-size: clamp(24px, 7.6vw, 32px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.prose {
  margin: clamp(12px, 2.4dvh, 20px) 0 0;
  font-size: clamp(15px, 4.4vw, 18px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  text-wrap: pretty;
}

.result__body2 { margin-top: var(--gap-s); }

/* The whole card is the copy target — no trailing button, so the address keeps
   the full width and stays on one line. */
.mailcard {
  display: block;
  width: 100%;
  margin-top: var(--gap-s);
  padding: clamp(12px, 2.2dvh, 18px) 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 116, 180, 0.45);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.mailcard:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 116, 180, 0.7);
}

.mailcard:active { transform: scale(0.99); }

.mailcard__label {
  display: block;
  /* Sized so the address always fits on one line: the rendered width of this
     address in Poppins 700 is 18.59x the font size, and the space available is
     min(viewport, shell max-width) minus the shell and card padding. The 18.8
     divisor and the extra 2px leave a little slack. A longer address would need
     this re-measured; it degrades to a wrap at the <wbr> if it ever does. */
  font-size: clamp(12px, calc((min(100vw, 480px) - 90px) / 18.8), 19px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  /* Only relevant if the address ever has to wrap; the <wbr> after the @ is
     then the preferred break point. */
  overflow-wrap: anywhere;
}

.mailcard.is-copied {
  border-color: var(--magenta);
  background: rgba(229, 0, 110, 0.22);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.actions--result { margin-top: var(--gap-m); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: var(--gap-m);
  padding-top: var(--gap-s);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer__brand {
  display: block;
  line-height: 0;
}

.footer__brand img {
  height: 30px;
  width: auto;
}

.footer__links {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.footer__links a { color: rgba(255, 255, 255, 0.55); }

.footer__links a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Wider viewports — the funnel stays a phone-width column, just roomier.
   -------------------------------------------------------------------------- */

/* Only for viewports that are genuinely roomy in BOTH axes — a short
   landscape window must keep the compact vertical scale. */
@media (min-width: 560px) and (min-height: 720px) {
  .shell { padding: 48px 32px 40px; }
  .headline { font-size: 30px; }
  .result__title { font-size: 36px; }
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes blobA {
  0%   { transform: translate3d(-12%, -8%, 0) scale(1.05); }
  33%  { transform: translate3d(18%, 14%, 0) scale(1.4); }
  66%  { transform: translate3d(4%, -14%, 0) scale(1.15); }
  100% { transform: translate3d(-12%, -8%, 0) scale(1.05); }
}

@keyframes blobB {
  0%   { transform: translate3d(14%, 16%, 0) scale(1.2); }
  33%  { transform: translate3d(-16%, -4%, 0) scale(0.9); }
  66%  { transform: translate3d(10%, -18%, 0) scale(1.35); }
  100% { transform: translate3d(14%, 16%, 0) scale(1.2); }
}

@keyframes blobC {
  0%   { transform: translate3d(6%, -12%, 0) scale(1); }
  50%  { transform: translate3d(-18%, 18%, 0) scale(1.45); }
  100% { transform: translate3d(6%, -12%, 0) scale(1); }
}

@keyframes blobD {
  0%   { transform: translate3d(-8%, 20%, 0) scale(1.3); }
  50%  { transform: translate3d(16%, -10%, 0) scale(0.95); }
  100% { transform: translate3d(-8%, 20%, 0) scale(1.3); }
}

@keyframes hueShift {
  0%   { filter: blur(60px) hue-rotate(0deg); }
  50%  { filter: blur(60px) hue-rotate(24deg); }
  100% { filter: blur(60px) hue-rotate(0deg); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .blobs,
  .blob,
  .screen {
    animation: none;
  }

  .btn--solid:hover,
  .btn--solid:active {
    transform: none;
  }

  .dot { transition: none; }
}

/* The result screen carries the most content, so it needs a tighter rhythm
   on short viewports than the questions do. */
@media (max-height: 720px) {
  .result__icon { font-size: 30px; }
  .actions--result { margin-top: clamp(12px, 2.2dvh, 20px); }
}
