/* ==========================================================================
   StudyLoan — quiet luxury fintech on dark
   ========================================================================== */

:root {
  /* ink */
  --ink-950: #07070A;
  --ink-900: #0C0D12;
  --ink-800: #14151C;
  --ink-700: #1C1E28;
  --ink-on-gold: #0B0B0F;

  /* lines */
  --line: rgba(244, 241, 234, 0.10);
  --line-strong: rgba(244, 241, 234, 0.18);

  /* text */
  --text: #F4F1EA;
  --text-dim: rgba(244, 241, 234, 0.68);
  --text-faint: rgba(244, 241, 234, 0.46);

  /* gold */
  --gold-200: #F8EBC8;
  --gold-300: #F3DFA6;
  --gold-400: #E8C874;
  --gold-500: #D4AF5A;
  --gold-600: #B8903A;
  --gold-glow: rgba(232, 200, 116, 0.20);
  --gold-line: rgba(232, 200, 116, 0.35);
  --gold-fill-soft: rgba(232, 200, 116, 0.08);

  /* status */
  --ok: #8FDDB9;
  --err: #FF9A8F;

  /* surfaces */
  --glass: rgba(12, 13, 18, 0.86);
  --card-grad: linear-gradient(180deg, rgba(244, 241, 234, 0.035), rgba(244, 241, 234, 0.012));
  --gold-metal: linear-gradient(135deg, var(--gold-200), var(--gold-400) 45%, var(--gold-600));

  /* type */
  --font-display: "Cormorant", Georgia, "Times New Roman", serif;
  --font-ui: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
}

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

/* atmosphere: radial gold glow + fine noise grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 50% -8%, var(--gold-glow), transparent 65%),
    radial-gradient(700px 500px at 92% 8%, rgba(232, 200, 116, 0.05), transparent 70%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='2'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

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

h1,
h2,
h3,
p,
ul,
ol,
fieldset {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

fieldset {
  border: 0;
  min-width: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(232, 200, 116, 0.28);
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(46px, 7vw, 108px);
  line-height: 1;
  margin: 18px 0 0;
}

h2 {
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.05;
  margin: 16px 0 0;
}

h3 {
  font-size: clamp(22px, 2vw, 27px);
  line-height: 1.25;
}

section {
  scroll-margin-top: 96px;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.section {
  padding: clamp(72px, 9vw, 128px) 0;
  position: relative;
}

.hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line) 22%, var(--gold-line) 78%, transparent);
  opacity: 0.55;
}

/* ---------- utilities ---------- */

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  background: var(--gold-metal);
  color: var(--ink-on-gold);
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  transform: translateY(-64px);
  transition: transform 200ms var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 2px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold-500);
  flex: none;
}

.section-note {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--text-dim);
  font-size: 15.5px;
}

.section-note.left {
  margin-top: 20px;
}

.text-link {
  color: var(--gold-300);
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 1px;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
  overflow-wrap: anywhere;
}

.text-link:hover {
  color: var(--gold-200);
  border-bottom-color: var(--gold-400);
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 200ms var(--ease-out), box-shadow 220ms var(--ease-out),
    background-color 200ms var(--ease-out), border-color 200ms var(--ease-out),
    color 200ms var(--ease-out), filter 200ms var(--ease-out);
}

.btn-gold {
  background: var(--gold-metal);
  color: var(--ink-on-gold);
  border: 1px solid rgba(244, 241, 234, 0.14);
}

.btn-gold:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 14px 38px var(--gold-glow), 0 3px 10px rgba(0, 0, 0, 0.35);
}

.btn-gold:active {
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow: 0 6px 18px var(--gold-glow);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--gold-500);
  background: rgba(244, 241, 234, 0.04);
  transform: translateY(-1px);
}

.btn-lg {
  min-height: 54px;
  padding: 0 32px;
}

.btn-nav {
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
}

[data-magnetic] {
  translate: var(--mx, 0) var(--my, 0);
  transition: translate 180ms var(--ease-out), transform 200ms var(--ease-out),
    box-shadow 220ms var(--ease-out), filter 200ms var(--ease-out);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 260ms var(--ease-out), border-color 260ms var(--ease-out),
    backdrop-filter 260ms var(--ease-out);
}

.site-header.is-scrolled {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: 0.01em;
  color: var(--text);
  padding: 8px 0;
}

.wordmark-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-metal);
  box-shadow: 0 0 10px var(--gold-glow);
  align-self: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 13px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 999px;
  transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out);
  position: relative;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(244, 241, 234, 0.05);
}

.nav-link.is-active {
  color: var(--gold-300);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 7px;
  height: 1px;
  background: var(--gold-400);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

.menu-toggle:hover {
  border-color: var(--gold-500);
  background: rgba(244, 241, 234, 0.04);
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* ---------- mobile menu ---------- */

.mobile-menu {
  position: fixed;
  z-index: 90;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 24px 40px;
  background: rgba(7, 7, 10, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  translate: 0 -12px;
  transition: opacity 240ms var(--ease-out), translate 240ms var(--ease-out);
  overflow-y: auto;
}

.mobile-menu.open {
  opacity: 1;
  translate: 0 0;
}

.mobile-links li + li {
  border-top: 1px solid var(--line);
}

.mobile-links .nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 4px;
  font-size: 17px;
  border-radius: 0;
}

.mobile-links .nav-link.is-active::after {
  left: 4px;
  right: auto;
  width: 24px;
  bottom: 10px;
}

.mobile-apply {
  width: 100%;
  margin-top: 26px;
}

body.menu-open {
  overflow: hidden;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 152px 0 72px;
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: 40px;
  align-items: center;
}

.hero-sub {
  margin-top: 26px;
  max-width: 52ch;
  font-size: 18px;
  color: var(--text-dim);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
}

.h1-accent {
  font-style: italic;
  font-weight: 500;
  background: var(--gold-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-art {
  position: relative;
  min-height: 560px;
  height: 100%;
}

.hero-glow {
  position: absolute;
  inset: 4% 2%;
  background: radial-gradient(closest-side, var(--gold-glow), transparent 72%);
  z-index: 0;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* CSS-only fallback card (shown only when WebGL is unavailable) */
.css-card {
  display: none;
}

html.no-webgl .hero-canvas {
  display: none;
}

html.no-webgl .css-card {
  display: flex;
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: auto;
  width: min(72%, 520px);
  height: fit-content;
  aspect-ratio: 3.4 / 2.15;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  padding: 5.5% 7%;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.25), transparent 40%),
    var(--gold-metal);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    0 12px 40px var(--gold-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: rotate(-6deg);
}

.css-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8%;
}

.css-chip {
  width: 34px;
  height: 26px;
  border-radius: 6px;
  border: 1.5px solid var(--ink-on-gold);
  opacity: 0.65;
}

.css-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 26px);
  color: var(--ink-on-gold);
  opacity: 0.9;
}

.css-card-line {
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--ink-on-gold);
  opacity: 0.75;
}

.css-card-range {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 46px);
  color: var(--ink-on-gold);
  opacity: 0.9;
  line-height: 1;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: clamp(44px, 6vw, 76px);
}

.stat-tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-grad);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.stat-tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 3.6vw, 46px);
  line-height: 1;
  color: var(--gold-300);
}

.stat-value-range {
  font-size: clamp(24px, 2.6vw, 34px);
  padding-top: 6px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- offer cards ---------- */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 52px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-grad);
  padding: 30px 28px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform 240ms var(--ease-out), border-color 240ms var(--ease-out),
    box-shadow 240ms var(--ease-out);
  will-change: transform;
}

.card:hover,
.card:focus-within {
  border-color: var(--line-strong);
  --ty: -3px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--gold-fill-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold-300);
  margin-bottom: 22px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.1;
}

.card p {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--text-dim);
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
  counter-reset: step;
}

.step {
  position: relative;
}

.step + .step {
  border-left: 1px solid var(--line);
  padding-left: 32px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  color: var(--gold-300);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  background: var(--gold-fill-soft);
}

.step h3 {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
}

.step p {
  margin-top: 10px;
  font-size: 15.5px;
  color: var(--text-dim);
  max-width: 40ch;
}

/* ---------- repayment calculator ---------- */

.calc {
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--ink-900), var(--ink-950));
  padding: clamp(26px, 4vw, 44px);
  max-width: 880px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.calc-row + .calc-row {
  margin-top: 34px;
}

.calc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.calc-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.calc-badge {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  color: var(--gold-300);
}

/* range slider */
.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-faint);
}

input[type="range"].range,
#amount-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

#amount-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-400) var(--fill, 20%), var(--ink-700) var(--fill, 20%));
}

#amount-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--gold-metal);
  border: 2px solid var(--ink-950);
  box-shadow: 0 0 0 1px var(--line-strong), 0 4px 16px var(--gold-glow);
  transition: transform 160ms var(--ease-out);
}

#amount-range:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

#amount-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--ink-700);
}

#amount-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--gold-400);
}

#amount-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold-metal);
  border: 2px solid var(--ink-950);
  box-shadow: 0 0 0 1px var(--line-strong), 0 4px 16px var(--gold-glow);
}

/* segmented control */
.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-800);
  margin-top: 14px;
}

.segment {
  position: relative;
}

.segment input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.segment span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 180ms var(--ease-out), background-color 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

.segment:hover span {
  color: var(--text);
}

.segment input:checked + span {
  background: var(--gold-metal);
  color: var(--ink-on-gold);
  font-weight: 600;
  box-shadow: 0 6px 20px var(--gold-glow);
}

.segment input:focus-visible + span {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
}

/* outputs */
.calc-out {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.out-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.out {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.out-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.out-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1;
  color: var(--text);
}

.out-monthly {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding: 24px 26px;
  border-radius: 16px;
  border: 1px solid var(--gold-line);
  background: linear-gradient(120deg, rgba(232, 200, 116, 0.07), transparent 60%);
}

.monthly-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 6vw, 64px);
  line-height: 1;
  color: var(--gold-200);
}

/* ---------- what you'll need ---------- */

.need-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.need-list {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.need-list li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.need-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--gold-line);
  background: var(--gold-fill-soft);
  color: var(--gold-300);
}

.need-icon svg {
  width: 18px;
  height: 18px;
}

.need-list h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
}

.need-list p {
  margin-top: 4px;
  font-size: 15.5px;
  color: var(--text-dim);
}

.need-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--ink-900), var(--ink-950));
  padding: clamp(28px, 3vw, 40px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 110px;
}

.need-panel h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
}

.need-panel-text {
  margin-top: 10px;
  font-size: 15.5px;
  color: var(--text-dim);
}

.email-address {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2vw, 28px);
  color: var(--gold-200);
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 2px;
  overflow-wrap: anywhere;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.email-address:hover {
  color: var(--gold-300);
  border-bottom-color: var(--gold-400);
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  min-height: 44px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out),
    background-color 180ms var(--ease-out);
}

.copy-btn:hover {
  border-color: var(--gold-500);
  color: var(--text);
  background: rgba(244, 241, 234, 0.04);
}

.copy-btn svg {
  width: 16px;
  height: 16px;
}

.copy-btn.is-copied {
  border-color: var(--gold-500);
  color: var(--gold-300);
}

.copy-status {
  font-size: 13.5px;
  color: var(--ok);
  font-weight: 500;
}

.need-panel-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-faint);
}

/* ---------- terms ---------- */

.terms-panel {
  border: 1px solid var(--gold-line);
  border-radius: 26px;
  background:
    linear-gradient(160deg, rgba(232, 200, 116, 0.06), transparent 42%),
    var(--ink-900);
  padding: clamp(34px, 5vw, 64px);
  max-width: 920px;
  margin-inline: auto;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.terms-sentence {
  margin-top: 28px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.15;
  color: var(--gold-200);
  text-wrap: balance;
}

.terms-list {
  margin-top: 36px;
  counter-reset: term;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 68ch;
}

.terms-list li {
  counter-increment: term;
  position: relative;
  padding-left: 44px;
  font-size: 16px;
  color: var(--text-dim);
}

.terms-list li::before {
  content: counter(term);
  position: absolute;
  left: 0;
  top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  color: var(--gold-300);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 800px;
  margin-top: 40px;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:first-child {
  border-top: 1px solid var(--line);
}

.faq-heading {
  font-size: inherit;
  font-weight: inherit;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 56px;
  padding: 18px 2px;
  text-align: left;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  transition: color 180ms var(--ease-out);
}

.faq-q:hover {
  color: var(--gold-300);
}

.faq-chevron {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--gold-400);
  transition: transform 280ms var(--ease-out);
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms var(--ease-out);
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}

.faq-a-inner {
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s 320ms;
}

.faq-item.is-open .faq-a-inner {
  visibility: visible;
  transition: visibility 0s 0s;
}

.faq-a-inner p {
  padding: 2px 44px 24px 2px;
  font-size: 15.5px;
  color: var(--text-dim);
  max-width: 64ch;
}

/* ---------- contact / form ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 5vw, 88px);
  align-items: start;
}

.contact-direct {
  margin-top: 34px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-grad);
}

.contact-alt {
  margin-top: 18px;
  font-size: 14.5px;
  color: var(--text-faint);
}

.apply-form {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--ink-900), var(--ink-950));
  padding: clamp(26px, 3.5vw, 40px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row + .field,
.field + .form-row,
.form-row + .form-row,
.apply-form > .field {
  margin-top: 20px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label,
.field legend {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: block;
}

.field .optional {
  color: var(--text-faint);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--ink-800);
  color: var(--text);
  font-size: 15px;
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: rgba(244, 241, 234, 0.28);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--err);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23E8C874'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m6%209%206%206%206-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.fee-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fee-option {
  position: relative;
}

.fee-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.fee-option span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--ink-800);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out),
    background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.fee-option:hover span {
  border-color: rgba(244, 241, 234, 0.28);
  color: var(--text);
}

.fee-option input:checked + span {
  border-color: var(--gold-500);
  color: var(--gold-200);
  background: var(--gold-fill-soft);
  box-shadow: 0 0 0 1px var(--gold-line) inset;
}

.fee-option input:focus-visible + span {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
}

.field-error {
  margin-top: 7px;
  font-size: 13.5px;
  color: var(--err);
}

.field-error[hidden] {
  display: none;
}

.form-actions {
  margin-top: 28px;
}

.form-confirm {
  margin-top: 22px;
  border: 1px solid var(--gold-line);
  border-radius: 14px;
  background: rgba(232, 200, 116, 0.06);
  padding: 18px 22px;
  font-size: 15px;
  color: var(--text);
}

.form-confirm:focus {
  outline: none;
}

.form-confirm[hidden] {
  display: none;
}

/* grouped form sections, conditional rows, consent, copyable confirmation */

.form-intro {
  font-size: 14.5px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.req {
  color: var(--gold-400);
}

.form-section {
  margin-top: 30px;
}

/* the display rules above outrank the browser's default for [hidden], so state it here */
.form-row[hidden],
.field[hidden] {
  display: none;
}

.form-section > legend {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 20px;
}

.form-section > legend::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.form-section > legend .optional {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-faint);
  font-weight: 400;
}

.form-section > .form-row + .field,
.form-section > .field + .form-row,
.form-section > .form-row + .form-row,
.form-section > .field + .field,
.apply-form > .form-tail {
  margin-top: 20px;
}

.field-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: block;
}

.field-hint {
  margin-top: 7px;
  font-size: 13.5px;
  color: var(--text-faint);
}

.field-hint + .field-error {
  margin-top: 4px;
}

.field-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 12px;
  margin-top: 24px;
}

.field-check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--gold-500);
  cursor: pointer;
}

.field-check input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
}

.field-check label {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-dim);
  cursor: pointer;
}

.field-check .field-error {
  grid-column: 2;
}

.form-privacy {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-faint);
}

.form-confirm p + p {
  margin-top: 10px;
}

.confirm-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 13.5px;
  color: var(--text-dim);
}

#confirm-text {
  width: 100%;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

.form-confirm .copy-btn {
  margin-top: 12px;
}

.next-steps {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.next-steps li {
  display: flex;
  gap: 16px;
}

.next-steps .step-num {
  flex: none;
  width: 40px;
  height: 40px;
  font-size: 17px;
}

.next-steps h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
}

.next-steps p {
  margin-top: 5px;
  font-size: 14.5px;
  color: var(--text-dim);
  max-width: 40ch;
}

@media (max-width: 560px) {
  .field-check {
    grid-template-columns: 20px 1fr;
    column-gap: 10px;
  }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 56px 0 36px;
  background: linear-gradient(180deg, transparent, rgba(232, 200, 116, 0.03));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-tag {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--text-faint);
  max-width: 30ch;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 14.5px;
  color: var(--text-dim);
  transition: color 160ms var(--ease-out);
}

.footer-nav a:hover {
  color: var(--gold-300);
}

.footer-emails p {
  font-size: 14.5px;
  color: var(--text-dim);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-emails a {
  color: var(--gold-300);
  border-bottom: 1px solid var(--gold-line);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
  overflow-wrap: anywhere;
}

.footer-emails a:hover {
  color: var(--gold-200);
  border-bottom-color: var(--gold-400);
}

.footer-legal {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-condition {
  font-size: 13.5px;
  color: var(--text-faint);
}

.footer-copy {
  font-size: 13.5px;
  color: var(--text-faint);
}

/* ---------- reveal on scroll (only when JS runs) ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- responsive ---------- */

@media (max-width: 1140px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }

  .btn-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero {
    padding-top: 128px;
  }

  .hero-art {
    min-height: 420px;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(1200px, 100% - 40px);
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-tile {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
  }

  .stat-value-range {
    padding-top: 0;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .step + .step {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 26px;
  }

  .need-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .need-panel {
    position: static;
  }

  .out-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .offer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-legal {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.14em;
    gap: 10px;
  }

  .hero {
    padding-top: 116px;
  }

  .hero-art {
    min-height: 340px;
  }

  .segmented {
    display: flex;
  }

  .segment {
    flex: 1;
  }

  .segment span {
    width: 100%;
    padding: 0 10px;
  }

  .calc-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .out-monthly {
    flex-direction: column;
    gap: 10px;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .card {
    transform: none !important;
  }

  [data-magnetic] {
    translate: 0 0 !important;
  }

  .skip-link:focus-visible {
    transform: none;
  }
}
