/* --- Variables --- */
:root {
  --hero-max-width: 900px;
  --hero-padding: 40px;
  --primary-color: #0066ff;
  --secondary-color: #0044cc;
  --text-color: #ffffff;
  --overlay-color: rgba(0, 0, 0, 0.35);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Styles --- */
body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

/* --- Animations --- */
@keyframes scrollPulse {
  0% {
    transform: translateY(0);
    opacity: 0.5;
  }
  100% {
    transform: translateY(15px);
    opacity: 1;
  }
}

@keyframes floatShape {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(30px, 30px);
  }
}

@keyframes zoomBg {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1.2);
  }
}

/* --- Layout --- */
.hero-section {
  position: relative;
  min-height: 60vh;
  height: 100vh;
  display: flex;
  align-items: center;
  color: var(--text-color);
  overflow: hidden;
  z-index: 1;
  padding-top: env(safe-area-inset-top);
}

.container {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  padding: 0 20px;
  margin: 0 auto;
  width: 100%;
}

/* --- Background --- */
.hero-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/nang_cao_chat_luong.jpeg");
  background-size: cover;
  background-position: center;
  will-change: transform, opacity;
  z-index: 1;
}

.hero-background-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-color);
  z-index: 2;
}

/* --- Content & Typography --- */
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--hero-padding) 0;
  text-align: left;
  color: white;
  margin-top: 35vh;
}

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 4.5vw, 3.5rem);
  line-height: 1.08;
  margin: 0 0 1rem 0;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  text-align: left;
}

.hero-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  opacity: 0.95;
  max-width: 600px;
  text-align: left;
}

.intro-text {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 720px;
}

/* --- Buttons --- */
.hero-cta,
.hero-buttons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.22s var(--transition-timing);
  position: relative;
  overflow: hidden;
}

.btn i {
  margin-left: 10px;
  transition: transform 0.3s var(--transition-timing);
}

.btn:hover i {
  transform: translateX(4px);
}

.btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.16);
  outline: none;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.btn-primary:focus-visible {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  outline: none;
  transform: translateY(-2px);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

/* --- Decorations --- */
.hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  top: 0;
  left: 0;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: 8%;
  left: -60px;
  opacity: 0;
}

.shape-2 {
  width: 220px;
  height: 220px;
  bottom: 12%;
  right: -40px;
  opacity: 0;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 28px;
  width: 34px;
  height: 54px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 25px;
  z-index: 4;
  opacity: 0;
}

.scroll-indicator::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: #fff;
  border-radius: 50%;
  animation: scrollPulse 1.5s infinite alternate;
}

/* --- SplitText Helpers --- */
.split-text,
.line,
.char {
  display: inline-block;
  white-space: pre;
}

.split-text .line {
  display: block;
}

.word {
  margin-right: 0.28ch;
}

/* --- Media Queries --- */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 3rem;
  }
  .hero-subtitle {
    font-size: 1.3rem;
  }
}

@media (max-width: 992px) {
  .hero-content {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
    padding: 0 1.5rem;
    margin-top: 30vh;
  }
  .intro-text {
    margin: 0 auto 2rem auto;
  }
  .hero-buttons {
    justify-content: center;
  }
  .shape-1,
  .shape-2 {
    width: 300px;
    height: 300px;
  }
  .shape-2 {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 420px;
  }
  .hero-title {
    font-size: clamp(1.4rem, 7.5vw, 2.6rem);
  }
  .hero-subtitle {
    font-size: clamp(0.95rem, 2.4vw, 1.25rem);
  }
  .intro-text {
    font-size: 0.98rem;
  }
  .btn {
    padding: 10px 20px;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  .hero-cta .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  .shape-1,
  .shape-2 {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 600px;
  }
  .hero-title {
    font-size: clamp(1.4rem, 7.5vw, 2rem);
  }
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .hero-shape,
  .hero-background-image,
  .hero-content,
  .scroll-indicator {
    animation: none !important;
    transition: none !important;
  }
  .hero-shape {
    opacity: 1;
  }
}
