/* The Finish-Well Institute — shared styles */
/* Base ---------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #F8F8F5; overflow-x: hidden; }
img { max-width: 100%; }
a { color: #0B2545; text-decoration: none; }
a:hover { color: #C8A96A; }
::selection { background: #C8A96A; color: #0B2545; }
.fw-input::placeholder { color: #9A9A9A; }

/* Components (extracted from repeated inline styles) ---------------- */
/* Page wrapper */
.fw-page {
  font-family: 'Inter', sans-serif;
  color: #333333;
  background: #F8F8F5;
  width: 100%;
}
/* Navigation bar */
.fw-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 56px;
  margin: 0 auto;
  gap: 24px;
  flex-wrap: wrap;
  row-gap: 12px;
  width: 100%;
  box-sizing: border-box;
  background: #F8F8F5;
  box-shadow: 0 1px 0 rgba(11,37,69,0.08);
}
/* Nav logo */
.fw-nav-logo-img {
  height: 60px;
}
/* Nav link list */
.fw-nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
/* Nav link */
.fw-nav-link {
  font-size: 13px;
  font-weight: 500;
  color: #0B2545;
  white-space: nowrap;
}
/* Nav link (current page) */
.fw-nav-link.is-active {
  font-size: 13px;
  font-weight: 600;
  color: #C8A96A;
  white-space: nowrap;
}
/* Nav call-to-action */
.fw-nav-cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  background: #C8A96A;
  color: #333333;
  padding: 14px 24px;
  border-radius: 6px;
  white-space: nowrap;
}
/* Ornament: thin gold line */
.fw-orn-line {
  width: 24px;
  height: 1px;
  background: #C8A96A;
}
/* Ornament: gold diamond */
.fw-orn-diamond {
  width: 5px;
  height: 5px;
  background: #C8A96A;
  transform: rotate(45deg);
}
/* Ornament row, centred */
.fw-orn.fw-orn--center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
/* Ornament row, left */
.fw-orn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
/* Bullet diamond in lists */
.fw-bullet {
  width: 5px;
  height: 5px;
  background: #C8A96A;
  transform: rotate(45deg);
  flex: none;
  position: relative;
  top: -3px;
}
/* Small gold dot */
.fw-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C8A96A;
  display: inline-block;
}
/* Gold accent text */
.fw-accent {
  color: #C8A96A;
}
/* Gold italic accent text */
.fw-accent-italic {
  font-style: italic;
  font-weight: 500;
  color: #C8A96A;
}
/* Section eyebrow label */
.fw-eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #C8A96A;
  font-weight: 600;
  margin-bottom: 20px;
}
/* Section heading block */
.fw-section-head {
  text-align: center;
  margin-bottom: 72px;
}
/* Testimonial: author row */
.fw-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Testimonial: quote */
.fw-quote {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 500;
  color: #0B2545;
  line-height: 1.55;
  margin: 0 0 14px;
}
/* Testimonial: avatar */
.fw-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #E5DCC9;
}
/* Testimonial: author name */
.fw-author-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C8A96A;
}
/* Footer */
.fw-footer {
  background: #F8F8F5;
  padding: 72px 40px 56px;
  text-align: center;
  border-top: 1px solid #E5DCC9;
}
/* Footer logo */
.fw-footer-logo {
  height: 120px;
  margin-bottom: 20px;
}
/* Footer dots row */
.fw-footer-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
/* Footer tagline */
.fw-footer-tagline {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8A7449;
  margin-bottom: 22px;
}
/* Footer copyright */
.fw-footer-copy {
  font-size: 13px;
  color: #6B7686;
}
/* Form label */
.fw-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0B2545;
  margin-bottom: 10px;
}
/* Form field */
.fw-field {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #DCD5C4;
  background: #FFFFFF;
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: #333333;
  border-radius: 4px;
}
/* Form field: textarea */
.fw-field.fw-field--textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #DCD5C4;
  background: #FFFFFF;
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: #333333;
  border-radius: 4px;
  resize: vertical;
}
/* Form field: select */
.fw-field.fw-field--select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #DCD5C4;
  background: #FFFFFF;
  appearance: none;
  -webkit-appearance: none;
  padding: 14px 40px 14px 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: #333333;
  border-radius: 4px;
}

/* Reveal on scroll ----------------------------------------------------- */
/* Only hide content when JS is running (the <html class="js"> flag is set
   in each page's <head>), so the page stays readable if JS fails.       */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Hover states (generated from the original style-hover attributes) ---- */
/* !important is needed because the base colours are set inline.        */
.hv1:hover { color: #C8A96A !important; }
.hv2:hover { background: #0B2545 !important; color: #F8F8F5 !important; }
.hv3:hover { background: #F8F8F5 !important; color: #0B2545 !important; }
.hv4:hover { background: #F8F8F5 !important; }
.hv5:hover { background: #C8A96A !important; color: #0B2545 !important; }

/* Link styled as a button (replaces the old <a><button> nesting) -------- */
.fw-btn { text-align: center; line-height: normal; transition: background-color .2s, color .2s; }
.fw-btn:focus-visible,
.fw-nav-toggle:focus-visible { outline: 2px solid #C8A96A; outline-offset: 3px; }

/* Fixed widths never exceed their container */
.fw-fluid { max-width: 100% !important; box-sizing: border-box; }
.fw-grid > *, .fw-grid-4 > * { min-width: 0; }

/* Mobile menu toggle (hidden on desktop) */
.fw-nav-logo { display: inline-flex; }
.fw-nav-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.fw-nav-toggle span {
  display: block; width: 22px; height: 2px; background: #0B2545; border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.fw-nav.is-open .fw-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fw-nav.is-open .fw-nav-toggle span:nth-child(2) { opacity: 0; }
.fw-nav.is-open .fw-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero entrance (index.html) --------------------------------------------- */
/* Base styles are the final state, so nothing is hidden if animations are
   off. Sequence: dawn light (0-2.4s), slow photo settle (0-9s), gold line
   draws (0.3s), then text rises line by line; CTA visible by ~1.6s.       */
.fw-hero { overflow: hidden; }
.fw-hero-img {
  transform-origin: 70% 40%;
  animation: fwHeroSettle 9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fw-hero-dawn {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background:
    radial-gradient(120% 90% at 78% 30%, rgba(5,17,51,0.55), rgba(5,17,51,0.92) 70%);
  animation: fwHeroDawn 2.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.fw-hero-orn { margin-bottom: 14px; }
.fw-hero-orn .fw-orn-line {
  transform-origin: left center;
  animation: fwHeroDraw 0.8s cubic-bezier(0.65, 0, 0.35, 1) 0.3s both;
}
.fw-hero-orn .fw-orn-diamond {
  animation: fwHeroPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both;
}
.fw-hero-step {
  animation: fwHeroRise 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.45s + var(--i, 0) * 0.15s);
}

@keyframes fwHeroSettle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes fwHeroDawn   { from { opacity: 1; } to { opacity: 0; } }
@keyframes fwHeroDraw   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fwHeroPop    { from { opacity: 0; transform: rotate(45deg) scale(0); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
@keyframes fwHeroRise   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Accessibility ---------------------------------------------------------- */
.fw-skip {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: #0B2545; color: #F8F8F5; padding: 12px 18px; border-radius: 6px;
  font: 600 13px 'Inter', sans-serif;
}
.fw-skip:focus { top: 16px; color: #F8F8F5; }
#main:focus { outline: none; }
.fw-field:focus-visible { outline: 2px solid #C8A96A; outline-offset: 1px; border-color: #C8A96A; }
.fw-form-status { margin: 0; font-size: 14px; line-height: 1.6; color: #8A4B2F; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .fw-hero-img, .fw-hero-dawn, .fw-hero-orn *, .fw-hero-step { animation: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Responsive ------------------------------------------------------------ */
/* Layout values are inline in the markup, so overrides use !important.  */

/* Tablet */
@media (max-width: 1100px) {
  .fw-nav { padding: 10px 32px !important; }
  .fw-nav-links { gap: 20px !important; }
  .fw-section { padding-left: 40px !important; padding-right: 40px !important; }
  .fw-hero > div:last-child { padding-left: 40px !important; padding-right: 40px !important; }
  .fw-grid--wide { gap: 40px !important; }
  .fw-pad { padding: 44px 36px !important; }
}

/* Collapse nav into a menu */
@media (max-width: 1180px) {
  .fw-nav { padding: 10px 24px !important; row-gap: 0 !important; }
  .fw-nav-logo img { height: 48px !important; }
  .fw-nav-toggle { display: inline-flex; }
  .fw-nav-links,
  .fw-nav-cta { display: none !important; }
  .fw-nav.is-open { padding-bottom: 20px !important; max-height: 100vh; overflow-y: auto; }
  .fw-nav.is-open .fw-nav-links {
    display: flex !important; flex-direction: column; align-items: flex-start !important;
    gap: 0 !important; width: 100%; padding-top: 12px; border-top: 1px solid rgba(11,37,69,0.08);
  }
  .fw-nav.is-open .fw-nav-links a { display: block; width: 100%; padding: 12px 0; font-size: 15px !important; }
  .fw-nav.is-open .fw-nav-cta { display: block !important; width: 100%; box-sizing: border-box; margin-top: 8px; }
}

/* Phone / small tablet */
@media (max-width: 860px) {
  .fw-section { padding: 88px 24px !important; }
  .fw-nav + .fw-section { padding-top: 128px !important; }
  /* Hero: photo on top (cropped to keep the couple in frame), text below */
  .fw-hero {
    --hero-photo-h: 100vw;
    display: block !important; min-height: 0 !important;
    padding-top: 68px; background: #0B2545;
  }
  .fw-hero-img {
    position: relative !important; inset: auto !important; display: block;
    height: var(--hero-photo-h) !important; object-position: 95% 50%;
  }
  /* Overlays run 48px past the photo so its slow zoom never shows an edge */
  .fw-hero-shade, .fw-hero-dawn {
    top: 68px !important; bottom: auto !important; height: calc(var(--hero-photo-h) + 48px);
  }
  .fw-hero-shade { background: linear-gradient(to bottom, rgba(11,37,69,0) 50%, #0B2545 calc(100% - 48px)) !important; }
  .fw-hero-img { transform-origin: 75% 0; }
  .fw-hero > div:last-child { padding: 8px 24px 64px !important; margin-top: -40px !important; }
  .fw-hero > div:last-child > div { padding-top: 0 !important; padding-bottom: 0 !important; }

  .fw-grid { grid-template-columns: 1fr !important; }
  .fw-grid--wide { gap: 40px !important; }
  .fw-grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .fw-fluid { width: auto !important; }
  .fw-pad { padding: 32px 24px !important; }

  .fw-media { width: 100% !important; height: auto !important; aspect-ratio: 4 / 5; max-height: 560px; }
  .fw-pad.fw-fluid { width: 100% !important; height: auto !important; min-height: 280px; }

  .fw-fs-xl { font-size: 40px !important; }
  .fw-fs-l  { font-size: 32px !important; }
  .fw-fs-m  { font-size: 24px !important; }

  /* Bordered cells (About > Our Approach) stack: dividers become horizontal */
  .fw-grid--flush > .fw-pad { border-right: 0 !important; border-bottom: 1px solid #E5DCC9 !important; }
  .fw-grid--flush > .fw-pad:last-child { border-bottom: 0 !important; }
}

@media (min-width: 600px) and (max-width: 860px) {
  .fw-hero { --hero-photo-h: 75vw; }
  .fw-hero-img { object-position: 85% 50%; }
}

@media (max-width: 480px) {
  .fw-grid-4 { grid-template-columns: 1fr !important; }
  .fw-fs-xl { font-size: 36px !important; }
  .fw-fs-l  { font-size: 28px !important; }
  .fw-fs-m  { font-size: 22px !important; }
  .fw-btn { white-space: normal !important; }
}
