/* =========================================================
   Finance & Fairways — landing page
   Colours, type and spacing live in the tokens below.
   ========================================================= */
:root {
  --fairway: #1E3A2B;
  --fairway-deep: #14261C;
  --linen: #F4EFE3;
  --linen-dim: #D9D2C1;
  --brass: #C4A06A;
  --brass-hi: #E2C48E;
  --claret: #6B2230;
  --finext-orange: #F28C28;   /* swap for the exact Finext orange */
  --finext-orange-ink: #C4630A; /* deeper orange for text on Linen, so it stays readable */
  --rule-dark: rgba(244, 239, 227, .28);

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(88px, 11vw, 150px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--fairway);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
em { font-style: italic; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.section { padding-block: var(--section); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--linen); color: var(--fairway); padding: 10px 16px; }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---------- Type ---------- */
.eyebrow { font-size: 12px; font-weight: 400; letter-spacing: .32em; text-transform: uppercase; }
.eyebrow-claret { color: var(--claret); }
.eyebrow-gold { color: var(--brass-hi); }
.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 4.4vw, 60px);
  line-height: 1.08;
  text-wrap: balance;
}
.lead {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.35;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 500 13px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 17px 32px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-outline { border-color: var(--brass); color: var(--linen); padding: 13px 22px; }
.btn-outline:hover { background: var(--brass); color: var(--fairway); }
.btn-outline-light { border-color: var(--linen); color: var(--linen); }
.btn-outline-light:hover { background: var(--linen); color: var(--fairway); }
.btn-light { background: var(--linen); color: var(--fairway); }
.btn-light:hover { background: var(--brass-hi); }
.btn-dark { background: var(--fairway); color: var(--linen); }
.btn-dark:hover { background: var(--claret); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 96px; transition: height .35s var(--ease); }
.brand img { width: clamp(150px, 16vw, 200px); height: auto; opacity: 0; transform: translateY(-6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav a:not(.btn) {
  color: var(--linen); text-decoration: none;
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  position: relative;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--finext-orange); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.site-nav a:not(.btn) { transition: color .25s var(--ease); }
.site-nav a:not(.btn):hover, .site-nav a:not(.btn):focus-visible, .site-nav a:not(.btn)[aria-current="true"] { color: var(--finext-orange); }
.site-nav a:not(.btn):hover::after, .site-nav a:not(.btn)[aria-current="true"]::after { transform: scaleX(1); }

.site-header.is-solid { background: var(--fairway); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.site-header.is-solid .header-inner { height: 72px; }
.site-header.is-solid .brand img { opacity: 1; transform: none; }

.menu-toggle { display: none; }

@media (max-width: 760px) {
  .menu-toggle {
    display: grid; gap: 6px; place-content: center;
    width: 44px; height: 44px; background: none; border: 0; cursor: pointer; margin-right: -10px;
  }
  .menu-toggle .bar { display: block; width: 24px; height: 1.5px; background: var(--linen); transition: transform .3s var(--ease); }
  .menu-toggle[aria-expanded="true"] .bar:nth-of-type(2) { transform: translateY(3.75px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bar:nth-of-type(3) { transform: translateY(-3.75px) rotate(-45deg); }
  .site-nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 32px;
    background: var(--fairway);
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .site-nav a:not(.btn) { font-size: 16px; }
  .site-header.menu-open .site-nav { opacity: 1; visibility: visible; }
  .site-header.menu-open .brand img { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  color: var(--linen); background: var(--fairway-deep); overflow: hidden;
}
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media { background: url("../images/hero-poster.jpg") center / cover no-repeat; }
.hero-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shade { background: linear-gradient(180deg, rgba(12,22,16,.55) 0%, rgba(12,22,16,.38) 45%, rgba(12,22,16,.62) 100%); }
.hero-content {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(18px, 2.4vw, 28px); padding-block: 140px 100px;
}
.crest {
  width: clamp(170px, 20vw, 250px); aspect-ratio: 1;
  border-radius: 50%; background: var(--fairway);
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.crest img { width: 100%; height: 100%; }
.hero-title {
  font-family: var(--serif); font-weight: 600; text-transform: uppercase;
  font-size: clamp(36px, 6.4vw, 84px); line-height: 1; letter-spacing: .12em;
  margin-right: -.12em; /* balance the trailing letter-spacing */
}
.hero-content .btn { margin-top: 12px; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }

/* ---------- Split layout (About + Contact) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(40px, 7vw, 100px); align-items: start; }
.split-head, .split-body { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.split-body p:not(.lead) { max-width: 62ch; }
.services-block { margin-top: 10px; display: flex; flex-direction: column; gap: 18px; }
.services { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 34px; }
.service {
  font: 500 13px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase;
  color: var(--fairway); background: none; border: 0; padding: 8px 0; cursor: pointer; position: relative;
  transition: color .25s var(--ease);
}
.service::after {
  content: ""; position: absolute; left: 0; right: .24em; bottom: 0; height: 2px;
  background: var(--finext-orange); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.service:hover, .service[aria-expanded="true"] { color: var(--finext-orange-ink); }
.service:hover::after, .service[aria-expanded="true"]::after { transform: scaleX(1); }
.service-detail { position: relative; min-height: 96px; max-width: 62ch; }
.service-panel { border-left: 2px solid var(--finext-orange); padding: 4px 0 4px 18px; font-size: 16px; line-height: 1.6; animation: panelIn .35s var(--ease); }
.service-panel strong { font-weight: 500; }
.service-hint { font-size: 14px; color: #6A7A6F; font-style: italic; }
.service-panel:not([hidden]) ~ .service-hint { display: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- On the course ---------- */
.course { position: relative; overflow: hidden; background: var(--fairway); color: var(--linen); }
.course-photo { position: absolute; inset: 0; background: url("../images/team.jpg") right center / cover no-repeat; }
.course-shade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--fairway) 0%, rgba(30,58,43,.6) 30%, rgba(30,58,43,0) 55%), linear-gradient(0deg, rgba(30,58,43,.55) 0%, rgba(30,58,43,0) 40%); }
.course-inner { position: relative; display: flex; flex-direction: column; gap: clamp(48px, 6vw, 72px); }
.course-intro { display: flex; flex-direction: column; gap: 22px; max-width: 600px; }
.course-intro p:not(.eyebrow) { color: #E6DECB; }
.steps {
  list-style: none; margin: 0; padding: 40px 0 0;
  border-top: 1px solid var(--rule-dark);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
}
.steps h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2vw, 28px); line-height: 1.2; margin-bottom: 8px; }
.steps p { color: var(--linen-dim); font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Ball roll divider ---------- */
.ball-divider { margin-top: clamp(56px, 7vw, 96px); margin-bottom: calc(var(--section) * -0.45); }
.ball-divider svg { display: block; width: 100%; height: auto; overflow: visible; }
.bd-track { fill: none; stroke: none; }
.bd-line { fill: none; stroke: var(--brass); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(.5,0,.2,1); }
.bd-cup { fill: #14261C; }
.bd-pole { stroke: var(--fairway); stroke-width: 1.6; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .45s cubic-bezier(.2,.8,.2,1) .9s; }
.bd-pennant { fill: var(--finext-orange); transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); transition: transform .5s cubic-bezier(.3,1.6,.5,1) 1.2s; }
.bd-ball circle { fill: #FFFFFF; stroke: #CFC8B5; stroke-width: .8; }
.bd-ball .bd-dimple { fill: #DAD3C3; stroke: none; }
.bd-shadow { fill: rgba(30,58,43,.18); }
.bd-ball-wrap { opacity: 0; }
.ball-divider.is-live .bd-line { stroke-dashoffset: 0; }
.ball-divider.is-live .bd-pole { transform: none; }
.ball-divider.is-live .bd-pennant { transform: none; }
.ball-divider.is-live .bd-ball-wrap { opacity: 1; }
.ball-divider.is-holed .bd-pennant { animation: flagFlick .9s cubic-bezier(.3,1.6,.5,1); }
@keyframes flagFlick { 0% { transform: scaleX(1); } 30% { transform: scaleX(1.25) skewY(-8deg); } 60% { transform: scaleX(.9) skewY(4deg); } 100% { transform: none; } }
.ball-divider.is-done { cursor: pointer; }
.course .btn { align-self: flex-start; }
@media (max-width: 860px) {
  .course-photo { opacity: .45; background-position: 78% center; }
  .course-shade { background: linear-gradient(180deg, rgba(30,58,43,.9), rgba(30,58,43,.75)); }
}

/* ---------- Video testimonials: clubhouse carousel ---------- */
.testimonials { background: #EFE8D8; padding-block: var(--section); }
.b-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.b-carousel { width: 100%; max-width: 820px; margin-top: clamp(24px, 3vw, 40px); }
.b-stage { display: grid; }
.b-slide {
  grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: 22px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), visibility 0s .7s;
}
.b-slide.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease), visibility 0s; }
.b-marker {
  position: relative; width: clamp(160px, 18vw, 200px); aspect-ratio: 1; border-radius: 50%; padding: 0; border: 0; cursor: pointer;
  background: var(--fairway);
  box-shadow: 0 0 0 6px #EFE8D8, 0 0 0 7px var(--brass), 0 18px 40px rgba(20,38,28,.22);
  transition: transform .4s var(--ease);
}
.b-marker::after { content: ""; position: absolute; right: 12%; top: 9%; width: 10px; height: 10px; border-radius: 50%; background: var(--finext-orange); box-shadow: 0 0 0 3px #EFE8D8; }
.b-media { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background-size: cover; background-position: center; }
.b-marker:not(.has-poster) .b-media { background-image: url("../images/crest.svg"); background-size: 92% auto; background-repeat: no-repeat; background-position: center; }
.b-marker.has-poster .b-media::after { content: ""; position: absolute; inset: 0; background: rgba(12,22,16,.18); }
.b-play {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; z-index: 1;
  border: 1px solid var(--linen); background: rgba(12,22,16,.32); backdrop-filter: blur(4px);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.b-play::before { content: ""; position: absolute; left: 23px; top: 18px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent var(--linen); }
.b-marker:hover { transform: translateY(-4px); }
.b-marker:hover .b-play, .b-marker:focus-visible .b-play { background: var(--finext-orange); border-color: var(--finext-orange); transform: scale(1.08); }
.b-marker.is-empty { cursor: default; }
.b-marker.is-empty:hover { transform: none; }
.b-marker.is-empty .b-play { display: none; }
.b-quote { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.2; max-width: 22ch; text-wrap: balance; }
.b-name { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; font-weight: 500; }
.b-name span { color: var(--finext-orange-ink); }
.b-soon { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #6A7A6F; margin-top: -10px; }
.b-slide.has-video .b-soon { display: none; }
.b-nav { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: clamp(28px, 3vw, 40px); }
.b-arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--fairway); background: none; color: var(--fairway); cursor: pointer; font-size: 20px; line-height: 1; transition: background-color .25s, color .25s, border-color .25s; }
.b-arrow:hover { background: var(--fairway); color: var(--linen); }
.b-dots { display: flex; gap: 10px; }
.b-dot { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; background: rgba(30,58,43,.25); cursor: pointer; transition: background-color .25s, transform .25s; }
.b-dot[aria-current="true"] { background: var(--finext-orange); transform: scale(1.3); }
@media (prefers-reduced-motion: reduce) { .b-slide, .b-slide.is-on { transition: none; } }
.vt-dialog { padding: 0; border: 0; background: transparent; max-width: min(92vw, 1000px); max-height: 90vh; overflow: visible; }
.vt-dialog::backdrop { background: rgba(10,18,13,.88); }
.vt-video { display: block; max-width: min(92vw, 1000px); max-height: 86vh; width: auto; height: auto; border-radius: 4px; background: #000; }
.vt-close {
  position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border: 1px solid var(--linen); border-radius: 50%;
  background: transparent; color: var(--linen); font: 300 24px/1 var(--sans); cursor: pointer;
}
.vt-close:hover { background: var(--finext-orange); border-color: var(--finext-orange); }

/* ---------- Contact form ---------- */
.contact-details { font-size: 15px; line-height: 1.9; margin-top: 8px; }
.contact-details a { text-decoration: none; border-bottom: 1px solid rgba(30,58,43,.3); }
.contact-details a:hover { color: var(--claret); border-color: var(--claret); }
.enquiry { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px 32px; align-content: start; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.field input, .field select {
  font: 300 17px/1.4 var(--sans); color: var(--fairway);
  padding: 10px 0; border: 0; border-bottom: 1px solid var(--fairway); border-radius: 0;
  background: transparent; width: 100%;
  transition: border-color .2s;
}
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231E3A2B' stroke-width='1.5'/%3E%3C/svg%3E") right 4px center no-repeat; padding-right: 24px; }
.field input:focus, .field select:focus { outline: none; border-bottom: 2px solid var(--claret); }
.field.is-invalid input { border-bottom-color: var(--claret); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form-status { font-size: 15px; color: var(--claret); }
.req { color: var(--claret); }
.err { display: none; font-size: 13px; color: var(--claret); }
.field.is-invalid .err { display: block; }
.field.is-invalid select { border-bottom-color: var(--claret); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.small-note { font-size: 15px; max-width: 42ch; color: #3D4F43; }
.btn[disabled] { opacity: .6; cursor: wait; }
.form-status.is-ok { color: var(--fairway); }

/* ---------- Footer ---------- */
.site-footer { background: var(--fairway); color: var(--linen-dim); padding-block: 56px calc(56px + env(safe-area-inset-bottom)); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 18px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 6px; }
.footer-brand { font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: .26em; text-transform: uppercase; color: var(--linen); }
.legal { font-size: 13px; line-height: 1.6; max-width: 120ch; }
.legal a { color: var(--linen); }
.footer-legal-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 0; font-size: 14px; color: var(--linen); }
.footer-legal-line .sep { margin: 0 12px; color: var(--brass); }
@media (max-width: 520px) { .footer-legal-line { flex-direction: column; gap: 4px; } .footer-legal-line .sep { display: none; } .footer-legal-line a { align-self: flex-start; } }
.footer-legal-line a { color: var(--linen); text-decoration: none; border-bottom: 1px solid rgba(244,239,227,.4); }
.footer-legal-line a:hover { color: var(--finext-orange); border-color: var(--finext-orange); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 13px; letter-spacing: .06em; }
.footer-links a { color: var(--linen); text-decoration: none; border-bottom: 1px solid transparent; }
.footer-links a:hover { border-color: var(--brass); }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-left: auto; }
@media (max-width: 760px) { .footer-social { margin-left: 0; } }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* Hero text waits for the crest animation to land */
.js .hero-late.is-in { transition-delay: 2.9s; }
.js .hero-late.is-in ~ .hero-late.is-in { transition-delay: 3.2s; }
.js .hero-late.is-in ~ .hero-late.is-in ~ .hero-late.is-in { transition-delay: 3.5s; }
.crest { animation: crestIn .8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes crestIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .crest { animation: none; }
  .service-panel { animation: none; }
  .bd-line, .bd-pole, .bd-pennant { transition: none !important; }
}
