/* ==========================================================================
   farmlending.com.au — shared stylesheet
   Mobile-first. Aligned with hardiefinancegroup.com.au design language.
   ========================================================================== */

/* ---- Self-hosted webfonts (Latin) ---------------------------------------- */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/instrument-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/instrument-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/instrument-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/instrument-sans-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/assets/fonts/playfair-display-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('/assets/fonts/playfair-display-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/playfair-display-700.woff2') format('woff2');
}

:root {
  /* Brand */
  --green-primary: #2D6A4F;     /* canopy green — primary CTA, links */
  --green-deep:    #1B4332;     /* hover / dark accent */
  --green-fresh:   #22C55E;     /* fresh accent for highlights */
  --gold-harvest:  #D4A843;     /* warm accent */

  /* Neutrals */
  --charcoal:   #1C1C1E;
  --ink:        #2A2A2D;
  --slate:      #4B5563;
  --mute:       #6B7280;
  --line:       #E5E7EB;
  --soft:       #F4F4F5;
  --bg:         #FAFAFA;
  --white:      #FFFFFF;

  /* Type */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:    'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --maxw:    1180px;
  --pad:     1.25rem;
  --radius:  10px;
  --shadow:  0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(20,30,40,.06);

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* Reset --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--green-primary); text-decoration: none; }
a:hover { color: var(--green-deep); text-decoration: underline; }

/* Typography ---------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--charcoal);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.2rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
h4 { font-family: var(--font-sans); font-weight: 600; font-size: 1.05rem; margin: 1.2em 0 .4em; }
p  { margin: 0 0 1em; }
.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--green-primary);
  margin: 0 0 .8rem;
}

/* Layout helpers ------------------------------------------------------------ */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section   { padding: 4rem 0; }
.section-tight { padding: 2.5rem 0; }
.section-alt   { background: var(--white); }
.section-dark  { background: var(--charcoal); color: #E7E7E9; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.center { text-align: center; }
.lead   { font-size: 1.1rem; color: var(--slate); max-width: 60ch; }
.lead.center { margin-left: auto; margin-right: auto; }

/* Buttons ------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: .85rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--green-primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-deep); color: var(--white); }
.btn-outline {
  background: transparent;
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-outline:hover { background: var(--charcoal); color: var(--white); }
.btn-light {
  background: var(--white);
  color: var(--charcoal);
}
.btn-light:hover { background: var(--soft); color: var(--charcoal); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Header -------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo a { display: flex; align-items: center; gap: .6rem; color: var(--charcoal); font-weight: 700; font-size: 1.05rem; }
.logo img { height: 36px; width: auto; }
.logo span { font-family: var(--font-display); font-weight: 600; letter-spacing: .01em; }

.nav-primary { display: none; }
.nav-primary ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.6rem; }
.nav-primary a {
  color: var(--ink); font-weight: 500; font-size: .98rem; padding: .4rem 0;
  position: relative;
}
.nav-primary a:hover { color: var(--green-primary); text-decoration: none; }
.nav-primary a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--green-primary); border-radius: 2px;
}

.header-cta { display: none; }
.header-cta .btn { padding: .55rem 1rem; font-size: .92rem; }

.hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent; border: 0; cursor: pointer; color: var(--charcoal);
}
.hamburger svg { width: 26px; height: 26px; }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 68px 0 0 0;
  background: var(--white);
  transform: translateX(100%);
  transition: transform .25s var(--ease);
  z-index: 49;
  padding: 1.5rem var(--pad) 2rem;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}
.drawer.is-open { transform: translateX(0); }
.drawer ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.drawer li { border-bottom: 1px solid var(--line); }
.drawer a {
  display: block; padding: 1rem .25rem;
  color: var(--charcoal); font-weight: 500; font-size: 1.1rem;
}
.drawer a[aria-current="page"] { color: var(--green-primary); }
.drawer .btn { width: 100%; text-align: center; margin-top: .5rem; }
body.drawer-open { overflow: hidden; }

@media (min-width: 880px) {
  .nav-primary { display: block; }
  .header-cta  { display: inline-flex; }
  .hamburger   { display: none; }
}

/* Hero ---------------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(15,22,18,.30) 0%, rgba(15,22,18,.18) 55%, rgba(15,22,18,.45) 100%),
    url('assets/img/hero-hero-young-farmer-driving-new-tractor.webp') center/cover no-repeat;
  color: var(--white);
  min-height: 78vh;
  display: flex; align-items: center;
  padding: 5rem 0 4rem;
}
.hero-content {
  background: rgba(12, 20, 16, 0.82);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  backdrop-filter: blur(10px) saturate(115%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 2.2rem 2.4rem;
  max-width: 720px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.28);
}
.hero h1 { color: var(--white); max-width: 16ch; margin-bottom: .6em; }
.hero p  { color: rgba(255,255,255,.94); font-size: 1.12rem; max-width: 56ch; }
.hero .eyebrow { color: #F7D480; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 1rem 1.8rem;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .92rem; color: rgba(255,255,255,.92);
}
.hero-trust span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-trust svg { width: 18px; height: 18px; color: var(--green-fresh); }

/* Page hero (smaller) */
.page-hero {
  background: var(--charcoal);
  color: var(--white);
  padding: 4.5rem 0 3rem;
  border-bottom: 4px solid var(--green-primary);
}
.page-hero h1 { color: var(--white); }
.page-hero .eyebrow { color: #F0D27A; }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.1rem; max-width: 60ch; }

/* Cards & grids ------------------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(20,30,40,.08); border-color: #D9DDE2; }
.card h3 { margin-top: .2rem; }
.card .icon-wrap {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(45,106,79,.08);
  color: var(--green-primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: .8rem;
}
.card .icon-wrap svg { width: 22px; height: 22px; }
.card a.more {
  font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .4rem;
}

/* Service detail blocks */
.service-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-primary);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  margin-bottom: 1.1rem;
}
.service-block h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin-bottom: .4rem; }
.service-block p:last-child { margin-bottom: 0; }

/* Portraits ----------------------------------------------------------------- */
.portrait {
  width: 100%;
  max-width: 460px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--soft);
}
.portrait-frame {
  position: relative;
  display: inline-block;
  max-width: 460px;
}
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 2px solid var(--green-primary);
  border-radius: var(--radius);
  z-index: 0;
}
.portrait-frame .portrait { position: relative; z-index: 1; }

.byline {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  padding: .55rem .85rem .55rem .55rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin: 0 0 1.2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.byline img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 46px;
}
.byline .who { line-height: 1.25; }
.byline strong { display: block; color: var(--charcoal); font-size: .92rem; }
.byline span  { color: var(--mute); font-size: .82rem; }

/* Trust strip */
.trust-strip {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust-strip .row {
  display: grid; gap: 1.4rem;
  grid-template-columns: 1fr;
  padding: 1.6rem 0;
  text-align: center;
}
@media (min-width: 720px) {
  .trust-strip .row     { grid-template-columns: repeat(4, 1fr); }
  .trust-strip .row-3   { grid-template-columns: repeat(3, 1fr); }
}
.trust-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--green-primary);
  line-height: 1;
}
.trust-strip span { display: block; font-size: .9rem; color: var(--slate); margin-top: .35rem; }

/* CTA banner ---------------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-primary) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.4rem 1.6rem;
  text-align: center;
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255,255,255,.9); max-width: 52ch; margin-left: auto; margin-right: auto; }
.cta-banner .btn-row { justify-content: center; margin-top: 1.2rem; }

/* FAQ accordion ------------------------------------------------------------- */
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: .6rem;
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.2rem;
  font-weight: 600;
  color: var(--charcoal);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--green-primary);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.2rem 1.2rem; color: var(--slate); }

/* Form ---------------------------------------------------------------------- */
.form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.form .field { margin-bottom: 1rem; }
.form label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: .35rem;
}
.form input, .form textarea, .form select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,.15);
}
.form textarea { min-height: 130px; resize: vertical; }
.form .btn { width: 100%; padding: 1rem 1.4rem; font-size: 1.05rem; }
.form .hint { font-size: .82rem; color: var(--mute); margin-top: .4rem; }

/* Contact info block */
.contact-info {
  display: grid; gap: 1rem;
}
.contact-info .item {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-info .item:last-child { border-bottom: 0; }
.contact-info svg { width: 22px; height: 22px; color: var(--green-primary); flex: 0 0 22px; margin-top: .2rem; }
.contact-info strong { display: block; color: var(--charcoal); margin-bottom: .15rem; }
.contact-info a { font-weight: 500; }

/* Legal page ---------------------------------------------------------------- */
.legal-layout { display: grid; gap: 2rem; }
@media (min-width: 980px) {
  .legal-layout { grid-template-columns: 240px 1fr; align-items: start; }
  .legal-nav { position: sticky; top: 96px; }
}
.legal-nav ul { list-style: none; padding: 0; margin: 0; }
.legal-nav li { border-left: 2px solid var(--line); }
.legal-nav a {
  display: block;
  padding: .6rem .9rem;
  color: var(--slate);
  font-size: .95rem;
  font-weight: 500;
}
.legal-nav a:hover { color: var(--green-primary); text-decoration: none; }
.legal-nav li.is-active { border-left-color: var(--green-primary); }
.legal-nav li.is-active a { color: var(--green-primary); }

.legal-content section { padding-top: 1rem; margin-bottom: 2.5rem; scroll-margin-top: 96px; }
.legal-content h2 { border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-bottom: 1rem; }
.legal-content h4 { color: var(--charcoal); margin-top: 1.4rem; }

/* Footer -------------------------------------------------------------------- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,.78);
  padding: 3rem 0 2rem;
  font-size: .92rem;
}
.site-footer h4 {
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 .8rem;
}
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { max-width: 36ch; }
.footer-brand img { height: 40px; margin-bottom: .9rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { padding: .25rem 0; }
.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .82rem;
  color: rgba(255,255,255,.6);
}
.footer-legal p { margin: 0 0 .6rem; }
.footer-legal-links {
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem;
  margin-top: .8rem;
}
.footer-legal-links a { color: rgba(255,255,255,.7); }

/* 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: absolute; left: -9999px; top: 0;
  background: var(--charcoal); color: var(--white);
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
