/* ===== Helm & Birch — Custom Styles ===== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --brand-50: #f0fdf4;
  --brand-100: #dcfce7;
  --brand-200: #bbf7d0;
  --brand-300: #86efac;
  --brand-400: #4ade80;
  --brand-500: #22c55e;
  --brand-600: #15803d;
  --brand-700: #166534;
  --brand-800: #14532d;
  --brand-900: #0f3d1f;
  --brand-950: #052e16;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: #1a1a1a;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Serif Headings (Editorial) --- */
h1, h2, h3, h4, h5, h6,
.font-serif {
  font-family: var(--font-serif);
}

/* --- Noise / Grain Texture Overlay --- */
.noise-bg {
  position: relative;
  background-color: #ffffff;
}

.noise-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 1;
}

.noise-bg > * {
  position: relative;
  z-index: 2;
}

/* --- Double Line Dividers --- */
.divider-double {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 1rem;
}

.divider-double::before,
.divider-double::after {
  content: '';
  display: block;
  width: 100%;
  max-width: 1200px;
  height: 1px;
  background-color: var(--brand-200);
}

/* --- Side-Aligned Section Heading --- */
.section-heading {
  border-left: 4px solid var(--brand-600);
  padding-left: 1.25rem;
}

/* --- Outline-Accent Cards --- */
.card-accent {
  background: #ffffff;
  border-left: 4px solid var(--brand-500);
  border-top: none;
  border-right: none;
  border-bottom: none;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.card-accent:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* --- Underline Buttons --- */
.btn-underline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand-600);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2.5px solid var(--brand-600);
  padding-bottom: 4px;
  transition: color 0.25s ease, border-color 0.25s ease;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-size: inherit;
  font-family: var(--font-sans);
}

.btn-underline:hover {
  color: var(--brand-800);
  border-bottom-color: var(--brand-800);
}

.btn-underline-light {
  color: var(--brand-200);
  border-bottom-color: var(--brand-200);
}

.btn-underline-light:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* --- Accordion --- */
.accordion-item {
  border-left: 4px solid var(--brand-500);
  background: #ffffff;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.accordion-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  transition: color 0.2s ease;
}

.accordion-trigger:hover {
  color: var(--brand-600);
}

.accordion-icon {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--brand-600);
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
  max-height: 600px;
  padding: 0 1.5rem 1.5rem;
}

/* --- Before/After Columns --- */
.before-col {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
}

.after-col {
  background: var(--brand-50);
  border-left: 4px solid var(--brand-500);
}

/* --- Testimonial Spotlight --- */
.testimonial-spotlight {
  position: relative;
}

.testimonial-spotlight .quote-mark {
  font-family: var(--font-serif);
  font-size: 8rem;
  line-height: 1;
  color: var(--brand-200);
  position: absolute;
  top: -1rem;
  left: -0.5rem;
  z-index: 0;
  user-select: none;
}

/* --- Pull Quote --- */
.pull-quote {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--brand-700);
  border-left: 4px solid var(--brand-500);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--brand-50);
}

/* --- Asymmetric Footer --- */
.footer-asymmetric {
  background-color: var(--brand-950);
  color: #d1d5db;
}

.footer-asymmetric a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-asymmetric a:hover {
  color: #ffffff;
}

/* --- Trust Badge Row --- */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--brand-200);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-700);
  background: #ffffff;
}

.trust-badge svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--brand-500);
}

/* --- Form Styles --- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  color: #1a1a1a;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

/* --- Centered Logo Nav --- */
.nav-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Mobile Menu --- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-menu.open {
  max-height: 500px;
}

/* --- Case Study Stat --- */
.stat-highlight {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--brand-600);
  line-height: 1.1;
}

/* --- Badge Bar --- */
.badge-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  align-items: center;
}

/* --- FAQ Grid --- */
@media (min-width: 768px) {
  .faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

/* --- Legal Page Styles --- */
.legal-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: #4b5563;
  line-height: 1.8;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: #4b5563;
}

.legal-content ul li {
  margin-bottom: 0.375rem;
  line-height: 1.7;
}

/* --- Utility --- */
.text-balance {
  text-wrap: balance;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }

/* Scroll reveal initial state */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Print --- */
@media print {
  .noise-bg::before,
  nav,
  footer { display: none; }
}
