/* ============================================================
   Karl's Bookkeeping LLC — custom styles
   Tokens: ink #0f172a · ink-soft #1e293b · paper #faf9f6
           gold #d4af37 · gold-deep #b8952b
   Tailwind CDN handles utilities; this file owns the ledger
   texture, buttons, cards, forms, and motion states.
   ============================================================ */

:root {
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --paper: #faf9f6;
  --gold: #d4af37;
  --gold-deep: #b8952b;
  --ledger-red: #c0392b;
}

/* ---------- Ledger-paper signature texture ---------- */

.hero {
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.06), rgba(250, 249, 246, 0) 45%),
    var(--paper);
}

.ledger-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    rgba(15, 23, 42, 0.055) 31px,
    rgba(15, 23, 42, 0.055) 32px
  );
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 70%, transparent);
}

.ledger-lines--dark {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    rgba(250, 249, 246, 0.05) 31px,
    rgba(250, 249, 246, 0.05) 32px
  );
}

/* Classic ledger red margin rule — desktop only; on small screens it collides with text */
.ledger-margin {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(2rem, 4vw, 5.5rem);
  width: 1px;
  background: linear-gradient(180deg, rgba(192, 57, 43, 0.35), rgba(192, 57, 43, 0.08) 75%, transparent);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .ledger-margin {
    display: block;
  }
}

/* ---------- Nav ---------- */

#site-nav {
  background: transparent;
}

#site-nav.nav-scrolled {
  background: rgba(250, 249, 246, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

#site-nav.nav-scrolled nav {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.mobile-link {
  display: block;
  padding: 0.75rem 0.5rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 0.5rem;
}

.mobile-link:hover,
.mobile-link:focus-visible {
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink);
}

/* ---------- Buttons ---------- */

.btn-gold {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.65rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: #e0bd4d;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}

.btn-ghost {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.2);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--gold-deep);
  background: rgba(212, 175, 55, 0.08);
  transform: translateY(-2px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Section furniture ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--gold);
}

.eyebrow.justify-center {
  justify-content: center;
}

.eyebrow--gold {
  color: var(--gold);
}

.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.6rem);
  line-height: 1.15;
}

.underline-hand {
  background-image: linear-gradient(to top, rgba(212, 175, 55, 0.45) 0.35em, transparent 0.35em);
}

/* ---------- Service cards ---------- */

.service-card {
  position: relative;
  padding: 1.75rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow:
    0 16px 32px -12px rgba(15, 23, 42, 0.18),
    0 0 0 3px rgba(212, 175, 55, 0.12);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-deep);
  margin-bottom: 1.1rem;
}

.card-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card-body {
  color: rgba(30, 41, 59, 0.85);
  line-height: 1.65;
  font-size: 0.975rem;
}

/* ---------- Why items ---------- */

.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.why-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: var(--gold-deep);
  background: rgba(212, 175, 55, 0.08);
}

.why-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.why-body {
  color: rgba(30, 41, 59, 0.85);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ---------- Pricing ---------- */

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: var(--paper);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.price-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow:
    0 18px 36px -14px rgba(15, 23, 42, 0.2),
    0 0 0 3px rgba(212, 175, 55, 0.12);
}

.price-card--featured {
  background: var(--ink);
  color: var(--paper);
  border-color: rgba(212, 175, 55, 0.6);
}

.price-card--featured .price-tagline,
.price-card--featured .price-list li {
  color: rgba(250, 249, 246, 0.8);
}

.price-card--featured .price-list li::before {
  color: var(--gold);
}

.price-flag {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

.price-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.price-amount {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

.price-per {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.6;
  margin-left: 0.15rem;
}

.price-plus {
  font-size: 1.6rem;
  vertical-align: 0.35rem;
}

.price-tagline {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: rgba(30, 41, 59, 0.75);
}

.price-list {
  margin: 1.4rem 0 1.75rem;
  display: grid;
  gap: 0.65rem;
  font-size: 0.95rem;
}

.price-list li {
  position: relative;
  padding-left: 1.6rem;
  color: rgba(30, 41, 59, 0.9);
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold-deep);
  font-weight: 700;
}

/* Ghost button needs light treatment inside dark featured card */
.price-card--featured .btn-ghost {
  border-color: rgba(250, 249, 246, 0.35);
  color: var(--paper);
}

/* ---------- Contact form ---------- */

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(250, 249, 246, 0.85);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  border-radius: 0.6rem;
  border: 1px solid rgba(250, 249, 246, 0.2);
  background: rgba(15, 23, 42, 0.55);
  color: var(--paper);
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input::placeholder {
  color: rgba(250, 249, 246, 0.35);
}

.form-input:focus {
  border-color: var(--gold);
  background: rgba(15, 23, 42, 0.75);
}

select.form-input option {
  background: var(--ink);
  color: var(--paper);
}

.link-light {
  color: rgba(250, 249, 246, 0.9);
  text-decoration: underline;
  text-decoration-color: rgba(212, 175, 55, 0.6);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.link-light:hover,
.link-light:focus-visible {
  color: var(--gold);
}

/* ---------- Motion initial states (GSAP animates in) ---------- */

.hero-item,
.reveal,
.reveal-card {
  opacity: 0;
}

/* If GSAP fails to load, everything stays visible */
.no-gsap .hero-item,
.no-gsap .reveal,
.no-gsap .reveal-card {
  opacity: 1;
}

/* Reconciliation card idle float */
.recon-card {
  will-change: transform;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-item,
  .reveal,
  .reveal-card {
    opacity: 1 !important;
    transform: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
