/* Scroll progress */
.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 250;
  width: 3px;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  background: rgba(190, 255, 0, 0.08);
}

.scroll-progress::before {
  content: "";
  display: block;
  width: 100%;
  height: var(--scroll-pct, 0%);
  background: var(--color-accent);
  transition: height 0.08s linear;
}

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-deep);
  border-bottom: var(--border-thin);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4rem;
  padding-block: 0.75rem;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}

.site-header__logo img {
  display: block;
  height: clamp(2rem, 5vw, 2.5rem);
  width: auto;
  max-width: min(200px, 45vw);
}

.site-header__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(206, 206, 206, 0.25);
  background: transparent;
  cursor: pointer;
}

.site-header__toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin-inline: auto;
  background: var(--color-accent);
}

.site-header__nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg-deep);
  border-bottom: var(--border-thin);
  padding: 0.5rem 0 1rem;
}

.site-header__nav.is-open {
  display: flex;
}

.site-header__nav a {
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text-primary);
  opacity: 0.9;
  padding: 0.85rem clamp(1rem, 4vw, 2rem);
  border-top: var(--border-thin);
}

.site-header__nav a:not(.site-header__cta) {
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: color 0.2s ease, background-size 0.3s ease;
}

.site-header__nav a:not(.site-header__cta):hover {
  color: var(--color-accent);
  background-size: 100% 2px;
}

.site-header__cta {
  margin: 0.75rem clamp(1rem, 4vw, 2rem) 0;
  text-align: center;
  background: var(--color-accent);
  color: var(--color-dark) !important;
  border: none;
  opacity: 1 !important;
}

.site-header__cta:hover {
  filter: brightness(1.05);
}

@media (min-width: 768px) {
  .site-header__toggle {
    display: none;
  }

  .site-header__nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static;
    padding: 0;
    border: none;
    gap: 0.25rem;
  }

  .site-header__nav a {
    padding: 0.55rem 1rem;
    border-top: none;
    font-size: 1.15rem;
  }

  .site-header__cta {
    margin: 0 0 0 0.75rem;
    padding: 0.7rem 1.4rem !important;
    font-size: 1.1rem !important;
  }
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  font-size: 1.1rem;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.btn-primary:hover {
  filter: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(190, 255, 0, 0.35);
}

.btn-primary--lg {
  padding: 1rem 2.5rem;
}

.btn-outline-muted {
  background: transparent;
  border-color: var(--color-text-muted);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  text-transform: lowercase;
  padding: 1rem 2rem;
}

/* iPhone device frame (hero peek) */
.iphone-device {
  position: relative;
  width: 100%;
}

.iphone-device__body {
  background: linear-gradient(160deg, #5a5a5a 0%, #2e2e2e 45%, #1f1f1f 100%);
  border: 2px solid #141414;
  border-radius: 42px;
  padding: 11px 9px 13px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 -8px 16px rgba(0, 0, 0, 0.35);
}

.iphone-device__screen {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  aspect-ratio: 390 / 844;
  background: #000;
  line-height: 0;
}

.iphone-device__island {
  position: absolute;
  top: 11px;
  left: 50%;
  z-index: 2;
  width: 88px;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.iphone-device__island::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 10px;
  height: 10px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1a2a4a, #050508 70%);
}

.iphone-device__btn {
  position: absolute;
  z-index: 0;
  background: linear-gradient(90deg, #3d3d3d, #565656 50%, #3d3d3d);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.iphone-device__btn--silent {
  left: -3px;
  top: 108px;
  width: 3px;
  height: 26px;
}

.iphone-device__btn--vol-up {
  left: -3px;
  top: 152px;
  width: 3px;
  height: 44px;
}

.iphone-device__btn--vol-down {
  left: -3px;
  top: 204px;
  width: 3px;
  height: 44px;
}

.iphone-device__btn--power {
  right: -3px;
  top: 168px;
  width: 3px;
  height: 72px;
}

/* Marquee */
.marquee {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background: var(--color-bg-deep);
  height: 48px;
  display: flex;
  align-items: center;
}

.marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: marquee-scroll var(--marquee-duration, 45s) linear infinite;
}

.marquee__segment {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.marquee__content {
  flex-shrink: 0;
  padding-inline: 2.5rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: var(--color-text-primary);
}

@keyframes marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-1 * var(--marquee-distance, 50%)), 0, 0);
  }
}

.marquee--inner {
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
}

.marquee--inner .marquee__content {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

/* Calculator */
.calc {
  position: relative;
  background-color: var(--color-brand);
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.025) 18px,
      rgba(255, 255, 255, 0.025) 19px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 32px,
      rgba(255, 255, 255, 0.02) 32px,
      rgba(255, 255, 255, 0.02) 33px
    );
  color: var(--color-text-primary);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.calc__inner {
  max-width: 900px;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 4vw, 2rem);
}

.calc__label {
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  opacity: 0.8;
}

.calc__sub {
  margin-top: 0.5rem;
  font-size: 1rem;
  opacity: 0.6;
  margin-bottom: 1.25rem;
}

.calc-amount-label {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #fff;
  opacity: 0.85;
}

.calc-amount-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem 2.5rem;
  margin-top: 0.35rem;
}

.calc-amount {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 10vw, 6.5rem);
  font-weight: 700;
  line-height: 0.9;
  color: var(--color-accent);
  margin: 0;
}

.calc-amount__value {
  display: inline-block;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.2s ease, letter-spacing 0.2s ease;
}

.calc-amount__value.is-animating {
  opacity: 0.88;
  letter-spacing: 0.02em;
}

.calc-payment {
  margin: 0;
  text-align: left;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  line-height: 1.2;
  opacity: 0.9;
}

.calc-payment__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.65;
  margin-bottom: 0.2rem;
}

.calc-payment__value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.calc-payment__value.is-ticking {
  color: var(--color-accent);
}

@media (max-width: 599px) {
  .calc-amount-row {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .calc-payment {
    text-align: center;
  }
}

/* App-style slider: thick track, ticks, lime thumb with grip */
.calc-slider-app {
  position: relative;
  width: 100%;
  height: 44px;
  margin-top: 1.5rem;
}

.calc-slider {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.calc-slider-app__visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.14);
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent 11px,
    rgba(255, 255, 255, 0.28) 11px,
    rgba(255, 255, 255, 0.28) 12px
  );
}

.calc-slider-app__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--slider-pct, 0%);
  background: rgba(0, 8, 80, 0.45);
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent 11px,
    rgba(255, 255, 255, 0.18) 11px,
    rgba(255, 255, 255, 0.18) 12px
  );
}

.calc-slider-app__thumb {
  position: absolute;
  top: 50%;
  left: var(--slider-pct, 0%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 28px;
  height: 34px;
  background: var(--color-accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.2s ease;
}

.calc-slider-app.is-active .calc-slider-app__thumb {
  box-shadow:
    0 0 12px var(--color-accent),
    0 0 28px rgba(190, 255, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.25);
}

.calc-slider-app__thumb span {
  display: block;
  width: 2px;
  height: 16px;
  background: var(--color-brand);
}

.calc__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding-inline: 0.15rem;
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  opacity: 0.85;
}

.calc__disclaimer {
  margin-top: 1.25rem;
  max-width: 60ch;
  margin-inline: auto;
  font-size: 0.85rem;
  opacity: 0.5;
  line-height: 1.5;
}

.calc .btn-primary {
  margin-top: 2rem;
}

/* Not a lender */
.not-lender {
  background: var(--color-warning);
  color: #fff;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.not-lender__inner {
  max-width: 700px;
  margin-inline: auto;
  padding-inline: 2rem;
}

.not-lender__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.not-lender h2 {
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  line-height: 0.95;
}

.not-lender__symbol {
  width: 80px;
  height: 80px;
  opacity: 0.4;
  flex-shrink: 0;
}

.not-lender p {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.55;
}

.not-lender__caption {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

@media (max-width: 767px) {
  .not-lender__symbol {
    display: none;
  }
}

/* Footer */
.site-footer {
  background: var(--color-bg-deep);
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-brand__logo {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
}

.footer-brand__logo img {
  display: block;
  height: 2.75rem;
  width: auto;
  max-width: 220px;
}

.footer-brand__tag {
  margin-top: 0.5rem;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-col h4 {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-contact__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.footer-contact p,
.footer-contact a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  text-transform: none;
  opacity: 1;
}

.footer-contact a {
  color: var(--color-accent);
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-disclaimer {
  margin-top: 2rem;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
}

.footer-disclaimer p {
  margin: 0 0 0.85rem;
}

.footer-disclaimer p:last-child {
  margin-bottom: 0;
}

.footer-disclaimer strong {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.footer-disclaimer a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.footer-disclaimer a:hover {
  color: var(--color-text-primary);
}

.footer-bar {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  opacity: 0.5;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

/* App badge */
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-dark);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 0.75rem;
  border: 1px solid #333;
  border-radius: var(--radius);
}

.app-badge strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
}

.iphone-device--hiw {
  margin-inline: auto;
}
