/* ============ CSS VARIABLES ============ */
/* Provide both HEX and RGB variants so rules can choose correctly */
:root {
  --blue-dark: #343a49; /* hex */
  --blue-brand-hex: #3e5481; /* hex */
  --blue-brand-rgb: 62, 84, 129; /* rgb tuple for rgb() usage */
  --surface: #2f3a56;
  --surface-2: #314061;

  --gold: #c9a267;
  --gold-contrast: #e6c98d;

  --text-muted: rgba(255, 255, 255, 0.8);
  --shadow-strong: 0 12px 30px rgba(0, 0, 0, 0.28);

  --radius: 14px;
  --radius-lg: 18px;
}

/* ============ BASE ============ */
html,
body {
  scroll-behavior: smooth;
}
body {
  background: var(--blue-dark);
  color: #fff;
}
html,
body {
  overflow-x: hidden;
}
body.nav-open {
  overflow: hidden;
}

/* Containers */
.container-narrow {
  width: min(1200px, 92%);
  margin-inline: auto;
}
.container-wide {
  width: min(1280px, 94%);
  margin-inline: auto;
}

/* Section spacing & headings (kept for non-TW areas) */
section.section {
  padding-block: clamp(3rem, 4vw + 1rem, 6rem);
}
.section-title {
  text-align: center;
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem);
  color: #fff;
}
.section-title .accent {
  color: var(--gold-contrast);
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 70ch;
  margin: 0.5rem auto 0;
}

/* ============ CARDS / GRIDS / BUTTONS ============ */
.card {
  background: var(--surface);
  border: 1px solid rgba(230, 201, 141, 0.18);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-strong);
}
@media (min-width: 768px) {
  .card {
    padding: 1.5rem;
  }
}
.card h3 {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--gold-contrast);
  margin-bottom: 0.25rem;
}
.card p {
  color: var(--text-muted);
}

.grid-standard {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .grid-standard {
    gap: 1.5rem;
  }
}
@media (min-width: 992px) {
  .grid-standard {
    gap: 2rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform 0.06s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, color 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--gold-contrast);
  color: var(--blue-dark);
  border-color: var(--gold-contrast);
}
.btn-primary:hover {
  background: #f0d9a5;
  border-color: #f0d9a5;
}
.btn-outline {
  background: transparent;
  color: var(--gold-contrast);
  border-color: var(--gold-contrast);
}
.btn-outline:hover {
  background: var(--gold-contrast);
  color: var(--blue-dark);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ============ NAVBAR ============ */
/* Single, non-duplicated definition; uses rgb tuple var */
header.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgb(var(--blue-brand-rgb)); /* solid by default */
  color: #fff;
  border-bottom: 1px solid rgba(230, 201, 141, 0.25);
  transition: background 0.3s, backdrop-filter 0.3s;
}
body {
  padding-top: 64px;
} /* adjust to navbar height */

/* Scrolled state (translucent + blur) */
header.navbar.scrolled {
  background: rgba(var(--blue-brand-rgb), 0.6);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  backdrop-filter: saturate(120%) blur(6px);
}

/* Mobile drawer (attribute selector retained) */
[data-nav] {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100%;
  max-width: 300px;
  background: rgba(var(--blue-brand-rgb), 0.96);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  backdrop-filter: saturate(120%) blur(6px);
  transform: translateX(100%);
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  overflow-y: auto;
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.12);
}
[data-nav].is-open {
  transform: translateX(0);
  pointer-events: auto;
}
@media (min-width: 881px) {
  [data-nav] {
    display: flex !important;
    align-items: center;
    gap: 2rem;
    position: static;
    height: auto;
    max-width: none;
    width: auto;
    transform: none;
    pointer-events: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
    overflow: visible;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ============ HERO ============ */
.eyebrow {
  display: inline-block;
  background: rgba(230, 201, 141, 0.14);
  color: var(--gold-contrast);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.hero-title {
  font-family: Poppins, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
}
.hero-text {
  color: var(--text-muted);
  max-width: 68ch;
  margin-inline: auto;
}

/* Parallax background (fallback scroll; fixed is unreliable on iOS) */
.parallax-bg {
  background-image: url("https://innerworkadvisorsllp.com/images/contact-us.png");
  background-position: bottom center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: translateZ(0); /* improve compositing */
  will-change: transform;
  background-attachment: scroll; /* safe everywhere */
}
/* iOS/Android fallback already safe; keep media rule if you later re-enable fixed */
@media (max-width: 768px) {
  #hero .parallax-bg {
    background-attachment: scroll;
  }
}

/* Testimonials */
blockquote.testimonial {
  position: relative;
  background: var(--surface-2);
  border: 1px solid rgba(230, 201, 141, 0.16);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-strong);
  max-width: 720px;
}
@media (min-width: 768px) {
  blockquote.testimonial {
    padding: 1.5rem;
  }
}
blockquote.testimonial p {
  color: #fff;
  font-size: 1.05rem;
}
blockquote.testimonial p::before {
  content: "“";
  position: absolute;
  left: 14px;
  top: -18px;
  font-size: 5rem;
  line-height: 1;
  color: rgba(230, 201, 141, 0.12);
  pointer-events: none;
}
.testimonial footer {
  margin-top: 0.75rem;
  color: var(--gold-contrast);
  font-weight: 600;
}

/* Maps & phones */
.office-card h3 {
  color: var(--gold-contrast);
  font-size: 1.125rem;
}
.map-frame {
  height: clamp(280px, 32vw, 420px);
  width: 100%;
  border: 0;
  border-radius: 12px;
}
.phone-list li a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}
.phone-list li a:hover {
  color: var(--gold-contrast);
}
.phone-icon {
  width: 18px;
  height: 18px;
  color: var(--gold-contrast);
}

/* Footer */
footer.site-footer {
  background: var(--blue-brand-hex);
  border-top: 1px solid rgba(230, 201, 141, 0.25);
}
.footer-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .footer-cta {
    flex-direction: row;
  }
  .footer-cta a {
    width: auto;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  color: #000;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  z-index: 9999;
}
