/* ---------------------------------------------------------------------------
   Fluency The Agency — Revenue Check
   Palette: charcoal ground, muted amber (action / impact),
   teal (recovery), soft magenta (loss). Nothing bright, nothing neon.
--------------------------------------------------------------------------- */

:root {
  --bg: #0d0e10;
  --surface: #141619;
  --surface-raised: #191c20;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e9e7e2;
  --text-muted: #9298a1;
  --text-faint: #666c75;
  --amber: #c9974d;
  --amber-soft: rgba(201, 151, 77, 0.14);
  --teal: #4e9b94;
  --teal-soft: rgba(78, 155, 148, 0.13);
  --magenta: #a86b95;
  --magenta-soft: rgba(168, 107, 149, 0.12);
  --radius: 12px;
  --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Ambient waveform texture -------------------------------------------- */

.waveform {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2vw;
  pointer-events: none;
  z-index: 0;
}

.waveform span {
  width: 2px;
  border-radius: 2px;
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .waveform span {
    animation: breathe 9s ease-in-out infinite alternate;
  }
  @keyframes breathe {
    from { transform: scaleY(1); }
    to   { transform: scaleY(0.55); }
  }
}

/* ---- Top bar + waveform progress ----------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 14, 16, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0.55rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand-dot { color: var(--amber); }

.step-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.progress-wave {
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 1.25rem 0.7rem;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 26px;
}

.progress-wave span {
  flex: 1;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.45s ease;
}

.progress-wave span.is-filled { background: var(--amber); }

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

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3rem;
  flex: 1;
}

.screen[hidden] { display: none; }

.screen.is-active {
  animation: rise 0.45s ease both;
}

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

@media (prefers-reduced-motion: reduce) {
  .screen.is-active { animation: none; }
}

/* ---- Type ------------------------------------------------------------------ */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 6.5vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  outline: none;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}

.subhead {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.body-copy {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.fineprint {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 1.25rem;
}

.caption {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 0.4rem;
}

/* ---- Buttons --------------------------------------------------------------- */

.btn {
  display: block;
  width: 100%;
  padding: 0.95rem 1.5rem;
  border-radius: 10px;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  color: #17130c;
}

.btn-primary:hover { background: #d6a75f; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  margin-top: 0.75rem;
}

.btn-secondary:hover { border-color: var(--amber); color: var(--amber); }

.btn-back {
  display: inline-block;
  margin-top: 1.5rem;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

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

:is(.btn, .btn-back, .option, input, a):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---- Quiz ------------------------------------------------------------------ */

.question-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.5rem;
}

.question-title { margin-bottom: 1.5rem; }

.options {
  display: grid;
  gap: 0.65rem;
}

.option {
  width: 100%;
  text-align: left;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.option:hover { border-color: rgba(201, 151, 77, 0.5); }

.option.is-selected {
  border-color: var(--amber);
  background: var(--amber-soft);
}

/* ---- Calculator ------------------------------------------------------------ */

.field { margin-bottom: 1.6rem; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

input[type="number"],
input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}

input[type="text"],
input[type="email"] {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

input:focus { border-color: var(--amber); outline: none; }

.currency-input { position: relative; }

.currency-prefix {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 600;
}

.currency-input input { padding-left: 2rem; }

.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  min-width: 3.2rem;
  text-align: right;
}

input[type="range"] {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--amber);
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line);
}

/* ---- Results --------------------------------------------------------------- */

.value-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

@media (max-width: 380px) {
  .value-cards { grid-template-columns: 1fr; }
}

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

.card-lost { border-top: 2px solid var(--magenta); background: linear-gradient(var(--magenta-soft), transparent 55%) var(--surface); }
.card-recoverable { border-top: 2px solid var(--teal); background: linear-gradient(var(--teal-soft), transparent 55%) var(--surface); }

.card-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 6vw, 1.8rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.card-lost .card-number { color: var(--magenta); }
.card-recoverable .card-number { color: var(--teal); }

.card-sub {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.hero-insight {
  text-align: center;
  padding: 2rem 1rem 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(rgba(201, 151, 77, 0.07), transparent 70%) var(--surface);
  margin-bottom: 1.75rem;
}

.hero-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 12vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.hero-hours {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

/* ---- Bar chart ------------------------------------------------------------- */

.chart {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chart-title {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.chart-row {
  display: grid;
  grid-template-columns: 6.2rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.chart-row + .chart-row { margin-top: 0.85rem; }

.chart-label { font-size: 0.85rem; color: var(--text-muted); }

.chart-track {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.chart-bar {
  height: 100%;
  width: 0;
  border-radius: 6px;
  transition: width 1.1s cubic-bezier(0.25, 1, 0.4, 1);
}

.chart-bar-current { background: #4a505a; }
.chart-bar-fluency { background: linear-gradient(90deg, var(--teal), var(--amber)); }

.chart-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 4.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .chart-bar { transition: none; }
}

/* ---- Leak result ------------------------------------------------------------ */

.leak {
  padding: 1.4rem 1.25rem;
  border-left: 2px solid var(--amber);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2.25rem;
}

.leak-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.4rem;
}

.leak-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.leak-copy { color: var(--text-muted); font-size: 0.95rem; }

/* ---- Email capture ----------------------------------------------------------- */

.capture {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}

.capture-prompt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.form-error {
  color: #d08a8a;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.gotcha {
  position: absolute !important;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
}

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

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 1.25rem 2rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}
