/* Piggy Tax & Bookkeeping — base styles */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  /* Brand palette */
  --green: #6EB04F;
  --green-deep: #2D5016;
  --green-soft: #C9DCB7;
  --green-tint: #E8F0DD;
  --green-leaf: #4F8B33;

  --cream: #FAFAF7;
  --paper: #F2EEE3;
  --paper-warm: #E9E2CE;
  --line: #E5E1D4;
  --line-strong: #D4CFBE;

  --ink: #1A1A1A;
  --ink-soft: #3A3A36;
  --ink-muted: #6B6B62;
  --ink-faint: #9C9A8E;

  --accent-warm: #C97E3F; /* used very sparingly */

  /* Type scale (editorial) */
  --display: 'DM Serif Display', 'Times New Roman', serif;
  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Section sizing */
  --max: 1280px;
  --max-narrow: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
  color: var(--green-deep);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

/* Editorial helpers */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-leaf);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1.5px;
  background: var(--green-leaf);
  display: inline-block;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1.5px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--green-deep);
  color: var(--cream);
}
.btn-primary:hover { background: #1f3a0e; }
.btn-accent {
  background: var(--green);
  color: #0e1a05;
}
.btn-accent:hover { background: #62a043; }
.btn-outline {
  background: transparent;
  border-color: var(--green-deep);
  color: var(--green-deep);
}
.btn-outline:hover { background: var(--green-deep); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--green-deep); color: var(--green-deep); }

.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--green-deep);
  border-bottom: 1.5px solid var(--green-deep);
  padding-bottom: 2px;
  transition: gap .2s ease, color .15s ease;
}
.btn-arrow:hover { gap: 14px; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--green-soft);
  box-shadow: 0 16px 40px -20px rgba(45, 80, 22, 0.18);
}

/* Decorative number — outlined serif behind content */
.deco-num {
  font-family: var(--display);
  font-size: clamp(140px, 22vw, 280px);
  line-height: 0.8;
  font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--green-soft);
  letter-spacing: -0.05em;
  user-select: none;
  pointer-events: none;
}

/* Section dividers — soft diagonal lines */
.divider-diag {
  position: relative;
  height: 1px;
  background: var(--line);
  transform: skewY(-1.5deg);
  margin: 0 -100px;
}

/* Subtle leaf pattern background */
.leaf-bg {
  background-image:
    radial-gradient(ellipse 200px 80px at 20% 30%, rgba(110, 176, 79, 0.04), transparent 60%),
    radial-gradient(ellipse 300px 120px at 80% 70%, rgba(45, 80, 22, 0.05), transparent 60%),
    radial-gradient(ellipse 240px 100px at 50% 100%, rgba(110, 176, 79, 0.03), transparent 60%);
}

/* Form */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.field-input,
.field-select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong);
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(110, 176, 79, 0.15);
}
.field-input::placeholder { color: var(--ink-faint); }

/* Chips/badges */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green-deep);
  font-size: 12.5px;
  font-weight: 600;
}

/* Anim */
/* Subtle entrance — applied via JS once mounted, with safe initial state */
.fade-up { opacity: 1; }
.is-loading .fade-up { opacity: 0; transform: translateY(14px); }
.fade-up { transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.fade-up.d1 { transition-delay: .08s; }
.fade-up.d2 { transition-delay: .16s; }
.fade-up.d3 { transition-delay: .24s; }
.fade-up.d4 { transition-delay: .32s; }

@keyframes swayLeaf {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-4px); }
}

/* Tweak-bound overrides set on <html data-*> */
html[data-accent="muted"]  { --green: #8AA86F; --green-leaf: #6F8F58; }
html[data-accent="vivid"]  { --green: #6EB04F; --green-leaf: #4F8B33; }
html[data-accent="deep"]   { --green: #5A9740; --green-leaf: #3F7028; }

html[data-bg="cream"] { --cream: #FAFAF7; }
html[data-bg="paper"] { --cream: #F5EFE0; --line: #E0DAC6; }
html[data-bg="white"] { --cream: #FFFFFF; --line: #ECE9DE; }

html[data-numerals="hidden"] .deco-num { display: none; }
html[data-numerals="solid"] .deco-num {
  -webkit-text-stroke: 0;
  color: var(--green-tint);
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.75);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, padding .2s ease;
}
.site-header.scrolled {
  background: rgba(250, 250, 247, 0.92);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 46px;
  width: auto;
  max-width: 230px;
  object-fit: contain;
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--green-tint);
  border-radius: 14px;
  border: 1px solid rgba(45, 80, 22, 0.1);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--display);
  font-size: 22px;
  color: var(--green-deep);
  letter-spacing: -0.01em;
}
.brand-amp { color: var(--green); margin: 0 2px; }
.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
  font-weight: 500;
}
.nav-desk {
  display: flex;
  gap: 6px;
  align-items: center;
}
.nav-link {
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover { color: var(--green-deep); background: var(--green-tint); }
.nav-link.active { color: var(--green-deep); background: var(--green-tint); }
.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--green-deep);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--green-soft);
}
.header-phone:hover { background: var(--green-tint); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .nav-desk { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-mobile { display: flex; }
  .header-phone span { display: none; }
}
@media (max-width: 720px) {
  .header-cta .btn-sm { display: none; }
  .brand-sub { display: none; }
}

/* ─── Footer ─── */
.footer-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 260px;
  /* tint the green logo to cream for the dark-green footer */
  filter: brightness(0) invert(1) opacity(0.95);
}
.site-footer {
  background: var(--green-deep);
  color: rgba(250, 250, 247, 0.85);
  padding: 80px 0 30px;
  margin-top: 80px;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 60px;
  background: var(--cream);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 50%);
}
.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-top: 40px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: rgba(250, 250, 247, 0.78);
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--green); }
.footer-h {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-soft);
  margin-bottom: 8px;
}
.footer-bottom {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid rgba(250, 250, 247, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(250, 250, 247, 0.5);
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-credit {
  font-size: 12.5px;
  color: rgba(250, 250, 247, 0.55);
  letter-spacing: 0.01em;
}
.footer-credit a {
  color: var(--green-soft);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(178, 215, 184, 0.3);
  padding-bottom: 1px;
  transition: color .15s ease, border-color .15s ease;
}
.footer-credit a:hover {
  color: var(--cream);
  border-bottom-color: var(--cream);
}
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(250, 250, 247, 0.08);
  color: var(--cream);
  transition: background .15s ease, transform .15s ease;
}
.footer-social a:hover { background: var(--green); transform: translateY(-2px); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Responsive */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .container, .container-narrow { padding: 0 22px; }
  .deco-num { font-size: clamp(100px, 26vw, 180px); }
}
