/* =============================================
   Tilley Tax & Bookkeeping, Inc.
   styles.css — Mobile-first, Dark Mode Ready
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ── CSS Variables ─────────────────────────── */
:root {
  /* Brand Colors */
  --blue:        #1a3a6e;
  --blue-mid:    #1e4a9e;
  --blue-light:  #2a5fc4;
  --red:         #8b1a1a;
  --red-light:   #a82020;
  --gold:        #c8a84b;

  /* Light Mode */
  --bg:          #f5f3ef;
  --bg-card:     #ffffff;
  --bg-section:  #ede9e3;
  --text:        #1a1814;
  --text-muted:  #5a5550;
  --border:      #d8d2c8;
  --shadow:      0 2px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.14);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;

  /* Spacing */
  --max-w: 1100px;
  --section-pad: clamp(3rem, 8vw, 6rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0f0e0c;
    --bg-card:    #1a1916;
    --bg-section: #141310;
    --text:       #ede9e2;
    --text-muted: #9a9490;
    --border:     #2e2c28;
    --shadow:     0 2px 16px rgba(0,0,0,0.45);
    --shadow-lg:  0 8px 40px rgba(0,0,0,0.60);
  }
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  transition: background 0.3s, color 0.3s;
}

img { max-width: 100%; display: block; }
a  { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Skip Link (Accessibility) ─────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--blue);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Top Bar ────────────────────────────────── */
.topbar {
  background: var(--blue);
  color: rgba(255,255,255,0.88);
  font-size: 0.82rem;
  padding: 0.4rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,0.88); }
.topbar a:hover { color: #fff; text-decoration: none; }
.topbar svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }

/* ── Header / Nav ───────────────────────────── */
header {
  background: var(--bg-card);
  border-bottom: 3px solid var(--blue);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo { height: 52px; width: auto; }

nav { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
nav a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background 0.18s, color 0.18s;
}
nav a:hover { background: var(--blue); color: #fff; text-decoration: none; }
nav a.cta-nav {
  background: var(--red);
  color: #fff;
  margin-left: 0.5rem;
}
nav a.cta-nav:hover { background: var(--red-light); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border);
  border-radius: 5px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }

@media (max-width: 700px) {
  .nav-toggle { display: flex; align-items: center; }
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.25rem;
    box-shadow: var(--shadow);
  }
  nav.open { display: flex; }
  nav a { width: 100%; padding: 0.6rem 0.75rem; }
  nav a.cta-nav { margin-left: 0; margin-top: 0.25rem; text-align: center; }
}

/* ── Hero ───────────────────────────────────── */
.hero {
  position: relative;
  background: var(--blue);
  overflow: hidden;
  padding: clamp(3rem, 10vw, 6rem) 1.25rem clamp(2.5rem, 8vw, 5rem);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-text h1 span {
  color: var(--gold);
  display: block;
}
.hero-text p {
  color: rgba(255,255,255,0.82);
  font-size: 1.1rem;
  max-width: 440px;
  margin-bottom: 1.75rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  border-radius: 5px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-light); text-decoration: none; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.12); text-decoration: none; border-color: #fff; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.hero-image {
  display: flex;
  justify-content: flex-end;
}
.hero-image img {
  max-height: 420px;
  width: auto;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.5));
  border-radius: 4px;
}

@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-image { justify-content: center; }
  .hero-image img { max-height: 260px; }
}

/* ── Section Shared ─────────────────────────── */
section { padding: var(--section-pad) 1.25rem; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin-bottom: 2.5rem;
}
.divider {
  width: 48px; height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin: 0.75rem 0 1.5rem;
}

/* ── Trust Bar ──────────────────────────────── */
.trust-bar {
  background: var(--blue);
  padding: 1.1rem 1.25rem;
}
.trust-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  justify-content: center;
  align-items: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.88rem;
}
.trust-item svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }

/* ── Services ───────────────────────────────── */
.services-bg { background: var(--bg-section); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.service-icon {
  width: 48px; height: 48px;
  background: var(--blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.service-icon svg { width: 24px; height: 24px; color: #fff; }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.service-card p { color: var(--text-muted); font-size: 0.95rem; }
.service-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.service-list li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 1.1rem;
  position: relative;
}
.service-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue-light);
  font-weight: 700;
}

/* ── Why Choose Us ──────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.why-items { display: flex; flex-direction: column; gap: 1.25rem; }
.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.why-num {
  width: 36px; height: 36px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.why-item h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.why-item p { color: var(--text-muted); font-size: 0.92rem; }

.why-aside {
  background: var(--blue);
  border-radius: 12px;
  padding: 2rem;
  color: #fff;
}
.why-aside h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--gold);
}
.hours-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.hours-table td { padding: 0.45rem 0; color: rgba(255,255,255,0.88); }
.hours-table td:last-child { text-align: right; font-weight: 600; }
.hours-table tr + tr td { border-top: 1px solid rgba(255,255,255,0.12); }
.hours-note {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.83rem;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}
.hours-phone {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
}
.hours-phone svg { width: 20px; height: 20px; }
.hours-phone a { color: var(--gold); }
.hours-phone a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ── Reviews ────────────────────────────────── */
.reviews-bg { background: var(--bg-section); }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 0.5rem; }
.review-card blockquote {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.reviewer {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}
.review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.review-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  border: 2px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
  transition: all 0.18s;
}
.review-link-btn:hover { border-color: var(--blue-light); color: var(--blue-light); text-decoration: none; }
.review-link-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.yelp-btn { border-color: #d32323; color: #d32323; }
.yelp-btn:hover { background: #d32323; color: #fff; border-color: #d32323; }
.google-btn { border-color: #4285f4; color: #4285f4; }
.google-btn:hover { background: #4285f4; color: #fff; border-color: #4285f4; }

/* ── Contact / Map ──────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.contact-icon {
  width: 40px; height: 40px;
  background: var(--blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; color: #fff; }
.contact-item h4 { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.15rem; }
.contact-item p, .contact-item a { font-size: 1rem; color: var(--text); }
.contact-item a:hover { color: var(--blue-light); }

.map-frame {
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
}
.map-frame iframe { width: 100%; height: 340px; display: block; border: none; }

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ── Footer ─────────────────────────────────── */
footer {
  background: #0c0b09;
  color: rgba(255,255,255,0.75);
  padding: 2.5rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand img { height: 44px; margin-bottom: 0.75rem; filter: brightness(1.1); }
.footer-brand p { font-size: 0.88rem; max-width: 300px; line-height: 1.6; }
.footer-links h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links li a { font-size: 0.88rem; color: rgba(255,255,255,0.7); }
.footer-links li a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: rgba(255,255,255,0.75); text-decoration: none; }

/* ── Floating Call Button (mobile) ─────────── */
.fab-call {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--red);
  color: #fff;
  width: 56px; height: 56px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: background 0.18s, transform 0.18s;
}
.fab-call:hover { background: var(--red-light); transform: scale(1.05); text-decoration: none; }
.fab-call svg { width: 24px; height: 24px; }
@media (max-width: 700px) { .fab-call { display: flex; } }

/* ── Utility ────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
