/*
Theme Name: FinCalc
Theme URI: https://example.com/fincalc/
Author: FinCalc
Description: A fast, clean theme for the FinCalc finance calculators site. Homepage with searchable tool grid, tool page template, SEO head built in. (Brand name is a placeholder — rename in style.css, functions.php FC_BRAND, header.php and footer.php.)
Version: 1.3.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: fincalc
*/

/* ============ base — UI/UX Pro Max design system: Trust & Authority, Minimalism/Swiss ============ */
:root {
  --fc-primary: #0f172a; --fc-secondary: #1e3a8a; --fc-accent: #a16207; --fc-accent-dark: #854d0e;
  --fc-ink: #020617; --fc-body: #1e293b; --fc-muted: #475569; --fc-line: #e2e8f0; --fc-bg: #f8fafc;
  --fc-ring: #b45309;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--fc-body); background: #fff;
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px; line-height: 1.6;
}
h1, h2, h3, h4, .fc-logo { font-family: "Lexend", "Source Sans 3", sans-serif; }
/* Links must be unmistakable: saturated blue + underline in content areas */
a { color: #1d4ed8; }
a:hover { color: #1e3a8a; }
.fc-article a, .fc-post-card p a, .fc-section p a { text-decoration: underline; text-underline-offset: 3px; }
.fc-article a:hover, .fc-post-card p a:hover, .fc-section p a:hover { text-decoration-thickness: 2px; }
::selection { background: #fef3c7; color: var(--fc-primary); }
:focus-visible { outline: 3px solid var(--fc-ring); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.fc-container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.fc-container-narrow { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ============ header ============ */
.fc-site-header { border-bottom: 1px solid var(--fc-line); background: #fff; position: sticky; top: 0; z-index: 50; }
.fc-header-inner { display: flex; align-items: center; gap: 24px; padding: 10px 20px; max-width: 1080px; margin: 0 auto; }
.fc-logo { font-size: 1.4rem; font-weight: 800; color: var(--fc-primary); text-decoration: none; letter-spacing: -0.02em; padding: 6px 0; }
.fc-logo span { color: var(--fc-accent); }
.fc-logo:hover { color: var(--fc-primary); }
.fc-nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--fc-line); border-radius: 10px; padding: 8px 10px; color: var(--fc-primary); cursor: pointer; min-width: 46px; min-height: 46px; }
.fc-nav { margin-left: auto; }
.fc-nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.fc-nav-list > li > a, .fc-nav-top { text-decoration: none; color: var(--fc-body); font-weight: 600; font-size: .95rem; padding: 12px 13px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; font-family: "Source Sans 3", sans-serif; min-height: 44px; }
.fc-nav-list > li > a:hover, .fc-nav-top:hover { background: var(--fc-bg); color: var(--fc-secondary); }
.fc-has-sub { position: relative; }
.fc-chev { transition: transform .18s ease; }
.fc-has-sub:hover .fc-chev, .fc-has-sub.open .fc-chev, .fc-has-sub:focus-within .fc-chev { transform: rotate(180deg); }
.fc-sub { list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; background: #fff; border: 1px solid var(--fc-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); display: none; z-index: 60; }
.fc-has-sub:hover .fc-sub, .fc-has-sub:focus-within .fc-sub, .fc-has-sub.open .fc-sub { display: block; }
.fc-sub a { display: block; padding: 11px 13px; border-radius: 8px; text-decoration: none; color: var(--fc-body); font-size: .93rem; font-weight: 500; min-height: 44px; }
.fc-sub a:hover { background: var(--fc-bg); color: var(--fc-secondary); }

@media (max-width: 960px) {
  .fc-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .fc-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; margin-left: 0; background: #fff; border-bottom: 1px solid var(--fc-line); box-shadow: 0 14px 30px rgba(15,23,42,.12); max-height: calc(100vh - 70px); overflow-y: auto; }
  .fc-site-header.fc-nav-open .fc-nav { display: block; }
  .fc-site-header { position: sticky; }
  .fc-nav-list { flex-direction: column; align-items: stretch; padding: 10px 14px 18px; gap: 0; }
  .fc-nav-list > li > a, .fc-nav-top { width: 100%; justify-content: flex-start; font-size: 1rem; }
  .fc-sub { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 6px 14px; min-width: 0; }
  .fc-chev { display: none; }
  .fc-has-sub > .fc-nav-top { cursor: default; color: var(--fc-primary); font-family: "Lexend", sans-serif; font-size: .95rem; }
}

/* ============ hero / homepage ============ */
.fc-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); color: #fff; padding: 64px 0 56px; }
.fc-hero h1 { margin: 0 0 10px; font-size: 2.4rem; letter-spacing: -0.02em; line-height: 1.2; }
.fc-hero p { margin: 0 0 22px; font-size: 1.1rem; opacity: .94; max-width: 640px; }
.fc-search { max-width: 560px; position: relative; }
.fc-search input { width: 100%; padding: 15px 18px; font-size: 1.05rem; border: 0; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.25); min-height: 52px; }
.fc-search input:focus { outline: 3px solid #fbbf24; outline-offset: 1px; }

.fc-trust { background: #fff; border-bottom: 1px solid var(--fc-line); }
.fc-trust-inner { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 14px; padding-bottom: 14px; }
.fc-trust-inner span { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; color: var(--fc-primary); }
.fc-trust-inner svg { width: 19px; height: 19px; color: var(--fc-accent); flex: none; }

.fc-section { padding: 48px 0; }
.fc-section h2 { font-size: 1.6rem; margin: 0 0 6px; letter-spacing: -0.01em; color: var(--fc-primary); }
.fc-section .fc-sub { color: var(--fc-muted); margin: 0 0 24px; }

.fc-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.fc-hub { border: 1px solid var(--fc-line); border-radius: 14px; padding: 22px; background: #fff; }
.fc-hub h3 { margin: 0 0 4px; font-size: 1.15rem; color: var(--fc-primary); }
.fc-hub p { color: var(--fc-muted); font-size: .95rem; margin: 0 0 12px; }
.fc-hub ul { list-style: none; margin: 0; padding: 0; }
.fc-hub li { border-top: 1px dashed var(--fc-line); font-size: .95rem; }
.fc-hub li a { text-decoration: none; color: var(--fc-body); display: block; padding: 9px 2px; }
.fc-hub li a:hover { color: var(--fc-secondary); }

.fc-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.fc-tool-card { border: 1px solid var(--fc-line); border-radius: 12px; padding: 18px; background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.fc-tool-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,23,42,.12); border-color: #cbd5e1; }
.fc-tool-card .fc-ico { color: var(--fc-secondary); line-height: 0; }
.fc-tool-card .fc-ico svg { width: 27px; height: 27px; }
.fc-tool-card h3 { margin: 10px 0 4px; font-size: 1.02rem; }
.fc-tool-card h3 a { color: var(--fc-primary); text-decoration: none; }
.fc-tool-card h3 a:hover { color: var(--fc-secondary); }
.fc-tool-card p { margin: 0; font-size: .9rem; color: var(--fc-muted); }

.fc-why { background: var(--fc-bg); border-top: 1px solid var(--fc-line); border-bottom: 1px solid var(--fc-line); }
.fc-why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.fc-why-item h3 { font-size: 1.05rem; margin: 0 0 6px; color: var(--fc-primary); display: flex; align-items: center; gap: 8px; }
.fc-why-ico { color: var(--fc-accent); line-height: 0; }
.fc-why-ico svg { width: 20px; height: 20px; }
.fc-why-item p { margin: 0; color: var(--fc-muted); font-size: .95rem; }

/* ============ tool page ============ */
.fc-tool-hero { background: var(--fc-bg); border-bottom: 1px solid var(--fc-line); padding: 40px 0 30px; }
.fc-tool-hero h1 { margin: 0 0 8px; font-size: 2rem; letter-spacing: -0.02em; color: var(--fc-primary); }
.fc-tool-hero .fc-dek { color: var(--fc-muted); font-size: 1.08rem; max-width: 720px; margin: 0; }
.fc-crumbs { font-size: .88rem; color: var(--fc-muted); margin-bottom: 10px; }
.fc-crumbs a { color: var(--fc-muted); text-decoration: none; padding: 4px 0; display: inline-block; }
.fc-crumbs a:hover { color: var(--fc-secondary); }
.fc-article { padding: 34px 0 20px; }
.fc-article h2 { font-size: 1.45rem; margin: 34px 0 10px; letter-spacing: -0.01em; color: var(--fc-primary); }
.fc-article h3 { font-size: 1.15rem; margin: 26px 0 8px; color: var(--fc-primary); }
.fc-article p, .fc-article li { color: #334155; }
.fc-article .fc-tool { margin: 8px 0 30px; }
.fc-related { border-top: 1px solid var(--fc-line); margin-top: 30px; padding-top: 20px; }
.fc-related h2 { font-size: 1.2rem; color: var(--fc-primary); }

/* ============ blog ============ */
.fc-post-list { display: grid; gap: 22px; padding: 30px 0; }
.fc-post-card { border: 1px solid var(--fc-line); border-radius: 12px; padding: 22px; }
.fc-post-card h2 { margin: 0 0 6px; font-size: 1.3rem; }
.fc-post-card h2 a { color: var(--fc-primary); text-decoration: none; }
.fc-post-card .fc-meta { font-size: .85rem; color: var(--fc-muted); margin-bottom: 8px; }

/* ============ footer ============ */
.fc-site-footer { background: #0f172a; color: #cbd5e1; margin-top: 40px; }
.fc-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding: 44px 20px 30px; max-width: 1080px; margin: 0 auto; }
.fc-site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .05em; font-family: "Lexend", sans-serif; }
.fc-site-footer ul { list-style: none; margin: 0; padding: 0; }
.fc-site-footer li { margin-bottom: 4px; font-size: .92rem; }
.fc-site-footer a { color: #cbd5e1; text-decoration: none; display: inline-block; padding: 5px 0; }
.fc-site-footer a:hover { color: #fff; }
.fc-site-footer .fc-brand { color: #fff; font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; display: block; font-family: "Lexend", sans-serif; }
.fc-site-footer .fc-brand span { color: #fbbf24; }
.fc-footer-bottom { border-top: 1px solid #1e293b; padding: 18px 20px; font-size: .85rem; color: #94a3b8; max-width: 1080px; margin: 0 auto; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }

/* ============ misc ============ */
.fc-404 { text-align: center; padding: 80px 20px; }
.fc-404 h1 { font-size: 3rem; margin: 0 0 10px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 99; background: #fff; padding: 10px 14px; outline: 3px solid var(--fc-ring); }

@media (max-width: 720px) {
  .fc-hero h1 { font-size: 1.8rem; }
  .fc-tool-hero h1 { font-size: 1.55rem; }
  .fc-footer-grid { grid-template-columns: 1fr 1fr; }
  body { font-size: 16px; }
}

/* ============ reduced motion (skill rule: honor prefers-reduced-motion) ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- guides (v1.1.4) ---------- */
.fc-guide-tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #a16207; margin: 0 0 6px; }
.fc-guides-more { margin-top: 20px; font-weight: 600; }
.fc-guides-more a { color: #1d4ed8; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- hero CTA + mobile tap targets (v1.1.5) ---------- */
.fc-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; }
.fc-cta-btn { display: inline-flex; align-items: center; min-height: 50px; padding: 12px 24px; border-radius: 12px; background: #b45309; color: #fff; font-weight: 700; font-size: 1.02rem; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.fc-cta-btn:hover { background: #92400e; }
.fc-cta-link { color: #fde68a; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 960px) {
  .fc-nav-list > li > a, .fc-nav-top, .fc-sub a { min-height: 46px; }
}

/* ---- v1.2.0: illustrations + social icons ---- */
.fc-hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 20px;
  box-shadow: 0 8px 24px rgba(15,23,42,.10);
}
.fc-card-thumb {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
}
.fc-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.fc-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1E293B;
  color: #E2E8F0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .2s;
}
.fc-social a:hover, .fc-social a:focus-visible {
  background: #A16207;
  color: #fff;
  transform: translateY(-2px);
}
.fc-social svg {
  width: 19px;
  height: 19px;
}

/* ---- v1.3.0: share bar ---- */
.fc-share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.fc-share-label {
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #475569;
  margin-right: 2px;
}
.fc-share-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  background: #fff;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.fc-share-btn:hover, .fc-share-btn:focus-visible {
  background: #0F172A;
  border-color: #0F172A;
  color: #fff;
  transform: translateY(-2px);
}
.fc-share-btn svg { width: 18px; height: 18px; }
.fc-copy-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0F172A;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  white-space: nowrap;
}
.fc-copy-link.fc-copied .fc-copy-tip { opacity: 1; }
