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

:root {
  --white: #FFFFFF;
  --white-dark: #F6F6F6;
  --black-regular: #211E26;
  --black-light: #564F62;
  --black-lighter: #ABA8AF;
  --primary: #e7e7e7;
  --accent: #6c63ff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Average', serif;
  font-size: 20px;
  line-height: 30px;
  color: var(--black-regular);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Prata', serif;
  font-weight: 400;
}

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

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

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--primary);
  padding: 16px 0;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-family: 'Prata', serif;
  font-size: 24px;
  color: var(--black-regular);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar-menu {
  display: flex;
  gap: 32px;
}

.navbar-link {
  font-size: 18px;
  color: var(--black-light);
  transition: color 0.2s;
}

.navbar-link:hover,
.navbar-link.active {
  color: var(--accent);
}

/* ===== Header ===== */
.header {
  background: var(--primary);
  padding: 128px 0 64px;
}

.header-inner {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 48px;
  align-items: center;
}

.header-image img {
  width: 100%;
}

.header-content h1 {
  font-size: 48px;
  line-height: 56px;
  color: var(--black-regular);
  margin-bottom: 24px;
}

.header-cta {
  display: inline-block;
  font-size: 24px;
  color: var(--accent);
  transition: opacity 0.2s;
}

.header-cta:hover {
  opacity: 0.8;
}

/* ===== Services ===== */
.services {
  padding: 80px 0;
}

.service-block {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}

.service-block:last-child {
  margin-bottom: 0;
}

.service-block--inverse {
  grid-template-columns: 2fr 3fr;
}

.service-text h2 {
  font-size: 30px;
  line-height: 40px;
  margin-bottom: 16px;
}

.service-text p {
  font-size: 20px;
  line-height: 30px;
  color: var(--black-light);
}

.service-image img {
  width: 100%;
}

/* ===== Projects ===== */
.projects {
  background: var(--white-dark);
  padding: 80px 0;
}

.section-title {
  font-size: 36px;
  line-height: 48px;
  text-align: center;
  margin-bottom: 48px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.project-card {
  text-align: center;
}

.project-card a {
  display: block;
  transition: opacity 0.2s;
}

.project-card a:hover {
  opacity: 0.8;
}

.project-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.project-card p {
  font-size: 16px;
  line-height: 24px;
  color: var(--black-lighter);
}

/* ===== Footer ===== */
.footer {
  background: var(--primary);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-info h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.footer-info p {
  font-size: 16px;
  line-height: 24px;
  color: var(--black-light);
}

.footer-info a {
  color: var(--accent);
}

.footer-info a:hover {
  text-decoration: underline;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-social a:hover {
  opacity: 1;
}

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

/* lg: <= 1199px */
@media (max-width: 1199px) {
  .header-content h1 {
    font-size: 42px;
    line-height: 50px;
  }
}

/* md: <= 991px */
@media (max-width: 991px) {
  .header-inner {
    grid-template-columns: 1fr 2fr;
    gap: 32px;
  }

  .header-content h1 {
    font-size: 36px;
    line-height: 44px;
  }

  .service-block,
  .service-block--inverse {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

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

/* sm: <= 767px */
@media (max-width: 767px) {
  .navbar-toggle {
    display: block;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    gap: 0;
    padding: 0 16px 16px;
  }

  .navbar-menu.open {
    display: flex;
  }

  .navbar-menu li {
    padding: 8px 0;
  }

  .header {
    padding: 96px 0 48px;
  }

  .header-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .header-image {
    max-width: 300px;
    margin: 0 auto;
  }

  .header-content h1 {
    font-size: 30px;
    line-height: 40px;
  }

  .service-block,
  .service-block--inverse {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service-block--inverse .service-image {
    order: -1;
  }

  .service-text h2 {
    font-size: 24px;
    line-height: 32px;
  }

  .services {
    padding: 48px 0;
  }

  .service-block {
    margin-bottom: 48px;
  }

  .projects {
    padding: 48px 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}

/* xs: <= 575px */
@media (max-width: 575px) {
  .header-content h1 {
    font-size: 26px;
    line-height: 34px;
  }

  .header-cta {
    font-size: 20px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .section-title {
    font-size: 28px;
    line-height: 36px;
  }
}
