/* ==========================================================================
   Ellison Finance — shared stylesheet
   Edit the :root variables below to change site-wide colors/fonts.
   ========================================================================== */

:root {
  /* Brand colors */
  --navy-900: #081b33;
  --navy-800: #0c2a4d;
  --navy-700: #123863;
  --navy-600: #1a4b82;
  --navy-100: #e8eef6;
  --navy-50: #f4f7fb;
  /* Accent — grey/silver, matched to the "FINANCE" wordmark in the logo.
     Use silver-300 for accents on dark/navy backgrounds, silver-600/700
     where an accent needs to read against white. */
  --silver-100: #eef0f3;
  --silver-300: #b7bfc9;
  --silver-500: #8b93a1;
  --silver-600: #667085;
  --silver-700: #4b5563;

  --ink: #1a2230;
  --ink-soft: #4a5568;
  --paper: #ffffff;
  --paper-soft: #f7f8fa;
  --border: #e2e6ed;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-display: "Poppins", var(--font-sans);

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(8, 27, 51, 0.08);
  --shadow-md: 0 8px 24px rgba(8, 27, 51, 0.1);

  --max-width: 1160px;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--navy-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 64px 0;
}

.section-tight {
  padding: 40px 0;
}

.section-alt {
  background: var(--navy-50);
}

.section-navy {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  color: #dbe4f0;
}

.section-navy h2,
.section-navy h3 {
  color: #fff;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--silver-600);
  margin-bottom: 0.5em;
  display: block;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy-600);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-700);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  border-color: #fff;
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  border-color: var(--navy-700);
  color: var(--navy-700);
}

.btn-outline:hover {
  background: var(--navy-700);
  color: #fff;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy-900);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  height: 60px;
  width: auto;
  border-radius: 6px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--navy-700);
}

.nav-links a:hover {
  color: var(--navy-700);
  text-decoration: none;
}

.nav-cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-700);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 420px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    width: 100%;
    border-top: 1px solid var(--border);
  }

  .nav-cta {
    margin: 12px 24px 18px;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 0;
  background: linear-gradient(180deg, var(--navy-50) 0%, #fff 100%);
}

.hero-copy {
  max-width: 640px;
  padding-bottom: 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.trust-line {
  margin: 18px 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Full-width hero banner — deliberately breaks out of .container so the
   image runs edge-to-edge instead of sitting in a boxed column. */
.hero-banner {
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 460px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner svg {
  width: 120px;
  height: 120px;
  opacity: 0.9;
}

@media (max-width: 700px) {
  .hero-banner {
    aspect-ratio: 4 / 3;
  }
}

.hero-art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.placeholder-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-photo.wide {
  aspect-ratio: 16 / 10;
}

.placeholder-photo svg {
  width: 55%;
  height: 55%;
  opacity: 0.9;
}

.placeholder-photo img,
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Page header photo variant ---------- */
.page-header.has-photo {
  position: relative;
  background-size: cover;
  background-position: center 60%;
}

.page-header.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(8, 27, 51, 0.92) 0%,
    rgba(8, 27, 51, 0.72) 45%,
    rgba(8, 27, 51, 0.4) 100%
  );
}

.page-header.has-photo .container {
  position: relative;
}

/* ---------- Page header (non-home pages) ---------- */
.page-header {
  padding: 56px 0 40px;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  color: #fff;
}

.page-header .eyebrow {
  color: var(--silver-300);
}

.page-header h1 {
  color: #fff;
}

.page-header p {
  color: #b9c6dc;
  max-width: 62ch;
}

/* ---------- Steps (lean, one-line-per-step process list) ---------- */
.steps-lean {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 32px;
}

@media (max-width: 760px) {
  .steps-lean {
    grid-template-columns: 1fr;
  }
}

.steps-lean li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.steps-lean p {
  margin: 0;
  color: var(--ink-soft);
}

.steps-lean strong {
  color: var(--navy-900);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy-700);
  color: var(--silver-300);
  font-weight: 800;
  font-size: 0.85rem;
}

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

@media (max-width: 760px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

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

.card-grid.four-col {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 860px) {
  .card-grid.four-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .card-grid.two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .card-grid.four-col {
    grid-template-columns: 1fr;
  }
}

.benefit-card {
  background: var(--paper-soft);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  border: 1px solid var(--border);
}

.benefit-card h3 {
  margin-bottom: 0.4em;
}

.benefit-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--silver-100);
  color: var(--silver-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-weight: 800;
}

.footnote {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 24px;
}

.section-navy .footnote {
  color: #93a3bc;
}

/* ---------- Polaroid photo frame ---------- */
.polaroid {
  background: #fff;
  padding: 14px 14px 34px;
  box-shadow: var(--shadow-md);
  border-radius: 4px;
  transform: rotate(-2deg);
  max-width: 340px;
  margin: 0 auto;
  position: relative;
}

.polaroid .placeholder-photo {
  aspect-ratio: 4 / 5;
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 70px;
  height: 26px;
  background: rgba(102, 112, 133, 0.35);
  border: 1px solid rgba(102, 112, 133, 0.5);
}

/* ---------- Tabs (Services page) ---------- */
.tabs {
  margin-top: 32px;
}

.tab-list {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-sans);
}

.tab-btn:hover {
  color: var(--navy-700);
}

.tab-btn[aria-selected="true"] {
  color: var(--navy-900);
  border-bottom-color: var(--silver-500);
}

.tab-panel {
  padding-top: 40px;
}

.tab-panel[hidden] {
  display: none;
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.tip-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .tip-grid.three-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .tip-grid {
    grid-template-columns: 1fr;
  }
}

.tip-card {
  background: var(--paper-soft);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
}

.qa-block {
  background: var(--navy-50);
  border-left: 4px solid var(--navy-700);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin-top: 20px;
}

/* ---------- Accordion (Disclosure page) ---------- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: var(--paper-soft);
  border: none;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--navy-900);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-sans);
}

.accordion-trigger:hover {
  background: var(--navy-100);
}

.accordion-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
}

.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  background: var(--navy-700);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion-icon::before {
  width: 14px;
  height: 2px;
}

.accordion-icon::after {
  width: 2px;
  height: 14px;
  transition: transform 0.2s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-panel {
  padding: 4px 22px 22px;
}

.accordion-panel[hidden] {
  display: none;
}

.accordion-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.92rem;
}

.accordion-panel th,
.accordion-panel td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Lender chip list inside accordion ---------- */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
  margin: 12px 0 0;
}

.chip-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.86rem;
}

/* ---------- Info panels (fees etc.) ---------- */
.info-callout {
  background: var(--silver-100);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 20px 0;
}

/* ---------- Bio ---------- */
.bio-whakapapa {
  font-style: italic;
  color: var(--navy-800);
  border-left: 4px solid var(--silver-500);
  padding-left: 20px;
  margin: 0 0 28px;
  font-size: 1.05rem;
}

.bio-quote {
  margin-top: 36px;
  padding: 28px;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: 1.15rem;
  font-style: italic;
}

.bio-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--silver-300);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  margin-top: 8px;
  align-items: start;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-detail {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.contact-detail .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy-100);
  color: var(--navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-card {
  background: var(--paper-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--navy-900);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  background: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--navy-600);
  outline-offset: 1px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-status {
  margin-top: 14px;
  font-weight: 600;
}

.form-status.success {
  color: #1a7a3f;
}

.form-status.error {
  color: #b3261e;
}

/* ---------- Mortgage calculator ---------- */
.calc-results {
  background: var(--navy-50);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 24px;
}

.calc-result-primary {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.calc-result-primary .calc-result-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-top: 4px;
}

.calc-result-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.calc-result-row:last-child {
  margin-bottom: 0;
}

.calc-result-row > div {
  flex: 1;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.calc-result-row .calc-result-value {
  display: block;
  font-weight: 700;
  color: var(--navy-900);
  font-size: 1.1rem;
  margin-top: 2px;
}

.calc-result-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  color: #fff;
  padding: 56px 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: #b9c6dc;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600));
  color: #a9b7cc;
  padding: 48px 0 28px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.site-footer a {
  color: #a9b7cc;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-logo {
  height: 76px;
  width: auto;
  border-radius: 6px;
  display: block;
}

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  font-size: 0.8rem;
  color: #7e8ea8;
  line-height: 1.7;
}

.footer-legal p {
  margin: 0 0 8px;
}

/* ---------- Utility ---------- */
.mt-0 {
  margin-top: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy-700);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
}
