/* ============================================================
   Let's Finance with Jem — design tokens & components
   ============================================================ */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Surfaces — warm cream */
  --color-bg: #f8f5f0;
  --color-surface: #fbf9f5;
  --color-surface-2: #fdfcfa;
  --color-surface-offset: #f1ece4;
  --color-surface-offset-2: #eae4d9;
  --color-surface-dynamic: #e2dbce;
  --color-divider: #ddd6c9;
  --color-border: #d3cabb;

  /* Text — warm charcoal */
  --color-text: #241f18;
  --color-text-muted: #6e675c;
  --color-text-faint: #b3aca0;
  --color-text-inverse: #faf8f4;

  /* Primary accent — Let's Finance orange */
  --color-primary: #b4520e;
  --color-primary-hover: #93430c;
  --color-primary-active: #753509;
  --color-primary-highlight: #f2ddc9;

  /* Success */
  --color-success: #43712a;
  --color-error: #a1372c;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.25 0.02 70 / 0.06), 0 3px 10px oklch(0.25 0.02 70 / 0.04);
  --shadow-md: 0 2px 4px oklch(0.25 0.02 70 / 0.07), 0 8px 24px oklch(0.25 0.02 70 / 0.07);
  --shadow-lg: 0 4px 8px oklch(0.25 0.02 70 / 0.08), 0 18px 44px oklch(0.25 0.02 70 / 0.12);

  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1200px;

  --font-display: 'Zodiak', Georgia, serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

/* ============ Layout primitives ============ */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--wide {
  max-width: var(--content-wide);
}

section {
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
}

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  min-height: 48px;
  text-decoration: none;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-hover);
}
.btn--primary:active {
  background: var(--color-primary-active);
}
.btn--ghost {
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.25);
}
.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--light {
  background: #fff;
  color: #241f18;
}
.btn--light:hover {
  background: #f2e9dc;
}

/* ============ Header ============ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header--scrolled {
  border-bottom-color: var(--color-divider);
  box-shadow: var(--shadow-sm);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.logo__img {
  display: block;
  width: auto;
  height: 40px;
  flex: none;
}
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header__phone {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}
.header__phone:hover {
  color: var(--color-primary);
}
.header__call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  background: var(--color-surface);
}
@media (min-width: 768px) {
  .header__call {
    display: none;
  }
}
@media (min-width: 768px) {
  .header__phone {
    display: inline-flex;
  }
}
.header__cta {
  display: none;
}
@media (min-width: 560px) {
  .header__cta {
    display: inline-flex;
  }
}

/* ============ Hero ============ */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
  background: #17130e;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url('./assets/hero-home-m.webp');
  background-size: cover;
  background-position: center 65%;
}
@media (min-width: 701px) {
  .hero__bg {
    background-image: url('./assets/hero-home.webp');
  }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, oklch(0.16 0.02 60 / 0.92) 0%, oklch(0.16 0.02 60 / 0.72) 45%, oklch(0.2 0.03 60 / 0.35) 100%);
}
.hero__grid {
  display: grid;
  gap: var(--space-10);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--space-16);
  }
}
.hero__copy {
  color: #f5efe6;
}
.hero__eyebrow {
  color: #f0a765;
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: #fdfaf5;
  margin-bottom: var(--space-5);
}
.hero__title em {
  font-style: italic;
  color: #f0a765;
}
.hero__sub {
  font-size: var(--text-base);
  color: oklch(0.92 0.015 75 / 0.88);
  max-width: 52ch;
  margin-bottom: var(--space-8);
}
.hero__trust {
  display: grid;
  gap: var(--space-2);
  padding: 0;
}
@media (min-width: 560px) {
  .hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
  }
}
.hero__trust li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: oklch(0.9 0.02 75 / 0.85);
}
.hero__trust svg {
  flex: none;
  color: #f0a765;
}

/* Lead form card */
.lead-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-6), 4vw, var(--space-8));
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  width: 100%;
  justify-self: center;
  scroll-margin-top: 84px;
}
@media (min-width: 900px) {
  .lead-card {
    justify-self: end;
  }
}
.lead-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.lead-card__sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.field {
  margin-bottom: var(--space-4);
}
.field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
}
.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  font-size: 16px;
}
.field input:focus,
.field select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.18);
}
.field--error input {
  border-color: var(--color-error);
}
.field__msg {
  display: none;
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-1);
}
.field--error .field__msg {
  display: block;
}
.field-row {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 480px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}
.lead-card .btn {
  width: 100%;
  margin-top: var(--space-2);
}
.lead-card__fineprint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-4);
  line-height: 1.5;
}
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}
.lead-card__success {
  display: none;
  text-align: center;
  padding-block: var(--space-8);
}
.lead-card__success svg {
  margin-inline: auto;
  color: var(--color-success);
  margin-bottom: var(--space-4);
}
.lead-card__success h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.lead-card__success p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-inline: auto;
}
.lead-card.is-done form {
  display: none;
}
.lead-card.is-done .lead-card__success {
  display: block;
}

/* ============ Trust bar ============ */

.trustbar {
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.trustbar__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4) var(--space-3);
}
.trustbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
@media (min-width: 640px) {
  .trustbar__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3) var(--space-10);
  }
  .trustbar__item {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-2);
  }
}
.trustbar__item strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

/* ============ Meet Jem ============ */

.meet__grid {
  display: grid;
  gap: var(--space-10);
  align-items: center;
}
@media (min-width: 860px) {
  .meet__grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-16);
  }
}
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 400px;
  margin-inline: auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(160deg, var(--color-surface-offset) 0%, var(--color-surface-dynamic) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.portrait__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.meet__body p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}
.meet__body p:first-of-type {
  color: var(--color-text);
}
.meet__cred {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.meet__cred svg {
  flex: none;
  margin-top: 2px;
  color: var(--color-primary);
}

/* ============ Steps ============ */

.steps {
  background: var(--color-surface-offset);
}
.steps__list {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-10);
  padding: 0;
}
@media (min-width: 820px) {
  .steps__list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}
.step {
  position: relative;
  padding-top: var(--space-6);
}
.step__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.step h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--space-10);
  height: 2px;
  background: var(--color-primary);
}

/* ============ Services ============ */

.services__grid {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-10);
}
@media (min-width: 760px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service--feature {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}
.service {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
}
.service h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.service p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.service__tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.service--feature {
  background: var(--color-surface-2);
}
.service--feature .service__media {
  display: none;
}
@media (min-width: 760px) {
  .service--feature .service__media {
    display: block;
    height: 100%;
    min-height: 220px;
    border-radius: var(--radius-md);
    background-image: url('./assets/hero-home.webp');
    background-size: cover;
    background-position: center 60%;
  }
  .service--feature {
    gap: var(--space-8);
  }
}

/* ============ Full-bleed divider ============ */

.divider {
  position: relative;
  isolation: isolate;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32));
  background-image: url('./assets/perth-suburbs-m.webp');
  background-size: cover;
  background-position: center;
}
@media (min-width: 701px) {
  .divider {
    background-image: url('./assets/perth-suburbs.webp');
  }
}
.divider::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: oklch(0.2 0.03 55 / 0.55);
}
.divider blockquote {
  max-width: 34ch;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  font-weight: 500;
  color: #fdfaf5;
  line-height: 1.35;
}
.divider cite {
  display: block;
  margin-top: var(--space-5);
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: oklch(0.9 0.03 70 / 0.85);
}

/* ============ FAQ ============ */

.faq__list {
  margin-top: var(--space-8);
  max-width: var(--content-narrow);
}
.faq__item {
  border-bottom: 1px solid var(--color-divider);
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-weight: 700;
  font-size: var(--text-base);
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__item summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  flex: none;
  transition: transform var(--transition-interactive);
}
.faq__item[open] summary::after {
  transform: rotate(45deg);
}
.faq__item p {
  padding-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============ Final CTA ============ */

.cta-final {
  background: var(--color-surface-offset);
  text-align: center;
}
.cta-final h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin-bottom: var(--space-3);
}
.cta-final p {
  color: var(--color-text-muted);
  margin-inline: auto;
  margin-bottom: var(--space-8);
}
.cta-final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
}

/* ============ Footer ============ */

.footer {
  padding-block: var(--space-12) var(--space-24);
  border-top: 1px solid var(--color-divider);
}
.footer__grid {
  display: grid;
  gap: var(--space-8);
}
@media (min-width: 760px) {
  .footer__grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-16);
  }
}
.footer p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  line-height: 1.6;
}
.footer__heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.footer a {
  color: var(--color-text-muted);
}
.footer a:hover {
  color: var(--color-primary);
}
.footer__meta {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============ Mobile sticky CTA ============ */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  background: oklch(from var(--color-surface) l c h / 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-divider);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.sticky-cta.is-visible {
  transform: translateY(0);
}
.sticky-cta .btn {
  flex: 1;
  min-height: 50px;
  font-size: var(--text-sm);
  padding-inline: var(--space-3);
}
@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* ============ Touch refinements ============ */

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ============ Reveal animation ============ */

.reveal {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.reveal.is-in {
  opacity: 1;
}

/* ============ Legal / Privacy page ============ */
.container--narrow {
  max-width: 720px;
}

.legal {
  padding: calc(72px + var(--space-2xl)) 0 var(--space-2xl);
}

.legal__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.15;
  margin: var(--space-xs) 0;
}

.legal__updated {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-xl);
}

.legal h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin: var(--space-xl) 0 var(--space-sm);
}

.legal p,
.legal li {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
}

.legal p + p {
  margin-top: var(--space-sm);
}

.legal ul {
  margin: var(--space-sm) 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.legal a {
  color: var(--color-primary);
  text-underline-offset: 3px;
}

.legal__back {
  margin-top: var(--space-2xl);
}

.legal__back a {
  font-weight: 500;
  text-decoration: none;
}

.legal__back a:hover {
  text-decoration: underline;
}

.lead-card__error {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-error);
}

.lead-card__error a {
  color: inherit;
  font-weight: 600;
}

.lead-card__success .btn {
  margin-top: var(--space-xs);
}
