/* Better Money Options: site styles. Mobile-first; desktop layout from 900px. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Mohave";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/mohave-latin.woff2") format("woff2");
}

:root {
  --green: #0F3D2E;
  --green-hover: #17563F;
  --gold: #C79A3B;
  --gold-light: #E5C46B;
  --gold-tint: rgba(199, 154, 59, .14);
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --text: #1B241F;
  --muted: #5E6A63;
  --border: #E5E7EB;
  --border-strong: #E4E6E0;
  --tp-green: #00B67A;
  --font-head: "Mohave", sans-serif;
  --font-body: "Archivo", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--green); text-decoration-color: var(--gold); }
a:hover { color: #7A5A18; }

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

button { font-family: inherit; }

.accent { color: #AD8322; }

/* Header */
.site-header {
  display: flex;
  justify-content: flex-start;
  padding: 16px 20px 8px;
}
.logo-link { display: inline-flex; }
.logo { height: 40px; width: auto; max-width: 100%; }

/* Hero */
.hero { padding: 20px 20px 24px; }

.hero__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--green);
  margin: 0 0 12px;
  text-wrap: pretty;
}
.hero__sub {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  text-wrap: pretty;
}

/* Mobile: headline beside a small photo */
.hero__copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 144px;
  column-gap: 10px;
  align-items: start;
}
.hero__title, .hero__sub { grid-column: 1; }
.hero__media--mobile { grid-column: 2; grid-row: 1 / span 2; }
.loan-form, .trust { grid-column: 1 / -1; }
.hero__media--desktop { display: none; }

/* Photo + decoration */
.hero__media { position: relative; }
.hero__media--mobile {
  width: 160px; height: 176px;
  transform: scale(.9); transform-origin: top right;
  margin-left: -16px; margin-bottom: -18px;
}
.media__ring {
  position: absolute; left: 10px; top: 10px;
  width: 150px; height: 150px; border-radius: 50%;
  background: var(--gold-tint);
}
/* Four dots orbiting the photo. The orbit box is a square centered on the
   photo; each dot sits on one side of it and the whole box rotates. */
.media__orbit {
  position: absolute;
  width: 200px; height: 200px;
  left: -15px; top: -15px;
  animation: orbit 28s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.media__orbit span {
  position: absolute; border-radius: 50%;
  background: var(--gold);
}
.media__orbit span:nth-child(1) { top: 0; left: 50%; width: 16px; height: 16px; margin-left: -8px; }
.media__orbit span:nth-child(2) { top: 50%; right: 0; width: 10px; height: 10px; margin-top: -5px; background: var(--green); }
.media__orbit span:nth-child(3) { bottom: 0; left: 50%; width: 12px; height: 12px; margin-left: -6px; }
.media__orbit span:nth-child(4) { top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; background: var(--green); }
@keyframes orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* The cutout stands on the ring: heads and fists rise above the circle, the
   lower body is clipped by the circle's arc. The figure box is centered on the
   ring and taller than it; the clip path is a rectangle down to the ring's
   center line joined to the ring's lower half. Mobile ring: 150px at (10,10). */
.media__figure {
  position: absolute;
  left: -5px; top: -30px;
  width: 180px; height: 190px;
  clip-path: path("M0 0 H180 V115 H165 A75 75 0 0 1 15 115 H0 Z");
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .9; }
  50%      { transform: scale(1.05); opacity: .45; }
}
.media__photo {
  position: static;
  width: auto; height: 172px;
  object-fit: contain;
}
.stat {
  position: absolute; left: -6px; right: -10px; bottom: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px;
  background: #08251B; color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(15, 61, 46, .18);
}
.media__tp {
  position: absolute; left: -24px; right: -20px; bottom: 0; z-index: 2;
  display: flex; justify-content: center;
}
.media__tp .trustpilot { padding: 0; gap: 6px; white-space: nowrap; }
.media__tp .tp-stars { width: 76px; height: 14px; }
.media__tp .tp-text { font-size: 11px; white-space: nowrap; }
.stat__num {
  font-family: var(--font-head);
  font-weight: 700; font-size: 20px; line-height: 1;
  color: var(--gold-light);
}
.stat__label { font-size: 10px; font-weight: 600; line-height: 1.15; }

/* Form */
.loan-form {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 20px;
}
.loan-form__label { font-weight: 700; font-size: 17px; }
.loan-form__help { margin: 0; font-size: 14px; color: var(--muted); }

/* Mobile: the caption floats inside the full-width box, like the reference. */
.amount-wrap { position: relative; display: flex; align-items: center; gap: 26px; }
.amount-wrap__caption {
  position: absolute; left: 15px; top: 10px; z-index: 1;
  display: flex; gap: 4px;
  font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1;
  pointer-events: none;
}
.amount-field {
  position: relative; flex: 1 1 auto; min-width: 0;
  height: 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.amount-field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.amount-field__prefix {
  position: absolute; left: 0; top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-body); font-weight: 600; font-size: 42px; line-height: 1;
  color: var(--green);
  pointer-events: none;
}
.amount-field__input {
  width: 100%; height: 100%; padding: 22px 14px 0;
  border: 0; outline: 0; background: transparent;
  font: 600 30px var(--font-head); color: var(--green);
  text-align: left;
}

.presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.preset {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 62px; padding: 10px 4px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.preset:hover { border-color: var(--gold); }
.preset.is-selected { border-color: var(--gold); background: var(--gold-tint); }
.preset__cap { font-size: 12px; color: var(--muted); }
.preset__val {
  font-family: var(--font-head);
  font-weight: 600; font-size: 22px; color: var(--green);
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; margin-top: 4px;
  border: 0; border-radius: 999px;
  background: linear-gradient(90deg, #0F3D2E, #1E7A55, #0F3D2E);
  background-size: 200% 100%;
  color: #fff;
  font: 700 18px var(--font-body);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 61, 46, .3);
  animation: shift 3s linear infinite;
  transition: transform .2s, box-shadow .2s;
}
@keyframes shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 61, 46, .4); }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Trust row */
.trust {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-top: 20px;
}
.trustpilot {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; text-decoration: none; color: var(--text);
}
.tp-stars { width: 98px; height: 18px; }
.tp-text { font-size: 13px; font-weight: 600; }
.tp-star { color: var(--tp-green); }

.badges {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin: 0; padding: 0; list-style: none;
}
.badges li {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--green);
}

/* Press strip */
.press { text-align: center; }
.press__inner {
  padding: 18px 20px 20px;
  background: #EEF0F2;
}
.press__label {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0 0 12px;
  font-size: 11px; font-weight: 600; letter-spacing: .14em;
  color: var(--green);
}
.press__logos {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px 18px;
  margin: 0; padding: 0; list-style: none;
}
.press__logos li { display: flex; align-items: center; }
.press__logos li + li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; margin-right: 18px;
}
.press__logos img {
  width: auto; max-width: 140px;
}

/* Disclaimers footer */
.disclaimers {
  display: flex; flex-direction: column; gap: 12px;
  padding: 24px 20px 28px;
  font-size: 12px; line-height: 1.65; color: var(--muted);
}
.disclaimers p { margin: 0; }
.disclaimers strong { color: var(--text); }
.disclaimers a { color: var(--green); font-weight: 400; text-decoration: underline; text-decoration-color: var(--gold); }
.disclaimers a:hover { color: #7A5A18; }
.footer-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px;
  margin-top: 8px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links a { font-size: 13px; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.disclaimers .copyright { margin: 0; color: var(--green); }
.disclaimers--dark { background: #08251B; color: rgba(255, 255, 255, .72); }
.disclaimers--dark strong { color: #fff; }
.disclaimers--dark a { color: var(--gold-light); text-decoration-color: var(--gold); }
.disclaimers--dark a:hover { color: #fff; }
.disclaimers--dark .footer-bar { border-top-color: rgba(255, 255, 255, .15); }
.disclaimers--dark .copyright { color: rgba(255, 255, 255, .72); }

/* Inner pages */
.page-hero { padding: 16px 20px 8px; }
.page-hero__title {
  font-family: var(--font-head);
  font-weight: 600; font-size: 38px; line-height: 1; letter-spacing: -.01em;
  color: var(--green); margin: 0 0 12px; text-wrap: pretty;
}
.page-hero__sub { margin: 0; font-size: 16px; color: var(--muted); text-wrap: pretty; }

.page-body { padding: 16px 20px 24px; }
.page-body h2 {
  font-family: var(--font-head);
  font-weight: 600; font-size: 28px; line-height: 1.05; letter-spacing: -.01em;
  color: var(--green); margin: 32px 0 10px;
}
.page-body h2:first-child { margin-top: 8px; }
.page-body h3 {
  font-family: var(--font-head);
  font-weight: 600; font-size: 21px; line-height: 1.1;
  color: var(--green); margin: 22px 0 8px;
}
.page-body p { margin: 0 0 14px; font-size: 16px; line-height: 1.65; }
.page-body ul { margin: 0 0 14px; padding-left: 20px; }
.page-body li { margin-bottom: 6px; font-size: 16px; line-height: 1.6; }
.page-body a { color: var(--green); font-weight: 600; }
.page-body .lead { font-size: 18px; line-height: 1.55; }
.page-body .note {
  padding: 14px 16px; margin: 0 0 18px;
  background: var(--gold-tint); border-radius: 8px;
  font-size: 15px;
}
.page-body .note p { font-size: 15px; }
.page-body .note p:last-child { margin-bottom: 0; }
.page-body :target { scroll-margin-top: 24px; }
.page-body h2:target { color: var(--gold); }
.legal-body p, .legal-body li { font-size: 15px; }

.jump {
  margin: 0 0 18px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.jump__title { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.jump ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.jump li { margin: 0; }
.jump a { font-size: 14px; text-decoration: none; }
.jump a:hover { text-decoration: underline; }

.cost-table__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; }
.cost-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.cost-table th, .cost-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.cost-table th { background: var(--green); color: #fff; font-weight: 600; font-size: 13px; }
.cost-table tr:nth-child(even) td { background: var(--surface); }

.btn-link {
  display: inline-block; padding: 14px 32px; margin: 8px 0 0;
  background: var(--green); color: #fff; text-decoration: none;
  border-radius: 999px; font-weight: 600; font-size: 16px;
}
.page-body a.btn-link { color: #fff; }
.btn-link:hover { background: var(--green-hover); color: #fff; }

/* About */
.about-intro { display: grid; gap: 20px; align-items: center; margin-bottom: 8px; }
.about-intro__media { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.about-intro__media .media__ring { left: 10px; top: 10px; width: 200px; height: 200px; }
.about-intro__media .media__figure {
  left: -10px; top: -40px;
  width: 240px; height: 250px;
  clip-path: path("M0 0 H240 V150 H220 A100 100 0 0 1 20 150 H0 Z");
}
.about-intro__media .media__photo { height: 230px; }
.about-intro__media .media__orbit { width: 260px; height: 260px; left: -20px; top: -20px; }
.about-intro__media .media__orbit span:nth-child(1) { width: 22px; height: 22px; margin-left: -11px; }
.about-intro__media .media__orbit span:nth-child(3) { width: 16px; height: 16px; margin-left: -8px; }
.about-steps { display: grid; gap: 12px; margin: 0 0 18px; }
.about-step {
  padding: 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
}
.about-step__n { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--gold); line-height: 1; }
.about-step h3 { margin: 6px 0 6px; }
.about-step p { margin: 0; font-size: 15px; }

/* Contact */
.contact-layout { display: grid; gap: 24px; }
.contact-points { list-style: none; padding: 0; margin: 0 0 8px; }
.contact-points li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.contact-points img { flex: none; margin-top: 2px; }
.contact-points b { display: block; color: var(--green); }
.contact-points span span { display: block; font-size: 14px; color: var(--muted); }
.contact-card {
  padding: 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
}
.contact-card h2 { margin-top: 0; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form > div { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; }
.inp {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
  font: 400 16px var(--font-body);
}
.inp:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
textarea.inp { min-height: 150px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-message { padding: 14px 16px; margin-bottom: 16px; border-radius: 8px; font-size: 15px; }
.form-message h3 { margin: 0 0 6px; }
.form-message ul { margin: 0; padding-left: 18px; }
.form-message--success { background: rgba(0, 182, 122, .12); border: 1px solid rgba(0, 182, 122, .4); }
.form-message--error { background: rgba(200, 60, 40, .08); border: 1px solid rgba(200, 60, 40, .35); }

/* Apply page */
.apply-page { display: flex; flex-direction: column; min-height: 100vh; }
.apply-page .site-header { justify-content: center; }
.apply-page__body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 20px; font-size: 18px; color: var(--muted); }

/* 404 */
.notfound { text-align: center; padding: 24px 20px 40px; }
.notfound__code { font-family: var(--font-head); font-weight: 700; font-size: 96px; line-height: 1; color: var(--gold); margin: 0; }
.notfound p { max-width: 520px; margin-left: auto; margin-right: auto; }

/* Desktop */
@media (min-width: 900px) {
  .site-header {
    max-width: 1120px; margin: 0 auto;
    justify-content: flex-start;
    padding: 28px 40px 8px;
  }
  .logo { height: 51px; }

  .hero {
    max-width: 1120px; margin: 0 auto;
    padding: 32px 40px 56px;
    display: grid;
    grid-template-columns: 500px minmax(0, 1fr);
    gap: 72px;
    align-items: center;
  }
  .hero__copy { display: block; }
  .hero__media--mobile { display: none; }
  .hero__media--desktop {
    display: flex; align-items: center; justify-content: center;
    height: 520px;
  }

  .hero__title { font-size: 60px; line-height: .98; margin-bottom: 14px; }
  .hero__sub { font-size: 18px; line-height: 1.5; margin-bottom: 28px; }
  .loan-form { margin-top: 0; }
  .amount-wrap { justify-content: flex-start; }
  .amount-wrap__caption {
    position: static; flex: none; flex-direction: column; align-items: center; gap: 0;
    font-weight: 600; pointer-events: auto;
  }
  .amount-wrap__cap-loan { font-size: 21px; font-weight: 400; letter-spacing: .01em; }
  .amount-wrap__cap-amount { font-size: 13px; margin-top: 3px; }
  .amount-field { flex: 0 1 170px; height: 64px; }
  .amount-field__input { padding: 0 18px; font-size: 34px; }
  .presets { gap: 10px; }
  .preset { min-height: 64px; }

  .trust { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 28px; margin-top: 22px; }

  .media__outer {
    position: absolute; left: 50%; top: 50%;
    width: 464px; height: 464px; margin: -232px 0 0 -232px;
    border-radius: 50%; border: 1px solid rgba(15, 61, 46, .12);
    animation: breathe 6s ease-in-out infinite;
  }
  .media__outer::before {
    content: ""; position: absolute; inset: -34px;
    border-radius: 50%; border: 1px solid rgba(15, 61, 46, .08);
  }
  .hero__media--desktop .media__ring {
    left: 50%; top: 50%;
    width: 420px; height: 420px; margin: -210px 0 0 -210px;
  }
  .hero__media--desktop .media__orbit {
    width: 560px; height: 560px;
    left: 50%; top: 50%; margin: -280px 0 0 -280px;
  }
  .hero__media--desktop .media__orbit span:nth-child(1) { width: 44px; height: 44px; margin-left: -22px; }
  .hero__media--desktop .media__orbit span:nth-child(2) { width: 22px; height: 22px; margin-top: -11px; }
  .hero__media--desktop .media__orbit span:nth-child(3) { width: 30px; height: 30px; margin-left: -15px; }
  .hero__media--desktop .media__orbit span:nth-child(4) { width: 16px; height: 16px; margin-top: -8px; }
  /* Desktop ring: 420px centered in a 520px box, so it spans (50,50)-(470,470).
     Figure box 520 wide, from y=-20 to the ring bottom at y=470. */
  .hero__media--desktop .media__figure {
    left: 50%; top: 50%;
    width: 520px; height: 490px;
    margin: -280px 0 0 -260px;
    clip-path: path("M0 0 H520 V280 H470 A210 210 0 0 1 50 280 H0 Z");
  }
  .hero__media--desktop .media__photo { height: 470px; }
  .hero__media--desktop .media__tp { left: 24px; right: auto; bottom: -12px; width: 260px; justify-content: center; }
  .hero__media--desktop .media__tp .tp-stars { width: 98px; height: 18px; }
  .hero__media--desktop .media__tp .tp-text { font-size: 13px; }
  .hero__media--desktop .stat {
    left: 24px; right: auto; bottom: 28px; width: 260px; justify-content: center;
    gap: 12px; padding: 14px 18px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(15, 61, 46, .2);
  }
  .hero__media--desktop .stat__num { font-size: 40px; }
  .hero__media--desktop .stat__label { font-size: 14px; line-height: 1.25; max-width: none; }

  .press__inner {
    padding: 22px 40px;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 40px;
  }
  .press__label { margin: 30px 0 14px; white-space: nowrap; }
  .press__logos { gap: 40px; }
  .press__logos li + li::before { margin-right: 40px; }
  .press__logos img { max-width: 160px; }

  .disclaimers { padding: 36px 40px 40px; line-height: 1.7; align-items: center; }
  .disclaimers > * { max-width: 1040px; width: 100%; }

  .page-hero { max-width: 1120px; margin: 0 auto; padding: 32px 40px 8px; }
  .page-hero__title { font-size: 56px; }
  .page-hero__sub { font-size: 18px; }
  .page-body { max-width: 1120px; margin: 0 auto; padding: 24px 40px 56px; }
  .page-body h2 { font-size: 32px; }
  .about-intro { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
  .about-intro__media { width: 320px; height: 320px; margin: 0; }
  .about-intro__media .media__ring { width: 300px; height: 300px; }
  .about-intro__media .media__figure {
    left: -20px; top: -60px;
    width: 360px; height: 370px;
    clip-path: path("M0 0 H360 V220 H330 A150 150 0 0 1 30 220 H0 Z");
  }
  .about-intro__media .media__photo { height: 340px; }
  .about-intro__media .media__orbit { width: 380px; height: 380px; left: -30px; top: -30px; }
  .about-intro__media .media__orbit span:nth-child(1) { width: 30px; height: 30px; margin-left: -15px; }
  .about-intro__media .media__orbit span:nth-child(3) { width: 20px; height: 20px; margin-left: -10px; }
  .about-steps { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .contact-layout { grid-template-columns: minmax(0, 1fr) 520px; gap: 56px; align-items: start; }
  .contact-card { padding: 28px; }
}

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