/* James B Frankel CPA PC — a quiet ledger. Paper, ledger green, one brass pill. */
:root {
  --field: #f7f2e7;
  --field-soft: #efe7d3;
  --ink: #232a24;
  --muted: #4f594f;
  --deep: #1e4d3b;
  --deep-ink: #f7f2e7;
  --call: #b8860b;
  --call-hover: #9c7209;
  --call-ink: #232a24;
  --ghost: #1e4d3b;
  --accent: #b8860b;
  --line: #d8cdae;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out-expo: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-out-expo-alt: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1);
  --dur-fast: 0.3s;
  --dur-hover: 0.5s;
  --dur-enter: 0.7s;
  --dur-hero: 1.5s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--deep);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--field);
  color: var(--ink);
  padding: 0.5rem 1rem;
}

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep);
  margin: 0 0 0.9em;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.75rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(247, 242, 231, 0.94);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}

.brand span {
  font-weight: 600;
  color: var(--deep);
}

.site-header nav {
  display: flex;
  gap: 1.4rem;
}

.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: background var(--dur-fast) var(--ease-out-circ), color var(--dur-fast) var(--ease-out-circ), transform var(--dur-fast) var(--ease-out-circ);
}
.btn:hover {
  transform: translate3d(0, -2px, 0);
}
.btn-fill {
  background: var(--call);
  color: var(--call-ink);
}
.btn-fill:hover {
  background: var(--call-hover);
}
.btn-ghost {
  border: 1px solid currentColor;
  color: var(--ghost);
}
.call-nowrap {
  white-space: nowrap;
}

/* Signature flourish: underline grows from the left. */
.link-underline {
  position: relative;
  text-decoration: none;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform var(--dur-hover) var(--ease-out-expo-alt);
}
.link-underline:hover::after {
  transform: scaleX(1);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
  display: flex;
  align-items: center;
}
.hero-img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transition: opacity var(--dur-hero) var(--ease-out-expo);
}
.hero.is-in .hero-img,
.hero-img.is-in {
  opacity: 1;
}
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin: clamp(1rem, 4vw, 3rem);
  padding: 2.2rem 2.3rem 2rem;
  background: rgba(247, 242, 231, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(216, 205, 174, 0.9);
  border-radius: 4px;
}
.hero-copy h1 {
  margin-bottom: 0.45em;
}
.hero-copy .btn-ghost {
  color: var(--deep);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.4em 0 0;
}

/* Sections */
.services,
.how,
.faq,
.area,
.contact {
  padding: clamp(4rem, 8vw, 6.5rem) clamp(1.25rem, 6vw, 5rem);
  max-width: 76rem;
  margin: 0 auto;
}

/* Service river */
.river {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
}
.river-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.river-row.flip img {
  order: 2;
}
.river-row img {
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--field-soft);
  width: 100%;
}
.river-row h3 {
  margin-bottom: 0.4em;
}
.river-row p {
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 0;
}

/* About — deep ledger green */
.about {
  background: var(--deep);
  color: var(--deep-ink);
}
.about-inner {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 6.5rem) clamp(1.25rem, 6vw, 3rem);
}
.about .kicker {
  color: var(--call);
}
.about p {
  color: #e6dfcb;
}

/* How it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.steps li {
  border-top: 2px solid var(--accent);
  padding-top: 1.4rem;
}
.steps svg {
  color: var(--deep);
  margin-bottom: 0.8rem;
}
.steps h3 {
  font-size: 1.2rem;
}
.steps p {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 0;
}

/* FAQ */
.faq-list {
  max-width: 44rem;
}
.faq-list details {
  border-top: 1px solid var(--line);
}
.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 0;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.12rem;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list details p {
  margin: 0 0 1.15rem;
  max-width: 42ch;
  color: var(--muted);
}

/* Area + map */
.area .section-head p:last-child {
  color: var(--muted);
}
.map-wrap {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-line {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: var(--muted);
}
.contact-line svg {
  flex: none;
  margin-top: 0.25rem;
  color: var(--deep);
}
.contact-line a {
  color: var(--deep);
  font-weight: 600;
}
.contact-form {
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.75rem;
  display: grid;
  gap: 1rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--field);
  color: var(--ink);
  width: 100%;
}
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--deep);
  outline-offset: 1px;
}
.contact-form .btn {
  justify-self: start;
}
.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* Footer */
.site-footer {
  background: var(--deep);
  color: #e6dfcb;
  padding: 2.5rem clamp(1.25rem, 6vw, 5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}
.site-footer p {
  margin: 0;
  font-size: 0.92rem;
}
.site-footer a {
  color: var(--field);
}

/* Reviews (unused — kept minimal; section deleted from markup) */
.reviews,
.review-carousel .review-track {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 50px, 0);
  transition:
    opacity var(--dur-enter) var(--ease-out-expo),
    transform var(--dur-enter) var(--ease-out-expo);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* A block of copy that belongs together: the container holds still and its
   children come in one after another, top first. motion.js sets the delays. */
[data-reveal="cascade"] {
  opacity: 1;
  transform: none;
  transition: none;
}
[data-reveal="cascade"] > * {
  opacity: 0;
  transform: translate3d(0, 50px, 0);
  transition:
    opacity var(--dur-enter) var(--ease-out-expo),
    transform var(--dur-enter) var(--ease-out-expo);
}
[data-reveal="cascade"].is-in > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 390: image occupies the first screen; type overlaps only the bottom third
   so a face in the upper two-thirds stays visible. */
@media (max-width: 640px) {
  .site-header nav {
    display: none;
  }
  .site-header .btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.92rem;
  }
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    min-height: 100dvh;
  }
  .hero-img {
    object-position: center 12%;
  }
  .hero-copy {
    width: auto;
    max-width: none;
    margin: 0 1rem calc(1rem + env(safe-area-inset-bottom));
    padding: 1.15rem 1.1rem 1.05rem;
  }
  .hero-copy h1 {
    font-size: 1.65rem;
  }
  .hero-copy > p:nth-of-type(2) {
    font-size: 0.95rem;
  }
  .hero-actions .btn {
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
  }
  .river-row,
  .river-row.flip img {
    grid-template-columns: 1fr;
    order: 0;
  }
  .river-row img {
    order: -1;
  }
  .river-row.flip img {
    order: -1;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .map-wrap iframe {
    height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal="cascade"] > *,
  .hero-img {
    opacity: 1;
    transform: none !important;
    transition: none;
  }
  .btn:hover {
    transform: none;
  }
}
