/* Critical CSS: above-the-fold (header, hero, section, btn). Load first; full styles.css loads async. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  background-color: var(--color-bg-alt);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
}

body {
  margin: 0 auto;
  max-width: var(--content-max-width);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--color-dark-grey);
  background-color: var(--color-bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-primary);
  color: var(--color-light) !important;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--color-light);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav__link:focus-visible,
.header__nav-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

:root {
  --color-primary: #075449;
  --color-secondary: #296D61;
  --color-accent: #C6AF17;
  --color-light: #FFFFFF;
  --color-dark-grey: #2d3748;
  --color-bg: #f7fafc;
  --color-bg-alt: #F2F2F2;
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-primary: 0 4px 16px rgba(7, 84, 73, 0.10), 0 1px 4px rgba(0, 0, 0, 0.04);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --font-sans: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --text-base: 18px;
  --text-lg: 1.125rem;
  --heading-1: clamp(1.5rem, 4vw, 2.5rem);
  --heading-2: clamp(1.25rem, 3vw, 1.75rem);
  --line-height: 1.6;
  --letter-spacing-tight: -0.02em;
  --content-max-width: 1200px;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --touch-target: 44px;
  --bp-medium: 600px;
  --bp-wide: 900px;
  --header-height: 4rem;
}

.section__inner,
.header__inner,
.hero__inner,
.footer__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

#main,
#hero,
#why-finovasa,
#purpose,
#services,
#benefits,
#testimonials,
#contact {
  scroll-margin-top: var(--header-height);
}

.header {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-color: var(--color-primary);
  color: var(--color-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  text-decoration: none;
  color: var(--color-light);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-tight);
}

.header__logo-symbol-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.header__logo-symbol {
  width: 40px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.header__logo img {
  max-width: 160px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.header__nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.header__nav-toggle:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.header__nav-toggle-icon {
  display: block;
  position: relative;
  width: 24px;
  height: 14px;
  border-top: 2px solid var(--color-light);
  border-bottom: 2px solid var(--color-light);
}

.header__nav-toggle-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-light);
  transform: translateY(-50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header__nav-toggle[aria-expanded="true"] .header__nav-toggle-icon {
  border-color: transparent;
}

.header__nav-toggle[aria-expanded="true"] .header__nav-toggle-icon::before {
  opacity: 0;
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-4);
}

.nav__link {
  color: var(--color-dark-grey);
  font-weight: 600;
}

.header .nav__link {
  color: var(--color-light);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
}

.nav__link:hover {
  color: var(--color-primary);
  text-decoration: none;
  background-color: var(--color-bg);
}

.header .nav__link:hover {
  color: var(--color-light);
  background-color: rgba(255, 255, 255, 0.15);
}

.nav__link--active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-secondary);
}

.page-home .nav a[href="index.html"],
.page-about .nav a[href="about.html"],
.page-services .nav a[href="services.html"],
.page-why-us .nav a[href="why-us.html"],
.page-testimonials .nav a[href="testimonials.html"],
.page-contact .nav a[href="contact.html"] {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-secondary);
}

.page-home .header .nav a[href="index.html"],
.page-about .header .nav a[href="about.html"],
.page-services .header .nav a[href="services.html"],
.page-why-us .header .nav a[href="why-us.html"],
.page-testimonials .header .nav a[href="testimonials.html"],
.page-contact .header .nav a[href="contact.html"] {
  color: var(--color-light);
  border-bottom: 2px solid var(--color-accent);
  background-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 599px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-light);
    border-bottom: 1px solid var(--color-bg-alt);
    padding: 0 var(--space-3);
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.25s ease, padding 0.25s ease, visibility 0.25s;
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    max-height: 30rem;
    padding: var(--space-3);
  }
  .nav__list {
    flex-direction: column;
  }
  .nav__link {
    display: block;
    padding: var(--space-3);
  }
  .header .nav__link {
    color: var(--color-dark-grey);
  }
  .header .nav__link:hover {
    color: var(--color-primary);
    background-color: var(--color-bg);
  }
  .page-home .header .nav a[href="index.html"],
  .page-about .header .nav a[href="about.html"],
  .page-services .header .nav a[href="services.html"],
  .page-why-us .header .nav a[href="why-us.html"],
  .page-testimonials .header .nav a[href="testimonials.html"],
  .page-contact .header .nav a[href="contact.html"] {
    color: var(--color-primary);
    background-color: transparent;
  }
}

@media (min-width: 600px) {
  .header__nav-toggle {
    display: none;
  }
  .nav {
    display: block;
    visibility: visible;
    opacity: 1;
    max-height: none;
    overflow: visible;
  }
}

.hero {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-color: var(--color-primary);
  background-image:
    linear-gradient(to bottom, rgba(7, 84, 73, 0.28) 0%, rgba(7, 84, 73, 0.58) 100%),
    url("images/table_mountain_hero.jpg");
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  padding: var(--space-6) var(--space-3);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

@media (min-width: 1400px) {
  .hero {
    background-position: center 38%;
  }
}

@media (min-width: 1800px) {
  .hero {
    background-image:
      linear-gradient(to right, rgba(7, 84, 73, 0.18) 0%, transparent 18%, transparent 82%, rgba(7, 84, 73, 0.18) 100%),
      linear-gradient(to bottom, rgba(7, 84, 73, 0.28) 0%, rgba(7, 84, 73, 0.58) 100%),
      url("images/table_mountain_hero.jpg");
    background-position: center 38%, center 40%, center 40%;
    background-size: cover, cover, cover;
  }
}

.hero__inner {
  width: 100%;
  max-width: 44rem;
  animation: heroFadeIn 0.9s ease-out both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__inner {
    animation: none;
  }
}

.hero__logo {
  margin: 0 auto 2rem;
  width: 100%;
  max-width: 800px;
  height: auto;
  aspect-ratio: 800 / 158;
  display: block;
  filter: brightness(2.2) drop-shadow(0 2px 12px rgba(0, 0, 0, 0.15));
}

@media (min-width: 768px) {
  .hero__logo {
    margin-bottom: 2.5rem;
  }
}

@media (min-width: 1200px) {
  .hero__logo {
    margin-bottom: 3rem;
  }
}

.hero__title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-light);
  margin: 0 0 1rem;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 40px rgba(7, 84, 73, 0.15);
}

@media (min-width: 1200px) {
  .hero__title {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
  }
}

.hero__tagline {
  font-size: 1.15rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.01em;
}

@media (min-width: 1200px) {
  .hero__tagline {
    font-size: 1.35rem;
  }
}

.hero__cta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  align-items: center;
}

@media (min-width: 600px) {
  .hero__cta {
    flex-direction: row;
    gap: 1.25rem;
  }
}

.btn.hero__btn-primary {
  background-color: var(--color-light) !important;
  color: var(--color-primary) !important;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.08);
  border: none;
}

.btn.hero__btn-primary:hover {
  background-color: #f0f0f0 !important;
  color: var(--color-primary) !important;
  filter: none;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.10);
  transform: translateY(-1px);
}

.hero__cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  color: var(--color-light) !important;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  min-height: var(--touch-target);
  line-height: 1.25;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.hero__cta-link:hover {
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.12);
  border-color: var(--color-light);
  transform: translateY(-1px);
}

.hero__scroll-hint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  color: rgba(255, 255, 255, 0.7);
  animation: heroScrollBounce 2s ease-in-out infinite;
  transition: color 0.2s ease, opacity 0.4s ease;
  text-decoration: none;
  opacity: 1;
  pointer-events: auto;
}

.hero__scroll-hint.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hero__scroll-hint:hover {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-hint {
    animation: none;
  }
}

.section {
  padding: var(--space-5) var(--space-3);
}

@media (min-width: 600px) {
  .section {
    padding: var(--space-6) var(--space-3);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-5);
  background-color: var(--color-primary);
  color: var(--color-light) !important;
  font-weight: 600;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: var(--touch-target);
  line-height: 1.25;
  box-shadow: 0 1px 3px rgba(7, 84, 73, 0.18), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(0.92);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(7, 84, 73, 0.22), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(7, 84, 73, 0.18);
}
