/* ==========================================================================
   Your Finance Office — shared.css
   Navy / cyan fintech theme, shared across all pages (home, services,
   contact, tools hub, and the 6 calculator tools).
   ========================================================================== */

:root {
  --bg:        #ffffff;
  --bg-2:      #f4f7fb;
  --surface:   #ffffff;
  --surface-2: #eef2f9;
  --border:    rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.20);
  --text:      #0f172a;
  --muted:     #56617a;
  --muted-dim: #8592ab;
  --cyan:      #2563eb;
  --cyan-dim:  rgba(37, 99, 235, 0.08);
  --blue:      #4f46e5;
  --green:     #059669;
  --amber:     #d97706;
  --pink:      #db2777;

  /* Legacy variable names used inside the existing calculator tool pages —
     aliased here so each tool keeps its own distinct accent instead of
     breaking, while nav/footer/chrome use the site-wide navy/cyan brand. */
  --gold:       #c9a84c;
  --gold-dim:   rgba(201, 168, 76, 0.12);
  --gold-light: #e8c97a;
  --bg-card:    var(--surface);

  --sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --nav-h: 74px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

section { padding: 100px clamp(1.5rem, 8vw, 7rem); position: relative; }
@media (max-width: 640px) { section { padding: 64px clamp(1.25rem, 5vw, 2rem); } }

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; margin: 0; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--cyan); margin-bottom: 1.2rem;
}
.eyebrow::before { content: '//'; opacity: .5; }

.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.1; }
.section-head p { font-size: 1.05rem; color: var(--muted); font-weight: 300; line-height: 1.7; margin-top: 1rem; }

.grad-text {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sans); font-size: .92rem; font-weight: 600;
  padding: .9rem 1.8rem; border-radius: 100px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--blue)); color: #ffffff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(37,99,235,.25); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── NAV ── */
#mainNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 6vw, 4rem);
  background: rgba(255, 255, 255, .6); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s;
}
#mainNav.scrolled { background: rgba(255, 255, 255, .88); border-bottom-color: var(--border); box-shadow: 0 1px 0 rgba(15,23,42,.04); }

.nav-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: 1.02rem; color: var(--text); }
.nav-logo .mark { width: 34px; height: 34px; flex-shrink: 0; }
.nav-logo .wordmark-sub { display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; color: var(--muted); font-weight: 400; text-transform: uppercase; }

.nav-links { list-style: none; display: flex; align-items: center; gap: 2.2rem; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: .88rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--cyan); }
.nav-cta {
  background: var(--cyan-dim); border: 1px solid var(--border-strong);
  padding: .55rem 1.3rem !important; border-radius: 100px; color: var(--cyan) !important;
}
.nav-cta:hover { background: var(--cyan) !important; color: #ffffff !important; }

.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-burger span { width: 22px; height: 2px; background: var(--text); transition: all .25s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 99;
  background: var(--bg); display: flex; flex-direction: column; gap: 1.8rem;
  padding: 3rem clamp(1.5rem, 8vw, 4rem); transform: translateY(-110%); transition: transform .3s ease;
}
.nav-drawer.open { transform: translateY(0); }
.nav-drawer a { text-decoration: none; font-size: 1.3rem; font-weight: 600; color: var(--text); }
.nav-drawer .nav-cta { align-self: flex-start; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

/* ── FOOTER ── */
footer {
  padding: 3.5rem clamp(1.5rem, 8vw, 7rem);
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: var(--bg-2);
}
.footer-brand { font-family: var(--mono); font-size: .82rem; color: var(--muted); letter-spacing: .05em; }
.footer-copy { font-family: var(--mono); font-size: .75rem; color: var(--muted-dim); }
.footer-links { list-style: none; display: flex; gap: 1.8rem; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; font-size: .82rem; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--cyan); }

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ── CARDS (shared across services / tools / feature grids) ── */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15,23,42,.10); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: var(--cyan-dim); border: 1px solid var(--border-strong); margin-bottom: 1.3rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.card p { font-size: .92rem; color: var(--muted); line-height: 1.65; font-weight: 300; margin: 0; }

/* ── STAT COUNTERS ── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat-item { text-align: left; }
.stat-num { font-family: var(--sans); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; color: var(--text); }
.stat-num span { color: var(--cyan); }
.stat-label { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-top: .4rem; }
@media (max-width: 760px) { .stats-row { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }

/* ── CONTACT BOX ── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }

.contact-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2.5rem; position: relative; overflow: hidden;
}
.contact-box::before {
  content: ''; position: absolute; top: -30%; right: -20%; width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(37,99,235,.08) 0%, transparent 70%); pointer-events: none;
  animation: bgDrift 16s ease-in-out infinite;
}

.contact-info-item { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.8rem; }
.contact-info-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: var(--cyan-dim); border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.contact-info-label { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .25rem; }
.contact-info-value { font-size: .98rem; color: var(--text); font-weight: 500; }
.contact-info-value a { text-decoration: none; color: var(--text); }
.contact-info-value a:hover { color: var(--cyan); }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-field label { display: block; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: .5rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
  padding: .85rem 1rem; color: var(--text); font-family: var(--sans); font-size: .92rem; transition: border-color .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--cyan); }
.form-field textarea { resize: vertical; min-height: 110px; }

.contact-submit { align-self: flex-start; margin-top: .5rem; border: none; }

/* ── BADGES / CHIPS ── */
.chip {
  font-family: var(--mono); font-size: .65rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); padding: .25rem .65rem; border: 1px solid var(--border); border-radius: 100px;
}
.chip-cyan { color: var(--cyan); border-color: var(--border-strong); background: var(--cyan-dim); }

/* ══════════════════════════════════════════════════════════════════════
   HERO VISUAL — animated calculator + bar chart, used on home & tools hero
   ══════════════════════════════════════════════════════════════════════ */
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; align-items: center; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin: 2.5rem auto 0; }
}

.hero-visual {
  position: relative; height: 340px; max-width: 380px;
  display: flex; align-items: center; justify-content: center;
}

.hv-calc-card {
  position: relative; z-index: 2; width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 1.15rem; box-shadow: 0 20px 50px rgba(15,23,42,.12);
  animation: hvFloatCard 5s ease-in-out infinite;
}
.hv-calc-screen { background: var(--bg-2); border-radius: 10px; padding: .85rem 1rem; margin-bottom: .9rem; }
.hv-calc-label { display: block; font-family: var(--mono); font-size: .58rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .3rem; }
.hv-calc-number { font-family: var(--sans); font-weight: 700; font-size: 1.35rem; color: var(--cyan); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; }

/* Odometer / flip-clock style rolling digits */
.hv-od { display: inline-flex; align-items: flex-start; }
.hv-od-digit { display: inline-block; width: .62em; height: 1.3em; overflow: hidden; position: relative; }
.hv-od-strip { display: flex; flex-direction: column; transition: transform 1.1s cubic-bezier(.22,.85,.3,1); will-change: transform; }
.hv-od-strip span { height: 1.3em; line-height: 1.3em; display: block; text-align: center; }
.hv-od-static { display: inline-block; width: .38em; text-align: center; }

.hv-calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.hv-key { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); display: block; animation: hvKeyPress 3s ease-in-out infinite; }

.hv-chart { position: absolute; right: -6px; bottom: -4px; width: 190px; z-index: 1; filter: drop-shadow(0 10px 20px rgba(15,23,42,.08)); }
.hv-bar { transform-box: fill-box; transform-origin: bottom; animation: hvBarGrow 2.4s ease-in-out infinite; }
.hv-trend { stroke-dasharray: 260; stroke-dashoffset: 260; animation: hvDrawLine 3.4s ease-in-out infinite; }

.hv-badge {
  position: absolute; top: 2%; left: -4%; z-index: 3;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 100px;
  padding: .4rem .85rem; font-family: var(--mono); font-size: .72rem; font-weight: 600; color: var(--green);
  box-shadow: 0 8px 20px rgba(15,23,42,.10); animation: hvFloatBadge 4s ease-in-out infinite;
}

.hv-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); opacity: .45; animation: hvFloatDot 6s ease-in-out infinite; }
.hv-emoji { position: absolute; font-size: 1.4rem; animation: hvFloatBadge 4.5s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(15,23,42,.12)); }

@keyframes hvFloatCard { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
@keyframes hvKeyPress {
  0%, 100% { background: var(--surface-2); transform: scale(1); box-shadow: none; }
  38% { background: var(--cyan); transform: scale(.86); box-shadow: inset 0 2px 5px rgba(15,23,42,.4); }
  55% { background: var(--cyan); transform: scale(.94); box-shadow: inset 0 1px 2px rgba(15,23,42,.2); }
}
@keyframes hvBarGrow { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }
@keyframes hvDrawLine { 0% { stroke-dashoffset: 260; opacity: 0; } 15% { opacity: 1; } 55% { stroke-dashoffset: 0; opacity: 1; } 75% { opacity: 1; } 90%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes hvFloatBadge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes hvFloatDot { 0%, 100% { transform: translate(0, 0); opacity: .25; } 50% { transform: translate(-6px, -18px); opacity: .6; } }

/* ══════════════════════════════════════════════════════════════════════
   AMBIENT BACKGROUND DRIFT — applied to existing decorative blobs
   ══════════════════════════════════════════════════════════════════════ */
@keyframes bgDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-3%, 2%) scale(1.06); } }
.bg-drift { animation: bgDrift 16s ease-in-out infinite; }

/* ══════════════════════════════════════════════════════════════════════
   RECONCILIATION LOG — typewriter terminal mockup
   ══════════════════════════════════════════════════════════════════════ */
.rlog-card {
  background: #0b1220; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15,23,42,.18); border: 1px solid rgba(255,255,255,.06);
}
.rlog-head { display: flex; align-items: center; gap: .4rem; padding: .8rem 1rem; background: #111d33; border-bottom: 1px solid rgba(255,255,255,.06); }
.rlog-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rlog-title { margin-left: .5rem; font-family: var(--mono); font-size: .68rem; color: #8592ab; letter-spacing: .04em; }
.rlog-body { padding: 1.15rem 1.25rem; min-height: 230px; font-family: var(--mono); font-size: .8rem; line-height: 2; }
.rlog-line { color: #d7e0f3; white-space: pre-wrap; word-break: break-word; }
.rlog-time { color: #56617a; margin-right: .6rem; }
.rlog-ok { color: #34d399; font-weight: 600; }
.rlog-cursor { display: inline-block; width: 7px; height: 1em; background: #38bdf8; vertical-align: text-bottom; margin-left: 2px; animation: rlogBlink 1s steps(1) infinite; }
@keyframes rlogBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ══════════════════════════════════════════════════════════════════════
   SERVICE TABS — click-to-preview mock dashboard cards
   ══════════════════════════════════════════════════════════════════════ */
.svc-tabs { }
.svc-tab-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.svc-tab-btn {
  font-family: var(--sans); font-size: .85rem; font-weight: 600; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 100px;
  padding: .55rem 1.2rem; cursor: pointer; transition: all .2s ease;
}
.svc-tab-btn:hover { color: var(--text); border-color: var(--border-strong); }
.svc-tab-btn.active { background: var(--cyan); color: #fff; border-color: var(--cyan); }

.svc-tab-panel { display: none; }
.svc-tab-panel.active { display: block; }

.mock-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.8rem; max-width: 480px;
  box-shadow: 0 16px 40px rgba(15,23,42,.08);
}
.mock-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 0; border-bottom: 1px solid var(--border);
  font-size: .88rem; color: var(--text);
  opacity: 0; transform: translateX(-10px); transition: opacity .4s ease, transform .4s ease;
}
.mock-row:last-of-type { border-bottom: none; }
.svc-tab-panel.animate-in .mock-row { opacity: 1; transform: translateX(0); }
.svc-tab-panel.animate-in .mock-row:nth-child(1) { transition-delay: .05s; }
.svc-tab-panel.animate-in .mock-row:nth-child(2) { transition-delay: .15s; }
.svc-tab-panel.animate-in .mock-row:nth-child(3) { transition-delay: .25s; }
.svc-tab-panel.animate-in .mock-row:nth-child(4) { transition-delay: .35s; }

.mock-check {
  color: var(--green); font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: rgba(5,150,105,.1);
  transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1) .3s;
}
.svc-tab-panel.animate-in .mock-check { transform: scale(1); }

.mock-foot { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); font-size: .82rem; color: var(--muted); }
.mock-foot strong { color: var(--text); }
.mock-label { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .8rem; }

.mock-bar-track { height: 10px; border-radius: 100px; background: var(--bg-2); overflow: hidden; }
.mock-bar-fill { height: 100%; width: 0; border-radius: 100px; background: linear-gradient(90deg, var(--cyan), var(--blue)); transition: width 1.1s cubic-bezier(.22,.85,.3,1) .15s; }
.svc-tab-panel.animate-in .mock-bar-fill { width: var(--pct); }
.mock-bar-caption { margin-top: .7rem; font-size: .82rem; color: var(--muted); }
.mock-ok { color: var(--green); font-weight: 600; }

.mock-compare-row { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.mock-compare-row > span:first-child { width: 70px; font-size: .8rem; color: var(--muted); flex-shrink: 0; }
.mock-compare-row > span:last-child { width: 80px; text-align: right; font-size: .85rem; font-weight: 600; color: var(--text); flex-shrink: 0; }
.mock-compare-track { flex: 1; height: 10px; border-radius: 100px; background: var(--bg-2); overflow: hidden; }
.mock-compare-fill { height: 100%; width: 0; border-radius: 100px; transition: width 1.1s cubic-bezier(.22,.85,.3,1) .15s; }
.svc-tab-panel.animate-in .mock-compare-fill { width: var(--pct); }

.mock-chart-bars { display: flex; align-items: flex-end; gap: .5rem; height: 100px; }
.mock-chart-bar { width: 22px; border-radius: 4px 4px 0 0; background: var(--cyan-dim); height: 0; transition: height .8s cubic-bezier(.22,.85,.3,1); }
.svc-tab-panel.animate-in .mock-chart-bar { height: var(--h); }
.svc-tab-panel.animate-in .mock-chart-bar:nth-child(1) { transition-delay: 0s; background: var(--border-strong); }
.svc-tab-panel.animate-in .mock-chart-bar:nth-child(2) { transition-delay: .08s; background: var(--cyan-dim); }
.svc-tab-panel.animate-in .mock-chart-bar:nth-child(3) { transition-delay: .16s; background: var(--cyan); }
.svc-tab-panel.animate-in .mock-chart-bar:nth-child(4) { transition-delay: .24s; background: var(--blue); }
.svc-tab-panel.animate-in .mock-chart-bar:nth-child(5) { transition-delay: .32s; background: var(--cyan); }

/* ══════════════════════════════════════════════════════════════════════
   MINI CHAT — looping bubble mockup used inside a Why-Us card
   ══════════════════════════════════════════════════════════════════════ */
.mini-chat { margin-top: 1.2rem; display: flex; flex-direction: column; gap: .5rem; min-height: 62px; }
.mc-bubble {
  max-width: 88%; padding: .5rem .8rem; border-radius: 12px; font-size: .78rem; line-height: 1.4;
  opacity: 0; transform: translateY(6px) scale(.97); animation: mcPop 6s ease-in-out infinite;
}
.mc-in { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--border); border-bottom-left-radius: 3px; color: var(--text); animation-delay: 0s; }
.mc-out { align-self: flex-end; background: var(--cyan); color: #fff; border-bottom-right-radius: 3px; animation-delay: 1.2s; }
@keyframes mcPop {
  0% { opacity: 0; transform: translateY(6px) scale(.97); }
  8%, 80% { opacity: 1; transform: translateY(0) scale(1); }
  92%, 100% { opacity: 0; transform: translateY(-4px) scale(.98); }
}

