/*
Theme Name: MortgageFree
Theme URI: https://mortgagefree.com.au/
Author: MortgageFree
Author URI: https://mortgagefree.com.au/
Description: Modern, sleek refresh of the MortgageFree website — multi-page, mortgage-broker theme with Compare Home Loans, calculators, success stories and a 6-monthly review feature. Built on a warm-cream / deep-blue palette with Instrument Serif + Geist.
Version: 1.1.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mortgagefree
Tags: business, finance, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ─────────────────────────────────────────────────────────
   MortgageFree — shared site styles
   Modern Aussie home finance, friendly + premium
   ───────────────────────────────────────────────────────── */

:root {
  /* Type */
  --serif: "Instrument Serif", "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Geist", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  /* Color — Theme: Warm Cream (default) */
  --cream: #F3EEE3;
  --cream-deep: #ECE5D4;
  --paper: #FBFAF6;
  --ink: #14131A;
  --ink-soft: #5C5763;
  --ink-faint: #908B97;
  --line: #E5DECD;
  --line-strong: #D7CFBC;
  --brand: #1A47C2;     /* deep brand blue, refined from logo */
  --brand-deep: #0F2E80;
  --brand-tint: #E6EBF8;
  --accent: #7866D6;    /* logo purple, softened */
  --accent-tint: #EFEBFB;
  --positive: #2E7A4F;
  --positive-tint: #E1F0E7;
  --warm: #C6694A;

  /* Radii */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  /* Shadows */
  --shadow-card: 0 1px 0 rgba(20,19,26,.04), 0 8px 24px -12px rgba(20,19,26,.10);
  --shadow-pop: 0 10px 40px -10px rgba(20,19,26,.18);

  /* Spacing scale */
  --pad-page: clamp(20px, 4vw, 56px);
}

/* Theme: Slate Modern */
[data-theme="slate"] {
  --cream: #F1F1EF;
  --cream-deep: #E7E7E4;
  --paper: #FAFAF9;
  --line: #DCDCD7;
  --line-strong: #C6C6BF;
  --brand: #1E1B4B;
  --brand-deep: #0C0A2E;
  --brand-tint: #E4E4F1;
  --accent: #5B4FCF;
  --accent-tint: #ECEAF8;
}

/* Theme: Coastal */
[data-theme="coastal"] {
  --cream: #EDF2F2;
  --cream-deep: #DDE6E6;
  --paper: #F8FBFB;
  --line: #CDDADA;
  --line-strong: #B0C2C2;
  --brand: #0B4F4A;
  --brand-deep: #052E2B;
  --brand-tint: #DAEAE8;
  --accent: #C6694A;
  --accent-tint: #F4E3DB;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ─── Typography ─── */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 7.5vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.display em { font-style: italic; color: var(--brand); }
.h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 400;
}
.h1 em { font-style: italic; color: var(--brand); }
.h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 400;
}
.h2 em { font-style: italic; color: var(--brand); }
.h3 {
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  font-weight: 600;
  margin: 0;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); margin-right: 8px; vertical-align: middle;
  transform: translateY(-1px);
}
.lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
}
.body-lg { font-size: 18px; line-height: 1.55; color: var(--ink); }
.body { font-size: 16px; line-height: 1.6; color: var(--ink); }
.body-sm { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.caption { font-size: 12px; line-height: 1.5; color: var(--ink-soft); letter-spacing: 0.01em; }
.mono { font-family: var(--mono); font-feature-settings: "tnum" 1, "zero" 1; }
.num  { font-variant-numeric: tabular-nums; }

/* ─── Layout ─── */
.page { min-height: 100vh; }
.shell { max-width: 1340px; margin: 0 auto; padding-left: var(--pad-page); padding-right: var(--pad-page); }
.section { padding: clamp(64px, 8vw, 120px) 0; }
.section-tight { padding: clamp(40px, 5vw, 72px) 0; }
.rule { height: 1px; background: var(--line); width: 100%; }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.gap-8 { gap: 32px; } .gap-10 { gap: 40px; } .gap-12 { gap: 48px; }

/* ─── Header / Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--cream) 80%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
.nav-inner {
  max-width: 1340px; margin: 0 auto;
  padding: 14px var(--pad-page);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 700; font-size: 18px;
  letter-spacing: -0.01em; color: var(--ink);
}
.nav-logo .mark { width: 32px; height: 32px; }
.nav-logo .wordmark span:first-child { color: var(--brand); }
.nav-logo .wordmark span:last-child { color: var(--accent); }
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--cream-deep); color: var(--ink); }
.nav-links a.active { background: var(--ink); color: var(--paper); }
.nav-cta {
  display: flex; align-items: center; gap: 12px;
}
.nav-phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-soft); font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 1100px) { .nav-phone { display: none; } }
.nav-phone svg { width: 14px; height: 14px; stroke: var(--ink-soft); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--paper); border-color: var(--ink); }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn-lg { padding: 18px 28px; font-size: 17px; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── Cards ─── */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
}
.card-soft {
  background: var(--cream-deep);
  border: 1px solid color-mix(in oklab, var(--line-strong) 50%, transparent);
  border-radius: var(--r);
  padding: 28px;
}

/* ─── Pills / Tags ─── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-soft);
  align-self: flex-start;
  width: fit-content;
}
.eyebrow { align-self: flex-start; width: fit-content; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--positive); }
.pill-brand { background: var(--brand-tint); color: var(--brand-deep); border-color: transparent; }
.pill-accent { background: var(--accent-tint); color: var(--accent); border-color: transparent; }

/* ─── Image placeholders (subtle striped) ─── */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(45deg, rgba(20,19,26,.04) 0 1px, transparent 1px 14px),
    var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ph::after {
  content: attr(data-label);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ─── Lender logo card ─── */
.lender-card {
  aspect-ratio: 5 / 3;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  padding: 16px 18px;
  transition: border-color .15s ease, transform .15s ease;
}
.lender-card:hover { border-color: var(--line-strong); }
.lender-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
}
.lender-card.dark-bg { background: var(--ink); }
.lender-card.text-only {
  font-family: var(--sans); font-weight: 500; font-size: 13px;
  color: var(--ink-soft); letter-spacing: -0.01em;
}

/* Small logo for inline lists / compare table */
.lender-logo {
  width: 56px; height: 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 4px 6px;
  flex-shrink: 0;
}
.lender-logo.dark-bg { background: var(--ink); border-color: var(--ink); }
.lender-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
}

/* ─── Footer ─── */
.footer { background: var(--ink); color: #C9C5D2; padding: 80px 0 40px; }
.footer a { color: #C9C5D2; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: #807A8C; font-weight: 500; margin: 0 0 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-bottom {
  margin-top: 60px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #807A8C;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Focus ring */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* Util */
.muted { color: var(--ink-soft); }
.brand { color: var(--brand); }
.accent { color: var(--accent); }
.center { text-align: center; }
.max-prose { max-width: 64ch; }
.hidden { display: none !important; }
