* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: "Raleway", sans-serif;
  background: #000;
}

a {
  color: inherit;
  text-decoration: none;
}

.flex-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  overflow: hidden;
}

.flex-slide {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: flex-grow 0.55s ease;
  isolation: isolate;
}

.flex-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.45));
  z-index: -1;
}

.flex-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: -1;
}

.flex-slide:hover,
.flex-slide:focus-within,
.flex-slide.active {
  flex-grow: 2.3;
}

.flex-title {
  color: #fff;
  font-size: clamp(2rem, 5.2vw, 4.3rem);
  margin: 0;
  text-align: center;
  transform: rotate(90deg);
  transition: transform 0.45s ease, top 0.45s ease, opacity 0.45s ease;
  position: absolute;
  top: auto;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

.one-line {
  white-space: nowrap;
}

.calc-title {
  padding-inline: 0.35rem;
}

.home-logo {
  position: absolute;
  left: 60%;
  top: 82%;
  transform: translate(-50%, -50%);
  width: min(86%, 190px);
  height: auto;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.home-logo-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(11, 18, 35, 0.35));
}

.flex-about {
  opacity: 0;
  color: #fff;
  width: min(84%, 470px);
  font-size: clamp(0.96rem, 1.35vw, 1.15rem);
  padding: 1.1rem 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  line-height: 1.45;
  text-align: left;
  background: rgba(14, 20, 38, 0.35);
  backdrop-filter: blur(3px);
  transition: opacity 0.45s ease;
}

.site-name {
  margin: 0 0 0.7rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.category-label {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.45rem 0;
}

.mini-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #00e6ff, #7dffb4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.card-btn {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #42d5ff, #7f6dff);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(49, 84, 224, 0.35);
}

.logo-text {
  font-size: 0.96rem;
  font-weight: 700;
}

.flex-slide:hover .flex-title,
.flex-slide:focus-within .flex-title,
.flex-slide.active .flex-title {
  transform: rotate(0deg);
  top: 11%;
}

.flex-slide:hover .flex-about,
.flex-slide:focus-within .flex-about,
.flex-slide.active .flex-about {
  opacity: 1;
}

.home {
  background: url("https://images.pexels.com/photos/414171/pexels-photo-414171.jpeg?auto=compress&cs=tinysrgb&w=1600")
    center / cover no-repeat;
}

.calculator {
  background: url("https://images.pexels.com/photos/590022/pexels-photo-590022.jpeg?auto=compress&cs=tinysrgb&w=1600")
    center / cover no-repeat;
}

.blog {
  background: url("https://images.pexels.com/photos/159866/books-book-pages-read-literature-159866.jpeg?auto=compress&cs=tinysrgb&w=1600")
    center / cover no-repeat;
}

.about {
  background: url("https://images.pexels.com/photos/8199562/pexels-photo-8199562.jpeg?auto=compress&cs=tinysrgb&w=1600")
    center / cover no-repeat;
}

.contact {
  background: url("https://images.pexels.com/photos/3184465/pexels-photo-3184465.jpeg?auto=compress&cs=tinysrgb&w=1600")
    center / cover no-repeat;
}

.spinner {
  position: fixed;
  inset: 0;
  background: #141414;
  z-index: 999;
  color: #fff;
  display: grid;
  place-items: center;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.spinner.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner-inner {
  position: relative;
  width: 120px;
  height: 90px;
  text-align: center;
}

.cube1,
.cube2 {
  background-color: #fff;
  width: 16px;
  height: 16px;
  position: absolute;
  top: 0;
  left: 32px;
  animation: sk-cubemove 1.8s infinite ease-in-out;
}

.cube2 {
  animation-delay: -0.9s;
}

.spinner p {
  position: absolute;
  bottom: -26px;
  left: -18px;
  margin: 0;
  font-size: 0.92rem;
  letter-spacing: 0.4px;
}

@keyframes sk-cubemove {
  25% {
    transform: translateX(42px) rotate(-90deg) scale(0.5);
  }
  50% {
    transform: translateX(42px) translateY(42px) rotate(-180deg);
  }
  75% {
    transform: translateX(0) translateY(42px) rotate(-270deg) scale(0.5);
  }
  100% {
    transform: rotate(-360deg);
  }
}

@media screen and (max-width: 900px) {
  .flex-container {
    flex-direction: column;
  }

  .flex-slide {
    min-height: 20vh;
  }

  .flex-slide:hover,
  .flex-slide:focus-within,
  .flex-slide.active {
    flex-grow: 1.1;
  }

  .flex-title {
    transform: rotate(0deg);
    top: auto;
    font-size: clamp(1.85rem, 8.5vw, 3rem);
  }

  .home {
    padding-top: 40px;
  }

  .home-logo {
    width: min(50vw, 165px);
    left: 50%;
    top: 40px;
    transform: translateX(-50%);
  }

  .home .flex-title {
    top: 110px;
  }

  .flex-about {
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.72);
    width: min(92%, 540px);
    font-size: 1rem;
    margin-top: 20px;
    background: rgba(14, 20, 38, 0.45);
  }

  .home .flex-about {
    margin-top: 50px;
  }

  .one-line {
    white-space: normal;
  }
}
