/* ==========================================================================
   WebsiteHeart - base.css
   Shared by every page: design tokens, reset, buttons, header, CTA, footer.
   Page-specific styles live in home.css and report.css.
   ========================================================================== */

/* ============ TOKENS ============ */
:root{
  --ink: #16231F;
  --ink-soft: #46564E;
  --pine: #0F2620;
  --pine-2: #17342B;
  --pine-line: rgba(255,255,255,0.12);
  --paper: #F1F4F1;
  --paper-card: #FFFFFF;
  --line: #DAE1DA;
  --amber: #E3A93F;
  --amber-deep: #C98B22;
  --moss: #3FA672;
  --alert: #C24B3F;
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --wrap: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img,svg{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3{ font-family: var(--font-display); margin:0; font-weight:600; letter-spacing:-0.01em; }
p{ margin:0; }
.wrap{ max-width: var(--wrap); margin:0 auto; padding: 0 32px; }
section{ position:relative; }

::selection{ background: var(--amber); color: var(--pine); }

:focus-visible{
  outline: 2px solid var(--moss);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Visible only to screen readers - used for form labels the design hides. */
.visually-hidden{
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip: rect(0,0,0,0); white-space:nowrap; border:0;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.eyebrow::before{
  content:"";
  width:6px; height:6px; border-radius:50%;
  background: var(--moss);
  box-shadow: 0 0 0 3px rgba(63,166,114,0.18);
}

/* ============ BUTTONS ============ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 14px 26px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight:600;
  font-size:15px;
  cursor:pointer;
  border:1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--pine); color: var(--paper); }
.btn-primary:hover{ background:#0a1b16; }
.btn-ghost{ background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover{ border-color: var(--ink); }
.btn-amber{ background: var(--amber); color: #2A1B05; }
.btn-amber:hover{ background: var(--amber-deep); }
.btn-on-dark{ background: transparent; border-color: var(--pine-line); color: var(--paper); }
.btn-on-dark:hover{ border-color: rgba(255,255,255,0.4); }

/* A button mid-request: dimmed, unclickable, and it stops lifting on hover. */
.btn[aria-busy="true"], .btn:disabled{
  opacity: .72;
  cursor: progress;
  pointer-events:none;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html{ scroll-behavior: auto; }
}

/* ============ HEADER ============ */
header{
  position: sticky;
  top:0;
  z-index: 100;
  background: rgba(241,244,241,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 32px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.logo{
  display:flex;
  align-items:center;
  gap:9px;
  font-family: var(--font-display);
  font-weight:600;
  font-size: 21px;
  color: var(--pine);
}
.logo span.soft{ color: var(--ink-soft); font-weight:450; }

/* The heart mark. Replaces the reference's plain dot: same visual weight
   (11px dot + 4px ring), but now the pulse motif has a reason to exist. */
.logo-mark{
  width: 19px; height: 19px;
  flex-shrink: 0;
  color: var(--moss);
  display: flex; align-items: center; justify-content: center;
  animation: heartbeat 2.6s ease-in-out infinite;
}
.logo-mark svg{ width: 19px; height: 19px; }
@keyframes heartbeat{
  0%, 100%   { transform: scale(1); }
  8%         { transform: scale(1.16); }
  16%        { transform: scale(1); }
  24%        { transform: scale(1.10); }
  32%        { transform: scale(1); }
}

.nav-links{ display:flex; align-items:center; gap: 34px; }
.nav-links a{
  font-size: 14.5px;
  font-weight:500;
  color: var(--ink-soft);
  transition: color .15s ease;
}
.nav-links a:hover{ color: var(--ink); }
.nav-links a.active{ color: var(--pine); font-weight:600; }

.nav-item-dropdown{ position:relative; }
.dropdown-trigger{
  display:flex; align-items:center; gap:5px;
  background:none; border:none; padding:0;
  font-family: var(--font-body); font-size:14.5px; font-weight:500;
  color: var(--ink-soft); cursor:pointer; transition:color .15s ease;
}
.dropdown-trigger:hover{ color: var(--ink); }
.dropdown-trigger.active{ color: var(--pine); font-weight:600; }
.dropdown-trigger .caret{ transition: transform .15s ease; }
.nav-item-dropdown:hover .dropdown-trigger .caret,
.nav-item-dropdown:focus-within .dropdown-trigger .caret,
.dropdown-trigger[aria-expanded="true"] .caret{ transform: rotate(180deg); }
.dropdown-menu{
  position:absolute; top:100%; left:-14px; margin-top:14px;
  background: var(--paper-card); border:1px solid var(--line); border-radius:10px;
  padding:8px; min-width:210px;
  box-shadow: 0 20px 40px -24px rgba(22,35,31,0.25);
  opacity:0; visibility:hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease;
  z-index:150;
}
/* Opens on hover and on keyboard focus (works with no JavaScript), and on the
   .open class that main.js adds for click and touch. */
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu,
.nav-item-dropdown.open .dropdown-menu{
  opacity:1; visibility:visible; transform: translateY(0);
}
.dropdown-menu li + li{ margin-top:2px; }
.dropdown-menu a{ display:block; padding:9px 12px; border-radius:6px; font-size:14px; color: var(--ink-soft); }
.dropdown-menu a:hover{ background: var(--paper); color: var(--ink); }
.dropdown-menu a.active{ color: var(--pine); font-weight:600; }

.nav-actions{ display:flex; align-items:center; gap:14px; }
.nav-actions .btn{ padding: 10px 20px; font-size:14px; }

#menu-toggle{ display:none; }
.hamburger{ display:none; cursor:pointer; }

/* ============ CTA ============ */
.cta{ margin: 0 0 24px; padding: 0 32px; }
.cta-inner{
  max-width: var(--wrap);
  margin: 0 auto;
  background: linear-gradient(135deg, #0F2620 0%, #16342A 60%, #1B3F32 100%);
  border-radius: 22px;
  padding: 56px 60px;
  color: var(--paper);
  position:relative;
  overflow:hidden;
  text-align:center;
}
.cta-inner h2{ font-size: clamp(26px,3.2vw,36px); max-width: 600px; margin: 0 auto 14px; }
.cta-inner p{ color: rgba(241,244,241,0.7); max-width: 460px; margin: 0 auto 26px; font-size: 15.5px; }
.cta-ctas{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.cta-inner .eyebrow{ justify-content:center; margin-bottom:16px; color: var(--amber); }
.cta-inner .eyebrow::before{ background: var(--amber); box-shadow: 0 0 0 3px rgba(227,169,63,0.18); }

/* The landing page CTA is a little larger than the tool pages'. */
.cta-inner.cta-large{ padding: 64px 60px; }
.cta-inner.cta-large h2{ font-size: clamp(28px,3.6vw,42px); max-width: 640px; margin-bottom:16px; }
.cta-inner.cta-large p{ max-width: 480px; margin-bottom: 30px; font-size: 16px; }
.cta-inner.cta-large .eyebrow{ margin-bottom:18px; }

/* ============ FOOTER ============ */
footer{ background: #0C1F1A; color: rgba(241,244,241,0.72); padding: 64px 0 0; }
.footer-top{
  display:grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--pine-line);
}
.footer-brand .logo{ color: var(--paper); }
.footer-brand p{ margin-top: 14px; font-size: 14px; max-width: 260px; color: rgba(241,244,241,0.55); }
.footer-social{ display:flex; gap:12px; margin-top:22px; }
.footer-social a{
  width:34px; height:34px;
  border: 1px solid var(--pine-line); border-radius: 8px;
  display:flex; align-items:center; justify-content:center;
  transition: border-color .15s ease;
}
.footer-social a:hover{ border-color: rgba(255,255,255,0.4); }
.footer-social svg{ width:16px; height:16px; }
.footer-col h5{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform:uppercase;
  color: rgba(241,244,241,0.45);
  margin-bottom: 18px;
}
.footer-col ul{ display:flex; flex-direction:column; gap:12px; }
.footer-col a{ font-size: 14.5px; color: rgba(241,244,241,0.75); transition: color .15s ease; }
.footer-col a:hover{ color: var(--paper); }
.footer-bottom{
  display:flex; align-items:center; justify-content:space-between;
  padding: 22px 0; font-size: 13px; color: rgba(241,244,241,0.45);
  flex-wrap:wrap; gap: 12px;
}
.footer-bottom .status{ display:flex; align-items:center; gap:8px; font-family: var(--font-mono); }
.footer-bottom .status .live-dot{
  width:7px;height:7px;border-radius:50%;
  background: var(--moss);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink{ 0%,100%{opacity:1;} 50%{opacity:.35;} }
.footer-legal{ display:flex; gap:20px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px){
  .footer-top{ grid-template-columns: repeat(2,1fr); }
  .footer-brand{ grid-column: 1/-1; }
}

@media (max-width: 760px){
  .nav-links{
    position:absolute;
    top: 100%; left:0; right:0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction:column;
    align-items:flex-start;
    padding: 20px 32px 26px;
    gap: 18px;
    display:none;
  }
  #menu-toggle:checked ~ .nav-links{ display:flex; }
  .dropdown-menu{
    position:static; opacity:1; visibility:visible; transform:none;
    box-shadow:none; border:none; background:transparent;
    padding:4px 0 0 14px; margin-top:8px; min-width:0;
  }
  .dropdown-trigger{ pointer-events:none; }
  .dropdown-trigger .caret{ display:none; }
  .nav-actions .btn-ghost{ display:none; }
  .hamburger{ display:flex; flex-direction:column; gap:5px; width:22px; }
  .hamburger span{ height:2px; background: var(--pine); border-radius:2px; }
  .cta-inner, .cta-inner.cta-large{ padding: 48px 26px; }
}

@media (max-width: 620px){
  .cta-inner, .cta-inner.cta-large{ padding: 44px 24px; }
  .footer-top{ grid-template-columns: 1fr; }
  .footer-bottom{ flex-direction:column; align-items:flex-start; }
}
