/* =========================================================
   Penn York Tax Relief — V1 "Two States, One Advocate"
   Mobile-first. Zero horizontal overflow at 390px.
   ========================================================= */

@media (max-width:400px){
  .phone-cta-label{display:none;}
  .phone-cta{padding:10px 14px;}
  .brand-logo{height:38px;}
  .wrap{padding:0 16px;}
}

:root{
  --navy:#072F9F;
  --ink-deep:#04113B;
  --red:#CC1B29;
  --paper:#F7F8FB;
  --white:#FFFFFF;
  --ink:#1A2036;
  --muted:#5B6478;
  --line:#E2E6EF;
  --shadow:0 18px 44px -22px rgba(7,47,159,.35);
  --shadow-sm:0 8px 20px -14px rgba(7,47,159,.4);
  --serif:"Fraunces", Georgia, "Times New Roman", serif;
  --sans:"Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap:1140px;
  --r:14px;
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--ink);
  background:var(--paper);
  line-height:1.6;
  overflow-x:hidden;               /* hard guard against sideways scroll */
  font-size:16px;
  -webkit-font-smoothing:antialiased;
}
img,svg{max-width:100%;height:auto;display:block;}
a{color:inherit;}

.wrap{width:100%;max-width:var(--wrap);margin:0 auto;padding:0 20px;}

.skip-link{
  position:absolute;left:-999px;top:0;background:var(--navy);color:#fff;
  padding:10px 16px;border-radius:0 0 8px 0;z-index:200;
}
.skip-link:focus{left:0;}

:focus-visible{outline:3px solid var(--red);outline-offset:2px;border-radius:4px;}

/* ---------- Typography ---------- */
h1,h2,h3{font-family:var(--serif);font-weight:600;line-height:1.08;margin:0;color:var(--ink);letter-spacing:-.01em;}
.kicker,.eyebrow{
  font-family:var(--sans);font-weight:700;font-size:.72rem;letter-spacing:.18em;
  text-transform:uppercase;color:var(--red);margin:0 0 14px;
}
.section-h{font-size:clamp(1.75rem,6.4vw,2.9rem);}
.section-lead,.section-head p:not(.kicker){color:var(--muted);}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-family:var(--sans);font-weight:600;font-size:1rem;
  padding:15px 24px;border-radius:999px;text-decoration:none;
  border:2px solid transparent;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,color .18s ease;
  cursor:pointer;text-align:center;line-height:1.2;
}
.btn--primary{background:var(--red);color:#fff;box-shadow:var(--shadow-sm);}
.btn--primary:hover{transform:translateY(-2px);box-shadow:0 14px 30px -14px rgba(204,27,41,.6);}
.btn--ghost{background:transparent;color:var(--navy);border-color:rgba(7,47,159,.35);}
.btn--ghost:hover{border-color:var(--navy);background:rgba(7,47,159,.06);}
.btn--onDark.btn--ghost{color:#fff;border-color:rgba(255,255,255,.5);}
.btn--onDark.btn--ghost:hover{background:rgba(255,255,255,.12);border-color:#fff;}

/* ---------- Header ---------- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(247,248,251,.86);
  backdrop-filter:saturate(160%) blur(10px);
  -webkit-backdrop-filter:saturate(160%) blur(10px);
  border-bottom:1px solid transparent;
  transition:border-color .3s ease,box-shadow .3s ease,background .3s ease;
}
.site-header.is-stuck{border-bottom-color:var(--line);box-shadow:0 6px 20px -18px rgba(7,47,159,.6);}
.header-inner{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding-top:10px;padding-bottom:10px;}
.brand{display:inline-flex;align-items:center;min-width:0;margin-right:auto;}
.brand-logo{height:42px;width:auto;max-width:52vw;object-fit:contain;object-position:left center;}
.phone-cta{
  display:inline-flex;align-items:center;gap:10px;text-decoration:none;
  background:var(--navy);color:#fff;padding:9px 15px;border-radius:999px;
  box-shadow:var(--shadow-sm);white-space:nowrap;transition:transform .18s ease;
}
.phone-cta:hover{transform:translateY(-2px);}
.ico-phone{width:18px;height:18px;fill:#fff;flex:0 0 auto;}
.phone-cta-text{display:flex;flex-direction:column;line-height:1.05;}
.phone-cta-label{font-size:.62rem;letter-spacing:.06em;text-transform:uppercase;opacity:.8;}
.phone-cta-num{font-weight:700;font-size:.95rem;}

/* ---------- Primary navigation ----------
   No-JS: hamburger stays hidden and the links render below the bar (usable).
   JS present: hamburger appears and the nav collapses behind it on mobile.
   Desktop (>=900px): inline row with a hover/focus-within Services dropdown. */
.nav-toggle{
  display:none;                     /* no-JS => hidden; links show below */
  align-items:center;gap:9px;
  background:var(--navy);color:#fff;border:0;cursor:pointer;
  font-family:var(--sans);font-weight:600;font-size:.9rem;line-height:1;
  padding:10px 15px;border-radius:999px;box-shadow:var(--shadow-sm);
}
.js .nav-toggle{display:inline-flex;}   /* JS => hamburger available */
.nav-toggle-box{position:relative;width:18px;height:14px;display:inline-block;flex:0 0 auto;}
.nav-toggle-bar,.nav-toggle-bar::before,.nav-toggle-bar::after{
  position:absolute;left:0;height:2px;width:18px;background:#fff;border-radius:2px;
  transition:transform .25s ease,opacity .2s ease;
}
.nav-toggle-bar{top:6px;}
.nav-toggle-bar::before{content:"";top:-6px;}
.nav-toggle-bar::after{content:"";top:6px;}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar{background:transparent;}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before{transform:translateY(6px) rotate(45deg);}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after{transform:translateY(-6px) rotate(-45deg);}

.primary-nav{flex-basis:100%;display:flex;flex-direction:column;gap:4px;}
.nav-list{list-style:none;margin:0;padding:6px 0 8px;display:flex;flex-direction:column;gap:2px;}
.nav-link{
  display:block;text-decoration:none;color:var(--ink);
  font-family:var(--sans);font-weight:600;font-size:1rem;
  padding:11px 10px;border-radius:8px;transition:background .18s ease,color .18s ease;
}
.nav-link:hover{background:rgba(7,47,159,.06);color:var(--navy);}
.nav-link[aria-current="page"],.nav-link.is-active{color:var(--navy);}
.nav-link[aria-current="page"]::after,.nav-link.is-active::after{
  content:"";display:block;height:2px;width:22px;background:var(--red);margin-top:5px;border-radius:2px;
}
.nav-link .caret{font-size:.68em;color:var(--muted);}
.has-sub{position:relative;}
.sub-menu{
  list-style:none;margin:0 0 6px;padding:0 0 0 12px;
  display:flex;flex-direction:column;gap:1px;border-left:2px solid var(--line);
}
.sub-menu a{
  display:block;text-decoration:none;color:var(--muted);
  font-size:.92rem;font-weight:500;padding:9px 10px;border-radius:6px;
  transition:background .18s ease,color .18s ease;
}
.sub-menu a:hover{color:var(--navy);background:rgba(7,47,159,.06);}

/* JS + mobile: collapse nav behind the hamburger */
@media (max-width:899px){
  .js .primary-nav{
    max-height:0;overflow:hidden;visibility:hidden;opacity:0;
    transition:max-height .32s ease,opacity .25s ease,visibility .25s ease;
  }
  .js .primary-nav.is-open{max-height:min(80vh,600px);overflow:auto;visibility:visible;opacity:1;}
}

/* ---------- Hero ---------- */
.hero{position:relative;padding:34px 0 46px;overflow:hidden;}
.hero::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(120% 90% at 82% 6%, rgba(204,27,41,.07), transparent 55%),
    radial-gradient(110% 80% at 10% 96%, rgba(7,47,159,.09), transparent 55%);
}
.hero-grid{position:relative;z-index:1;display:grid;gap:14px;}

/* Signature emblem */
.hero-emblem{order:1;}
.emblem-stage{position:relative;width:min(86vw,420px);margin:0 auto;aspect-ratio:520/555;}
.states-svg{width:100%;height:100%;overflow:visible;filter:drop-shadow(0 22px 34px rgba(7,47,159,.22));}
.state-shape{stroke:var(--paper);stroke-width:5;stroke-linejoin:round;}
.state--ny .state-shape{fill:var(--red);}
.state--pa .state-shape{fill:var(--navy);}
.state{transition:transform .9s cubic-bezier(.2,.9,.2,1),opacity .9s ease;transform-box:fill-box;transform-origin:center;}
.seam{stroke:var(--red);stroke-width:3;stroke-linecap:round;opacity:0;
  stroke-dasharray:600;stroke-dashoffset:600;transition:opacity .6s ease,stroke-dashoffset 1s ease;}
.emblem-pulse{
  position:absolute;left:50%;top:52%;width:20px;height:20px;transform:translate(-50%,-50%);
  border-radius:50%;background:var(--red);opacity:0;pointer-events:none;
}

/* Drift-apart state (set by JS on load; default HTML shows locked for no-JS) */
.emblem-stage[data-state="apart"] .state--ny{transform:translate(34px,-30px) rotate(1.5deg);opacity:.94;}
.emblem-stage[data-state="apart"] .state--pa{transform:translate(-34px,30px) rotate(-1.5deg);opacity:.94;}
.emblem-stage[data-state="locked"] .seam{opacity:.9;stroke-dashoffset:0;}
.emblem-stage[data-state="locked"] .emblem-pulse{animation:lockPulse .7s ease-out .1s 1;}

@keyframes lockPulse{
  0%{opacity:.5;width:20px;height:20px;}
  100%{opacity:0;width:220px;height:220px;}
}

.emblem-caption{
  text-align:center;margin:16px auto 0;max-width:340px;color:var(--muted);
  font-size:.82rem;font-weight:500;display:flex;align-items:center;justify-content:center;
  gap:6px;flex-wrap:wrap;
}
.emblem-caption .dot{width:10px;height:10px;border-radius:50%;display:inline-block;}
.dot--ny{background:var(--red);}
.dot--pa{background:var(--navy);}
.emblem-caption .amp{color:var(--ink);font-weight:700;}

/* Hero copy */
.hero-copy{order:2;text-align:center;}
.hero-h1{font-size:clamp(2.15rem,9vw,4rem);line-height:1.02;margin-bottom:16px;}
.hero-h1 em{font-style:italic;color:var(--navy);display:block;}
.hero-sub{font-size:clamp(1.02rem,3.6vw,1.22rem);color:var(--muted);max-width:36ch;margin:0 auto 26px;}
.hero-cta{display:flex;flex-direction:column;gap:12px;align-items:stretch;}

/* ---------- Trust strip ---------- */
.trust{background:var(--ink-deep);color:#fff;padding:30px 0;}
.trust-list{list-style:none;margin:0;padding:0;display:grid;gap:20px;grid-template-columns:repeat(2,1fr);text-align:center;}
.trust-list li{display:flex;flex-direction:column;gap:3px;}
.trust-list strong{font-family:var(--serif);font-size:1.12rem;color:#fff;}
.trust-list span{font-size:.8rem;color:#AeB4CC;color:rgba(255,255,255,.62);letter-spacing:.01em;}

/* ---------- Section heads ---------- */
.section-head{max-width:640px;margin:0 0 34px;}
.section-head--light .kicker{color:#ff8a92;}
.section-head--light .section-h{color:#fff;}

/* ---------- Services ---------- */
.services{padding:64px 0;}
.svc-grid{list-style:none;margin:0;padding:0;display:grid;gap:16px;grid-template-columns:1fr;}
.svc{
  display:block;height:100%;text-decoration:none;color:inherit;
  background:var(--white);border:1px solid var(--line);border-radius:var(--r);
  padding:24px 22px;box-shadow:0 10px 30px -26px rgba(7,47,159,.5);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.svc:hover{transform:translateY(-4px);box-shadow:var(--shadow);border-color:rgba(7,47,159,.25);}
.svc-more{margin:26px 0 0;text-align:center;}
.svc-ico{display:inline-flex;width:52px;height:52px;border-radius:12px;align-items:center;justify-content:center;
  background:linear-gradient(150deg,rgba(7,47,159,.09),rgba(204,27,41,.08));margin-bottom:14px;}
.svc-ico svg{width:32px;height:32px;fill:none;stroke:var(--navy);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.svc-ico svg .fade{opacity:.35;}
.svc h3{font-size:1.16rem;margin-bottom:6px;}
.svc p{margin:0;color:var(--muted);font-size:.95rem;}
.svc p em{font-style:italic;color:var(--red);}

/* ---------- Process ---------- */
.process{background:var(--navy);color:#fff;padding:64px 0;
  background-image:linear-gradient(160deg,var(--navy),var(--ink-deep));}
.steps{list-style:none;margin:0;padding:0;display:grid;gap:18px;counter-reset:step;grid-template-columns:1fr;}
.step{position:relative;border:1px solid rgba(255,255,255,.16);border-radius:var(--r);padding:26px 24px;background:rgba(255,255,255,.04);}
.step-num{font-family:var(--serif);font-size:2.4rem;color:#ff8a92;line-height:1;display:block;margin-bottom:10px;}
.step h3{color:#fff;font-size:1.28rem;margin-bottom:8px;}
.step p{margin:0;color:rgba(255,255,255,.78);}

/* ---------- Founder ---------- */
.founder{padding:64px 0;}
.founder-grid{display:grid;gap:30px;align-items:center;}
.founder-portrait{max-width:320px;margin:0 auto;width:100%;}
.portrait-frame{position:relative;border-radius:18px;padding:12px;
  background:linear-gradient(160deg,var(--navy),var(--ink-deep));box-shadow:var(--shadow);}
.portrait-frame::after{content:"";position:absolute;inset:6px;border:1px solid rgba(255,255,255,.22);border-radius:12px;pointer-events:none;}
.portrait-svg{width:100%;border-radius:10px;display:block;}
/* Real founder photo — same frame as the placeholder SVG it replaced.
   aspect-ratio guards against layout shift while the JPEG loads. */
.portrait-photo{width:100%;height:auto;aspect-ratio:5/6;object-fit:cover;object-position:50% 30%;border-radius:10px;display:block;}
.portrait-bg{fill:#0b1c53;}
.portrait-figure circle,.portrait-figure path{fill:rgba(255,255,255,.14);}
.portrait-initials{font-family:var(--serif);font-size:34px;font-weight:600;fill:rgba(255,255,255,.5);text-anchor:middle;letter-spacing:.06em;}
.portrait-badge{position:absolute;right:-8px;bottom:-8px;background:var(--red);color:#fff;
  font-family:var(--serif);font-weight:600;font-size:1.05rem;width:52px;height:52px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;border:4px solid var(--paper);box-shadow:var(--shadow-sm);}
.founder-lead{color:var(--muted);font-size:1.05rem;margin:0 0 18px;}
.creds{list-style:none;margin:0 0 24px;padding:0;display:grid;gap:12px;}
.creds li{position:relative;padding-left:30px;color:var(--ink);font-weight:500;font-size:.96rem;}
.creds li::before{content:"";position:absolute;left:0;top:2px;width:20px;height:20px;border-radius:50%;
  background:var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l5 5 9-11'/%3E%3C/svg%3E") center/13px no-repeat;}

/* ---------- FAQ ---------- */
.faq{padding:64px 0;background:var(--white);border-top:1px solid var(--line);}
.faq-list{display:grid;gap:12px;max-width:820px;}
.faq-item{border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:0 20px;overflow:hidden;}
.faq-item summary{list-style:none;cursor:pointer;padding:18px 0;font-family:var(--serif);font-size:1.12rem;
  font-weight:600;color:var(--ink);display:flex;justify-content:space-between;align-items:center;gap:14px;}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{content:"+";font-family:var(--sans);font-size:1.5rem;color:var(--red);transition:transform .2s ease;flex:0 0 auto;}
.faq-item[open] summary::after{transform:rotate(45deg);}
.faq-item p{margin:0 0 18px;color:var(--muted);}
.faq-item p em{color:var(--red);font-style:italic;}

/* ---------- Third-party embeds (AutoDriveCRM / GoHighLevel) ----------
   form_embed.js measures the embedded page and sets an inline height, so
   the heights below are only the pre-script fallback — deliberately NO
   min-height, which would stop the script shrinking the frame. */
.embed-wrap{width:100%;}
.ghl-embed{display:block;width:100%;border:0;border-radius:10px;background:var(--white);}
.ghl-embed--form{height:938px;}
.ghl-embed--calendar{height:760px;}
.embed-card{background:var(--white);border:1px solid var(--line);border-radius:var(--r);
  padding:16px;box-shadow:0 14px 40px -30px rgba(7,47,159,.55);}
@media (max-width:640px){
  .embed-card{padding:10px;}
  .ghl-embed--calendar{height:820px;}
}

/* ---------- Final CTA ---------- */
.final-cta{background:var(--ink-deep);color:#fff;padding:66px 0;text-align:center;position:relative;overflow:hidden;
  background-image:radial-gradient(120% 100% at 50% 0%,rgba(7,47,159,.55),transparent 60%);}
.final-cta-inner{position:relative;z-index:1;max-width:640px;}
.cta-emblem img{width:96px;margin:0 auto 20px;filter:drop-shadow(0 12px 22px rgba(0,0,0,.4));}
.final-cta h2{color:#fff;font-size:clamp(1.9rem,7vw,3rem);margin-bottom:14px;}
.final-cta p{color:rgba(255,255,255,.82);font-size:1.1rem;margin:0 auto 26px;}
.final-cta p a{color:#fff;font-weight:700;text-decoration:underline;text-underline-offset:3px;}
.final-cta .hero-cta{max-width:420px;margin:0 auto;}

/* ---------- Footer ---------- */
.site-footer{background:#050d29;color:rgba(255,255,255,.72);padding:52px 0 34px;font-size:.92rem;}
.footer-grid{display:grid;gap:30px;grid-template-columns:1fr;}
.footer-logo{height:46px;width:auto;margin-bottom:14px;}
.footer-tag{color:rgba(255,255,255,.6);max-width:34ch;}
.footer-col h3{font-family:var(--sans);font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:#ff8a92;margin:0 0 12px;font-weight:700;}
.footer-col p{margin:0 0 8px;line-height:1.55;}
.footer-col a{color:#fff;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.25);}
.footer-col a:hover{border-color:#fff;}
.footer-nav{list-style:none;margin:0;padding:0;display:grid;gap:9px;}
.footer-addr{margin-top:12px;}
.disclaimer{margin-top:34px;padding-top:22px;border-top:1px solid rgba(255,255,255,.12);}
.disclaimer p{margin:0;color:rgba(255,255,255,.5);font-size:.78rem;line-height:1.6;max-width:none;}

/* ---------- Reveal on scroll ----------
   Content is VISIBLE BY DEFAULT. The hidden-initial state is gated behind
   .reveals-on, which app.js adds to <html> ONLY when JS runs AND motion is
   allowed. So no-JS, app.js failing to load, or prefers-reduced-motion all
   leave content fully visible — sections never ship blank. Inner pages just
   add class="reveal"; never set opacity:0 inline. */
.reveals-on .reveal{opacity:0;transform:translateY(22px);
  transition:opacity .7s ease,transform .7s cubic-bezier(.2,.8,.2,1);}
.reveals-on .reveal.is-in{opacity:1;transform:none;}

/* =========================================================
   RESPONSIVE — tablet & up
   ========================================================= */
@media (min-width:640px){
  .hero-cta{flex-direction:row;justify-content:center;align-items:center;}
  .btn{flex:0 0 auto;}
  .trust-list{grid-template-columns:repeat(4,1fr);}
  .svc-grid{grid-template-columns:repeat(2,1fr);}
  .steps{grid-template-columns:repeat(3,1fr);}
  .footer-grid{grid-template-columns:2fr 1.3fr 1.3fr 1.3fr;}
  .phone-cta-label{font-size:.66rem;}
}

@media (min-width:900px){
  .hero{padding:56px 0 72px;}
  .hero-grid{grid-template-columns:1.05fr .95fr;align-items:center;gap:40px;}
  .hero-emblem{order:2;}
  .hero-copy{order:1;text-align:left;}
  .hero-sub{margin-left:0;margin-right:0;}
  .hero-cta{justify-content:flex-start;}
  .hero-h1 em{display:inline;}
  .emblem-stage{width:min(42vw,460px);}
  .svc-grid{grid-template-columns:repeat(3,1fr);}
  .founder-grid{grid-template-columns:340px 1fr;gap:56px;}
  .section-h{font-size:clamp(2rem,3.4vw,3rem);}

  /* Nav: inline row with hover/focus-within dropdown */
  .nav-toggle{display:none !important;}
  .brand{order:1;}
  .primary-nav{order:2;flex-basis:auto;flex-direction:row;align-items:center;gap:2px;
    max-height:none;overflow:visible;visibility:visible;opacity:1;margin-left:16px;}
  .phone-cta{order:3;}
  .nav-list{flex-direction:row;padding:0;gap:2px;align-items:center;}
  .nav-link{padding:9px 13px;font-size:.98rem;}
  .nav-link[aria-current="page"]::after,.nav-link.is-active::after{margin-left:auto;margin-right:auto;}
  .sub-menu{
    position:absolute;top:calc(100% + 8px);left:0;min-width:250px;
    background:var(--white);border:1px solid var(--line);border-radius:12px;
    box-shadow:var(--shadow);padding:8px;margin:0;border-left:1px solid var(--line);
    visibility:hidden;opacity:0;transform:translateY(6px);
    transition:opacity .2s ease,transform .2s ease,visibility .2s ease;z-index:130;
  }
  .has-sub:hover>.sub-menu,
  .has-sub:focus-within>.sub-menu{visibility:visible;opacity:1;transform:none;}
}

/* =========================================================
   DEGRADATION LADDER — reduced motion
   ========================================================= */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *{animation:none !important;transition:none !important;}
  .reveal{opacity:1 !important;transform:none !important;}
  /* States posed locked, seam visible, no motion */
  .emblem-stage .state--ny,
  .emblem-stage .state--pa{transform:none !important;opacity:1 !important;}
  .seam{opacity:.9 !important;stroke-dashoffset:0 !important;}
  .emblem-pulse{display:none;}
}
