/* Mango Media — Instant Quote Calculator
   Dark theme. Brand palette: Mango Pink #E8556D, Mango Orange #F0943A,
   Mango Dark #0F0F0F. Signature pink→orange gradient on CTAs and accents.
   Type: Inter Tight 700/800 (headings), DM Sans 400/500 (body).
   Mobile-first, 560px max column. Designed to sit in an iframe. */

:root {
  --pink:        #e8556d;
  --orange:      #f0943a;
  --bg:          #0f0f0f;
  --surface:     #1a1a1a;
  --surface-2:   #222222;
  --border:      rgba(255, 255, 255, 0.07);
  --border-hover:rgba(255, 255, 255, 0.13);
  --text:        #ebebeb;
  --muted:       #6a6a6a;
  --grad:        linear-gradient(92deg, var(--pink), var(--orange));
  --radius:      14px;
  --shadow-pink: 0 8px 32px rgba(232, 85, 109, 0.22);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  /* Fully transparent — the parent Webflow page's background shows through
     the iframe. ANY paint here (even a 5% gradient wash) makes the iframe
     rectangle visible as a seam against the page. */
  background: transparent;
  color: var(--text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── layout ─────────────────────────────────────────────── */

.calc {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.calc-header {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

/* Embedded on mangomedia.ie (class set by app.js when iframed) — the site
   navbar already carries the logo, so the calculator's own header is hidden. */
body.embedded .calc-header {
  display: none;
}

/* Official white-wordmark logo (colour M mark + white text) — no filters */
.logo {
  height: 36px;
  width: auto;
}

.logo-fallback {
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

/* ── typography ──────────────────────────────────────────── */

.eyebrow {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 16px;
  text-align: center;
}

h1, h2 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 18px;
  text-align: center;
  color: var(--text);
}

h1 { font-size: clamp(32px, 8vw, 46px); }
h2 { font-size: clamp(26px, 6.5vw, 34px); font-weight: 700; }

.sub {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
  margin: 0 auto 28px;
  max-width: 42ch;
  text-align: center;
}

.sub a { color: var(--pink); font-weight: 500; }

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

/* ── card ────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* ── inputs ──────────────────────────────────────────────── */

textarea,
input[type="email"],
input[type="text"]:not(#company_website),
input[type="tel"],
input[type="number"] {
  width: 100%;
  font-family: "DM Sans", sans-serif;
  /* 16px minimum — anything smaller makes iOS Safari force-zoom the page
     when an input is focused, which is especially jarring inside an iframe. */
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea:focus,
input[type="email"]:focus,
input[type="text"]:not(#company_website):focus,
input[type="tel"]:focus,
input[type="number"]:focus {
  border-color: rgba(232, 85, 109, 0.55);
  box-shadow:
    0 0 0 3px rgba(232, 85, 109, 0.1),
    0 0 24px rgba(232, 85, 109, 0.06);
}

textarea::placeholder,
input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* Remove number input spinners */
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Details gate — first/last name side by side on desktop, stacked on mobile */
.name-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

#step-email .card input[type="tel"],
#step-email .card input[type="email"] {
  margin-bottom: 12px;
}

#step-email .card input[type="email"] { margin-bottom: 0; }

@media (min-width: 480px) {
  .name-row { grid-template-columns: 1fr 1fr; }
}

.nudge {
  font-size: 13.5px;
  color: var(--muted);
  margin: 12px 2px 16px;
  transition: opacity 0.2s ease;
}

.nudge.satisfied { opacity: 0; }

/* Flash when someone taps the inactive submit button */
.nudge.attention {
  color: var(--pink);
  font-weight: 500;
  opacity: 1;
  animation: nudge-shake 0.4s ease;
}

@keyframes nudge-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

.field-error {
  font-size: 13.5px;
  color: var(--pink);
  font-weight: 500;
  margin: 10px 2px 0;
}

/* Turnstile — interaction-only, takes space only if a challenge is shown */
.turnstile-slot { display: flex; justify-content: center; }
.turnstile-slot:not(:empty) { margin: 12px 0 4px; }

/* Honeypot — off-screen, stays in DOM for bots */
.hp-wrap {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ── buttons ─────────────────────────────────────────────── */

.btn {
  display: block;
  width: 100%;
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--grad);
  border: none;
  border-radius: 999px;
  padding: 16px 28px;
  margin-top: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-pink);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.15s ease;
  text-align: center;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(232, 85, 109, 0.32);
}

.btn:active:not(:disabled) { transform: translateY(0); }

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* Visually inactive but still tappable — a tap explains itself (flashes the
   nudge) instead of being silently swallowed like a real disabled button. */
.btn.btn-inactive {
  opacity: 0.35;
  box-shadow: none;
}

.btn.btn-inactive:hover {
  transform: none;
  box-shadow: none;
}

/* Ghost / outline button — secondary CTAs */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: rgba(255, 255, 255, 0.65);
  box-shadow: none;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--pink);
  color: var(--text);
  box-shadow: none;
  transform: translateY(-1px);
}

.trust-row {
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.34);
  margin-top: 24px;
  letter-spacing: 0.03em;
}

/* Client roster — quiet social proof under the trust row */
.client-strip {
  text-align: center;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 10px;
}

/* ── loader ──────────────────────────────────────────────── */

.loader {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

/* Thin gradient scanning line at the top — cinematic progress indicator */
.loader-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0.5;
  overflow: hidden;
  border-radius: 0;
}

.loader-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: scan 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes scan {
  0%   { left: -40%; }
  100% { left: 140%; }
}

.loader-msg {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  min-height: 1.5em;
  transition: opacity 0.25s ease;
}

.loader-msg.swap { opacity: 0; }

/* ── question cards ──────────────────────────────────────── */

.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-bottom: 10px;
  animation: rise 0.28s ease both;
}

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

/* Conditional question reveal — slightly more pronounced entrance */
.q-card.q-reveal {
  animation: reveal-card 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes reveal-card {
  from {
    opacity: 0;
    transform: translateY(12px);
    border-color: rgba(232, 85, 109, 0.3);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    border-color: var(--border);
  }
}

.q-title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.35;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Option buttons: rectangular with rounded corners, left-border selected state */
.opt {
  position: relative;
  font-family: "DM Sans", sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px 11px 16px;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    color 0.14s ease;
  overflow: hidden;
}

.opt:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface-2);
}

/* Selected: gradient left accent bar + subtle pink tint */
.opt.selected {
  border-color: rgba(232, 85, 109, 0.35);
  background: rgba(232, 85, 109, 0.07);
  color: var(--text);
}

.opt.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--grad);
}

.opt .opt-detail {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
  transition: color 0.14s ease;
}

.opt.selected .opt-detail {
  color: rgba(255, 255, 255, 0.45);
}

/* ── thank-you screen ────────────────────────────────────── */

.thankyou-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
  text-align: center;
  max-width: 40ch;
  margin: 0 auto 32px;
}

.thankyou-email-addr {
  color: var(--text);
  font-weight: 500;
}

.thankyou-body a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.thankyou-body a:hover { color: var(--pink); }

/* Questions progress — quiet counter that warms up when complete */
.q-progress {
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: -16px 0 20px;
  min-height: 1.2em;
  transition: color 0.2s ease;
}

.q-progress.complete {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* "What happens next" timeline on the thank-you screen */
.next-steps {
  max-width: 420px;
  margin: 0 auto 8px;
}

.next-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.next-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(232, 85, 109, 0.12);
  border: 1px solid rgba(232, 85, 109, 0.35);
  color: var(--pink);
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.next-step p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  text-align: left;
}

/* Inline Calendly embed on the thank-you screen */
.calendly-section {
  margin-top: 32px;
}

.calendly-heading {
  font-family: "Inter Tight", sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
  margin: 0 0 16px;
}

.calendly-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  min-height: 320px;
}

/* Loading state behind the embed — the Calendly iframe paints over it */
.calendly-embed::before {
  content: "Loading Sean's diary…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

.calendly-embed .calendly-inline-widget {
  position: relative;
  z-index: 1;
}

.restart-row {
  text-align: center;
  margin-top: 20px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.link-btn:hover { color: var(--text); }

/* ── shared confirm / email note ─────────────────────────── */

.email-confirm {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.55;
}

.email-confirm a {
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── error / fallback ────────────────────────────────────── */

#step-error .sub a {
  color: var(--pink);
  font-weight: 500;
}

/* ── responsive ──────────────────────────────────────────── */

@media (min-width: 480px) {
  .calc { padding-top: 52px; }

  .q-options {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .opt {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  /* Single options that span full width look better unconstrained */
  .q-options .opt:only-child { flex: 1 1 100%; }
}

@media (max-width: 400px) {
  .btn-ghost { max-width: 100%; }
  .calc { padding-left: 16px; padding-right: 16px; }
}
