/* =============================================
   Zuehl Digital — Stylesheet
   Mobile-first, CSS custom properties, Inter font
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Custom Properties --- */
:root {
  --color-white:        #FFFFFF;
  --color-navy:         #061A33;
  --color-navy-light:   #0D2B52;
  --color-steel:        #4A6FA5;
  --color-slate:        #64748B;
  --color-text:         #111111;
  --color-text-muted:   #555555;
  --color-border:       #E5E5E5;
  --color-surface:      #F8F9FA;
  --color-error:        #DC2626;
  --color-success:      #16A34A;

  --font-family:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --space-xs:           0.25rem;
  --space-sm:           0.5rem;
  --space-md:           1rem;
  --space-lg:           1.5rem;
  --space-xl:           2rem;
  --space-2xl:          3rem;
  --space-3xl:          4rem;
  --space-4xl:          6rem;
  --space-section:      5rem;

  --container-max:      1200px;
  --container-pad:      1.5rem;

  --radius-sm:          4px;
  --radius-md:          8px;
  --radius-lg:          12px;

  --shadow-sm:          0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md:          0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg:          0 8px 30px rgba(0, 0, 0, 0.12);

  --transition-fast:    150ms ease;
  --transition-base:    250ms ease;
  --transition-slow:    400ms ease;

  --header-height:      80px;
  --header-shrink:      64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 500;
  z-index: 10000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* --- Section Shared --- */
.section {
  padding: var(--space-section) 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-3xl);
}

.section-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.section-subheading {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: height var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
  height: var(--header-shrink);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 68px;
  width: auto;
  transition: height var(--transition-base);
}

.scrolled .logo-img {
  height: 56px;
}

/* Desktop Nav */
.desktop-nav {
  display: none;
}

.nav-list {
  display: flex;
  gap: var(--space-xl);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-navy);
  border-bottom-color: var(--color-steel);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2000;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  z-index: 1500;
}

.mobile-nav.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.mobile-nav-link {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-navy);
  transition: color var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--color-steel);
}

/* --- Hero --- */
.section-hero {
  position: relative;
  padding-top: calc(var(--header-height) + var(--space-4xl));
  padding-bottom: var(--space-4xl);
  overflow: hidden;
  background: var(--color-white);
}

.hero-geometry {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(to bottom, transparent 0%, var(--color-white) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      var(--color-border) 59px,
      var(--color-border) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      var(--color-border) 59px,
      var(--color-border) 60px
    );
  background-size: 100% 100%, 60px 60px, 60px 60px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-logo {
  height: 118px;
  width: auto;
  margin-bottom: var(--space-2xl);
}

.hero-heading {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
}

.hero-text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto var(--space-xl);
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  border: none;
  line-height: 1.4;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-navy-light);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-navy);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-navy);
  background: var(--color-navy);
  color: var(--color-white);
}

/* --- Services --- */
.section-services {
  background: var(--color-surface);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-steel);
  transform: translateY(-2px);
}

.service-icon {
  font-size: 1.5rem;
  color: var(--color-steel);
  margin-bottom: var(--space-md);
  font-weight: 700;
  line-height: 1;
}

.service-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: var(--space-sm);
}

.service-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Why --- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.why-item {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.why-marker {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-steel);
  flex-shrink: 0;
  padding-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.why-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: var(--space-xs);
}

.why-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- About --- */
.about-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  align-items: center;
}

.about-image-wrapper {
  flex-shrink: 0;
}

.about-headshot {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.about-text p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-lead {
  font-size: 1.05rem !important;
  color: var(--color-navy) !important;
  font-weight: 500;
}

/* --- FAQ --- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color var(--transition-fast);
  gap: var(--space-md);
}

.faq-question:hover {
  color: var(--color-steel);
}

.faq-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition-base);
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(-135deg);
}

.faq-answer {
  padding: 0 0 var(--space-lg);
}

.faq-answer[hidden] {
  display: none;
}

.faq-answer p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* --- Contact --- */
.section-contact {
  background: var(--color-surface);
}

.contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
}

.form-label span {
  color: var(--color-error);
}

.form-input {
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--color-steel);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.15);
}

.form-input.invalid {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-error);
  min-height: 0;
  transition: all var(--transition-fast);
}

.form-error:empty {
  display: none;
}

.form-footer {
  text-align: center;
}

.form-note {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: var(--color-slate);
  font-style: italic;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.footer-logo {
  height: 56px;
  width: auto;
}

.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
}

.footer-nav-list a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer-nav-list a:hover {
  color: var(--color-white);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.social-placeholder {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--transition-fast);
  cursor: default;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base), background var(--transition-fast);
  z-index: 900;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-navy-light);
}

.back-to-top-arrow {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
}

/* --- Animation Classes (applied by IntersectionObserver via JS) --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal delays for grids */
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.15s; }
.why-grid .why-item:nth-child(1)    { transition-delay: 0.05s; }
.why-grid .why-item:nth-child(2)    { transition-delay: 0.1s; }
.why-grid .why-item:nth-child(3)    { transition-delay: 0.15s; }

/* =============================================
   Responsive Breakpoints
   ============================================= */

/* 480px — small tablets / large phones */
@media (min-width: 480px) {
  :root { --container-pad: 2rem; }

  .hero-heading { font-size: 2.25rem; }
}

/* 640px — tablets */
@media (min-width: 640px) {
  :root { --container-pad: 2.5rem; }

  .section-heading { font-size: 2rem; }
  .hero-heading { font-size: 2.5rem; }
  .hero-logo { height: 132px; }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .about-headshot {
    width: 220px;
    height: 220px;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* 768px — landscape tablets */
@media (min-width: 768px) {
  :root { --container-pad: 3rem; }

  .section-heading { font-size: 2.25rem; }
  .hero-heading { font-size: 2.75rem; }
  .hero-logo { height: 150px; }

  .about-headshot {
    width: 260px;
    height: 260px;
  }

  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
}

/* 1024px — desktop */
@media (min-width: 1024px) {
  :root {
    --header-height: 88px;
    --header-shrink: 68px;
  }

  .section { padding: var(--space-4xl) 0; }

  .section-heading { font-size: 2.5rem; }

  .desktop-nav { display: flex; }
  .hamburger { display: none; }
  .mobile-nav { display: none; }

  .hero-heading {
    font-size: 3.25rem;
  }

  .hero-text {
    font-size: 1.1rem;
  }

  .hero-logo { height: 170px; }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-headshot {
    width: 300px;
    height: 300px;
  }
}

/* 1200px — large desktop */
@media (min-width: 1200px) {
  :root {
    --header-height: 96px;
    --header-shrink: 72px;
  }

  .hero-heading {
    font-size: 3.75rem;
  }

  .hero-text {
    font-size: 1.15rem;
  }

  .about-headshot {
    width: 340px;
    height: 340px;
  }
}

/* 1440px — extra large monitors */
@media (min-width: 1440px) {
  :root {
    --container-max: 1280px;
  }

  .hero-heading {
    font-size: 4rem;
  }
}