/* =========================================================
   Pai Accounting & Tax Inc. — stylesheet
   Change brand colours here and the whole site updates.
   ========================================================= */
:root {
  --navy: #14263F;
  --navy-2: #1D3557;
  --navy-deep: #0D1A2D;
  --gold: #D4A84B;
  --gold-dark: #B88D33;
  --gold-soft: #F7EDD6;
  --mist: #F4F6F9;
  --white: #FFFFFF;
  --ink: #1B2533;
  --muted: #5A6577;
  --line: #DDE3EB;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1180px;
  --r-sm: 6px;
  --r-lg: 14px;
  --shadow: 0 18px 40px -18px rgba(13, 26, 45, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img, svg { max-width: 100%; }
a { color: var(--navy-2); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.18; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5vw, 3.75rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--navy); padding: .5rem 1rem; z-index: 200; }
.skip:focus { left: 1rem; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-deep); color: #C5CEDB; font-size: .88rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
@media (max-width: 900px) { .topbar-note { display: none; } }
@media (max-width: 700px) { .topbar { display: none; } }

/* ---------- Header ---------- */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 80px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-text { line-height: 1.1; }
.brand-name { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.brand-sub { display: block; font-size: .78rem; letter-spacing: .12em; color: var(--gold-dark); font-weight: 600; margin-top: .2rem; }

.nav ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; align-items: center; }
.nav a { display: block; padding: .6rem .85rem; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem; border-radius: var(--r-sm); }
.nav a:hover { color: var(--navy-2); background: var(--mist); }
.nav a[aria-current="page"] { color: var(--navy); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.nav .nav-cta { background: var(--gold); color: var(--navy); margin-left: .6rem; border-radius: var(--r-sm); box-shadow: none; }
.nav .nav-cta:hover { background: var(--gold-dark); color: var(--navy); }

.menu-btn { display: none; background: var(--navy); color: #fff; border: 0; border-radius: var(--r-sm); padding: .6rem .9rem; font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; }
  .nav .nav-cta { margin: .5rem 0 0; text-align: center; }
}
@media (max-width: 420px) { .brand-sub { display: none; } .brand-name { font-size: 1.1rem; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem 1.5rem; border-radius: var(--r-sm); font: inherit; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.1em; height: 1.1em; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #D5DDE8; background: var(--navy); overflow: hidden; padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(4rem, 9vw, 7rem); }
.hero::before { /* ledger lines */
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 44px);
  mask-image: linear-gradient(90deg, transparent, #000 45%);
}
.hero::after { content: ""; position: absolute; right: -10%; top: -30%; width: 60%; aspect-ratio: 1; background: radial-gradient(circle, rgba(212,168,75,.18), transparent 65%); }
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { color: #fff; }
.hero-kicker { display: inline-flex; align-items: center; gap: .6rem; color: var(--gold); font-weight: 600; margin-bottom: 1.25rem; }
.hero-kicker::before { content: ""; width: 28px; height: 2px; background: var(--gold); }
.hero-lead { font-size: 1.2rem; max-width: 56ch; }
.hero-points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: .5rem; }
.hero-points li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2314263F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; flex: none; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Hero image */
.hero-visual { position: relative; }
.hero-visual img { width: 100%; height: auto; display: block; }
.hero-visual img[src$=".jpg"], .hero-visual img[src$=".png"], .hero-visual img[src$=".webp"] { border-radius: var(--r-lg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); aspect-ratio: 560 / 500; object-fit: cover; }
@media (max-width: 900px) { .hero-visual { max-width: 520px; margin-inline: auto; } }

/* ---------- Trust strip ---------- */
.trust { background: var(--white); position: relative; z-index: 2; margin-top: -2.5rem; }
.trust-inner { background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.trust-item { padding: 1.4rem 1.5rem; display: flex; gap: .9rem; align-items: flex-start; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item svg { width: 34px; height: 34px; color: var(--gold-dark); flex: none; }
.trust-item strong { display: block; color: var(--navy); }
.trust-item span { font-size: .9rem; color: var(--muted); }
@media (max-width: 900px) { .trust-inner { grid-template-columns: 1fr 1fr; } .trust-item:nth-child(3) { border-left: 0; } .trust-item:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .trust-inner { grid-template-columns: 1fr; } .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 680px; margin-bottom: 2.75rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.kicker { color: var(--gold-dark); font-weight: 700; margin-bottom: .6rem; display: block; }

/* Services grid — feature tiles with icons */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.svc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.75rem; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.svc:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-3px); }
.svc-icon { width: 54px; height: 54px; border-radius: 12px; background: var(--navy); color: var(--gold); display: grid; place-items: center; margin-bottom: 1.2rem; }
.svc-icon svg { width: 28px; height: 28px; }
.svc h3 { margin-bottom: .4rem; }
.svc p { color: var(--muted); margin-bottom: 1.2rem; flex: 1; }
.svc-link { font-weight: 700; color: var(--navy-2); }
.svc:hover .svc-link { color: var(--gold-dark); }
@media (max-width: 900px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: 1fr; } }

/* Industries — navy band with tiles */
.industries { background: var(--navy); color: #C9D2DF; }
.industries h2, .industries h3 { color: #fff; }
.industries .section-head p { color: #AEB9C9; }
.industries .kicker { color: var(--gold); }
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-lg); overflow: hidden; }
.ind { background: var(--navy); padding: 1.75rem; transition: background .2s; }
.ind:hover { background: var(--navy-2); }
.ind svg { width: 32px; height: 32px; color: var(--gold); margin-bottom: .9rem; }
.ind h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.ind p { margin: 0; font-size: .97rem; }
@media (max-width: 900px) { .ind-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .ind-grid { grid-template-columns: 1fr; } }

/* Split: about preview */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split-visual { position: relative; }
.photo-frame { aspect-ratio: 4 / 5; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--navy-2), var(--navy)); display: grid; place-items: center; overflow: hidden; color: #9FB0C6; text-align: center; padding: 2rem; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame.has-art { padding: 0; }
.badge { position: absolute; right: -1rem; bottom: 2rem; background: var(--gold); color: var(--navy); border-radius: var(--r-lg); padding: 1rem 1.25rem; box-shadow: var(--shadow); font-weight: 700; line-height: 1.3; }
.badge strong { font-family: var(--serif); font-size: 1.6rem; display: block; }
.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.checks li { display: flex; gap: .75rem; align-items: flex-start; }
.checks li::before { content: ""; width: 22px; height: 22px; margin-top: .2rem; 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 d='M6 12.5l4 4 8-9' fill='none' stroke='%23D4A84B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; flex: none; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split-visual { max-width: 380px; } .badge { right: .75rem; } }

/* Steps (sequential) */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: s; position: relative; }
.steps li { counter-increment: s; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--gold); color: var(--navy); font-family: var(--serif); font-weight: 700; font-size: 1.25rem; margin-bottom: 1rem; position: relative; z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.5rem; left: 3.5rem; right: -1.5rem; border-top: 2px dashed var(--line); }
.steps p { color: var(--muted); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } .steps li::after { display: none; } }

/* CTA banner */
.cta { padding: clamp(3rem, 7vw, 4.5rem) 0; }
.cta-box { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%); border-radius: 20px; padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; color: #C9D2DF; position: relative; overflow: hidden; }
.cta-box::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%; border: 40px solid rgba(212,168,75,.15); }
.cta-box h2 { color: #fff; margin-bottom: .4rem; }
.cta-box p { margin: 0; font-size: 1.1rem; }
.cta-box .btn-row { margin: 0; justify-content: flex-end; position: relative; z-index: 1; }
@media (max-width: 860px) { .cta-box { grid-template-columns: 1fr; } .cta-box .btn-row { justify-content: flex-start; } }

/* Page hero for inner pages */
.page-hero { background: var(--navy); color: #C9D2DF; padding: clamp(3rem, 7vw, 4.75rem) 0; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 44px); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; margin-bottom: .35em; }
.page-hero p { font-size: 1.15rem; max-width: 60ch; margin: 0; }
.page-hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.page-hero-art { width: 100%; max-width: 420px; height: auto; justify-self: end; }
@media (max-width: 760px) { .page-hero-grid { grid-template-columns: 1fr; } .page-hero-art { max-width: 300px; justify-self: start; } }
.crumbs { font-size: .9rem; margin-bottom: 1rem; }
.crumbs a { color: var(--gold); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Service detail rows */
.svc-detail { display: grid; grid-template-columns: 260px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); padding: 2.75rem 0; border-top: 1px solid var(--line); }
.svc-detail:first-child { border-top: 0; padding-top: 0; }
.svc-detail .svc-icon { margin-bottom: 1rem; }
.svc-detail h2 { font-size: 1.75rem; }
.svc-detail-body p { color: var(--muted); max-width: 64ch; }
.tick-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 2rem; }
.tick-list li { display: flex; gap: .6rem; }
.tick-list li::before { content: ""; width: 8px; height: 8px; margin-top: .6rem; background: var(--gold); border-radius: 2px; transform: rotate(45deg); flex: none; }
.text-link { font-weight: 700; color: var(--navy-2); }
@media (max-width: 760px) { .svc-detail { grid-template-columns: 1fr; } .tick-list { grid-template-columns: 1fr; } }

/* Values */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.value { background: var(--white); border-radius: var(--r-lg); padding: 1.75rem; border-top: 4px solid var(--gold); box-shadow: 0 1px 0 var(--line); }
.value p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1.1rem 1.3rem; margin-bottom: .75rem; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--gold-dark); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .75rem 0 0; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact-side { background: var(--navy); color: #C9D2DF; border-radius: var(--r-lg); padding: 2rem; }
.contact-side h2 { color: #fff; font-size: 1.5rem; }
.c-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.12); }
.c-item svg { width: 22px; height: 22px; color: var(--gold); flex: none; margin-top: .2rem; }
.c-item small { display: block; font-size: .82rem; color: #93A2B7; }
.c-item a, .c-item span { color: #fff; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.c-item a:hover { color: var(--gold); }
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow); }
.form h2 { font-size: 1.6rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; font-size: .93rem; color: var(--navy); }
.field input, .field select, .field textarea { width: 100%; font: inherit; padding: .8rem .9rem; border: 1px solid #B9C3D0; border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-2); outline: 3px solid rgba(212,168,75,.45); outline-offset: 0; }
.field textarea { min-height: 140px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--muted); margin-bottom: 1.25rem; }
.consent input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.form-note { font-size: .85rem; color: var(--muted); margin: .9rem 0 0; }
.form-status { margin-top: 1rem; padding: .85rem 1rem; border-radius: var(--r-sm); display: none; font-weight: 600; }
.form-status.ok { display: block; background: #E4F2EA; color: #1E5A3E; }
.form-status.err { display: block; background: #FBE7E3; color: #8A2D1C; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

/* Legal text */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.legal p, .legal li { color: #3A4556; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.updated { color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #A9B5C6; padding: 4rem 0 1.5rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand img { width: 250px; margin-bottom: 1rem; }
.footer-brand p { max-width: 34ch; }
.site-footer h3 { color: #fff; font-family: var(--sans); font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: #D3DBE6; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-contact { margin-top: 1.25rem; display: grid; gap: .4rem; }
.footer-contact a { color: #fff; font-weight: 600; }
.footer-bottom { border-top: 1px solid #24344C; margin-top: 3rem; padding-top: 1.25rem; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Mobile sticky action bar */
.mobile-bar { display: none; }
@media (max-width: 700px) {
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; box-shadow: 0 -6px 20px rgba(13,26,45,.2); }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; font-weight: 700; text-decoration: none; }
  .mobile-bar a:first-child { background: var(--navy); color: #fff; }
  .mobile-bar a:last-child { background: var(--gold); color: var(--navy); }
  .mobile-bar svg { width: 18px; height: 18px; }
  body { padding-bottom: 56px; }
}
