/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
:root {
  --color-primary:       hsl(214, 100%, 45%);
  --color-primary-dark:  hsl(220, 100%, 38%);
  --color-primary-light: hsl(226, 74%, 74%);
  --color-dark:          hsl(0, 0%, 11%);
  --color-dark-mid:      hsl(0, 0%, 27%);
  --color-light:         hsl(210, 29%, 97%);
  --color-light-border:  hsl(210, 13%, 90%);
  --color-white:         #ffffff;

  --font: 'Montserrat', sans-serif;

  --header-height: 72px;
  --max-width: 1200px;
  --radius: 8px;
  --transition: 0.2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* Scroll offset for fixed header */
section[id] {
  scroll-margin-top: var(--header-height);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--color-dark-mid);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

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

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* ============================================================
   HEADER & NAV
   ============================================================ */
#header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-light-border);
  transition: box-shadow var(--transition);
}

#header.scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark);
  flex-shrink: 0;
}

.nav__logo img {
  height: 32px;
  width: auto;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-dark);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.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: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, hsla(220, 80%, 10%, 0.88) 0%, hsla(214, 80%, 22%, 0.80) 100%),
    url('../images/hero-bg.jpg') center / cover no-repeat;
}

.hero__content {
  position: relative;
  max-width: 660px;
  color: var(--color-white);
  padding-top: var(--header-height);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__content h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
}

.hero__content > p {
  font-size: 1.2rem;
  opacity: 0.88;
  line-height: 1.65;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background: var(--color-white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about__text h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.about__text h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-dark-mid);
  margin-bottom: 1.25rem;
}

.about__text > p {
  color: var(--color-dark-mid);
  margin-bottom: 2rem;
}

.about__features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--color-light-border);
  border-radius: var(--radius);
  background: var(--color-light);
}

.feature__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--color-white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  border: 1px solid var(--color-light-border);
}

.feature__icon svg {
  width: 22px;
  height: 22px;
}

.feature h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.feature p {
  font-size: 0.875rem;
  color: var(--color-dark-mid);
  line-height: 1.65;
}

.about__image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
}

.about__image img {
  width: 100%;
  height: 580px;
  object-fit: cover;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  background: var(--color-light);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-light-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.service-card__image {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.service-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card__image img {
  transform: scale(1.05);
}

.service-card__body {
  padding: 1.5rem;
}

.service-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.service-card__body h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.3;
}

.service-card__body p {
  font-size: 0.875rem;
  color: var(--color-dark-mid);
  line-height: 1.7;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--color-white);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact__info h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.contact__info > p {
  color: var(--color-dark-mid);
  margin-bottom: 2rem;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: color var(--transition);
  font-size: 0.9375rem;
}

.contact__email:hover {
  color: var(--color-primary-dark);
}

.contact__email svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
}

.required {
  color: var(--color-primary);
}

.form-group input,
.form-group textarea {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--color-dark);
  background: var(--color-white);
  border: 1px solid var(--color-light-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: hsl(0, 0%, 65%);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px hsla(214, 100%, 45%, 0.14);
}

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

/* Form feedback message */
#form-message {
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  display: none;
}

#form-message.success {
  display: block;
  background: hsl(127, 47%, 93%);
  color: hsl(139, 90%, 28%);
  border: 1px solid hsl(128, 47%, 78%);
}

#form-message.error {
  display: block;
  background: hsl(351, 100%, 96%);
  color: hsl(1, 77%, 45%);
  border: 1px solid hsl(0, 73%, 82%);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-light);
  border-top: 1px solid var(--color-light-border);
  padding: 3.5rem 0 2rem;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-light-border);
}

.footer__cta {
  color: var(--color-dark-mid);
  max-width: 480px;
  font-size: 0.9375rem;
}

.footer__email {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: color var(--transition);
}

.footer__email:hover {
  color: var(--color-primary-dark);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.footer__nav a {
  font-size: 0.875rem;
  color: var(--color-dark-mid);
  transition: color var(--transition);
}

.footer__nav a:hover {
  color: var(--color-primary);
}

.footer__copyright {
  font-size: 0.875rem;
  color: var(--color-dark-mid);
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about__image {
    order: -1;
  }

  .about__image img {
    height: 400px;
  }

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

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .section {
    padding: 4rem 0;
  }

  /* Mobile nav */
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-light-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .nav__menu.open {
    display: flex;
  }

  .nav__link {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .nav__link::after {
    display: none;
  }

  /* Hero */
  .hero__content {
    padding-top: calc(var(--header-height) + 1rem);
    gap: 1.25rem;
  }

  /* Services */
  .services__grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .section-header h2,
  .about__text h2,
  .contact__info h2 {
    font-size: 1.625rem;
  }
}
