/* Self-hosted OFL fonts. Headlines use the visitor's Georgia; Gelasio shares
   its metrics and is only downloaded where Georgia is missing (Android,
   Linux), so the drawn headline keeps its proportions. Figtree stands in for
   the main site's Area Normal. */
@font-face {
  font-family: 'Gelasio';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/gelasio-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Gelasio';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/gelasio-italic-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/figtree-latin.woff2') format('woff2');
}

:root {
  /* creditstephy.com */
  --ink: #202020;
  --muted: #5d5a55;
  --paper: #fbfaf8;
  --stone: #f2f0ee;
  --line: #dddbd7;
  --brown: #8a5a3b;
  /* The client's plan card */
  --card: #221f1b;
  --card-raised: #2e2a24;
  --card-line: #48413a;
  --card-text: #f6f2ea;
  --card-muted: #bdb5a7;
  --gold: #c9a85c;
  --gold-hover: #d8b96e;
  --error-bg: #fbece6;
  --error: #8b3419;

  /* The original preview's headline face, kept for the large headlines. */
  --headline: Georgia, 'Gelasio', 'Times New Roman', serif;
  --home: #a87759;
  --sans: 'Figtree', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  /* Lines header and footer up with the 1360px content column. */
  --edge: max(var(--gutter), calc((100vw - 1360px) / 2 + var(--gutter)));
}

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

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

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

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

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

:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  background: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  top: 10px;
}

/* Header and footer */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
  padding: 0 var(--edge);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand img {
  width: 172px;
}

.header-link,
.site-footer a {
  font-size: 14px;
  text-decoration: none;
  text-underline-offset: 4px;
}

.header-link:hover,
.site-footer a:hover {
  text-decoration: underline;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: center;
  padding: 32px var(--edge);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  margin-left: auto;
  color: var(--ink);
}

/* Landing hero: headline over the photo on the left, plan card on the right */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "intro card"
    "photo card";
  gap: 0 clamp(36px, 5vw, 80px);
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(28px, 3.4vw, 52px) var(--gutter) clamp(56px, 6vw, 96px);
}

.hero-intro {
  grid-area: intro;
}

.plan-card {
  grid-area: card;
  align-self: start;
}

.hero-photo {
  grid-area: photo;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--brown);
  font-size: 15px;
}

h1 {
  font-family: var(--headline);
  font-weight: 400;
  font-size: clamp(44px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}

/* The landing headline is SVG text so each letter can be traced like ink. */
.headline {
  max-width: 640px;
  margin-top: 18px;
}

.headline svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.headline text {
  font-family: var(--headline);
  font-size: 100px;
  letter-spacing: -5.5px;
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 0;
}

.headline .headline-home {
  font-style: italic;
  fill: var(--home);
  stroke: var(--home);
}

.lead {
  max-width: 34em;
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-photo {
  position: relative;
  min-height: 280px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--stone);
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 10%;
}

.hero-photo figcaption {
  position: absolute;
  right: 22px;
  bottom: 18px;
  left: 22px;
  display: flex;
  justify-content: space-between;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}

.hero-photo figcaption i {
  margin-left: 6px;
  color: #e9c0a1;
  font-style: normal;
}

/* Entrance: the headline is written letter by letter, then the rest
   cascades in reading order. intro.js adds .intro/.intro-play and skips
   both for reduced motion, so the page is static without it. */

.intro .headline tspan {
  fill-opacity: 0;
  stroke-width: 1.4px;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
}

.intro-play .headline tspan {
  animation:
    ink-trace .85s cubic-bezier(.45, 0, .25, 1) calc(var(--i) * 55ms + 120ms) both,
    ink-fill .5s ease-out calc(var(--i) * 55ms + 620ms) both;
}

.intro .rise,
.intro .reveal,
.intro .dark-panel .plan-steps li {
  opacity: 0;
}

.intro-play .rise {
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) var(--d) both;
}

.intro-play .reveal {
  animation: reveal 1.1s cubic-bezier(.2, .7, .2, 1) var(--d) both;
}

.intro-play .dark-panel .plan-steps li {
  animation: rise .6s cubic-bezier(.2, .7, .2, 1) calc(1.45s + var(--step, 0) * 110ms) both;
}

.plan-steps li:nth-child(2) {
  --step: 1;
}

.plan-steps li:nth-child(3) {
  --step: 2;
}

@keyframes ink-trace {
  from {
    stroke-dashoffset: 900;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes ink-fill {
  from {
    fill-opacity: 0;
    stroke-width: 1.4px;
  }

  to {
    fill-opacity: 1;
    stroke-width: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: scale(1.03);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* The plan card follows the client's draft: charcoal panel, gold action. */

.plan-card {
  padding: clamp(24px, 2.4vw, 32px);
  border-radius: 20px;
  background: var(--card);
  color: var(--card-text);
  box-shadow: 0 24px 48px -24px rgba(34, 31, 27, .45);
}

.plan-card-head h2,
.widget-card-head h2 {
  font-family: var(--headline);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-align: center;
}

.plan-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 600;
}

.dark-panel .plan-steps {
  color: var(--card-muted);
}

.plan-card .plan-steps {
  margin-top: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-line);
}

.plan-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: .62;
}

.plan-steps li.is-current,
.plan-steps li.is-done {
  opacity: 1;
}

.plan-step-number {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.dark-panel .is-current,
.dark-panel .is-done {
  color: var(--card-text);
}

.dark-panel .is-done .plan-step-number {
  border-color: var(--gold);
  color: var(--gold);
}

.dark-panel .is-current .plan-step-number {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--card);
}

.plan-card-step {
  margin-top: 18px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

.plan-card-copy {
  margin-top: 6px;
  color: var(--card-muted);
  font-size: 15px;
  line-height: 1.6;
}

.referral {
  margin-top: 14px;
}

.referral summary {
  display: inline-block;
  color: var(--gold);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 92, .45);
  text-underline-offset: 4px;
}

.referral summary::-webkit-details-marker {
  display: none;
}

.referral[open] summary {
  text-decoration: none;
}

.text-input {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 13px 16px;
  border: 1px solid var(--card-line);
  border-radius: 12px;
  background: #1a1815;
  color: #fff;
  font-size: 16px;
}

.text-input::placeholder {
  color: #948c80;
}

.text-input:focus-visible,
.plan-card :focus-visible {
  outline-color: var(--gold);
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.55;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid #8f8778;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.check input::after {
  content: '';
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid var(--card);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
}

.check input:checked {
  border-color: var(--gold);
  background: var(--gold);
}

.check input:checked::after {
  transform: rotate(45deg) scale(1);
}

.check:hover input:not(:checked) {
  border-color: var(--card-text);
}

.check-required {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--card-line);
  color: var(--card-text);
}

.check a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 92, .5);
  text-underline-offset: 3px;
}

.check a:hover {
  text-decoration-color: var(--gold);
}

.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}

.primary-button {
  background: var(--ink);
  color: #fff;
}

.primary-button:hover {
  background: #3a3733;
}

.primary-button:disabled {
  opacity: .6;
  cursor: wait;
}

.plan-card .primary-button {
  margin-top: 18px;
  background: var(--gold);
  color: #1c1915;
}

.plan-card .primary-button:hover {
  background: var(--gold-hover);
}

.secondary-button {
  display: inline-flex;
  width: auto;
  min-height: 50px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.secondary-button:hover {
  background: var(--stone);
}

.billing-note {
  margin-top: 12px;
  color: var(--card-muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.billing-note strong {
  color: var(--card-text);
  font-weight: 600;
}

.form-error {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--error-bg);
  color: var(--error);
  font-size: 14px;
  line-height: 1.5;
}

/* What happens next */

.how-it-works {
  padding: clamp(48px, 6vw, 88px) var(--gutter);
  background: var(--stone);
}

.how-it-works > * {
  max-width: 1216px;
  margin-left: auto;
  margin-right: auto;
}

.how-it-works h2 {
  font-family: var(--headline);
  font-weight: 400;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.how-it-works ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: 36px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how-it-works li {
  position: relative;
  counter-increment: step;
  padding-top: 20px;
}

.how-it-works li::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: #cfccc6;
  transform-origin: left;
}

/* Scroll reveal: app.js adds .scroll-reveal, then .in-view to each part as it
   scrolls on screen. Each step draws its rule, then its text rises in. */
.scroll-reveal .how-it-works > h2,
.scroll-reveal .how-it-works li > * {
  opacity: 0;
}

.scroll-reveal .how-it-works li::before {
  transform: scaleX(0);
}

.scroll-reveal .how-it-works > h2.in-view {
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
}

.scroll-reveal .how-it-works li.in-view::before {
  animation: draw-rule .8s cubic-bezier(.45, 0, .25, 1) calc(.15s + var(--step, 0) * .22s) both;
}

.scroll-reveal .how-it-works li.in-view > h3 {
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) calc(.35s + var(--step, 0) * .22s) both;
}

.scroll-reveal .how-it-works li.in-view > p {
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) calc(.45s + var(--step, 0) * .22s) both;
}


.how-it-works li:nth-child(2) {
  --step: 1;
}

.how-it-works li:nth-child(3) {
  --step: 2;
}

@keyframes draw-rule {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.how-it-works h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 19px;
  font-weight: 600;
}

.how-it-works h3::before {
  content: counter(step);
  color: var(--home);
  font-family: var(--headline);
  font-style: italic;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.how-it-works li p {
  max-width: 36em;
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.fine-print {
  margin-top: 40px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Enrollment page: headline beside the plan card that holds the widget */

.step-shell {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "intro card"
    "notes card";
  gap: 0 clamp(36px, 5vw, 80px);
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(28px, 3.4vw, 52px) var(--gutter) clamp(64px, 7vw, 112px);
}

.step-intro {
  grid-area: intro;
}

.widget-card {
  grid-area: card;
  align-self: start;
}

.step-notes {
  grid-area: notes;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.step-notes li {
  max-width: 34em;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.widget-card {
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 48px -24px rgba(34, 31, 27, .35);
}

/* The widget itself stays on white so SmartCredit's form reads as intended. */
.widget-card-head {
  padding: clamp(22px, 2.4vw, 30px) clamp(24px, 2.4vw, 32px);
  background: var(--card);
  color: var(--card-text);
}

.widget-card-head .plan-steps {
  margin-top: 14px;
}

.widget-card-body {
  min-height: 380px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 20px 20px;
}

.widget-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.unavailable {
  padding: 24px 4px;
}

.unavailable h2 {
  font-family: var(--headline);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.unavailable p {
  max-width: 32em;
  margin: 14px 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

/* Confirmation page: centered headline over a charcoal reference card */

.receipt-shell {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 72px) var(--gutter) clamp(64px, 8vw, 120px);
  text-align: center;
}

.receipt-shell .eyebrow {
  justify-content: center;
}

/* Same letter size (~96px) for every centered headline, whatever its length. */
.headline-middle {
  max-width: min(100%, calc(var(--vbw) * .96px));
  margin-right: auto;
  margin-left: auto;
}

.receipt-shell .lead {
  margin: 18px auto 0;
}

.receipt-card {
  max-width: 460px;
  margin: 36px auto 0;
  padding: clamp(24px, 3vw, 32px);
  border-radius: 20px;
  background: var(--card);
  color: var(--card-text);
  box-shadow: 0 24px 48px -24px rgba(34, 31, 27, .45);
}

.receipt-reference {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--card-line);
}

.receipt-reference span {
  color: var(--card-muted);
  font-size: 14px;
}

.receipt-reference strong {
  display: block;
  margin: 6px 0;
  color: var(--gold);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: .12em;
}

.receipt-reference p {
  color: var(--card-muted);
  font-size: 14px;
}

.receipt-card .primary-button {
  margin-top: 22px;
  background: var(--gold);
  color: #1c1915;
}

.receipt-card .primary-button:hover {
  background: var(--gold-hover);
}

.receipt-shell .fine-print {
  max-width: 34em;
  margin: 32px auto 0;
}

@media (max-width: 960px) {
  .hero,
  .step-shell {
    grid-template-columns: 1fr;
  }

  .step-shell {
    grid-template-columns: minmax(0, 640px);
    grid-template-rows: none;
    grid-template-areas:
      "intro"
      "card"
      "notes";
    justify-content: center;
  }

  .widget-card {
    margin-top: 24px;
  }

  /* One centered column on tablets and phones: headline, card, photo. */
  .hero {
    grid-template-columns: minmax(0, 640px);
    grid-template-rows: none;
    grid-template-areas:
      "intro"
      "card"
      "photo";
    justify-content: center;
  }

  .plan-card {
    margin-top: 24px;
  }

  .hero-photo {
    aspect-ratio: 1;
    min-height: 0;
  }

  .hero-photo img {
    object-position: 30% 0;
  }

  .how-it-works ol {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .how-it-works li:nth-child(n) {
    --step: 0;
  }
}

/* Short laptop screens: keep the enrollment action in the first screen. */
@media (min-width: 961px) and (max-height: 820px) {
  .lead {
    font-size: 16px;
  }

  .plan-card-head h2,
  .widget-card-head h2 {
    font-size: 24px;
  }

  .plan-card-copy {
    font-size: 14px;
  }

  .check {
    font-size: 13px;
  }

}

@media (max-width: 600px) {
  .site-header {
    height: 64px;
  }

  .brand img {
    width: 136px;
  }

  .header-link {
    font-size: 13px;
  }

  .hero {
    padding-top: 28px;
  }

  h1 {
    font-size: 42px;
  }

  .headline {
    margin-top: 14px;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: .12em;
  }

  .hero-photo figcaption {
    font-size: 10px;
  }

  .lead {
    margin-top: 12px;
    font-size: 16px;
  }

  .plan-card {
    margin: 24px -8px 0;
    padding: 24px 20px;
    border-radius: 18px;
  }

  .widget-card {
    margin: 24px -8px 0;
    border-radius: 18px;
  }

  .widget-card-head {
    padding: 22px 20px;
  }

  .widget-card-body {
    padding: 24px 20px;
    border-radius: 0 0 18px 18px;
  }

  .unavailable h2 {
    font-size: 30px;
  }

  .plan-card-head h2,
  .widget-card-head h2 {
    font-size: 24px;
  }

  .plan-steps {
    gap: 6px 14px;
    font-size: 14px;
  }

  .plan-step-number {
    width: 22px;
    height: 22px;
  }

  .site-footer a {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (max-width: 380px) {
  .header-link {
    font-size: 12px;
  }

  .brand img {
    width: 120px;
  }

  h1 {
    font-size: 38px;
  }

  .plan-card {
    padding: 22px 18px;
  }

  .plan-card-head h2,
  .widget-card-head h2 {
    font-size: 22px;
  }

  .plan-steps {
    gap: 6px 10px;
    font-size: 13px;
  }

  .plan-step-number {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .plan-card-step {
    font-size: 18px;
  }
}

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

  * {
    transition: none !important;
    animation: none !important;
  }
}
