/* ============================================================
   CPAS — Corporate Personal Accounting Services
   Promotional site styles · light/dark theming via CSS vars
   ============================================================ */

:root {
  --brand: #3d7cc9;
  --brand-600: #326bb3;
  --brand-700: #275899;
  --brand-soft: rgba(61, 124, 201, 0.10);

  --bg: #ffffff;
  --bg-alt: #f5f8fc;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --border: #e4eaf2;
  --text: #16202e;
  --text-muted: #5a6b80;
  --heading: #0f1b2d;
  --shadow: 0 1px 2px rgba(16, 27, 45, .04), 0 8px 24px rgba(16, 27, 45, .06);
  --shadow-lg: 0 12px 40px rgba(16, 27, 45, .12);
  --header-bg: rgba(255, 255, 255, .82);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1160px;
}

[data-theme="dark"] {
  --brand: #5b9be6;
  --brand-600: #4a8bd8;
  --brand-700: #3d7cc9;
  --brand-soft: rgba(91, 155, 230, 0.14);

  --bg: #0d131c;
  --bg-alt: #111a26;
  --bg-elev: #16202e;
  --surface: #16202e;
  --border: #243244;
  --text: #d6e0ee;
  --text-muted: #8ea0b8;
  --heading: #f0f5fb;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
  --header-bg: rgba(13, 19, 28, .82);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}
h1, h2, h3 { color: var(--heading); line-height: 1.18; margin: 0; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(61,124,201,.32); }
.btn-primary:hover { background: var(--brand-600); box-shadow: 0 10px 26px rgba(61,124,201,.42); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--brand-700); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { border-radius: 10px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 20px; color: var(--heading); letter-spacing: -.01em; }
.brand-text small { font-size: 10.5px; color: var(--text-muted); letter-spacing: .02em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--text-muted); position: relative; padding: 4px 0; transition: color .2s ease; }
.main-nav a:hover { color: var(--heading); }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--brand); border-radius: 2px; transition: width .25s ease; }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.pill-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--heading);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  letter-spacing: .04em; transition: border-color .2s, color .2s, background-color .2s;
}
.pill-toggle:hover { border-color: var(--brand); color: var(--brand); }
.icon-toggle {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--heading); cursor: pointer;
  display: grid; place-items: center; transition: border-color .2s, color .2s, background-color .2s;
}
.icon-toggle:hover { border-color: var(--brand); color: var(--brand); }
.ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: none; }
[data-theme="dark"] .ico-moon { display: block; }

.menu-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-toggle span { width: 18px; height: 2px; background: var(--heading); border-radius: 2px; transition: transform .25s, opacity .2s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 76px; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 80% at 85% 0%, var(--brand-soft), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, var(--brand-soft), transparent 55%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; letter-spacing: .01em; }
.hero h1 { font-size: clamp(32px, 5vw, 50px); font-weight: 800; margin-bottom: 20px; }
.lead { font-size: 18px; color: var(--text-muted); max-width: 540px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-badges { display: flex; gap: 36px; flex-wrap: wrap; }
.hb { display: flex; flex-direction: column; }
.hb strong { font-size: 30px; font-weight: 800; color: var(--heading); letter-spacing: -.02em; }
.hb span { font-size: 13.5px; color: var(--text-muted); }

.hero-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 34px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-card-glow { position: absolute; top: -40px; right: -40px; width: 180px; height: 180px; background: radial-gradient(circle, var(--brand-soft), transparent 70%); }
.hero-logo { margin-bottom: 22px; border-radius: 16px; }
.hero-card-name strong { display: block; font-size: 19px; color: var(--heading); }
.hero-card-name span { font-size: 14px; color: var(--brand); font-weight: 500; }
.hero-card-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.hero-card-list li { position: relative; padding-left: 28px; font-size: 15px; color: var(--text); }
.hero-card-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 5px; background: var(--brand-soft); }
.hero-card-list li::after { content: ""; position: absolute; left: 5px; top: 10px; width: 6px; height: 3px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

/* ---------- trustbar ---------- */
.trustbar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.trustbar-inner { display: flex; flex-wrap: wrap; gap: 14px 40px; justify-content: center; padding: 22px 24px; }
.trustbar-inner span { font-size: 14px; font-weight: 600; color: var(--text-muted); position: relative; }
.trustbar-inner span:not(:last-child)::after { content: "·"; position: absolute; right: -22px; color: var(--brand); }

/* ---------- section heads ---------- */
.section-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); }
.section-sub { font-size: 17px; color: var(--text-muted); margin-top: 16px; }

/* ---------- about ---------- */
.about { background: var(--bg); }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: center; }
.about-visual {
  position: relative; aspect-ratio: 1/1; border-radius: 24px;
  background: linear-gradient(145deg, var(--brand), var(--brand-700));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; overflow: hidden; box-shadow: var(--shadow-lg);
}
.about-visual::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.16), transparent 55%); }
.about-stat { text-align: center; position: relative; z-index: 1; }
.about-stat-num { display: block; font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.about-stat-label { display: block; font-size: 16px; opacity: .92; margin-top: 8px; max-width: 200px; }
.about-signature { position: absolute; bottom: 24px; font-size: 18px; font-style: italic; opacity: .85; z-index: 1; font-weight: 500; }
.about-content h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 20px; }
.about-content p { color: var(--text-muted); font-size: 16.5px; margin-bottom: 16px; }
.checklist { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.checklist li { position: relative; padding-left: 30px; font-size: 15.5px; font-weight: 500; color: var(--text); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px; background: var(--brand-soft); }
.checklist li::after { content: ""; position: absolute; left: 6px; top: 6px; width: 8px; height: 4px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

/* ---------- services ---------- */
.services { background: var(--bg-alt); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card-ico { width: 52px; height: 52px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 20px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--text-muted); }

/* ---------- why ---------- */
.why { background: var(--bg); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-item { padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.why-num { display: inline-block; font-size: 15px; font-weight: 800; color: #fff; background: var(--brand); width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 18px; }
.why-item h3 { font-size: 18px; margin-bottom: 10px; }
.why-item p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- cta strip ---------- */
.cta-strip { background: linear-gradient(135deg, var(--brand), var(--brand-700)); position: relative; overflow: hidden; }
.cta-strip::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 120% at 100% 0%, rgba(255,255,255,.12), transparent 60%); }
.cta-inner { position: relative; text-align: center; padding: 72px 24px; color: #fff; }
.cta-inner h2 { color: #fff; font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.cta-inner p { color: rgba(255,255,255,.9); font-size: 17px; margin-bottom: 28px; }

/* ---------- contact ---------- */
.contact { background: var(--bg-alt); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 14px; }
.contact-list { list-style: none; padding: 0; margin: 34px 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.ci-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.contact-list small { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 2px; }
.contact-list a { font-size: 16.5px; font-weight: 600; color: var(--heading); transition: color .2s; }
.contact-list a:hover { color: var(--brand); }
.contact-hours { padding: 20px 24px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.contact-hours strong { display: block; color: var(--heading); margin-bottom: 4px; font-size: 15px; }
.contact-hours span { font-size: 15px; color: var(--text-muted); }

.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--heading); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { resize: vertical; }
.form-note { margin-top: 14px; font-size: 14px; text-align: center; min-height: 20px; }
.form-note.ok { color: #1f9d55; }
.form-note.err { color: #d9534f; }

.contact-map { margin-top: 48px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); line-height: 0; }
.contact-map iframe { display: block; width: 100%; }
[data-theme="dark"] .contact-map iframe { filter: invert(0.92) hue-rotate(180deg) brightness(0.95) contrast(0.9); }

/* ---------- footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding: 56px 24px 40px; align-items: start; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand strong { display: block; font-size: 18px; color: var(--heading); }
.footer-brand small { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { font-size: 15px; color: var(--text-muted); transition: color .2s; }
.footer-nav a:hover { color: var(--brand); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact a, .footer-contact span { font-size: 15px; color: var(--text-muted); }
.footer-contact a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; }
.footer-bottom span { font-size: 13.5px; color: var(--text-muted); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-card { max-width: 440px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { max-width: 360px; margin: 0 auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .section { padding: 68px 0; }
  .main-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg-elev); border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px; margin: 0; transform: translateY(-120%); transition: transform .3s ease;
    box-shadow: var(--shadow); max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .main-nav a::after { display: none; }
  .menu-toggle { display: flex; }
  .cards { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-badges { gap: 24px; }
  .brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
