/* ==========================================================
   ERPIFY — production stylesheet
   Most visual detail lives inline in index.html (carried over
   directly from the approved mockup for fidelity). This file
   covers: font loading, interactive states that HTML can't
   express inline (:hover, :focus-visible), the home/signup
   view switch, and responsive overrides for the grid layouts
   below. The @media rules use !important deliberately — they
   are overriding inline styles on purpose, not by accident.
   ========================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@keyframes erpDriftA { 0%,100% { transform: translate3d(0,0,0) scale(1); } 33% { transform: translate3d(7%,-5%,0) scale(1.14); } 66% { transform: translate3d(-6%,6%,0) scale(0.92); } }
@keyframes erpDriftB { 0%,100% { transform: translate3d(0,0,0) scale(1.06); } 50% { transform: translate3d(-9%,7%,0) scale(0.88); } }
@keyframes erpDriftC { 0%,100% { transform: translate3d(0,0,0) scale(0.95); } 50% { transform: translate3d(5%,9%,0) scale(1.1); } }
@keyframes erpPan { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes erpSheen { 0% { transform: translateX(-130%) skewX(-18deg); } 100% { transform: translateX(240%) skewX(-18deg); } }
@keyframes erpPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

body {
  margin: 0;
  background-color: #FBF8F5;
  background-image:
    radial-gradient(900px 520px at 10% -8%, rgba(244,82,42,0.13), transparent 62%),
    radial-gradient(820px 620px at 102% 6%, rgba(255,168,96,0.14), transparent 58%),
    radial-gradient(760px 520px at 48% 108%, rgba(146,170,205,0.13), transparent 62%);
  background-attachment: fixed;
  color: #23272F;
  font-family: Manrope, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Ambient floating blobs (decorative section backdrops) ---------- */
.ambient-wrap { position: relative; overflow: hidden; }
.ambient-blobs { position: absolute; pointer-events: none; filter: blur(70px); opacity: 0.85; z-index: 0; }
.ambient-blobs.dark { filter: blur(90px); opacity: 0.75; }
.blob { position: absolute; border-radius: 50%; display: block; }
.blob-a { animation: erpDriftA 22s ease-in-out infinite; }
.blob-b { animation: erpDriftB 26s ease-in-out infinite; }
.blob-c { animation: erpDriftC 30s ease-in-out infinite; }
.ambient-wrap > .wrap,
.ambient-wrap > section,
.ambient-wrap > div.hero-grid,
.ambient-wrap > div.signup-grid { position: relative; z-index: 1; }

/* ---------- Glass surface (frosted cards / nav / panels) ---------- */
.glass {
  background: linear-gradient(155deg, rgba(255,255,255,0.8), rgba(255,255,255,0.46));
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 34px 60px -46px rgba(23,26,33,0.55), inset 0 1px 0 rgba(255,255,255,0.85);
}
.glass-hover { transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.glass-hover:hover { box-shadow: 0 44px 70px -42px rgba(23,26,33,0.6), inset 0 1px 0 rgba(255,255,255,0.95); border-color: rgba(244,82,42,0.35); }

.glass-dark {
  background: linear-gradient(155deg, rgba(255,255,255,0.13), rgba(255,255,255,0.04));
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 50px 90px -50px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.18);
}

.glass-pill {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 10px 24px -18px rgba(23,26,33,0.6);
}

/* ---------- Animated gradient (buttons, progress, accents) ---------- */
.grad-coral {
  background: linear-gradient(110deg, #FF6A3D, #F4522A 35%, #E23F1F 65%, #FF8A4C);
  background-size: 260% 100%;
  animation: erpPan 9s ease infinite;
}
.grad-coral-slow { background-size: 300% 100%; animation: erpPan 14s ease infinite; }
.grad-peach {
  background-image: linear-gradient(115deg, rgba(255,238,231,0.95), rgba(255,247,243,0.7), rgba(255,229,214,0.9));
  background-size: 220% 100%;
  animation: erpPan 11s ease infinite;
}

.btn-shimmer { position: relative; overflow: hidden; }
.btn-shimmer::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0; width: 38%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.42), rgba(255,255,255,0));
  animation: erpSheen 4.6s ease-in-out infinite;
  pointer-events: none;
}

.pulse-dot { animation: erpPulse 2.6s ease-in-out infinite; }

.bar-track { flex: 1; height: 6px; border-radius: 999px; background: rgba(35,39,47,0.08); display: block; overflow: hidden; }
.bar-fill-anim { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FF8A4C, #F4522A, #FF7A3D); background-size: 220% 100%; animation: erpPan 7s ease infinite; }

.glow-accent {
  position: absolute; border-radius: 50%; pointer-events: none; display: block;
  background: radial-gradient(circle at 50% 50%, rgba(244,82,42,0.45), rgba(244,82,42,0) 70%);
}

a { color: #F4522A; text-decoration: none; }
a:hover { color: #D23F1B; }
button { font: inherit; }

img, svg { display: block; max-width: 100%; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #F4522A;
  outline-offset: 2px;
}

/* ---------- view switching (home / signup) ---------- */
.view { display: none; }
.view.is-active { display: block; }

/* ---------- hover states (from the mockup's style-hover) ---------- */
.btn-coral { transition: box-shadow 0.15s ease, filter 0.15s ease; }
.btn-coral:hover { filter: brightness(0.94); }

.btn-outline { transition: background 0.15s ease; }
.btn-outline:hover { background: rgba(255,255,255,0.85) !important; }

.btn-dark { transition: background 0.15s ease; }
.btn-dark:hover { background: #000 !important; }

.role-btn.is-off { transition: border-color 0.15s ease; }
.role-btn.is-off:hover { border-color: rgba(35,39,47,0.35) !important; }

.chip.is-off { transition: border-color 0.15s ease; }
.chip.is-off:hover { border-color: rgba(35,39,47,0.3) !important; }

.chip-other.is-off:hover {
  border-color: #F4522A !important;
  color: #C6421A !important;
}

.faq-question:hover span:first-child { color: #F4522A; }

/* ---------- interactive component states ---------- */
.role-btn {
  width: 100%; text-align: left; cursor: pointer; font-family: Manrope, sans-serif;
  border-radius: 16px; padding: 18px; display: grid; gap: 6px;
}
.role-btn.is-on { background: #FFF7F3; border: 1.5px solid #F4522A; }
.role-btn.is-off { background: #fff; border: 1px solid rgba(35,39,47,0.12); }

.chip {
  cursor: pointer; font-family: Manrope, sans-serif; font-size: 13.5px; font-weight: 600;
  padding: 9px 14px; border-radius: 999px;
}
.chip.is-on { color: #fff; background: #F4522A; border: 1px solid #F4522A; }
.chip.is-off { color: #4B515E; background: #F6F2EE; border: 1px solid rgba(35,39,47,0.1); }

.chip-other {
  cursor: pointer; font-family: Manrope, sans-serif; font-size: 13.5px; font-weight: 600;
  padding: 9px 14px; border-radius: 999px;
}
.chip-other.is-off { color: #4B515E; background: #fff; border: 1px dashed rgba(35,39,47,0.3); }
.chip-other.is-on { color: #fff; background: #F4522A; border: 1px solid #F4522A; }

.other-erp-input { display: none; }
.other-erp-input.is-visible { display: block; }

.faq-answer { display: none; }
.faq-answer.is-open { display: block; }

.faq-question { width: 100%; text-align: left; background: none; border: 0; padding: 22px 0; display: flex; align-items: center; gap: 20px; cursor: pointer; font-family: Manrope, sans-serif; font-size: 17.5px; font-weight: 600; color: #23272F; letter-spacing: -0.01em; }

.form-panel { display: block; }
.form-panel.is-hidden { display: none; }
.success-panel { display: none; }
.success-panel.is-visible { display: block; }

.form-error {
  display: none;
  font-size: 13.5px;
  color: #C6421A;
  background: #FFEEE7;
  border: 1px solid rgba(244,82,42,0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 14px;
}
.form-error.is-visible { display: block; }

button[disabled] { opacity: 0.65; cursor: default; }

/* ==========================================================
   Responsive overrides
   ========================================================== */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr !important; gap: 40px !important; padding-top: 48px !important; }
  .marketplace-grid { grid-template-columns: 1fr !important; }
  .how-grid { grid-template-columns: 1fr !important; }
  .how-grid > div { border-right: 0 !important; border-bottom: 1px solid rgba(35,39,47,0.1); padding: 22px 0 !important; }
  .how-grid > div:last-child { border-bottom: 0; }
  .escrow-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .platform-grid { grid-template-columns: 1fr !important; }
  .platform-grid > div[style*="span 2"] { grid-column: span 1 !important; }
  .module-match-card { grid-template-columns: 1fr !important; }
  .faq-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .cta-grid { grid-template-columns: 1fr !important; text-align: left; }
  .signup-grid { grid-template-columns: 1fr !important; }
  .signup-grid aside { position: static !important; }
  .role-grid { grid-template-columns: 1fr !important; }
  .footer-grid { flex-direction: column; }

  .h-hero { font-size: 2.6rem !important; }
  .h-signup { font-size: 2.4rem !important; }
  .h2-serif { font-size: 2rem !important; }
  .h-cta { font-size: 2rem !important; }

  section, header > div { padding-left: 20px !important; padding-right: 20px !important; }

  /* These three sections gained an extra ambient-wrap outer layer during
     the visual redesign, whose content divs already carry their own
     side padding — without this, the rule above would stack an extra
     20px on top of that instead of replacing it. */
  section.ambient-wrap, section#form-panel.ambient-wrap { padding-left: 0 !important; padding-right: 0 !important; }
  .hero-grid, .escrow-grid, .signup-grid { padding-left: 20px !important; padding-right: 20px !important; }
}

@media (max-width: 780px) {
  .nav-links { display: none !important; }
}

@media (max-width: 560px) {
  .two-col-fields { grid-template-columns: 1fr !important; }
  .trust-strip-inner { flex-direction: column; align-items: flex-start !important; gap: 14px !important; }
}
