/* === VARIABLES & RESET === */
:root {
  --hfw-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hfw-bg: #FFFFFF;
  --hfw-bg-alt: #F7F7F7;
  --hfw-text: #111111;
  --hfw-text-muted: #666666;
  --hfw-accent: #0047FF; /* Tech blue */
  --hfw-accent-hover: #0033CC;
  --hfw-border: #E5E5E5;
  --hfw-border-dark: #CCCCCC;
  --hfw-radius: 0; /* Swiss grid = sharp edges */
  --hfw-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --hfw-max-width: 1440px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--hfw-font-sans);
  background-color: var(--hfw-bg);
  color: var(--hfw-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--hfw-transition); }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* === ACCESSIBILITY === */
.hfw-skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--hfw-accent);
  color: #fff;
  padding: 1rem;
  z-index: 9999;
  transition: top 0.2s;
}
.hfw-skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--hfw-accent); outline-offset: 4px; }
[aria-hidden="true"] { pointer-events: none; }

/* === TYPOGRAPHY === */
.hfw-h1 { font-size: clamp(3rem, 6vw, 5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.hfw-h2 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.hfw-h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 600; line-height: 1.2; }
.hfw-p-large { font-size: clamp(1.125rem, 2vw, 1.375rem); color: var(--hfw-text-muted); max-width: 600px; }
.hfw-p { font-size: 1rem; color: var(--hfw-text-muted); }
.hfw-accent-text { color: var(--hfw-accent); }

/* === BUTTONS === */
.hfw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background: var(--hfw-text);
  color: #fff;
  font-weight: 500;
  transition: background var(--hfw-transition), transform var(--hfw-transition);
  gap: 0.5rem;
}
.hfw-btn:hover { background: var(--hfw-accent); }
.hfw-btn--outline { background: transparent; color: var(--hfw-text); border: 1px solid var(--hfw-border-dark); }
.hfw-btn--outline:hover { background: var(--hfw-bg-alt); border-color: var(--hfw-text); }
.hfw-btn--primary { background: var(--hfw-accent); }
.hfw-btn--primary:hover { background: var(--hfw-accent-hover); }

/* === LAYOUT & GRID === */
.hfw-container { max-width: var(--hfw-max-width); margin: 0 auto; padding: 0 5%; }
.hfw-section { padding: 6rem 0; border-bottom: 1px solid var(--hfw-border); }
.hfw-section--dark { background: var(--hfw-text); color: var(--hfw-bg); }
.hfw-section--dark .hfw-p, .hfw-section--dark .hfw-p-large { color: #A0A0A0; }
.hfw-section--alt { background: var(--hfw-bg-alt); }

/* === HEADER === */
.hfw-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: transparent; transition: background 0.3s, border-bottom 0.3s;
  border-bottom: 1px solid transparent;
}
.hfw-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hfw-border);
}
.hfw-nav-container { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.hfw-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; }
.hfw-logo svg { width: 24px; height: 24px; }
.hfw-nav-list { display: flex; gap: 2rem; align-items: center; }
.hfw-nav-link { font-size: 0.875rem; font-weight: 500; color: var(--hfw-text-muted); }
.hfw-nav-link:hover, .hfw-nav-link.is-active { color: var(--hfw-text); }
.hfw-burger { display: none; width: 32px; height: 24px; flex-direction: column; justify-content: space-between; position: relative; z-index: 101; }
.hfw-burger span { display: block; width: 100%; height: 2px; background: var(--hfw-text); transition: var(--hfw-transition); }

/* === MOBILE NAV === */
.hfw-mobile-nav {
  position: fixed; top: 0; left: 0; width: 100%; height: 100dvh;
  background: var(--hfw-bg); z-index: 99;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity var(--hfw-transition);
}
.hfw-mobile-nav.is-open { opacity: 1; pointer-events: auto; }
.hfw-mobile-nav-list { display: flex; flex-direction: column; gap: 2rem; text-align: center; font-size: 1.5rem; font-weight: 600; }
body.nav-open { overflow: hidden; }
.hfw-header.nav-open .hfw-burger span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.hfw-header.nav-open .hfw-burger span:nth-child(2) { opacity: 0; }
.hfw-header.nav-open .hfw-burger span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* === HERO (Mirrored Split) === */
.hfw-hero { min-height: 90vh; display: flex; align-items: center; padding-top: 80px; }
.hfw-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hfw-hero-content { order: 2; display: flex; flex-direction: column; gap: 2rem; }
.hfw-hero-visual { order: 1; aspect-ratio: 1; background: var(--hfw-bg-alt); display: flex; justify-content: center; align-items: center; position: relative; border: 1px solid var(--hfw-border); }
.hfw-hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
/* Grid graphic */
.hfw-grid-art { width: 100%; height: 100%; background-image: linear-gradient(var(--hfw-border) 1px, transparent 1px), linear-gradient(90deg, var(--hfw-border) 1px, transparent 1px); background-size: 40px 40px; position: relative; }
.hfw-grid-art::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 120px; height: 120px; background: var(--hfw-accent); border-radius: 50%; filter: blur(40px); opacity: 0.5; }

/* === TRUST STRIP === */
.hfw-trust { padding: 3rem 0; border-bottom: 1px solid var(--hfw-border); overflow: hidden; }
.hfw-trust-inner { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.hfw-trust-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--hfw-text-muted); font-weight: 600; }
.hfw-trust-logos { display: flex; gap: 4rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.hfw-trust-logo { font-size: 1.25rem; font-weight: 700; color: #CCC; font-style: italic; }

/* === SERVICES (Bento Grid) === */
.hfw-services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--hfw-border); border: 1px solid var(--hfw-border); margin-top: 3rem; }
.hfw-service-card { background: var(--hfw-bg); padding: 3rem; display: flex; flex-direction: column; gap: 1rem; transition: background 0.3s; }
.hfw-service-card:hover { background: var(--hfw-bg-alt); }
/* Bento sizing */
.hfw-service-card:nth-child(1), .hfw-service-card:nth-child(4) { grid-column: span 2; }
.hfw-service-card:nth-child(2), .hfw-service-card:nth-child(3), .hfw-service-card:nth-child(5), .hfw-service-card:nth-child(6) { grid-column: span 2; }
@media (min-width: 1024px) {
  .hfw-service-card:nth-child(2), .hfw-service-card:nth-child(3) { grid-column: span 1; }
}
.hfw-service-icon { font-size: 2rem; color: var(--hfw-accent); margin-bottom: 1rem; }

/* === PRICING (3 Cards, Elevated Mid) === */
.hfw-pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; align-items: center; }
.hfw-pricing-card { border: 1px solid var(--hfw-border); padding: 3rem; display: flex; flex-direction: column; gap: 2rem; background: var(--hfw-bg); }
.hfw-pricing-card--featured { background: var(--hfw-text); color: var(--hfw-bg); margin: -2rem 0; padding: 5rem 3rem; border-color: var(--hfw-text); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.hfw-pricing-card--featured .hfw-p, .hfw-pricing-card--featured .hfw-price-suffix { color: #A0A0A0; }
.hfw-price { font-size: 3rem; font-weight: 700; line-height: 1; }
.hfw-price-suffix { font-size: 1rem; font-weight: 400; color: var(--hfw-text-muted); }
.hfw-pricing-features { display: flex; flex-direction: column; gap: 1rem; flex-grow: 1; }
.hfw-pricing-features li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.875rem; }
.hfw-pricing-features li i { color: var(--hfw-accent); margin-top: 3px; }
.hfw-pricing-card--featured .hfw-pricing-features li i { color: #fff; }

/* === ADDITIONAL SERVICES (Accordion) === */
.hfw-additional { margin-top: 3rem; border-top: 1px solid var(--hfw-border); }
.hfw-add-item { border-bottom: 1px solid var(--hfw-border); }
.hfw-add-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; width: 100%; text-align: left; background: none; border: none; cursor: pointer; font-size: 1.125rem; font-weight: 600; }
.hfw-add-price { color: var(--hfw-accent); font-weight: 700; display: flex; align-items: center; gap: 1rem; }
.hfw-add-icon { transition: transform 0.3s; }
.hfw-add-item.is-open .hfw-add-icon { transform: rotate(180deg); }
.hfw-add-body { display: none; padding-bottom: 1.5rem; }
.hfw-add-body p { margin-bottom: 1rem; color: var(--hfw-text-muted); }
.hfw-add-item.is-open .hfw-add-body { display: block; }
.hfw-add-action { font-size: 0.875rem; font-weight: 600; color: var(--hfw-text); text-decoration: underline; }
.hfw-add-action:hover { color: var(--hfw-accent); }

/* === PROCESS (Vertical Timeline) === */
.hfw-process-list { margin-top: 4rem; display: flex; flex-direction: column; gap: 3rem; position: relative; }
.hfw-process-list::before { content: ''; position: absolute; left: 24px; top: 0; bottom: 0; width: 1px; background: var(--hfw-border); }
.hfw-process-step { display: flex; gap: 3rem; position: relative; z-index: 1; }
.hfw-process-num { width: 48px; height: 48px; flex-shrink: 0; background: var(--hfw-bg); border: 1px solid var(--hfw-border); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--hfw-accent); }
.hfw-process-content { padding-top: 0.5rem; }

/* === GUARANTEE (2-Col Band) === */
.hfw-guarantee { background: var(--hfw-text); color: var(--hfw-bg); padding: 4rem 0; }
.hfw-guarantee-grid { display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: center; }
.hfw-badge { width: 80px; height: 80px; background: var(--hfw-accent); display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 2rem; }

/* === COMPARISON (3-Col Strip) === */
.hfw-compare-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; margin-top: 3rem; border: 1px solid var(--hfw-border); }
.hfw-compare-header, .hfw-compare-row { display: contents; }
.hfw-compare-cell { padding: 1.5rem; border-bottom: 1px solid var(--hfw-border); border-right: 1px solid var(--hfw-border); }
.hfw-compare-cell:nth-child(3n) { border-right: none; }
.hfw-compare-header .hfw-compare-cell { font-weight: 700; background: var(--hfw-bg-alt); }
.hfw-compare-row:last-child .hfw-compare-cell { border-bottom: none; }
.hfw-cell-check { color: var(--hfw-accent); }
.hfw-cell-cross { color: #ccc; }

/* === FAQ (2-Col Split) === */
.hfw-faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem; }
.hfw-faq-col { display: flex; flex-direction: column; gap: 1rem; }
.hfw-faq-item { border: 1px solid var(--hfw-border); }
.hfw-faq-q { width: 100%; text-align: left; padding: 1.5rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: var(--hfw-bg); }
.hfw-faq-a { padding: 0 1.5rem 1.5rem; display: none; color: var(--hfw-text-muted); }
.hfw-faq-item.is-open .hfw-faq-a { display: block; }
.hfw-faq-icon { transition: transform 0.3s; }
.hfw-faq-item.is-open .hfw-faq-icon { transform: rotate(45deg); }

/* === ABOUT === */
.hfw-about-main { max-width: 800px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 1.5rem; }
.hfw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 4rem; border-top: 1px solid var(--hfw-border); padding-top: 4rem; text-align: center; }
.hfw-stat-num { font-size: 3rem; font-weight: 700; color: var(--hfw-accent); line-height: 1; margin-bottom: 0.5rem; }
.hfw-stat-label { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; color: var(--hfw-text-muted); }
.hfw-team { margin-top: 4rem; display: flex; justify-content: center; }
.hfw-team-card { display: flex; align-items: center; gap: 1.5rem; border: 1px solid var(--hfw-border); padding: 1.5rem 2rem; background: var(--hfw-bg-alt); }
.hfw-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--hfw-text); color: var(--hfw-bg); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.25rem; }

/* === REVIEWS (Horizontal Strip) === */
.hfw-reviews-wrap { margin-top: 3rem; overflow-x: auto; padding-bottom: 2rem; scrollbar-width: none; -ms-overflow-style: none; }
.hfw-reviews-wrap::-webkit-scrollbar { display: none; }
.hfw-reviews-track { display: flex; gap: 2rem; width: max-content; }
.hfw-review-card { width: 350px; border: 1px solid var(--hfw-border); padding: 2rem; display: flex; flex-direction: column; gap: 2rem; }
.hfw-review-stars { color: var(--hfw-accent); display: flex; gap: 0.25rem; }
.hfw-review-author { display: flex; align-items: center; gap: 1rem; }
.hfw-review-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--hfw-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* === CONTACT PAGE === */
.hfw-contact-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; margin-top: 3rem; }
.hfw-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.hfw-contact-card { border: 1px solid var(--hfw-border); padding: 2rem; background: var(--hfw-bg-alt); }
.hfw-contact-card i { font-size: 1.5rem; color: var(--hfw-accent); margin-bottom: 1rem; display: block; }
.hfw-contact-side { border: 1px solid var(--hfw-border); padding: 3rem; background: var(--hfw-text); color: var(--hfw-bg); display: flex; flex-direction: column; gap: 1.5rem; }
.hfw-map-wrap { margin-top: 4rem; width: 100%; height: 400px; border: 1px solid var(--hfw-border); background: var(--hfw-bg-alt); }
.hfw-map-wrap iframe { width: 100%; height: 100%; border: none; }

/* === LEGAL PAGE === */
.hfw-legal-layout { display: grid; grid-template-columns: 250px 1fr; gap: 4rem; margin-top: 3rem; align-items: start; }
.hfw-legal-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 1rem; }
.hfw-legal-nav a { font-weight: 500; color: var(--hfw-text-muted); }
.hfw-legal-nav a:hover { color: var(--hfw-accent); }
.hfw-legal-content section { margin-bottom: 4rem; padding-top: 80px; margin-top: -80px; }
.hfw-legal-content h2 { margin-bottom: 1.5rem; }
.hfw-legal-content h3 { margin: 1.5rem 0 1rem; font-size: 1.25rem; }
.hfw-legal-content p, .hfw-legal-content ul { margin-bottom: 1rem; color: var(--hfw-text-muted); }
.hfw-legal-content ul { padding-left: 1.5rem; list-style: disc; }

/* === FOOTER === */
.hfw-footer { padding: 6rem 0 2rem; background: var(--hfw-text); color: var(--hfw-bg); }
.hfw-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.hfw-footer-col { display: flex; flex-direction: column; gap: 1rem; }
.hfw-footer-col h4 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.hfw-footer-link { color: #A0A0A0; font-size: 0.875rem; }
.hfw-footer-link:hover { color: #fff; }
.hfw-footer-bottom { padding-top: 2rem; border-top: 1px solid #333; display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: #A0A0A0; }
.hfw-footer-legal { display: flex; gap: 1rem; }

/* === COOKIE BANNER === */
.hfw-cookie { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--hfw-bg); border-top: 1px solid var(--hfw-border); padding: 1.5rem; z-index: 1000; transform: translateY(100%); transition: transform 0.4s ease-out; box-shadow: 0 -10px 30px rgba(0,0,0,0.05); }
.hfw-cookie.is-visible { transform: translateY(0); }
.hfw-cookie-inner { max-width: var(--hfw-max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.hfw-cookie-text { font-size: 0.875rem; color: var(--hfw-text-muted); max-width: 600px; }
.hfw-cookie-actions { display: flex; gap: 1rem; }

/* === STICKY CTA === */
.hfw-sticky-cta { position: fixed; bottom: 2rem; right: 2rem; z-index: 90; opacity: 0; pointer-events: none; transition: opacity var(--hfw-transition), transform var(--hfw-transition); transform: translateY(20px); }
.hfw-sticky-cta.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.hfw-sticky-cta .hfw-btn { border-radius: 99px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); padding: 0.75rem 1.5rem; }

/* === ANIMATIONS (Scroll Reveal) === */
.hfw-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.hfw-reveal.is-revealed { opacity: 1; transform: translateY(0); }
/* No-JS fallback */
html:not(.js-ready) .hfw-reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hfw-reveal, .hfw-cookie, .hfw-sticky-cta { transition-duration: 0.01ms !important; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hfw-hero-grid { grid-template-columns: 1fr; }
  .hfw-hero-content { order: 1; text-align: center; align-items: center; }
  .hfw-hero-visual { order: 2; height: 300px; }
  .hfw-pricing-grid { grid-template-columns: 1fr; max-width: 500px; margin-inline: auto; }
  .hfw-pricing-card--featured { margin: 0; }
  .hfw-contact-layout { grid-template-columns: 1fr; }
  .hfw-legal-layout { grid-template-columns: 1fr; }
  .hfw-legal-nav { position: static; flex-direction: row; flex-wrap: wrap; margin-bottom: 2rem; }
  .hfw-legal-content section { padding-top: 40px; margin-top: -40px; }
}
@media (max-width: 900px) {
  .hfw-nav-list { display: none; }
  .hfw-burger { display: flex; }
  .hfw-services-grid { grid-template-columns: 1fr; }
  .hfw-service-card:nth-child(n) { grid-column: 1; }
  .hfw-compare-grid { grid-template-columns: 1fr; }
  .hfw-compare-header { display: none; }
  .hfw-compare-row { display: grid; grid-template-columns: 1fr; border-bottom: 2px solid var(--hfw-text); margin-bottom: 2rem; }
  .hfw-compare-cell { border-right: none; }
  .hfw-compare-cell:first-child { font-weight: bold; background: var(--hfw-bg-alt); }
  .hfw-compare-cell::before { display: block; font-size: 0.75rem; color: var(--hfw-text-muted); margin-bottom: 0.25rem; }
  .hfw-compare-cell:nth-child(2)::before { content: "HorizonFrameWorks"; }
  .hfw-compare-cell:nth-child(3)::before { content: "Typical Agency"; }
  .hfw-faq-grid { grid-template-columns: 1fr; }
  .hfw-stats { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .hfw-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hfw-footer-grid { grid-template-columns: 1fr; }
  .hfw-footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .hfw-guarantee-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .hfw-stats { grid-template-columns: 1fr; }
  .hfw-contact-grid { grid-template-columns: 1fr; }
  .hfw-process-step { gap: 1.5rem; flex-direction: column; }
  .hfw-process-list::before { left: 24px; }
  .hfw-cookie-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .hfw-cookie-actions { justify-content: center; }
}
