/* =========================
   Reset & Base
========================= */

:root {
  --nav-height: 64px;
  --nav-height-shrink: 48px;
}

body {
  padding-top: var(--nav-height);
}

section {
  scroll-margin-top: var(--nav-height);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1f2933;
  line-height: 1.6;
  background: #ffffff;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 2rem 1rem;
}

.narrow {
  max-width: 800px;
}

/* =========================
   Typography
========================= */
h1, h2, h3 {
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
}

p {
  margin-top: 0.75rem;
}

/* =========================
   Buttons
========================= */
.btn {
  background: #0f3d5e;
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary {
  background: #374151;
}

.cta-group a {
  margin-right: 1rem;
  margin-top: 1rem;
}

/* =========================
   Navigation
========================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  padding: 0.5rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-menu a {
  text-decoration: none;
  font-size: 0.95rem;
  color: #1f2933;
  padding: 0.4rem 0.6rem;
}

.nav-menu a:hover {
  color: #0f3d5e;
}

.nav-cta {
  border: 1px solid #0f3d5e;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
}

.nav-cta:hover {
  background: #0f3d5e;
  color: #ffffff;
}

/* =========================
   Layout Utilities
========================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 2rem;
  border-radius: 12px;
}

/* =========================
   Sections
========================= */
.content-section {
  padding: 5rem 0;
  background: #ffffff;
}

.alt-bg {
  background: #f9fafb;
}

.values,
.services {
  background-image: url("images/pattern-bg.png");
  background-repeat: repeat;
}

/* =========================
   Image Sections (Hero + Parallax)
========================= */
.image-section {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.image-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 32, 50, 0.45),
    rgba(8, 32, 50, 0.65)
  );
}

.image-section .container {
  position: relative;
  z-index: 1;
}

.image-section h1,
.image-section h2,
.image-section p {
  text-shadow: 0 4px 20px rgba(0,0,0,0.45);
}

/* Background Assignments */
.hero-bg {
  min-height: 85vh;
  background-image: url("images/hero-bg.jpg");
}

.feature-bg {
  background-image: url("images/feature-bg.jpg");
}

.philosophy-bg {
  background-image: url("images/philosophy-bg.jpg");
}

.legacy-bg {
  background-image: url("images/legacy-bg.jpg");
}

/* =========================
   Safe Parallax
========================= */
@media (min-width: 1024px) {
  .image-section[data-parallax] {
    background-attachment: fixed;
  }
}

@media (max-width: 1023px) {
  .image-section {
    background-attachment: scroll !important;
    background-position: center center !important;
  }
}

/* =========================
   Contact Form
========================= */
.contact {
  background: #0f3d5e;
  color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

form {
  background: #ffffff;
  color: #1f2933;
  padding: 2rem;
  border-radius: 12px;
}

.form-group {
  margin-bottom: 1.4rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #0f3d5e;
}

.error {
  color: #dc2626;
  font-size: 0.8rem;
  height: 1rem;
}

.form-success {
  margin-top: 1rem;
  color: #16a34a;
  font-weight: 500;
}

/* =========================
   Footer
========================= */
.footer {
  background: #111827;
  color: #d1d5db;
}

.footer a {
  color: #9ca3af;
  text-decoration: none;
}

/* =========================
   Fade-in Animation
========================= */
.fade-in {
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.is-hidden {
  opacity: 0;
  transform: translateY(24px);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================
   Responsive
========================= */
@media (max-width: 900px) {
  .grid-3,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .image-section {
    min-height: 70vh;
    background-position: center top;
  }
}

.hero {
  padding-top: 72px;
}

/* Navbar shrink on scroll */
.navbar {
  transition:
    padding 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.navbar.shrink {
  padding: 0.25rem 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Logo scaling */
.logo img {
  height: 32px;
  transition: height 0.25s ease;
}

.navbar.shrink .logo img {
  height: 26px;
}

@media (max-width: 768px) {
  .hero-bg,
  .image-section {
    min-height: auto;
    padding: 6rem 0;
  }
}

.content-section,
.services,
.about {
  position: relative;
  z-index: 2;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .fade-in,
  .fade-in.is-hidden {
    opacity: 1 !important;
    transform: none !important;
  }
}

