/* ============================================
   GLOBAL RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: #0C0C0C;
  overflow-x: hidden;
}

body {
  font-family: 'Kanit', 'Noto Sans SC', sans-serif;
  background: #0C0C0C;
  color: #D7E2EA;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.gradient-text {
  background: linear-gradient(180deg, #646973 0%, #BBCCD7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gold-text {
  color: #c2a972;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.navbar.scrolled {
  background: rgba(12, 12, 12, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1rem, 2.5vw, 1.5rem) 0;
}

.nav-logo {
  font-family: 'Kanit', sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: 0.15em;
  color: #D7E2EA;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.5rem);
}

.nav-links a {
  font-size: clamp(0.65rem, 1vw, 0.85rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #D7E2EA;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 0.7;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(5rem, 12vw, 8rem) clamp(1.5rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

.hero-bg-text {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Kanit', sans-serif;
  font-weight: 900;
  font-size: clamp(8rem, 22vw, 22rem);
  color: rgba(215, 226, 234, 0.03);
  letter-spacing: 0.05em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}

.hero-title {
  position: relative;
  z-index: 2;
  font-family: 'Kanit', 'Noto Sans SC', sans-serif;
  font-weight: 900;
  font-size: clamp(4rem, 16vw, 15rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-top: clamp(0.5rem, 1.5vw, 1rem);
  margin-bottom: auto;
  width: 100%;
}

.hero-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-bottom: clamp(1rem, 3vw, 2rem);
}

.hero-desc {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.65rem, 1.1vw, 0.95rem);
  font-weight: 300;
  color: #D7E2EA;
  line-height: 1.8;
  max-width: 320px;
  opacity: 0.85;
  white-space: nowrap;
}

/* Hero Photo */
.hero-photo-wrapper {
  position: absolute;
  left: 50%;
  margin-left: calc(clamp(200px, 28vw, 480px) / -2);
  bottom: 0;
  z-index: 3;
  width: clamp(200px, 28vw, 480px);
  will-change: transform;
  transition: transform 0.3s ease-out;
}

.hero-photo {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: brightness(0.95);
}

/* ============================================
   CONTACT BUTTON
   ============================================ */
.contact-btn {
  display: inline-block;
  padding: clamp(0.7rem, 1.5vw, 1rem) clamp(2rem, 4vw, 3rem);
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  font-weight: 600;
  font-family: 'Noto Sans SC', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #fff;
  background: linear-gradient(123deg, #18001F 7%, #B600A8 37%, #7621B0 72%, #BE4C00 100%);
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 4px rgba(181, 1, 167, 0.25), 4px 4px 12px #7721B1 inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(181, 1, 167, 0.4), 4px 4px 12px #7721B1 inset;
}

/* ============================================
   MARQUEE SECTION
   ============================================ */
.marquee-section {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(1rem, 2vw, 2rem);
  overflow: hidden;
}

.marquee-label {
  text-align: center;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  color: #646973;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  text-transform: uppercase;
}

.marquee-track-wrapper {
  overflow: hidden;
  margin-bottom: clamp(0.5rem, 1vw, 0.75rem);
}

.marquee-track {
  display: flex;
  gap: clamp(0.75rem, 1.5vw, 1.2rem);
  width: max-content;
}

.marquee-row-1 {
  animation: marqueeScroll1 35s linear infinite;
}

.marquee-row-2 {
  animation: marqueeScroll2 40s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-card {
  flex-shrink: 0;
  width: clamp(260px, 28vw, 360px);
  height: clamp(160px, 18vw, 220px);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
}

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

.marquee-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #D7E2EA;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.75rem, 1.1vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

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

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

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.section-title {
  font-family: 'Kanit', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 10rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.about-content {
  max-width: 720px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.about-text-block {
  display: flex;
  flex-direction: column;
  gap: clamp(0.6rem, 1.2vw, 1rem);
}

.about-text {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.8rem, 1.4vw, 1.1rem);
  font-weight: 400;
  line-height: 1.9;
  color: #FFFFFF;
  text-align: center;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  max-width: 800px;
  width: 100%;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: 'Kanit', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 4rem);
  color: #C8A96A;
  line-height: 1.1;
  white-space: nowrap;
}

.stat-label {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  color: #646973;
  font-weight: 400;
}

.about-cta {
  margin-top: 1rem;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
  background: #FFFFFF;
  border-radius: clamp(40px, 6vw, 60px) clamp(40px, 6vw, 60px) 0 0;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem);
}

.section-title-dark {
  font-family: 'Kanit', 'Noto Sans SC', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 10rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #0C0C0C;
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.services-list {
  max-width: 900px;
  margin: 0 auto;
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid rgba(12, 12, 12, 0.12);
}

.service-item:last-child {
  border-bottom: none;
}

.service-number {
  font-family: 'Kanit', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 6rem);
  color: #0C0C0C;
  opacity: 0.15;
  line-height: 1;
  flex-shrink: 0;
  min-width: clamp(60px, 10vw, 120px);
}

.service-info {
  flex: 1;
}

.service-name {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.6rem);
  color: #0C0C0C;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.service-desc {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 300;
  font-size: clamp(0.8rem, 1.4vw, 1.1rem);
  color: #0C0C0C;
  opacity: 0.6;
  line-height: 1.8;
  max-width: 640px;
}

/* ============================================
   PROJECTS SECTION - STACKING CARDS
   ============================================ */
.projects-section {
  background: #0C0C0C;
  border-radius: clamp(40px, 6vw, 60px) clamp(40px, 6vw, 60px) 0 0;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 4vw, 3rem) clamp(4rem, 8vw, 8rem);
  margin-top: -1px;
}

.projects-stack {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.project-card-wrapper {
  height: 85vh;
  position: relative;
}

.project-card {
  position: sticky;
  top: clamp(5rem, 10vw, 8rem);
  background: #0C0C0C;
  border: 2px solid rgba(215, 226, 234, 0.12);
  border-radius: clamp(24px, 4vw, 40px);
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.project-card:hover {
  border-color: #C8A96A;
  box-shadow: 0 20px 60px rgba(200, 169, 106, 0.1);
}

.project-card-inner {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  gap: 1rem;
}

.project-card-header {
  flex: 1;
}

.project-card-photo {
  width: 100%;
  border-radius: clamp(16px, 3vw, 28px);
  overflow: hidden;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  aspect-ratio: 16 / 9;
}

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

.project-card:hover .project-card-photo img {
  transform: scale(1.03);
}

.project-desc {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  color: #646973;
  line-height: 1.7;
  max-width: 600px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) clamp(1.5rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
}

.footer-heading {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: #D7E2EA;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.footer-info {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(215, 226, 234, 0.08);
}

.footer-info p {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.7rem, 1vw, 0.9rem);
  color: #646973;
}

/* ============================================
   CONTACT MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 12, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: rgba(30, 30, 35, 0.95);
  border: 1px solid rgba(215, 226, 234, 0.12);
  border-radius: clamp(20px, 3vw, 32px);
  padding: clamp(2rem, 4vw, 3rem);
  max-width: 420px;
  width: 90%;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: #646973;
  font-size: 1.8rem;
  line-height: 1;
  transition: color 0.2s;
  cursor: pointer;
}

.modal-close:hover {
  color: #D7E2EA;
}

.modal-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: #D7E2EA;
  margin-bottom: 1.5rem;
  text-align: center;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(215, 226, 234, 0.05);
  border: 1px solid rgba(215, 226, 234, 0.1);
  border-radius: 16px;
  color: #D7E2EA;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  transition: border-color 0.3s, background 0.3s;
}

.modal-contact-item:hover {
  border-color: #C8A96A;
  background: rgba(200, 169, 106, 0.06);
}

.modal-contact-item svg {
  flex-shrink: 0;
  color: #C8A96A;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero-photo-wrapper {
    width: clamp(180px, 25vw, 380px);
    margin-left: calc(clamp(180px, 25vw, 380px) / -2);
  }

  .projects-stack {
    max-width: 100%;
  }

  .project-card-wrapper {
    height: auto;
    min-height: 80vh;
  }
}

@media (max-width: 768px) {
  .nav-links {
    gap: clamp(0.8rem, 2vw, 1.2rem);
  }

  .nav-links a {
    font-size: clamp(0.65rem, 2.5vw, 0.85rem);
  }

  .hero {
    padding-top: clamp(6rem, 15vw, 10rem);
    align-items: center;
    text-align: center;
  }

  .hero-title {
    text-align: center;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .hero-desc {
    text-align: center;
  }

  .hero-photo-wrapper {
    position: relative;
    left: auto;
    transform: none;
    bottom: auto;
    width: clamp(180px, 50vw, 300px);
    margin: 2rem auto 0;
  }

  .hero-bg-text {
    display: none;
  }

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

  .service-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .service-number {
    min-width: auto;
  }

  .projects-stack {
    max-width: 100%;
  }

  .project-card-wrapper {
    height: auto;
    min-height: 70vh;
  }

  .project-card-photo {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 0.6rem;
  }

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