/* ===== TYPEWRITER ===== */
.typewriter {
  visibility: hidden;
}

.typewriter.typing {
  visibility: visible;
}

.typewriter.typing::after {
  content: '|';
  animation: blink 0.6s step-end infinite;
}

.typewriter.done::after {
  content: none;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== TYPEWRITER REVEAL ===== */
.typewriter ~ * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.typewriter.done ~ * {
  opacity: 1;
  transform: translateY(0);
}

.typewriter.done ~ *:nth-child(2) { transition-delay: 0s; }
.typewriter.done ~ *:nth-child(3) { transition-delay: 0.15s; }
.typewriter.done ~ *:nth-child(4) { transition-delay: 0.3s; }
.typewriter.done ~ *:nth-child(5) { transition-delay: 0.45s; }

/* ===== HERO (index-specific) ===== */
.hero-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 300;
  font-size: 68px;
  line-height: 86px;
  text-transform: uppercase;
  color: var(--white);
  max-width: 1240px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero.in-view .hero-title {
  opacity: 1;
  transform: translateY(0);
}

.hero-subtitle {
  position: absolute;
  right: 70px;
  top: 480px;
  width: 380px;
  font-size: 17px;
  color: var(--gray);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}

.hero.in-view .hero-subtitle {
  opacity: 1;
  transform: translateY(0);
}

.hero-images {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  position: relative;
  height: 340px;
}

.hero-img-left {
  width: calc(35% - 10px);
  height: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease 0.5s, transform 0.7s ease 0.5s;
}

.hero.in-view .hero-img-left {
  opacity: 1;
  transform: translateY(0);
}

.hero-img-left img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.hero-img-right {
  width: calc(65% - 10px);
  height: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease 0.65s, transform 0.7s ease 0.65s;
}

.hero.in-view .hero-img-right {
  opacity: 1;
  transform: translateY(0);
}

.hero-img-right img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-socials {
  display: flex;
  gap: 16px;
  position: absolute;
  bottom: 70px;
  left: 70px;
  opacity: 0;
  transition: opacity 0.6s ease 0.9s;
}

.hero.in-view .hero-socials {
  opacity: 1;
}

/* ===== BADGES ===== */
.badges {
  padding: 80px 30px 0;
  overflow: hidden;
}

.badges-row {
  overflow: hidden;
}

.badges-track {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: nowrap;
  width: max-content;
  animation: marquee 20s linear infinite;
  animation-play-state: paused;
}

.badges-track.running {
  animation-play-state: running;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.badge {
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: -1.1px;
  line-height: 1.312;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-green {
  background: var(--accent);
  color: var(--dark);
}

.badge-white {
  border: 1px solid var(--white);
  color: var(--white);
}

/* ===== ADVANTAGES ===== */
.advantages {
  padding: 80px 30px 0;
}

.advantages-inner {
  background: var(--bg-card);
  border-radius: var(--radius-section);
  padding: 70px 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: start;
  position: relative;
  overflow: hidden;
}

.glow-adv-center {
  display: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: url('assets/glow-purple.svg');
}

.adv-card {
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.adv-green {
  background: var(--accent);
  color: var(--dark);
}

.adv-white {
  background: var(--white);
  color: var(--dark);
}

.adv-top {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.adv-num {
  font-size: 17px;
}

.adv-value {
  font-family: 'Rubik', sans-serif;
  font-weight: 300;
  font-size: 42px;
  line-height: 1.12;
  text-transform: uppercase;
}

.adv-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.adv-line {
  height: 2px;
  background: var(--dark);
  width: 100%;
}

.adv-bottom p {
  font-size: 17px;
  line-height: 1.4;
  max-width: 295px;
}

/* ===== KNOW SECTION ===== */
.know-section {
  padding: 100px 30px 0;
}

.know-section .section-title {
  margin-bottom: 70px;
}

.know-cards {
  overflow: hidden;
  cursor: grab;
}

.know-cards:active {
  cursor: grabbing;
}

.know-track {
  display: flex;
  gap: 30px;
  width: max-content;
  will-change: transform;
}

.know-card {
  background: var(--white);
  border-radius: var(--radius-card);
  min-width: 535px;
  height: 455px;
  padding: 0;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.know-card h3 {
  font-family: 'Rubik', sans-serif;
  font-weight: 300;
  font-size: 32px;
  line-height: 42px;
  text-transform: uppercase;
  color: var(--dark);
  max-width: 475px;
  position: absolute;
  top: 30px;
  left: 30px;
}

.know-card-shape {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 224px;
  height: 225px;
}

.know-card-link {
  position: absolute;
  top: 375px;
  left: 356px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.know-card-link-text {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--dark);
  white-space: nowrap;
}

.know-card-arrow {
  width: 154px;
  height: 1px;
  background: var(--dark);
  position: relative;
}

.know-card-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -4px;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--dark);
  border-top: 1px solid var(--dark);
  transform: rotate(45deg);
}

/* ===== SOLUTIONS ===== */
.solutions {
  padding: 100px 30px 0;
}

.solutions .section-title {
  margin-bottom: 40px;
  text-align: center;
}

.solutions-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1380px;
  margin: 0 auto;
}

.solution-card {
  background: var(--bg);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
  transition: background 0.15s;
}

.solution-card.in-view {
  background: var(--bg-card);
}

.solution-glow {
  position: absolute;
  width: 938px;
  height: 938px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: scale(0.6);
}

.solution-card.in-view .solution-glow {
  animation: glow-flicker 1.2s ease forwards;
}

@keyframes glow-flicker {
  0%   { opacity: 0; transform: scale(0.75); }
  25%  { opacity: 0.45; transform: scale(0.87); }
  40%  { opacity: 0.35; transform: scale(0.9); }
  60%  { opacity: 0.65; transform: scale(0.94); }
  75%  { opacity: 0.55; transform: scale(0.97); }
  90%  { opacity: 0.85; transform: scale(0.99); }
  100% { opacity: 1; transform: scale(1); }
}

.solution-glow-tr {
  top: -330px;
  right: -330px;
  background-image: url('assets/glow-purple.svg');
  background-size: contain;
}

.solution-glow-bl {
  bottom: -330px;
  left: -330px;
  background-image: url('assets/glow-purple-2.svg');
  background-size: contain;
}

.solution-content {
  display: flex;
  gap: 29px;
  align-items: center;
  justify-content: space-between;
  padding: 40px 70px;
  position: relative;
  z-index: 1;
}

.solution-card.in-view .btn-green-sm {
  border-color: var(--white);
  color: var(--white);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.solution-card.in-view .btn-green-sm:hover {
  background: var(--white);
  color: var(--dark);
}

.solution-img {
  width: 535px;
  height: 498px;
  flex-shrink: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.solution-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.solution-card.in-view .solution-img img {
  transform: scale(1.03);
}

.solution-info {
  width: 676px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.solution-info-top {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.solution-info h3 {
  font-family: 'Rubik', sans-serif;
  font-weight: 300;
  font-size: 32px;
  line-height: 1.2;
}

.solution-desc {
  font-size: 18px;
  line-height: 23px;
}

.solution-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.solution-features li,
.solution-extras li {
  font-size: 16px;
  line-height: 1.2;
  padding-left: 16px;
  position: relative;
}

.solution-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.solution-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.solution-extras li {
  padding-left: 32px;
}

.solution-extras li::before {
  content: '+';
  position: absolute;
  left: 0;
  top: -1px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  background: var(--dark);
  border-radius: 50%;
}

.solution-prices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-label {
  font-size: 14px;
  color: var(--white);
}

.price-value {
  font-size: 20px;
  font-weight: 500;
  color: var(--accent);
}

.price-note {
  font-size: 14px;
  color: var(--white);
}

.btn-green-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 12px 30px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.btn-green-sm:hover {
  background: var(--accent);
  color: var(--dark);
}

/* ===== SERVICES ===== */
.services {
  padding: 100px 30px 0;
}

.services-inner {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 70px;
  display: flex;
  flex-direction: column;
  gap: 100px;
  position: relative;
  overflow: hidden;
}

.glow-services-tl {
  top: -350px;
  left: -350px;
  background-image: url('assets/glow-purple.svg');
}

.glow-services-center {
  display: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: url('assets/glow-purple.svg');
}

.glow-services-br {
  bottom: -200px;
  right: -200px;
  background-image: url('assets/glow-purple-2.svg');
}

.service-block.service-row {
  display: flex;
  gap: 98px;
  align-items: center;
}

.service-block.service-row-reverse {
  flex-direction: row-reverse;
}

.service-block.service-col {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.service-block {
  position: relative;
  z-index: 1;
}

.service-text {
  flex: 1;
}

.service-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 300;
  font-size: 56px;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.service-desc {
  font-size: 20px;
  line-height: 26px;
  color: var(--white);
  margin-bottom: 35px;
}

.service-desc strong {
  font-weight: 700;
}

.service-img {
  width: 560px;
  height: 400px;
  border-radius: var(--radius-card);
  overflow: hidden;
  flex-shrink: 0;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-img-wide {
  width: 100%;
  height: 400px;
}

/* ===== REVIEWS ===== */
.reviews {
  padding: 100px 30px 0;
}

.reviews-inner {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 70px;
  overflow: hidden;
  position: relative;
}

.reviews-inner .section-title {
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.glow-reviews-tl {
  top: -300px;
  left: 0;
  width: 1600px;
  height: 1600px;
  background-image: url('assets/glow-purple.svg');
  animation: glow-drift 10s ease-in-out infinite;
}

@keyframes glow-drift {
  0% { transform: translate(0, 0) scale(1); opacity: 0.5; filter: hue-rotate(0deg) brightness(1); }
  25% { transform: translate(150px, 80px) scale(1.3); opacity: 1; filter: hue-rotate(30deg) brightness(1.4); }
  50% { transform: translate(-50px, 120px) scale(0.9); opacity: 0.6; filter: hue-rotate(-20deg) brightness(0.9); }
  75% { transform: translate(-120px, -40px) scale(1.2); opacity: 0.95; filter: hue-rotate(20deg) brightness(1.3); }
  100% { transform: translate(0, 0) scale(1); opacity: 0.5; filter: hue-rotate(0deg) brightness(1); }
}

.glow-reviews-br {
  display: none;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
  height: 700px;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.reviews-col {
  overflow: hidden;
  cursor: grab;
}

.reviews-col:active {
  cursor: grabbing;
}

.reviews-track {
  display: flex;
  flex-direction: column;
  gap: 20px;
  will-change: transform;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 20px;
  color: var(--dark);
  font-size: 15px;
}

.review-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.review-header strong {
  font-size: 15px;
  font-weight: 600;
}

.review-location {
  font-size: 14px;
  color: #ababb0;
}

.review-card p {
  line-height: 1.5;
}

/* ===== INDEX RESPONSIVE ===== */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 48px;
    line-height: 60px;
  }

  .service-title {
    font-size: 40px;
  }

  .solutions,
  .services,
  .cases,
  .reviews {
    padding: 60px 20px 0;
  }

  .solutions-inner,
  .cases-inner,
  .reviews-inner {
    padding: 50px;
  }

  .solution-content {
    flex-direction: column;
    padding: 20px;
  }

  .solution-img {
    width: 100%;
    min-height: 260px;
  }

  .service-block.service-row,
  .service-block.service-row-reverse {
    flex-direction: column;
    gap: 40px;
  }

  .service-img {
    width: 100%;
  }

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

  .reviews-col:nth-child(3) {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero-title {
    font-size: 28px;
    line-height: 36px;
    word-break: break-word;
  }

  .hero-subtitle {
    position: static;
    width: 100%;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.4;
  }

  .hero-images {
    flex-direction: column-reverse;
    height: auto;
  }

  .hero-img-left,
  .hero-img-right {
    width: 100%;
    height: 220px;
  }

  .hero-socials {
    position: static;
    margin-top: 20px;
  }

  .badges {
    padding: 40px 15px 0;
  }

  .badges-track {
    animation-duration: 15s;
  }

  .badge {
    font-size: 16px;
  }

  .advantages {
    padding: 40px 15px 0;
  }

  .advantages-inner {
    padding: 30px 20px;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .glow-adv-center,
  .glow-services-center {
    display: block;
  }

  .adv-value {
    font-size: 32px;
  }

  .know-section {
    padding: 60px 15px 0;
  }

  .know-section .section-title {
    margin-bottom: 30px;
  }

  .know-track {
    gap: 15px;
  }

  .know-card {
    min-width: 260px;
    height: 300px;
  }

  .know-card h3 {
    font-size: 18px;
    line-height: 24px;
    top: 20px;
    left: 20px;
    max-width: 180px;
  }

  .know-card-shape {
    width: 130px;
    height: 130px;
  }

  .know-card-link {
    top: auto;
    left: auto;
    bottom: 15px;
    right: 15px;
  }

  .know-card-link-text {
    font-size: 12px;
    align-self: flex-end;
  }

  .know-card-arrow {
    width: 90%;
    align-self: flex-end;
  }

  .solutions {
    padding: 60px 15px 0;
  }

  .solutions-list {
    gap: 20px;
  }

  .solution-content {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .solution-img {
    width: 100%;
    height: 220px;
  }

  .solution-info {
    width: 100%;
    gap: 20px;
  }

  .solution-info h3 {
    font-size: 20px;
  }

  .solution-desc {
    font-size: 14px;
    line-height: 20px;
  }

  .solution-features li,
  .solution-extras li {
    font-size: 14px;
  }

  .price-value {
    font-size: 18px;
  }

  .price-label {
    font-size: 13px;
  }

  .btn-green-sm {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .solution-glow {
    width: 500px;
    height: 500px;
  }

  .solution-glow-tr {
    top: -200px;
    right: -200px;
  }

  .solution-glow-bl {
    bottom: -200px;
    left: -200px;
  }

  .services {
    padding: 60px 15px 0;
  }

  .services-inner {
    padding: 30px 20px;
    gap: 60px;
  }

  .service-title {
    font-size: 32px;
  }

  .service-img {
    height: 260px;
  }

  .reviews {
    padding: 60px 15px 0;
  }

  .reviews-inner {
    padding: 30px 20px;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    height: 600px;
  }

  .reviews-col:nth-child(2),
  .reviews-col:nth-child(3) {
    display: none;
  }
}
