/* FincWin — Shared Marketing Stylesheet
   Linked by: landing-v2.html, features-v3.html, blog/*, about.html, compare.html, etc. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sage:    #5a6e3f;
  --sage-lt: #dce8d4;
  --sage-dk: #3d4d2b;
  --ink:     #111111;
  --muted:   #6b7280;
  --faint:   #f5f4f0;
  --white:   #ffffff;
  --border:  rgba(0,0,0,.08);
  --r: 10px;
  --sans: 'Hanken Grotesk', sans-serif;
  --serif: 'Instrument Serif', serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAV ──────────────────────────────────────────────────────── */
#mainNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
#mainNav.scrolled { border-color: var(--border); }
.nav-logo {
  font-family: var(--serif);
  font-size: 22px; font-weight: 400; letter-spacing: -.5px;
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 3px; line-height: 1;
}
/* "Win" in a solid sage chip — matches the in-app logo */
.nav-logo span {
  background: var(--sage); color: #fff; font-weight: 700;
  padding: 1px 9px 2px; border-radius: 7px;
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 13px; font-weight: 400; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 500; }
/* "App" links (nav + footer) are shown only to signed-in users. They stay
   hidden while <html> lacks .fw-authed — the default before paint — so an
   unauthenticated visitor never sees them (they get the "Get started free"
   CTA, which routes through signin). mkt.js adds .fw-authed from the
   fw_signed_in flag, set by the app entry guard / signin and cleared on
   sign-out. Using :not(.fw-authed) on the hide rule means the reveal simply
   restores each link's natural display (inline in the nav, block in the
   footer) with no per-context override. Targeted by href so it works on
   already-built pages too. */
html:not(.fw-authed) #mainNav .nav-links a[href$="app.html"]:not(.nav-cta),
html:not(.fw-authed) .mkt-footer a[href$="app.html"] { display: none; }
/* Account icon — only shown to signed-in users; hidden (display:none via :not rule) until fw-authed is set */
html:not(.fw-authed) .nav-account { display: none; }
.nav-account {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 1.5px solid var(--border); border-radius: 50%;
  color: var(--muted) !important; text-decoration: none;
  transition: color .2s, border-color .2s; flex-shrink: 0;
}
.nav-account:hover { color: var(--ink) !important; border-color: rgba(0,0,0,.25); }
.nav-account-label { display: none; }
.nav-cta {
  font-size: 13px; font-weight: 500; color: var(--white) !important;
  background: var(--ink); padding: 9px 22px; border-radius: 50px;
  transition: background .2s !important; white-space: nowrap;
}
.nav-cta:hover { background: var(--sage) !important; }

/* Mobile hamburger (button injected by js/mkt.js; hidden on desktop) */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px; margin: -8px -8px -8px 0;
  background: none; border: none; cursor: pointer;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
#mainNav.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#mainNav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
#mainNav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px;
  background: var(--ink); color: var(--white);
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--sage); transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px;
  background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 14px; font-weight: 400;
  text-decoration: none; border: 1.5px solid rgba(0,0,0,.15); cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.btn-ghost:hover { border-color: rgba(0,0,0,.4); transform: translateY(-1px); }
.btn-ghost-inv {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 50px;
  background: transparent; color: rgba(255,255,255,.8);
  font-family: var(--sans); font-size: 14px; font-weight: 400;
  text-decoration: none; border: 1.5px solid rgba(255,255,255,.2); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-ghost-inv:hover { border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-sage {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px;
  background: var(--sage); color: var(--white);
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-sage:hover { background: var(--sage-dk); transform: translateY(-1px); }

/* ── SECTION SHARED ───────────────────────────────────────────── */
section { padding: 96px 48px; }
.section-inner { max-width: 1060px; margin: 0 auto; }
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--sage); margin-bottom: 20px; display: block;
}
.section-label-inv {
  font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,.6); margin-bottom: 20px; display: block;
}
h2.serif {
  font-family: var(--serif); font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 400; line-height: 1.1; color: var(--ink);
}
h2.serif em { font-style: normal; color: var(--sage); }
h2.serif-inv {
  font-family: var(--serif); font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 400; line-height: 1.1; color: var(--white);
}
h2.serif-inv em { font-style: normal; color: #a8c48a; }

/* ── ANIMATIONS ───────────────────────────────────────────────── */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }

/* Reduced-motion: collapse animations so opacity:0 reveal states land at their
   final (visible) value instantly, instead of relying on motion to appear. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── FOOTER ───────────────────────────────────────────────────── */
footer.mkt-footer { background: var(--ink); padding: 64px 48px 40px; }
.footer-inner { max-width: 1060px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .footer-logo { font-size: 17px; font-weight: 500; color: var(--white); text-decoration: none; display: block; margin-bottom: 12px; }
.footer-brand .footer-logo span { color: #a8c48a; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.7; max-width: 220px; }
.footer-col h4 { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.65); text-decoration: none; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: rgba(255,255,255,.9); }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,.12); margin-bottom: 28px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-copy { font-size: 12px; color: rgba(255,255,255,.5); }
.footer-legal { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s; }
.footer-legal a:hover { color: rgba(255,255,255,.8); }
.footer-cookie-btn { font-size: 12px; color: rgba(255,255,255,.5); background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; transition: color .2s; }
.footer-cookie-btn:hover { color: rgba(255,255,255,.8); }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  section { padding: 72px 32px; }
  #mainNav { padding: 18px 32px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  #mainNav { padding: 16px 24px; }
  .nav-burger { display: flex; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(255,255,255,.98);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 18px;
  }
  #mainNav.nav-open .nav-links { display: flex; }
  .nav-links a { width: 100%; padding: 13px 0; font-size: 15px; }
  .nav-account { width: 100% !important; height: auto !important; border: none !important; border-radius: 0 !important; padding: 13px 0; font-size: 15px; justify-content: flex-start; gap: 8px; }
  .nav-account-label { display: inline; }
  .nav-cta { margin-top: 10px; padding: 11px 22px; display: flex; align-items: center; justify-content: center; text-align: center; }
  section { padding: 60px 20px; }
  footer.mkt-footer { padding: 48px 24px 36px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
