/*
 * The landing page and the sign-in pages (Round 3).
 * SCM's own colours: red #ed1c24 ($clr-primary), slate #404565
 * ($clr-secondary), Inter. Standalone: these pages load only this file and
 * Font Awesome, so nothing from the app pages leaks in.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --p-red: #ed1c24;
  --p-red-dark: #c8141b;
  --p-red-soft: #fdecec;
  --p-slate: #404565;
  --p-slate-dark: #2c3049;
  --p-slate-soft: #eef0f6;
  --p-ink: #111322;
  --p-text: #2b2f45;
  --p-muted: #6b7086;
  --p-help: #a7a7a7;
  --p-line: #e4e6ee;
  --p-bg: #f7f8fb;
  --p-radius: 14px;
  --p-shadow: 0 1px 2px rgba(17, 19, 34, 0.06), 0 12px 32px -12px rgba(17, 19, 34, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.fxp {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--p-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
.fxp a { color: inherit; }
.fxp img { max-width: 100%; display: block; }
.fxp h1, .fxp h2, .fxp h3, .fxp h4 { color: var(--p-ink); line-height: 1.2; margin: 0; }
.fxp .container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Brand mark */
.fxp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.fxp-brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--p-red); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(237, 28, 36, 0.6); }
.fxp-brand-mark svg { width: 22px; height: 22px; }
.fxp-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.fxp-brand-name { font-weight: 800; font-size: 18px; color: var(--p-ink); letter-spacing: 0.02em; }
.fxp-brand-product { font-size: 12px; color: var(--p-muted); }
.fxp-brand.on-dark .fxp-brand-name { color: #fff; }
.fxp-brand.on-dark .fxp-brand-product { color: rgba(255, 255, 255, 0.7); }

/* Buttons */
.fxp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; font-family: inherit; }
.fxp-btn:active { transform: translateY(1px); }
.fxp-btn-primary { background: var(--p-red); color: #fff !important; }
.fxp-btn-primary:hover { background: var(--p-red-dark); }
.fxp-btn-secondary { background: #fff; color: var(--p-slate) !important; border-color: var(--p-line); }
.fxp-btn-secondary:hover { border-color: var(--p-slate); }
.fxp-btn-ghost-light { background: rgba(255, 255, 255, 0.08); color: #fff !important; border-color: rgba(255, 255, 255, 0.25); }
.fxp-btn-ghost-light:hover { background: rgba(255, 255, 255, 0.16); }
.fxp-btn:focus-visible, .fxp-input:focus-visible, .fxp a:focus-visible { outline: 3px solid rgba(237, 28, 36, 0.35); outline-offset: 2px; }

/* ---------- Landing ---------- */
.fxp-nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--p-line); }
.fxp-nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.fxp-nav-links { display: flex; align-items: center; gap: 8px; }
.fxp-nav-links a.plain { text-decoration: none; color: var(--p-slate); font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.fxp-nav-links a.plain:hover { background: var(--p-slate-soft); }

.fxp-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--p-slate-dark) 0%, var(--p-slate) 60%, #555b84 100%); color: #fff; }
.fxp-hero::after { content: ""; position: absolute; right: -180px; top: -160px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(237, 28, 36, 0.35), rgba(237, 28, 36, 0) 70%); pointer-events: none; }
.fxp-hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 80px; padding-bottom: 88px; }
.fxp-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #ffd4d6; }
.fxp-eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--p-red); }
.fxp-hero h1 { color: #fff; font-size: clamp(36px, 5vw, 58px); font-weight: 800; letter-spacing: -0.02em; margin: 16px 0 18px; }
.fxp-hero h1 em { font-style: normal; color: #ff8a8f; }
.fxp-hero .lead { font-size: 19px; color: rgba(255, 255, 255, 0.86); max-width: 560px; margin: 0 0 28px; }
.fxp-site-label { display: inline-block; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px; background: #e5a000; color: #1b1300; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.fxp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.fxp-hero-note { margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }

.fxp-device { justify-self: center; width: 300px; max-width: 100%; padding: 12px; border-radius: 40px; background: #0f1120; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.06); }
.fxp-device-screen { border-radius: 30px; overflow: hidden; background: #fff; aspect-ratio: 9 / 18.5; }
.fxp-device-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.fxp-section { padding: 88px 0; }
.fxp-section.alt { background: var(--p-bg); }
.fxp-section-head { max-width: 680px; margin-bottom: 40px; }
.fxp-section-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.01em; }
.fxp-section-head p { color: var(--p-muted); font-size: 17px; margin: 12px 0 0; }
.fxp-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--p-red); margin-bottom: 10px; display: block; }

.fxp-areas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.fxp-area { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 12px; background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-radius); text-decoration: none; text-align: center; font-weight: 600; color: var(--p-ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.fxp-area:hover { border-color: var(--p-red); box-shadow: var(--p-shadow); transform: translateY(-2px); }
.fxp-area img { width: 56px; height: 56px; }
.fxp-area small { font-weight: 500; color: var(--p-muted); font-size: 12px; }

.fxp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fxp-feature { background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-radius); padding: 26px; box-shadow: 0 1px 2px rgba(17, 19, 34, 0.04); }
.fxp-feature .icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--p-red-soft); color: var(--p-red); font-size: 20px; margin-bottom: 16px; }
.fxp-feature.slate .icon { background: var(--p-slate-soft); color: var(--p-slate); }
.fxp-features .fxp-feature:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.fxp-feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.fxp-feature p { margin: 0; color: var(--p-muted); }

.fxp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.fxp-step { position: relative; display: block; text-decoration: none; background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-radius); padding: 26px 22px 22px; transition: border-color .15s, box-shadow .15s; }
.fxp-step:hover { border-color: var(--p-slate); box-shadow: var(--p-shadow); }
.fxp-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--p-slate); color: #fff; font-weight: 700; margin-bottom: 14px; }
.fxp-step h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.fxp-step p { margin: 0 0 14px; color: var(--p-muted); font-size: 14px; }
.fxp-step .watch { font-size: 13px; font-weight: 600; color: var(--p-red); }

.fxp-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fxp-role { display: flex; flex-direction: column; gap: 10px; border-radius: var(--p-radius); padding: 28px; background: #fff; border: 1px solid var(--p-line); }
.fxp-role h3 { font-size: 20px; font-weight: 700; }
.fxp-role p { margin: 0; color: var(--p-muted); flex: 1; }
.fxp-role .fxp-btn { align-self: flex-start; margin-top: 8px; }

.fxp-contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; background: linear-gradient(135deg, var(--p-slate) 0%, var(--p-slate-dark) 100%); color: #fff; border-radius: 20px; padding: 44px; }
.fxp-contact h2 { color: #fff; font-size: 30px; font-weight: 800; }
.fxp-contact p { color: rgba(255, 255, 255, 0.82); margin: 12px 0 0; }
.fxp-advisor { display: flex; gap: 18px; align-items: center; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--p-radius); padding: 20px; }
.fxp-advisor img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, 0.35); }
.fxp-advisor strong { display: block; font-size: 18px; color: #fff; }
.fxp-advisor span { display: block; font-size: 14px; color: rgba(255, 255, 255, 0.8); }
.fxp-advisor a { color: #ffd4d6; }

.fxp-footer { border-top: 1px solid var(--p-line); padding: 28px 0; color: var(--p-muted); font-size: 14px; }
.fxp-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.fxp-social { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.fxp-social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--p-line); }
.fxp-social img { width: 16px; height: 16px; }
.fxp-build { font-size: 12px; color: var(--p-help); }

@media (max-width: 980px) {
  .fxp-hero .container { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
  .fxp-device { width: 240px; }
  .fxp-areas { grid-template-columns: repeat(3, 1fr); }
  .fxp-features, .fxp-roles { grid-template-columns: 1fr 1fr; }
  .fxp-features .fxp-feature:last-child:nth-child(3n+1) { grid-column: auto; }
  .fxp-steps { grid-template-columns: 1fr 1fr; }
  .fxp-contact { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 620px) {
  .fxp-nav-links a.plain { display: none; }
  .fxp-areas { grid-template-columns: repeat(2, 1fr); }
  .fxp-features, .fxp-roles, .fxp-steps { grid-template-columns: 1fr; }
  .fxp-section { padding: 64px 0; }
}

/* ---------- Sign-in pages ---------- */
.fxp-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 0.95fr) 1.05fr; }
.fxp-auth-side { position: relative; overflow: hidden; background: linear-gradient(165deg, var(--p-slate-dark) 0%, var(--p-slate) 70%, #575d86 100%); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.fxp-auth-side::after { content: ""; position: absolute; left: -140px; bottom: -180px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(237, 28, 36, 0.35), rgba(237, 28, 36, 0) 70%); pointer-events: none; }
.fxp-auth-side > * { position: relative; z-index: 1; }
.fxp-auth-side h1 { color: #fff; font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.02em; margin: 14px 0 14px; }
.fxp-auth-side .lead { color: rgba(255, 255, 255, 0.85); font-size: 17px; margin: 0 0 22px; max-width: 440px; }
.fxp-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.fxp-points li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, 0.9); }
.fxp-points i { flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(237, 28, 36, 0.85); color: #fff; font-size: 13px; margin-top: 1px; }
.fxp-auth-side small { color: rgba(255, 255, 255, 0.6); font-size: 13px; }

.fxp-auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; background: var(--p-bg); }
.fxp-auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--p-line); border-radius: 18px; box-shadow: var(--p-shadow); padding: 32px; }
.fxp-role-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--p-slate-soft); border-radius: 12px; margin-bottom: 26px; }
.fxp-role-tabs a { text-align: center; padding: 9px 6px; border-radius: 9px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--p-slate); }
.fxp-role-tabs a[aria-current="page"] { background: #fff; color: var(--p-red); box-shadow: 0 1px 3px rgba(17, 19, 34, 0.12); }
.fxp-auth-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.fxp-auth-card .sub { margin: 0 0 22px; color: var(--p-muted); }
.fxp-field { margin-bottom: 16px; }
.fxp-field label { display: block; font-weight: 600; font-size: 14px; color: var(--p-ink); margin-bottom: 6px; }
.fxp-input-wrap { position: relative; }
.fxp-input { width: 100%; height: 46px; padding: 0 44px 0 14px; border: 1px solid #d6d9e4; border-radius: 10px; font: inherit; color: var(--p-ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.fxp-input:focus { outline: none; border-color: var(--p-red); box-shadow: 0 0 0 4px rgba(237, 28, 36, 0.12); }
.fxp-input-icon { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; color: var(--p-muted); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.fxp-input-icon:hover { color: var(--p-slate); background: var(--p-slate-soft); }
.fxp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.fxp-row a { color: var(--p-red); font-weight: 600; text-decoration: none; font-size: 14px; }
.fxp-row a:hover { text-decoration: underline; }
.fxp-auth-card .fxp-btn-primary { width: 100%; height: 48px; margin-top: 8px; }
.fxp-help { color: var(--p-muted); font-size: 13px; margin: 18px 0 0; text-align: center; }
.fxp-help a { color: var(--p-slate); font-weight: 600; }
.fxp-error { display: block; color: var(--p-red); font-size: 13px; margin-top: 6px; }
.fxp-alert { display: none; width: 100%; max-width: 440px; margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; background: var(--p-red-soft); border: 1px solid #f7b6b9; color: #a3121a; font-weight: 500; }
.fxp-alert.show, .fxp-alert.error { display: block; }
.fxp-alert.ok { display: block; background: #eef7e8; border-color: #c9e4b8; color: #2f7d0b; }
.fxp-back { margin-top: 18px; font-size: 14px; color: var(--p-muted); text-decoration: none; }
.fxp-back:hover { color: var(--p-slate); }

/* Waiting and success overlays the sign-in script shows. */
.fxp-overlay { display: none; position: fixed; inset: 0; z-index: 50; background: rgba(17, 19, 34, 0.45); align-items: center; justify-content: center; }
.fxp-overlay .box { background: #fff; border-radius: 14px; padding: 22px 26px; display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--p-ink); box-shadow: var(--p-shadow); }
.fxp-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--p-slate-soft); border-top-color: var(--p-red); animation: fxp-spin 0.8s linear infinite; }
.fxp-overlay .tick { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #2f7d0b; color: #fff; }
@keyframes fxp-spin { to { transform: rotate(360deg); } }
.fxp-shake { animation: fxp-shake 0.45s; }
@keyframes fxp-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (max-width: 880px) {
  .fxp-auth { grid-template-columns: 1fr; }
  .fxp-auth-side { padding: 28px 24px; }
  .fxp-auth-side .fxp-points, .fxp-auth-side .lead, .fxp-auth-side small { display: none; }
  .fxp-auth-side h1 { font-size: 24px; margin: 12px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
