/* ============================================================
   KATAX — Kaya for Accounting & Tax Services Inc.
   Design system: "the tax ledger" — ruled lines, itemized line
   codes, form-like structure. See DESIGN.md for the rationale.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #16213E;
  --ink-soft: #1F2D4E;
  --paper: #EDF2F4;
  --paper-2: #FFFFFF;
  --accent: #C0272D;
  --accent-soft: #D3555C;
  --confirm: #1C7A3B;
  --line: #C7D1D6;
  --muted: #5B6472;
  --text: #202634;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --max: 1120px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--text); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--mono); }

.muted { color: var(--muted); }

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

.site-header {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(to right, #C0272D 0%, #C0272D 33%, #1B1B1B 33%, #1B1B1B 66%, #1C7A3B 66%, #1C7A3B 100%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max);
  margin: 0 auto;
}

.nav__logo img { display: block; height: 36px; width: auto; }
.nav__logo { display: flex; align-items: center; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav__links a:hover { color: var(--accent); text-decoration: none; }

.nav__links a.is-active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

.nav__call {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--ink);
  white-space: nowrap;
}

.nav__call:hover {
  background: var(--ink);
  color: var(--paper-2);
  text-decoration: none;
}

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}

.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav__links.is-open { max-height: 320px; }
  .nav__links li { width: 100%; }
  .nav__links a {
    display: block;
    padding: 14px 24px;
    width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .nav__call { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(
      480px 320px at 82% 15%,
      rgba(192, 39, 45, 0.12),
      transparent 70%
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 37px,
      rgba(22, 33, 62, 0.06) 38px
    ),
    var(--paper);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.hero p.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(22, 33, 62, 0.06);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(192, 39, 45, 0.25);
}
.btn-primary:hover {
  background: #8F1D22;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(192, 39, 45, 0.32);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; text-decoration: none; }

.hero__trust {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* Ledger form illustration */
.ledger-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 22px 18px;
  box-shadow: 6px 6px 0 rgba(22, 33, 62, 0.05), 0 12px 30px rgba(22, 33, 62, 0.08);
}

.ledger-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.ledger-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.ledger-row:last-child { border-bottom: none; }

.ledger-row__code {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 76px;
}

.ledger-row__check {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1.5px solid var(--confirm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ledger-row__check svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ledger-card.is-checked .ledger-row__check svg {
  opacity: 1;
  transform: scale(1);
}

.ledger-row:nth-child(2) .ledger-row__check svg { transition-delay: 0.15s; }
.ledger-row:nth-child(3) .ledger-row__check svg { transition-delay: 0.35s; }
.ledger-row:nth-child(4) .ledger-row__check svg { transition-delay: 0.55s; }
.ledger-row:nth-child(5) .ledger-row__check svg { transition-delay: 0.75s; }

.ledger-card__stamp {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.stamp {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--confirm);
  border: 1.5px solid var(--confirm);
  border-radius: 3px;
  padding: 4px 10px;
  transform: rotate(-3deg);
  opacity: 0;
  transition: opacity 0.4s ease 0.95s;
}
.ledger-card.is-checked .stamp { opacity: 1; }

/* ---------- Sections ---------- */

.section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.section--tight { padding: 48px 0; }

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.section__head p { margin: 0; }

/* Reasons list (no cards — ledger rule dividers) */
.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 780px) {
  .reasons { grid-template-columns: 1fr; }
}

.reason {
  padding: 26px 24px 26px 0;
  border-bottom: 1px solid var(--line);
}

.reason:not(:last-child) {
  border-right: 1px solid var(--line);
}

@media (max-width: 780px) {
  .reason:not(:last-child) { border-right: none; }
}

.reason__code {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 10px;
}

.reason h3 { margin-bottom: 8px; }
.reason p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* Itemized services list */
.line-items {
  border-top: 1px solid var(--ink);
}

.line-item {
  display: grid;
  grid-template-columns: 40px 100px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 700px) {
  .line-item { grid-template-columns: 40px 1fr; gap: 6px 14px; }
  .line-item__code { grid-column: 2; }
  .line-item__body { grid-column: 2; }
  .line-item__link { grid-column: 2; }
}

.line-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(192, 39, 45, 0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.line-item__icon svg {
  width: 20px;
  height: 20px;
}

.line-item:hover .line-item__icon {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(22, 33, 62, 0.12);
}

.line-item__code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  padding-top: 3px;
}

.line-item__body h3 { margin-bottom: 6px; }
.line-item__body p { color: var(--muted); margin: 0; font-size: 0.96rem; }

.line-item__link {
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* About preview split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

.split blockquote {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 0 0 20px;
}

.split cite {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
}

/* CTA band */
.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 56px 0;
}

.cta-band h2 { color: #fff; }
.cta-band p { color: #C9D2E0; }

.cta-band__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band .btn-primary { background: var(--accent); }
.cta-band .btn-outline { border-color: #fff; color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--ink); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #B9C4D6;
  padding: 56px 0 26px;
  font-size: 0.92rem;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 700px) {
  .footer__top { grid-template-columns: 1fr; gap: 30px; }
}

.footer__logo {
  display: block;
  height: 34px;
  width: auto;
  margin-bottom: 16px;
}

.footer__badge {
  display: inline-flex;
  margin-bottom: 14px;
}

.footer__brand p {
  max-width: 34ch;
}

.footer__social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.footer__social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.footer__social-icon:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.footer__social-icon svg {
  width: 16px;
  height: 16px;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__col li {
  margin-bottom: 12px;
}

.footer__contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer__contact-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer__contact-icon svg {
  width: 15px;
  height: 15px;
}

.site-footer h4 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.site-footer a { color: #B9C4D6; }
.site-footer p { color: #8D98AE; }
.site-footer a:hover { color: #fff; }

.footer__bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: #8D98AE;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: #B9C4D6;
}

/* ---------- Page header (interior pages) ---------- */

.page-header {
  padding: 52px 0 40px;
  border-bottom: 1px solid var(--line);
}

.page-header p.lede { color: var(--muted); max-width: 60ch; }

/* ---------- Values / team ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}
@media (max-width: 700px) { .values { grid-template-columns: 1fr; } }

.value__code {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.8rem;
}

.team-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: start;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 6px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(22, 33, 62, 0.04);
}

.team-card__avatar {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.6rem;
}

@media (max-width: 520px) {
  .team-card { grid-template-columns: 1fr; }
  .team-card__avatar { width: 64px; height: 64px; font-size: 1.2rem; }
}

/* ---------- Services page detail rows ---------- */

.service-detail {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
}
@media (max-width: 700px) {
  .service-detail { grid-template-columns: 1fr; gap: 8px; }
}

.service-detail__code {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  padding-top: 4px;
}

.service-detail ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.service-detail li { margin-bottom: 6px; }

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.96rem;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--text);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
}

.field textarea { min-height: 130px; resize: vertical; }

.field-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

/* honeypot field — hidden from real users */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}
.form-status.is-success {
  display: block;
  background: rgba(76, 122, 99, 0.12);
  color: var(--confirm);
  border: 1px solid var(--confirm);
}
.form-status.is-error {
  display: block;
  background: rgba(192, 39, 45, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.info-block {
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}

.info-row {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.info-row__label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 84px;
  padding-top: 2px;
}

.info-row a { color: var(--ink); font-weight: 600; }
.info-row a:hover { color: var(--accent); }

.map-embed {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.map-embed iframe { display: block; width: 100%; height: 260px; border: 0; }

/* ---------- Scroll reveal ---------- */

.will-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.will-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.is-revealed { opacity: 1; }

/* ---------- Richer hover interactions ---------- */

.line-item, .service-detail {
  transition: background-color 0.2s ease;
  border-radius: 4px;
}

.line-item:hover, .service-detail:hover {
  background-color: rgba(192, 39, 45, 0.035);
}

.line-item:hover .line-item__code,
.service-detail:hover .service-detail__code {
  color: var(--accent-soft);
}

.reason {
  transition: transform 0.25s ease;
}

.reason:hover {
  transform: translateY(-3px);
}

.team-card {
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.team-card:hover {
  box-shadow: 6px 6px 0 rgba(22, 33, 62, 0.08);
  transform: translateY(-2px);
}

.btn {
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary:hover {
  box-shadow: 3px 3px 0 rgba(22, 33, 62, 0.15);
}

.nav__logo img {
  transition: transform 0.2s ease;
}

.nav__logo:hover img {
  transform: translateY(-1px);
}
