/* ============================================================
   Impact Legacy Group — Main Stylesheet
   ============================================================ */

:root {
  --forest:      #1a3828;
  --forest-mid:  #234535;
  --forest-deep: #122a1e;
  --gold:        #c9a84c;
  --gold-light:  #dfc070;
  --cream:       #f5f0e8;
  --cream-dark:  #ede7d9;
  --white:       #ffffff;
  --gray:        #6b7280;
  --light-gray:  #e5e7eb;
  --text:        #1f2937;
  --radius:      6px;
  --shadow:      0 4px 24px rgba(0,0,0,0.10);
  --transition:  0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
  color: var(--forest);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p  { margin-bottom: 1rem; }

/* ---------- Utility ---------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5rem 0; }
.section--dark { background: var(--forest); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--muted { background: var(--cream); }
.gold-rule {
  display: block;
  width: 56px;
  height: 3px;
  background: var(--gold);
  margin: 1rem 0 1.5rem;
}
.gold-rule--center { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn--gold {
  background: var(--gold);
  color: var(--forest);
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--outline:hover {
  background: var(--white);
  color: var(--forest);
}
.btn--outline-gold {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn--outline-gold:hover {
  background: var(--gold);
  color: var(--forest);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(26, 56, 40, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201,168,76,0.25);
  transition: background var(--transition);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav__logo-img {
  height: 54px;
  width: auto;
}
.nav__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav__logo-top {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--white);
  font-weight: 700;
}
.nav__logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 4px;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav__links a:hover, .nav__links a.active {
  color: var(--gold);
}
.nav__links a:hover::after, .nav__links a.active::after {
  width: 100%;
}
.nav__cta { margin-left: 1rem; }

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--forest);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(26,56,40,0.93) 0%, rgba(26,56,40,0.78) 55%, rgba(26,56,40,0.92) 100%),
    url('https://images.unsplash.com/photo-1486325212027-8081e485255e?w=1600&q=80&auto=format');
  background-size: cover;
  background-position: center;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding-top: 4rem;
}
.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.5rem; }
.hero h1 span { color: var(--gold); }
.hero__lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
  max-width: 560px;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}
.hero__scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(201,168,76,0.8), transparent);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   VALUE BAR (replaces stats for new company)
   ============================================================ */
.value-bar {
  background: var(--gold);
  padding: 1.6rem 0;
}
.value-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.value-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.value-bar__icon { font-size: 1.4rem; }
.value-bar__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
}

/* ============================================================
   ABOUT PREVIEW
   ============================================================ */
.about-preview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-preview__image {
  position: relative;
}
.about-preview__img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  background: var(--light-gray);
}
.about-preview__badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--gold);
  color: var(--forest);
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: var(--shadow);
  padding: 1rem;
}
.about-preview__badge-icon { font-size: 1.5rem; }
.about-preview__badge-text { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 0;
  background: var(--gold);
  transition: height 0.35s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.service-card:hover::before { height: 100%; }
.service-card__icon { font-size: 2rem; margin-bottom: 1rem; }
.service-card h3 { margin-bottom: 0.6rem; }
.service-card p { color: var(--gray); font-size: 0.93rem; margin-bottom: 0; }

.section--dark .service-card {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
.section--dark .service-card h3 { color: var(--white); }
.section--dark .service-card p  { color: rgba(255,255,255,0.65); }

/* ============================================================
   SERVICES DETAIL PAGE
   ============================================================ */
.page-hero {
  background: var(--forest);
  padding: 9rem 0 5rem;
  text-align: center;
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin-top: 1rem; }

.service-detail {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--light-gray);
  scroll-margin-top: 90px;
}
.service-detail:last-child { border-bottom: none; }
.service-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.service-detail__grid.reverse { direction: rtl; }
.service-detail__grid.reverse > * { direction: ltr; }
.service-detail__visual {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 100%);
  border-radius: var(--radius);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}
.service-detail__badge {
  display: inline-block;
  background: rgba(201,168,76,0.15);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.service-detail__content h2 { margin-bottom: 0.5rem; }
.service-detail__content p { color: var(--gray); }
.service-checklist {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.service-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--gray);
  font-size: 0.95rem;
}
.service-checklist li::before {
  content: '✓';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--gold);
  color: var(--forest);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  margin-top: 2px;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-story__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
  align-items: start;
}
.about-story__img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--light-gray);
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.value-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,168,76,0.2);
}
.value-card__icon { font-size: 2.2rem; margin-bottom: 1rem; }
.value-card h3 { color: var(--white); margin-bottom: 0.5rem; }
.value-card p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin: 0; }
.mission-box {
  border-left: 4px solid var(--gold);
  padding: 1.5rem 2rem;
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}
.mission-box p { margin: 0; font-style: italic; font-size: 1.05rem; color: var(--forest); }

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.team-card {
  text-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  transition: transform var(--transition);
}
.team-card:hover { transform: translateY(-4px); }
.team-card__avatar {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.team-card__body { padding: 1.5rem; }
.team-card__name { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 0.2rem; color: var(--forest); }
.team-card__role { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-section { background: var(--forest); padding: 5rem 0; }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}
.contact-info__icon {
  width: 48px;
  height: 48px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-info__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.contact-info__value { font-size: 0.95rem; color: rgba(255,255,255,0.8); }
.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: 'Lato', sans-serif;
  color: var(--text);
  transition: border-color var(--transition);
  background: var(--white);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 130px; }
.form-group select { appearance: none; cursor: pointer; }
.form__submit { width: 100%; font-size: 1rem; padding: 0.9rem; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.7); margin-bottom: 2rem; font-size: 1.05rem; }
.cta-banner__actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--forest-deep);
  color: rgba(255,255,255,0.65);
  padding: 4rem 0 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer__logo { height: 64px; width: auto; margin-bottom: 0.75rem; }
.footer__brand h3 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}
.footer__brand p { font-size: 0.88rem; line-height: 1.6; margin-top: 0.75rem; }
.footer__col h4 {
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.footer__col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__col ul li a { font-size: 0.88rem; transition: color var(--transition); }
.footer__col ul li a:hover { color: var(--gold); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: 0.8rem;
}
.footer__bottom-links { display: flex; gap: 1.5rem; }
.footer__bottom-links a { transition: color var(--transition); }
.footer__bottom-links a:hover { color: var(--gold); }
.footer__gold-sub {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ============================================================
   FORM FEEDBACK MESSAGES
   ============================================================ */
.form-success {
  display: none;
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-top: 1rem;
  color: #065f46;
  font-weight: 600;
}
.form-error {
  display: none;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  color: #991b1b;
  font-size: 0.9rem;
}
.form-field-error {
  display: block;
  font-size: 0.8rem;
  color: #b91c1c;
  margin-top: 0.25rem;
}
/* Formspree marks invalid fields with aria-invalid */
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: #fca5a5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .value-bar__grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-preview__grid { gap: 3rem; }
}

@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }

  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--forest);
    padding: 1.5rem;
    gap: 1rem;
    border-top: 1px solid rgba(201,168,76,0.2);
  }
  .nav__toggle { display: flex; }
  .nav__cta { display: none; }

  .hero__content { padding-top: 6rem; }

  .about-preview__grid,
  .service-detail__grid,
  .about-story__grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .service-detail__grid.reverse { direction: ltr; }
  .about-preview__badge { right: 0; bottom: -1rem; }

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

  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 0.8rem; text-align: center; }

  .cta-banner__actions { flex-direction: column; align-items: center; }
  .hero__actions { flex-direction: column; }
  .btn { text-align: center; }
}

@media (max-width: 480px) {
  .value-bar__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}
