/* ── hero ── */

#hero {
  border-top: none;
  min-height: calc(100vh - 53px);
  display: flex;
  align-items: center;
  padding: 24px 0;
  position: relative;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  width: 100%;
}

.hero-text {
  flex: 1;
}

#hero h1 {
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

#hero p {
  margin-top: 20px;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.hero-image {
  flex: 0 0 25%;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── section headings ── */

#about h2, #portfolio h2, #services h2, #contacts h2 {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

/* ── about ── */

#about p {
  max-width: 640px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
}

/* ── portfolio ── */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-8px);
  transition: opacity 0.5s ease, transform 0.28s ease;
}

.card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #b0b0b0;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover .card-image img {
  transform: scale(1.04);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.2px;
  text-underline-offset: 5px;
  text-decoration-color: #616161;
}

.card-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: #444;
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-top: 6px;
  color: #4D4D4D;
}

.card-more:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 0.9px;
  text-decoration-color: #7A7A7A;
}

.card-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.card-more:hover .card-arrow {
  transform: translateX(4px);
}

/* ── services / accordion ── */

.accordion-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.accordion-item {
  border-top: 1px solid #7A7A7A;
}

.accordion-item:first-child {
  border-top: none;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: transform 0.22s ease;
}

.accordion-trigger:hover {
  transform: translateY(-3px);
}

.accordion-item:first-child .accordion-trigger {
  padding-top: 0;
}

.accordion-toggle {
  margin-left: auto;
  font-size: 0;
  color: #888;
  flex-shrink: 0;
  line-height: 1;
}

.accordion-toggle::before {
  content: '+';
  font-size: 18px;
  font-weight: 300;
  display: inline-block;
  transition: transform 0.35s ease;
}

.accordion-item.open .accordion-toggle::before {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-item.open .accordion-body {
  max-height: 300px;
}

.accordion-body p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: #555;
  padding-bottom: 28px;
  max-width: 600px;
}

.service-index {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #888;
  min-width: 24px;
  flex-shrink: 0;
}

.service-name {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  transition: color 0.2s ease;
}

/* ── contacts ── */

.contacts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contacts-list li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  min-width: 80px;
}

.contacts-list a {
  font-size: 16px;
  font-weight: 300;
}

/* ── responsive ── */

@media (max-width: 1024px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .hero-text {
    flex: none;
    width: 100%;
  }

  .hero-image {
    flex: none;
    width: 100%;
  }

  .hero-image img {
    max-height: 40vh;
    width: auto;
    max-width: 100%;
  }

  #about h2, #portfolio h2, #services h2, #contacts h2 {
    margin-bottom: 32px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .card {
    gap: 6px;
  }

  .card:hover {
    transform: none;
  }

  .card-title {
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  #about h2, #portfolio h2, #services h2, #contacts h2 {
    margin-bottom: 28px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card {
    gap: 6px;
  }

  .card-title {
    margin-top: 12px;
  }

  .service-name {
    font-size: 18px;
  }
}
