/* ================================================================
   FX Pro — Landing Page Stylesheet
   Modern CSS3, mobile-first, no framework dependencies.

   Table of contents:
   1.  Design tokens
   2.  Reset / base
   3.  Header
   4.  Hero + application form
   5.  Shared section headings
   6.  Trust / feature cards
   7.  About section
   8.  FAQ
   9.  Footer
   10. Responsive breakpoints
   ================================================================ */

/* ----------------------------------------------------------------
   1. DESIGN TOKENS
   A restrained, two-color brand system (ink + red) reads as more
   institutional/trustworthy than a red-heavy page. Red is reserved
   for actions, accents and small highlights only.
   ---------------------------------------------------------------- */
:root {
  /* Brand */
  --ink: #12151B;             /* near-black navy — headings, primary text */
  --ink-soft: #333844;        /* body copy */
  --muted: #667085;           /* secondary / supporting text */
  --muted-soft: #8A93A3;

  --red: #D71920;             /* primary accent — CTAs, links, active states */
  --red-dark: #A81219;        /* hover / pressed state */
  --red-tint: #FBEAEA;        /* soft accent background (badges, chips) */
  --red-tint-strong: #F6D3D5;

  --success: #1B7A37;
  --success-tint: #E9F6EC;

  /* Neutrals */
  --surface: #FFFFFF;
  --surface-alt: #F8F9FB;     /* subtle cool off-white for alternating sections */
  --line: #E4E7EC;            /* default hairline border */
  --line-soft: #ECEEF2;

  /* Typography */
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Fluid type scale: shrinks gracefully on small screens, grows on large */
  --text-headline: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --text-section-title: clamp(1.6rem, 1.4rem + 0.9vw, 2rem);
  --text-card-title: 1.15rem;

  /* Spacing scale */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 72px;
  --space-3xl: 104px;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Elevation — soft, layered shadows for a premium, non-flat feel */
  --shadow-xs: 0 1px 2px rgba(18, 21, 27, 0.05);
  --shadow-card: 0 1px 2px rgba(18, 21, 27, 0.04), 0 6px 20px rgba(18, 21, 27, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(18, 21, 27, 0.05), 0 14px 32px rgba(18, 21, 27, 0.09);
  --shadow-form: 0 2px 6px rgba(18, 21, 27, 0.05), 0 24px 48px rgba(18, 21, 27, 0.12);
  --shadow-button: 0 6px 16px rgba(215, 25, 32, 0.22);
  --shadow-button-hover: 0 10px 22px rgba(215, 25, 32, 0.30);

  --max-width: 1180px;

  /* Motion — short and functional only; never used for decoration */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}

/* ----------------------------------------------------------------
   2. RESET / BASE
   ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth; /* smooth scrolling for in-page anchor links only */
  scroll-padding-top: 88px; /* keeps anchored sections clear of the sticky header */
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--surface);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--red-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p { margin: 0; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
ul { margin: 0; padding: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Accessible, always-visible focus states (distinct outline, not a color fill,
   so it never reads as an error state) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip link: hidden until focused, standard accessibility pattern */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition-fast);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

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

/* ----------------------------------------------------------------
   3. HEADER
   ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-logo { width: 38px; height: 38px; border-radius: 50%; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--red);
  border-bottom-color: var(--red-tint-strong);
}

.nav-cta {
  background: var(--red);
  color: var(--surface) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-pill);
  border-bottom: none !important;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}
.nav-cta:hover,
.nav-cta:focus-visible { background: var(--red-dark); box-shadow: var(--shadow-button); }

/* Hide secondary nav links on very small screens to keep header compact */
@media (max-width: 480px) {
  .main-nav li:not(:last-child) { display: none; }
}

/* ----------------------------------------------------------------
   4. HERO + APPLICATION FORM
   ---------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  padding: var(--space-xl) 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* Mobile order: application card appears ABOVE the hero copy */
.apply-wrap { order: -1; }

.hero-headline {
  font-size: var(--text-headline);
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 54ch;
  margin-bottom: var(--space-lg);
}

.hero-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15.5px;
  color: var(--ink-soft);
  font-weight: 500;
}
.hero-points .check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: var(--red-tint);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

/* Application card */
.apply-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-form);
  padding: var(--space-lg) var(--space-md);
}

.apply-title {
  font-size: 22px;
  margin-bottom: 6px;
}

.apply-sub {
  display: block;
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--line-soft);
}

/* Form layout */
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* Wraps each control so a decorative leading icon can be positioned
   inside the field without affecting form semantics. */
.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--muted-soft);
  pointer-events: none;
}

.field input,
.field select {
  width: 100%;
  font-size: 16px; /* 16px minimum prevents iOS auto-zoom on focus */
  padding: 14px 14px 14px 44px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  min-height: 50px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 40px;
}

.field input::placeholder { color: var(--muted-soft); }

.field input:hover,
.field select:hover { border-color: var(--muted-soft); }

.field input:focus,
.field select:focus {
  border-color: var(--red);
  outline: none;
  box-shadow: 0 0 0 4px var(--red-tint);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--red-dark);
}
.field input[aria-invalid="true"]:focus,
.field select[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px var(--red-tint-strong);
}

.field-error {
  display: block;
  min-height: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red-dark);
  margin-top: 6px;
}

.btn-primary {
  display: block;
  width: 100%;
  background: var(--red);
  color: var(--surface);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 17px 20px;
  min-height: 56px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow-button);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-primary:hover { background: var(--red-dark); box-shadow: var(--shadow-button-hover); }
.btn-primary:active { background: var(--red-dark); box-shadow: var(--shadow-xs); }
.btn-primary:disabled {
  background: var(--muted-soft);
  box-shadow: none;
  cursor: not-allowed;
}

.form-footnote {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--space-sm);
}
.form-footnote a { color: var(--red); font-weight: 600; }

/* Thank-you view (inside the same card, shown after successful submit) */
#thank-you-view { text-align: center; padding: var(--space-sm) 0; }
.thank-you-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--success-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thank-you-icon svg { width: 30px; height: 30px; stroke: var(--success); }
.thank-you-text {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 14px;
}
.thank-you-text:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------
   5. SHARED SECTION HEADINGS
   ---------------------------------------------------------------- */
.section { padding: var(--space-2xl) 0; }

.section-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section-title {
  font-size: var(--text-section-title);
  line-height: 1.25;
  margin-bottom: 32px;
  max-width: 34ch;
}

/* ----------------------------------------------------------------
   6. TRUST / FEATURE CARDS
   ---------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.feature-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-soft);
}

.feature-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--red-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-badge svg { width: 24px; height: 24px; stroke: var(--red); }

.feature-card h3 { font-size: var(--text-card-title); margin-bottom: 8px; }
.feature-card p { font-size: 15px; color: var(--muted); }

/* ----------------------------------------------------------------
   7. ABOUT
   ---------------------------------------------------------------- */
.about-section {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-body { font-size: 17px; color: var(--ink-soft); max-width: 72ch; }
.about-body p { margin-bottom: 18px; }
.about-body p:last-child { margin-bottom: 0; }

/* Values strip: short, honest trust signals — no invented statistics */
.values-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: var(--space-lg);
  max-width: 640px;
}
.value-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.value-chip svg { width: 18px; height: 18px; stroke: var(--red); flex-shrink: 0; }

/* ----------------------------------------------------------------
   8. FAQ
   ---------------------------------------------------------------- */
.faq-list {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.faq-item:hover { border-color: var(--muted-soft); box-shadow: var(--shadow-card); }
.faq-item[open] { border-color: var(--red-tint-strong); box-shadow: var(--shadow-card); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary .plus {
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red-tint);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.faq-item[open] summary .plus { background: var(--red); color: var(--surface); }

.faq-answer {
  padding: 0 20px 20px;
  font-size: 15.5px;
  color: var(--muted);
  max-width: 65ch;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
  margin: 0 20px 20px;
  padding-left: 0;
  padding-right: 0;
}

/* ----------------------------------------------------------------
   9. FOOTER
   ---------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #C7CBD1;
  padding: var(--space-xl) 0 var(--space-lg);
  font-size: 14px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: var(--space-md);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.footer-brand img { width: 30px; height: 30px; border-radius: 50%; }
.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--surface);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a { color: #C7CBD1; text-decoration: none; font-weight: 500; }
.footer-links a:hover,
.footer-links a:focus-visible { color: var(--surface); text-decoration: underline; }

.footer-disclosure {
  color: #9AA0AB;
  font-size: 13px;
  line-height: 1.7;
  max-width: 80ch;
  margin-bottom: var(--space-sm);
}

.footer-copyright { color: #7E8590; font-size: 13px; }

/* ----------------------------------------------------------------
   10. RESPONSIVE — TABLET / DESKTOP (min-width 760px)
   ---------------------------------------------------------------- */
@media (min-width: 760px) {
  .header-inner { padding: 16px 24px; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-word { font-size: 22px; }

  /* Hero becomes a two-column layout: copy beside the form */
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: start;
    padding: var(--space-3xl) 0;
  }
  .apply-wrap { order: 0; } /* restore natural (right-hand) position on desktop */

  .hero-sub { font-size: 19px; }

  .apply-card { padding: var(--space-lg); position: sticky; top: 96px; }

  .field-row { grid-template-columns: 1fr 1fr; gap: 16px; }

  .section-title { max-width: 40ch; }

  .features-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .values-strip { grid-template-columns: repeat(2, 1fr); }

  .footer-top { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Large desktop: cap line lengths and add a touch more breathing room */
@media (min-width: 1200px) {
  .container { padding: 0 32px; }
}
