/* ===================================================================
   Affinity Tax Solutions — shared site styles for the service pages
   (resolution / tax-preparation / advisory). Mirrors the homepage's
   "Stitch Affinity" quiet-luxury system: ivory, ink, champagne.
   =================================================================== */

:root {
  --ivory: #f9f9f9;
  --surface: #ffffff;
  --surface-alt: #f3f3f4;
  --ink: #1a1c1c;
  --muted: #45474a;
  --hairline: #c5c6ca;
  --line: #e5e5e5;
  --black: #000000;
  --champagne: #e8dfc5;
  --champagne-ink: #68634d;
  --gold: #c5a059;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -0.015em; line-height: 1.08; margin: 0; }

.ms {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal; line-height: 1;
  vertical-align: middle; -webkit-font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding-left: clamp(20px, 5vw, 64px); padding-right: clamp(20px, 5vw, 64px); }
.section { padding-top: clamp(64px, 9vw, 112px); padding-bottom: clamp(64px, 9vw, 112px); }
.eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--champagne-ink); margin: 0 0 18px; }
.lead { font-size: clamp(17px, 2vw, 19px); line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* ---------- Navigation (shared by every page: logo + tabs left, actions right) ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(249,249,249,0.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.nav-inner { max-width: 1440px; margin: 0 auto; min-height: 80px; padding: 0 clamp(20px,4vw,64px); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* logo pinned far-left; nav links + actions pushed to the right of the header */
.nav-left { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: clamp(22px, 3vw, 44px); }
.nav-logo { line-height: 0; text-decoration: none; }
.nav-logo img { height: clamp(30px, 3.4vw, 38px); width: auto; }
.nav-links { display: flex; gap: clamp(18px, 2vw, 30px); align-items: center; }
.nav-link { position: relative; color: var(--muted); text-decoration: none; font-size: 15px; transition: color .2s ease; white-space: nowrap; }
.nav-link:hover { color: var(--black); }
.nav-link.active { color: var(--black); border-bottom: 2px solid var(--black); padding-bottom: 3px; }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.m-menu { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-sans); font-size: 16px; font-weight: 500; cursor: pointer; text-decoration: none; border-radius: 6px; padding: 15px 30px; border: 1px solid transparent; transition: opacity .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.btn-sm { padding: 11px 22px; font-size: 15px; }
.btn-lg { padding: 17px 36px; font-size: 17px; }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { opacity: .9; }
.btn-ghost { background: #fff; color: var(--black); border-color: var(--line); }
.btn-ghost:hover { background: #eee; }
.btn-champagne { background: var(--champagne); color: var(--ink); }
.btn-champagne:hover { background: #ddd2b2; }
.btn-white { background: #fff; color: #000; }
.btn-white:hover { background: #eee; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-block { width: 100%; }

/* ---------- Cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.hairline-top { border-top: 1px solid var(--hairline); }
.surface { background: var(--surface); }
.surface-alt { background: var(--surface-alt); }

/* check list */
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--ink); line-height: 1.5; }
.checklist .ms { color: #2f6b4f; font-size: 20px; flex-shrink: 0; margin-top: 1px; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--hairline); border-radius: 14px; padding: clamp(24px, 4vw, 40px); box-shadow: 0 24px 48px -28px rgba(0,0,0,.22); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-sans); font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--hairline); border-radius: 8px; padding: 12px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.consent-row { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 20px; }
.consent-row input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: #000; }
.consent-row label { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.form-note { font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 14px; }
.form-status { font-size: 14px; margin-top: 14px; min-height: 1px; }
.form-status.err { color: #b42318; }
.form-status.ok { color: #2f6b4f; }
.form-success { display: none; text-align: center; padding: 24px 8px; }
.form-success .ms { font-size: 48px; color: #2f6b4f; }

/* ---------- Hero variants ---------- */
.hero { position: relative; overflow: hidden; }
.hero-dark { background: #121414; color: #fff; }
.hero-dark .lead { color: #c6c6c9; }
.hero-dark .eyebrow { color: var(--champagne); }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; display: grid; gap: 24px; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step-num { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 15px; color: var(--black); background: #fff; }

/* ---------- Reveal animation ---------- */
@keyframes popUp { 0% { opacity: 0; transform: translateY(40px); } 100% { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; will-change: opacity, transform; }
.reveal.in-view { animation: popUp .9s cubic-bezier(.16,1,.3,1) both; }
.reveal-group > * { opacity: 0; }
.reveal-group.in-view > * { animation: popUp .85s cubic-bezier(.16,1,.3,1) both; }
.reveal-group.in-view > *:nth-child(2) { animation-delay: .12s; }
.reveal-group.in-view > *:nth-child(3) { animation-delay: .24s; }
.reveal-group.in-view > *:nth-child(4) { animation-delay: .36s; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal-group > * { animation: none !important; opacity: 1 !important; transform: none !important; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ivory); border-top: 1px solid var(--hairline); }
.site-footer .inner { max-width: 1440px; margin: 0 auto; padding: 48px clamp(20px,5vw,64px); display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 32px; }
.site-footer .links a { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-decoration: none; }
.site-footer .links a:hover { color: #000; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-left .nav-links, .nav-actions { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }

  /* No-JS mobile menu via <details> */
  details.m-menu { position: relative; display: block; }
  details.m-menu > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--hairline); border-radius: 8px; background: #fff; }
  details.m-menu > summary::-webkit-details-marker { display: none; }
  details.m-menu > summary .ms { font-size: 26px; }
  details.m-menu[open] > summary .ms::before { content: 'close'; }
  .m-panel { position: absolute; right: 0; top: 54px; width: 240px; background: #fff; border: 1px solid var(--hairline); border-radius: 12px; box-shadow: 0 24px 48px -20px rgba(0,0,0,.25); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
  .m-panel a { padding: 12px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 16px; }
  .m-panel a:hover { background: var(--surface-alt); }
  .m-panel .btn { margin-top: 8px; }
}
@media (min-width: 981px) { details.m-menu { display: none; } }
