/* ==========================================================================
   Tome Accounting Services PA — Stylesheet
   Palette: Navy Charcoal / Brand Blue / Gold (matched to client logo)
   ========================================================================== */

:root {
  /* Color system — navy-charcoal base tied to the brand mark, brand blue + gold accents */
  --ink: #0D1420;
  --charcoal: #15202F;
  --charcoal-soft: #1C2A3C;
  --panel: #25384E;
  --panel-border: #35495F;

  --blue: #6A96B7;
  --blue-bright: #8FB4D1;
  --blue-deep: #3E7295;
  --blue-50: #EEF4F8;

  --gold: #CBAE87;
  --gold-bright: #DFCCB2;

  --white: #FFFFFF;
  --off-white: #FBF7EF;
  --gray-100: #F0EEE7;
  --gray-300: #C7CCD8;
  --gray-500: #8A93A6;
  --gray-700: #4C5465;
  --gray-900: #1E222B;

  --font-head: 'Manrope', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(13, 20, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(13, 20, 32, 0.08);
  --shadow-lg: 0 20px 50px rgba(13, 20, 32, 0.18);
  --shadow-glow: 0 0 0 1px rgba(106, 150, 183, 0.15), 0 20px 40px rgba(106, 150, 183, 0.12);

  --container-w: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; color: var(--ink); }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue); color: var(--white);
  padding: 10px 16px; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

.section { padding: 96px 0; }
.section-dark {
  background: var(--off-white);
  color: var(--gray-700);
}
.section-dark h2, .section-dark h3 { color: var(--ink); }

.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-sub { margin-top: 14px; color: var(--gray-500); font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin: 0 0 12px;
}

h2 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); font-weight: 800; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(106, 150, 183, 0.28);
}
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--gray-300);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  height: 76px;
  width: auto;
  object-fit: contain;
}

.main-nav ul { display: flex; gap: 30px; }
.main-nav a {
  color: var(--gray-700);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.18s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a.active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--blue); border-radius: 2px;
}

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-phone {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 600; font-size: 0.92rem;
}
.header-phone svg { width: 17px; height: 17px; color: var(--blue-deep); }

.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 13px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gray-500);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-btn:hover:not(.active) { color: var(--ink); }
.lang-btn.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.lang-toggle-mobile { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: transparent; border: none;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(170deg, var(--white) 0%, var(--off-white) 55%, var(--gray-100) 100%);
  color: var(--ink);
  overflow: hidden;
  padding: 90px 0 110px;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(13,20,32,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,20,32,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 70% 30%, black 10%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(106,150,183,0.25), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero-copy h1 {
  color: var(--ink);
  font-size: clamp(2.3rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.hero-sub {
  color: var(--gray-700);
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 38px; }

.hero-trust { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-trust li { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--gray-700); }
.hero-trust svg { width: 18px; height: 18px; color: var(--blue-deep); flex-shrink: 0; }

.hero-media { position: relative; }
.hero-image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--white);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-lg);
}
.hero-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-image-fallback {
  display: none;
  position: absolute; inset: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--gray-500);
  background: linear-gradient(145deg, var(--white), var(--gray-100));
  text-align: center; padding: 20px;
  font-size: 0.85rem;
}
.hero-image-fallback svg { width: 44px; height: 44px; opacity: 0.5; }
.hero-image-frame.placeholder .hero-image-fallback { display: flex; }
.hero-image-frame.placeholder img { display: none; }

.hero-stat-card {
  position: absolute;
  bottom: -28px; left: -28px;
  background: var(--white);
  color: var(--ink);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px;
  max-width: 200px;
}
.hero-stat-card strong { font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; color: var(--blue); }
.hero-stat-card span { font-size: 0.82rem; color: var(--gray-700); }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--off-white); border-bottom: 1px solid var(--gray-100); padding: 22px 0; }
.trust-bar-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.03em; color: var(--gray-500); text-transform: uppercase;
  text-align: center;
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
.about-image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--off-white);
  box-shadow: var(--shadow-md);
}
.about-image-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.about-image-fallback {
  display: none; position: absolute; inset: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--gray-500); background: var(--gray-100); text-align: center; padding: 20px; font-size: 0.85rem;
}
.about-image-fallback svg { width: 44px; height: 44px; opacity: 0.4; }
.about-image-frame.placeholder .about-image-fallback { display: flex; }
.about-image-frame.placeholder img { display: none; }

.about-copy h2 { margin-bottom: 18px; }
.about-copy p:not(.eyebrow) { color: var(--gray-700); font-size: 1.05rem; margin-bottom: 32px; }
.about-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--blue); }
.stat span { font-size: 0.88rem; color: var(--gray-500); }

/* ==========================================================================
   Office gallery
   ========================================================================== */
.office-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.office-photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
}
.office-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==========================================================================
   Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(203, 174, 135, 0.6);
  box-shadow: var(--shadow-md);
}
.service-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(106, 150, 183, 0.14);
  color: var(--blue-deep);
  margin-bottom: 20px;
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { color: var(--ink); font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { color: var(--gray-700); font-size: 0.95rem; }

/* ==========================================================================
   Process
   ========================================================================== */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.process-step { position: relative; padding-top: 10px; }
.process-number {
  display: inline-block; font-family: var(--font-head); font-weight: 800;
  font-size: 2.4rem; color: var(--blue-50); -webkit-text-stroke: 1.5px var(--blue);
  margin-bottom: 8px;
}
.process-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.process-step p { color: var(--gray-500); font-size: 0.95rem; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  margin: 0;
  box-shadow: var(--shadow-sm);
}
.stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 16px; font-size: 0.95rem; }
.testimonial-card blockquote { margin: 0 0 20px; color: var(--gray-700); font-size: 0.98rem; font-style: normal; }
.testimonial-card figcaption { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 0.9rem; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: linear-gradient(120deg, var(--blue-deep), var(--blue));
  color: var(--white);
  padding: 56px 0;
}
.cta-band-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.85); }
.cta-band .btn-primary { background: var(--white); color: var(--blue-deep); box-shadow: var(--shadow-md); }
.cta-band .btn-primary:hover { background: var(--off-white); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  background: transparent; border: none; text-align: left;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--ink);
}
.faq-question svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; transition: transform 0.25s ease; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p { padding: 0 24px 20px; color: var(--gray-700); font-size: 0.96rem; }
.faq-item.open .faq-answer { max-height: 300px; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; }
.contact-info h2 { margin-bottom: 14px; }
.contact-details { margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.contact-details li { display: flex; align-items: center; gap: 14px; font-size: 0.98rem; }
.contact-details svg { width: 20px; height: 20px; color: var(--blue-deep); flex-shrink: 0; }
.contact-details a { color: var(--ink); font-weight: 600; }
.contact-label { font-weight: 400; color: var(--gray-500); font-size: 0.82rem; margin-left: 4px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); }
.form-field input, .form-field select, .form-field textarea {
  background: var(--off-white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(106,150,183,0.2);
}
.form-note { font-size: 0.88rem; color: var(--blue-deep); min-height: 1.2em; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--gray-100); color: var(--gray-700); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--gray-300); }
.footer-brand p { margin-top: 16px; font-size: 0.92rem; max-width: 320px; }
.footer-nav h4, .footer-contact h4 { color: var(--ink); font-size: 0.9rem; margin-bottom: 18px; }
.footer-nav ul, .footer-contact ul { display: flex; flex-direction: column; gap: 12px; font-size: 0.92rem; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--blue-deep); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: var(--blue-deep); }

/* ==========================================================================
   Floating UI
   ========================================================================== */
.whatsapp-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 401;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37,211,102,0.45);
  transition: transform 0.2s ease;
}
.whatsapp-fab:hover { transform: translateY(-2px); }
.whatsapp-fab svg { width: 28px; height: 28px; }

.mobile-call-fab {
  display: none;
  position: fixed; bottom: 92px; right: 24px; z-index: 400;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(106,150,183,0.4);
}
.mobile-call-fab svg { width: 24px; height: 24px; }

.back-to-top {
  position: fixed; bottom: 24px; right: 90px; z-index: 399;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-deep); color: var(--white);
  border: none;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .services-grid, .process-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .main-nav, .header-phone { display: none; }
  .header-actions .lang-toggle { display: none; }
  .nav-toggle { display: flex; }
  .hero-inner, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; width: 100%; max-width: 420px; margin: 0 auto 20px; }
  .hero-stat-card { left: 16px; bottom: -20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .mobile-call-fab { display: flex; }

  .main-nav {
    position: fixed; inset: 96px 0 0 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .main-nav.open { display: block; transform: translateX(0); }
  .site-header:has(.main-nav.open) { backdrop-filter: none; }
  .main-nav.open ul { flex-direction: column; gap: 4px; }
  .main-nav.open a { display: block; padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--gray-100); }
  .main-nav.open .lang-toggle-mobile { display: inline-flex; margin-top: 20px; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .services-grid, .process-grid, .testimonials-grid, .office-gallery { grid-template-columns: 1fr; }
  .trust-bar-inner { justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band-inner { text-align: center; justify-content: center; }
}
