/* ==========================================================
   MyPaydayChoice — shared styles
   ========================================================== */

:root {
  --ground: #F5F7F2;
  --surface: #FFFFFF;
  --ink: #13231B;
  --ink-soft: #4A5A51;
  --ink-muted: #5B6A61;
  --line: #E2E8DF;
  --line-strong: #B9C5B4;
  --brand: #146B4A;
  --brand-dark: #0E4F37;
  --brand-tint: #E3F0E8;
  --dark: #13231B;
  --dark-text: #C9D6CE;
  --error: #B42318;
  --radius: 18px;
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.icon {
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon-bold { stroke-width: 2.2; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px -14px rgba(19, 35, 27, 0.35); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand);
}
.logo span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.logo .logo-tld { color: var(--brand); }

.main-nav { display: flex; gap: 26px; }
.main-nav a {
  text-decoration: none;
  color: #3A4A41;
  font-weight: 500;
  font-size: 15px;
  padding: 10px 0;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after,
.main-nav a.active::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 10px 22px -12px rgba(20, 107, 74, 0.7); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: #CBD5C7; }
.btn-secondary:hover { color: var(--ink); border-color: var(--ink-muted); }
.btn-light { background: #fff; color: var(--ink); font-weight: 700; }
.btn-light:hover { background: var(--brand-tint); color: var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 88px;
  padding-bottom: 96px;
}
.hero-copy { flex: 1 1 520px; min-width: 0; }

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 7px 12px;
  border-radius: 999px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.lead {
  margin: 22px 0 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 540px;
}

.hero-card {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 24px 48px -28px rgba(19, 35, 27, 0.35);
}
.hero-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-card-title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.hero-card-sub { margin: 6px 0 22px; font-size: 14px; color: var(--ink-muted); }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--ground);
}
.checklist svg { margin-top: 1px; }
.checklist strong { display: block; font-size: 15px; font-weight: 600; }
.checklist span { display: block; margin-top: 3px; font-size: 14px; color: var(--ink-muted); line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-border { border-bottom: 0; }

.section-head { max-width: 640px; }
.section-head h2, .contact-info h2 { font-weight: 800; font-size: clamp(30px, 3.4vw, 42px); }
.section-head p { margin: 14px 0 0; font-size: 18px; color: var(--ink-soft); }

.card-grid {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px;
}
.card {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--ground);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -24px rgba(19, 35, 27, 0.4); }
.card-white { background: var(--surface); }
.card h3 { margin-top: 22px; font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.card p { margin: 10px 0 0; color: var(--ink-soft); }

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--brand-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-num {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}

/* ---------- CTA ---------- */
.cta-wrap { padding-bottom: 88px; }
.cta {
  background: var(--dark);
  border-radius: 24px;
  padding: 56px 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta > div { flex: 1 1 420px; min-width: 0; }
.cta h2 { color: #fff; font-weight: 800; font-size: clamp(28px, 3vw, 38px); }
.cta p { margin: 12px 0 0; font-size: 17px; color: var(--dark-text); }

/* ---------- Contact ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 56px; }
.contact-info { flex: 1 1 340px; min-width: 0; }
.lead-sm { margin: 14px 0 0; font-size: 18px; color: var(--ink-soft); }
.info-block { margin-top: 32px; }
.info-block h3 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.info-block p { margin: 8px 0 0; font-size: 17px; font-weight: 500; line-height: 1.9; }

.contact-form {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 107, 74, 0.18);
}
.field.invalid input, .field.invalid textarea { border-color: var(--error); }
.error { margin: 0; min-height: 0; font-size: 13px; color: var(--error); }
.error:empty { display: none; }
.form-status { margin: 0; font-size: 15px; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.success { color: var(--brand); }
.form-status.fail { color: var(--error); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-text); padding: 40px 0; }
.disclosure { margin: 0; font-size: 13px; line-height: 1.7; color: #AFC0B6; max-width: 900px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #2C4237;
  font-size: 14px;
}
.footer-bottom p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: #fff; }
.footer-links a:hover { color: var(--brand-tint); }

/* ---------- Legal pages ---------- */
.legal-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 64px 0 48px; }
.legal-hero h1 { font-weight: 800; font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.025em; }
.legal-hero p { margin: 12px 0 0; color: var(--ink-muted); }

.legal-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px;
  padding-top: 56px;
  padding-bottom: 88px;
}
.legal-toc {
  flex: 1 1 240px;
  max-width: 280px;
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.legal-toc h2 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.legal-toc ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.legal-toc li { margin: 7px 0; }
.legal-toc a { text-decoration: none; color: var(--ink-soft); }
.legal-toc a:hover, .legal-toc a.active { color: var(--brand); text-decoration: underline; }

.legal-content {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 780px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px;
}
.legal-content h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p, .legal-content li { color: #2E3D35; }
.legal-content p { margin: 0 0 14px; }
.legal-content ul { margin: 0 0 14px; padding-left: 22px; }
.legal-content li { margin: 6px 0; }
.legal-note {
  background: var(--brand-tint);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 32px;
  font-size: 15px;
}
.legal-note p { margin: 0; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    box-shadow: 0 16px 28px -18px rgba(19, 35, 27, 0.4);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:last-child { border-bottom: 0; }
  .main-nav a::after { display: none; }

  .legal-toc { position: static; max-width: none; }
}

@media (max-width: 600px) {
  .hero { padding-top: 56px; padding-bottom: 64px; gap: 40px; }
  .section { padding: 64px 0; }
  .cta { padding: 40px 24px; }
  .cta .btn { width: 100%; }
  .contact-form { padding: 22px; }
  .legal-content { padding: 26px 20px; }
  .btn-row .btn { flex: 1 1 100%; }
}
