/* ─── Reset ─────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── Base ──────────────────────────────────────────────────── */
body {
  font-family: "Montserrat", sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  color: white;
  position: relative;
}

body.section-active {
  overflow-y: auto;
  overflow-x: hidden;
  height: auto;
}

/* ─── Background breath keyframes ──────────────────────────── */
@keyframes bg-breathe {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 0.45; }
}

/* ─── Animated Background ───────────────────────────────────── */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #463949;
  overflow: hidden;
  z-index: -1;
}

.background::before,
.background::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.8;
  transition: transform 0.5s ease-out, background 0.5s ease-out;
  will-change: transform, background, opacity;
  pointer-events: none;
}

.background::before { animation: bg-breathe 9s  ease-in-out infinite 0s; }
.background::after  { animation: bg-breathe 12s ease-in-out infinite 3s; }

.background::before {
  width: 50vmax;
  height: 50vmax;
  background: radial-gradient(circle, #e0324e 0%, rgba(224, 50, 78, 0) 70%);
  top: 20%;
  left: 20%;
}

.background::after {
  width: 60vmax;
  height: 60vmax;
  background: radial-gradient(circle, #913281 0%, rgba(145, 50, 129, 0) 70%);
  bottom: 10%;
  right: 20%;
}

.background-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.background-inner::before {
  content: "";
  position: absolute;
  width: 40vmax;
  height: 40vmax;
  background: radial-gradient(circle, #c0566e 0%, rgba(192, 86, 110, 0) 70%);
  top: 68%;
  left: 70%;
  transform: translate(-150%, -150%);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
  transition: transform 0.5s ease-out, background 0.5s ease-out;
  will-change: transform, background, opacity;
  animation: bg-breathe 10s ease-in-out infinite 6s;
}

/* ─── Site Wrapper ──────────────────────────────────────────── */
.site-wrapper {
  display: flex;
  flex-direction: column;
}

/* ─── Site Header ───────────────────────────────────────────── */
.site-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 80px;
  transition: min-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

body.section-shrinking .site-header,
body.section-active .site-header {
  min-height: 300px;
  padding: 60px 20px 44px;
}

/* ─── Logo ──────────────────────────────────────────────────── */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-img {
  width: 200px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

body.section-shrinking .logo-img,
body.section-active .logo-img {
  width: 100px;
}

/* ─── Title Image ───────────────────────────────────────────── */
.title-image {
  width: 80%;
  max-width: 360px;
  height: auto;
  margin-top: 6px;
  opacity: 0.22;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.2));
  transition: opacity 0.3s ease, max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.title-image:hover { opacity: 0.5; }

body.section-shrinking .title-image,
body.section-active .title-image {
  max-width: 180px;
  opacity: 0.28;
}

/* ─── Menu ──────────────────────────────────────────────────── */
.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 44px;
  margin-top: 44px;
  pointer-events: none;
  transition: margin-top 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              gap 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.section-shrinking .menu,
body.section-active .menu {
  margin-top: 28px;
  gap: 36px;
}

/* ─── Menu Items — flat & elegant ───────────────────────────── */
.menu-item {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 0;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  pointer-events: auto;
  transition: color 0.3s ease, border-color 0.3s ease, letter-spacing 0.3s ease;
  position: relative;
}

.menu-item:hover {
  color: white;
  letter-spacing: 5px;
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.menu-item.active {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.75);
}

/* Close × inside the active button */
.menu-close-btn {
  display: none;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.55;
  letter-spacing: 0;
  transition: opacity 0.2s ease;
  pointer-events: auto;
}

.menu-item.active .menu-close-btn {
  display: inline;
}

.menu-close-btn:hover { opacity: 1; }

/* ─── Content Area & Sections ───────────────────────────────── */
.content-area { flex: 1; }

.content-section {
  display: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  padding: 56px 30px 110px;
  min-height: calc(100vh - 260px);
}

.content-section.section-open   { display: block; }
.content-section.section-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-inner {
  max-width: 720px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 36px;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
}

.section-body {
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 300;
}

.section-body p   { margin-bottom: 1.1rem; }
.section-body a   { color: white; }
.section-body a:hover { opacity: 0.7; }

/* ─── Portfolio — stacked list ──────────────────────────────── */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
}

.portfolio-image img,
.portfolio-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img,
.portfolio-item:hover .portfolio-slide { transform: scale(1.04); }

/* Multi-image slideshow within a portfolio item */
.portfolio-slides {
  position: absolute;
  inset: 0;
}

.portfolio-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease, transform 0.5s ease;
  transform: scale(1);
}

.portfolio-slide.active { opacity: 1; }

/* Dot indicators */
.portfolio-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.portfolio-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.3s ease;
}

.portfolio-dot.active { background: rgba(255, 255, 255, 0.9); }

.portfolio-info { padding: 22px; }

.portfolio-info h3 {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.portfolio-info p {
  margin-bottom: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  font-size: 0.9rem;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.portfolio-tech span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* ─── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 200;
  pointer-events: none;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  background: rgba(255, 255, 255, 0.08);
  padding: 2.5rem;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  color: white;
  transform: translateY(24px);
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.modal-overlay.active .modal { transform: translateY(0); }

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
  line-height: 1;
}

.close-modal:hover { color: white; }

.modal-title {
  margin-bottom: 1.5rem;
  font-weight: 300;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
  display: inline-block;
}

.modal-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.modal-body {
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  font-size: 0.9rem;
}

.modal-body h3 {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 1.4rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
}

.modal-body p  { margin-bottom: 0.85rem; }
.modal-body ul { margin: 0.4rem 0 0.85rem 1.3rem; }
.modal-body li { margin-bottom: 0.3rem; }

.modal-body code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.82em;
}

.modal-body a { color: white; }

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 13px 0;
  background: rgba(42, 31, 43, 0.88);
  backdrop-filter: blur(8px);
  color: white;
  z-index: 100;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.copyright {
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.5px;
}

/* ─── Language switcher — text style ───────────────────────── */
.footer-lang {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  cursor: pointer;
  padding: 3px 2px;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.lang-btn:hover {
  color: rgba(255, 255, 255, 0.75);
}

.lang-btn.active {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.lang-divider {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.7rem;
  font-weight: 300;
}

/* ─── Footer links ──────────────────────────────────────────── */
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.footer-link:hover { color: rgba(255, 255, 255, 0.8); }

.divider {
  color: rgba(255, 255, 255, 0.18);
  font-weight: 300;
  font-size: 0.7rem;
}

/* ─── Cookie Banner ─────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  width: min(660px, calc(100vw - 32px));
  z-index: 150;
  background: rgba(38, 26, 40, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.45);
  padding: 18px 22px;
  color: white;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.cookie-banner:not([hidden]) {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.cookie-text {
  flex: 1 1 240px;
  font-size: 0.8rem;
  line-height: 1.65;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.btn-cookie {
  background: none;
  border: none;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.btn-accept {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.btn-accept:hover {
  border-bottom-color: white;
}

.btn-decline {
  color: rgba(255, 255, 255, 0.45);
}

.btn-decline:hover {
  color: rgba(255, 255, 255, 0.75);
}

.cookie-more-link {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.cookie-more-link:hover { color: rgba(255, 255, 255, 0.65); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  .site-header {
    min-height: 100vh;
    padding-bottom: 60px;
  }

  .menu { gap: 28px; }

  .footer-lang {
    position: static;
    transform: none;
    order: 2;
    margin: 0 auto;
  }

  .footer-content {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    font-size: 0.76rem;
  }

  .content-section { padding: 40px 20px 100px; }
  .section-title    { font-size: 1.3rem; letter-spacing: 4px; }
  .cookie-banner    { bottom: 82px; }
}

@media (max-width: 480px) {
  .menu { flex-direction: column; gap: 20px; }
  .logo-img { width: 160px; }
  body.section-shrinking .logo-img,
  body.section-active .logo-img { width: 80px; }
}
