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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body,
.main-wrapper {
  background: #0c0c0c;
  font-family: 'Kanit', sans-serif;
}

.main-wrapper {
  overflow-x: clip;
}

.hero-heading,
.section-heading {
  background: linear-gradient(180deg, #646973 0%, #bbccd7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BUTTONS ===== */
.btn-contact {
  display: inline-block;
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(123deg, #18011f 7%, #b600a8 37%, #7621b0 72%, #be4c00 100%);
  box-shadow:
    0 4px 4px rgba(181, 1, 167, 0.25),
    4px 4px 12px #7721b1 inset;
  outline: 2px solid white;
  outline-offset: -3px;
  transition: opacity 0.2s;
}

.btn-contact:hover {
  opacity: 0.9;
}

.btn-live {
  border-radius: 9999px;
  border: 2px solid #d7e2ea;
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d7e2ea;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-live:hover {
  background: rgba(215, 226, 234, 0.1);
}

@media (min-width: 640px) {
  .btn-contact {
    padding: 0.875rem 2.5rem;
    font-size: 0.875rem;
  }

  .btn-live {
    padding: 0.875rem 2.5rem;
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .btn-contact {
    padding: 1rem 3rem;
    font-size: 1rem;
  }
}

/* ===== FADE IN ===== */
.fade-in {
  opacity: 0;
  transform: translate(var(--fade-x, 0), var(--fade-y, 30px));
  transition:
    opacity var(--fade-duration, 0.7s) cubic-bezier(0.25, 0.1, 0.25, 1) var(--fade-delay, 0s),
    transform var(--fade-duration, 0.7s) cubic-bezier(0.25, 0.1, 0.25, 1) var(--fade-delay, 0s);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  background: #0c0c0c;
}

.hero-nav {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0;
}

.hero-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #d7e2ea;
  text-decoration: none;
  transition: opacity 0.2s;
}

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

.hero-heading-wrap {
  margin-top: 1.5rem;
  overflow: hidden;
}

.hero-heading {
  width: 100%;
  white-space: nowrap;
  font-size: 14vw;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.025em;
}

.hero-portrait {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 10;
  width: min(320px, 78vw);
  transform: translate(-50%, -50%);
}

.hero-portrait .magnet {
  will-change: transform;
  transition: transform 0.6s ease-in-out;
}

.hero-portrait .magnet.is-active {
  transition: transform 0.3s ease-out;
}

.hero-portrait img {
  width: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.65s ease;
}

.hero-portrait.hero-portrait-ready img,
.hero-portrait img.is-loaded {
  opacity: 1;
}

.hero-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 1.5rem 1.75rem;
}

.hero-tagline {
  max-width: 160px;
  font-size: clamp(0.75rem, 1.4vw, 1.5rem);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.375;
  color: #d7e2ea;
}

@media (min-width: 640px) {
  .hero-nav {
    padding: 2rem 2.5rem 0;
  }

  .hero-nav a {
    font-size: 1.125rem;
  }

  .hero-heading-wrap {
    margin-top: 1rem;
  }

  .hero-heading {
    font-size: 15vw;
  }

  .hero-portrait {
    top: auto;
    bottom: 0;
    width: min(400px, 70vw);
    transform: translate(-50%, 0);
  }

  .hero-bottom {
    padding-bottom: 2rem;
  }

  .hero-tagline {
    max-width: 220px;
  }
}

@media (min-width: 768px) {
  .hero-heading-wrap {
    margin-top: -1.25rem;
  }

  .hero-heading {
    font-size: 16vw;
  }

  .hero-portrait {
    width: min(480px, 65vw);
  }

  .hero-bottom {
    padding: 0 2.5rem 2.5rem;
  }

  .hero-tagline {
    max-width: 260px;
  }
}

@media (min-width: 1024px) {
  .hero-nav a {
    font-size: 1.4rem;
  }

  .hero-heading {
    font-size: 17.5vw;
  }

  .hero-portrait {
    width: min(560px, 58vw);
  }
}

/* ===== MARQUEE ===== */
.marquee {
  background: #0c0c0c;
  padding: 6rem 0 2.5rem;
}

.marquee-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.marquee-row {
  display: flex;
  gap: 0.75rem;
  will-change: transform;
}

.marquee-row img,
.marquee-row .lazy-img-wrap {
  width: min(420px, 72vw);
  height: auto;
  aspect-ratio: 420 / 270;
  flex-shrink: 0;
  border-radius: 1rem;
  object-fit: cover;
}

.marquee-row img {
  object-fit: cover;
}

@media (min-width: 640px) {
  .marquee {
    padding-top: 8rem;
  }
}

@media (min-width: 768px) {
  .marquee {
    padding-top: 10rem;
  }
}

/* ===== ABOUT ===== */
.about {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 5rem 1.25rem;
  background: #0c0c0c;
}

.about-deco {
  position: absolute;
  pointer-events: none;
  opacity: 1;
  background: none;
  animation: none;
}

.about-deco-moon {
  top: 4%;
  left: 1%;
  width: 120px;
}

.about-deco-object {
  bottom: 8%;
  left: 3%;
  width: 100px;
}

.about-deco-lego {
  top: 4%;
  right: 1%;
  width: 120px;
}

.about-deco-group {
  bottom: 8%;
  right: 3%;
  width: 130px;
}

.about-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.section-heading {
  text-align: center;
  font-size: clamp(3rem, 12vw, 160px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.025em;
}

.animated-text {
  position: relative;
  max-width: 560px;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 500;
  text-align: center;
  line-height: 1.625;
  color: #d7e2ea;
}

.animated-text .char-wrap {
  position: relative;
  display: inline-block;
}

.animated-text .char-placeholder {
  visibility: hidden;
}

.animated-text .char-visible {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0.2;
}

.about-contact {
  position: relative;
  z-index: 1;
  margin-top: 4rem;
}

@media (min-width: 640px) {
  .about {
    padding: 5rem 2rem;
  }

  .about-deco-moon {
    left: 2%;
    width: 160px;
  }

  .about-deco-object {
    left: 6%;
    width: 140px;
  }

  .about-deco-lego {
    right: 2%;
    width: 160px;
  }

  .about-deco-group {
    right: 6%;
    width: 170px;
  }

  .about-content {
    gap: 3.5rem;
  }

  .about-contact {
    margin-top: 5rem;
  }
}

@media (min-width: 768px) {
  .about {
    padding: 5rem 2.5rem;
  }

  .about-deco-moon {
    left: 4%;
    width: 210px;
  }

  .about-deco-object {
    left: 10%;
    width: 180px;
  }

  .about-deco-lego {
    right: 4%;
    width: 210px;
  }

  .about-deco-group {
    right: 10%;
    width: 220px;
  }

  .about-content {
    gap: 4rem;
  }

  .about-contact {
    margin-top: 6rem;
  }
}

/* ===== SERVICES ===== */
.services {
  background: #ffffff;
  border-radius: 40px 40px 0 0;
  padding: 5rem 1.25rem;
}

.services-heading {
  margin-bottom: 4rem;
  text-align: center;
  font-size: clamp(3rem, 12vw, 160px);
  font-weight: 900;
  text-transform: uppercase;
  color: #0c0c0c;
}

.services-list {
  max-width: 64rem;
  margin: 0 auto;
}

.service-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(12, 12, 12, 0.15);
}

.service-item:first-child {
  border-top: 1px solid rgba(12, 12, 12, 0.15);
}

.service-number {
  flex-shrink: 0;
  font-size: clamp(3rem, 10vw, 140px);
  font-weight: 900;
  color: #0c0c0c;
  line-height: 1;
}

.service-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.service-title {
  font-size: clamp(1rem, 2.2vw, 2.1rem);
  font-weight: 500;
  text-transform: uppercase;
  color: #0c0c0c;
}

.service-desc {
  max-width: 42rem;
  font-size: clamp(0.85rem, 1.6vw, 1.25rem);
  font-weight: 300;
  line-height: 1.625;
  color: #0c0c0c;
  opacity: 0.6;
}

@media (min-width: 640px) {
  .services {
    border-radius: 50px 50px 0 0;
    padding: 6rem 2rem;
  }

  .services-heading {
    margin-bottom: 5rem;
  }

  .service-item {
    gap: 2rem;
    padding: 2.5rem 0;
  }
}

@media (min-width: 768px) {
  .services {
    border-radius: 60px 60px 0 0;
    padding: 8rem 2.5rem;
  }

  .services-heading {
    margin-bottom: 7rem;
  }

  .service-item {
    padding: 3rem 0;
  }
}

/* ===== PROJECTS ===== */
.projects {
  position: relative;
  z-index: 10;
  margin-top: -2.5rem;
  background: #0c0c0c;
  border-radius: 40px 40px 0 0;
  padding: 5rem 1.25rem;
}

.projects-title {
  margin-bottom: 4rem;
}

.projects-stack {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
}

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

.project-card-wrap {
  position: sticky;
  top: calc(4rem + var(--card-index, 0) * 14px);
  z-index: var(--card-z, 1);
}

.project-card {
  background: #0c0c0c;
  border: 2px solid #d7e2ea;
  border-radius: 40px;
  padding: 1rem;
  transform-origin: top center;
  will-change: transform;
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
}

.project-number {
  font-size: clamp(3rem, 10vw, 140px);
  font-weight: 900;
  color: #d7e2ea;
  line-height: 1;
}

.project-category {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #d7e2ea;
  opacity: 0.6;
}

.project-name {
  font-size: clamp(1rem, 2.2vw, 2.1rem);
  font-weight: 500;
  text-transform: uppercase;
  color: #d7e2ea;
}

.project-images {
  display: flex;
  gap: 0.75rem;
}

.project-col-left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 40%;
}

.project-col-right {
  width: 60%;
}

.project-col-left img,
.project-col-right img,
.project-col-left .lazy-img,
.project-col-right .lazy-img {
  width: 100%;
  object-fit: cover;
  border-radius: 40px;
}

.project-col-left img:first-child,
.project-col-left .lazy-img-wrap:first-child {
  height: clamp(130px, 16vw, 230px);
}

.project-col-left img:last-child,
.project-col-left .lazy-img-wrap:last-child {
  height: clamp(160px, 22vw, 340px);
}

.project-col-right img,
.project-col-right .lazy-img-wrap {
  height: 100%;
}

@media (min-width: 640px) {
  .projects {
    margin-top: -3rem;
    border-radius: 50px 50px 0 0;
    padding: 6rem 2rem;
  }

  .projects-title {
    margin-bottom: 5rem;
  }

  .project-card {
    border-radius: 50px;
    padding: 1.5rem;
  }

  .project-images {
    gap: 1rem;
  }

  .project-col-left {
    gap: 1rem;
  }

  .project-col-left img,
  .project-col-right img {
    border-radius: 50px;
  }

  .project-card-wrap {
    top: calc(6rem + var(--card-index, 0) * 28px);
  }
}

@media (min-width: 768px) {
  .projects {
    margin-top: -3.5rem;
    border-radius: 60px 60px 0 0;
    padding: 8rem 2.5rem;
  }

  .projects-title {
    margin-bottom: 7rem;
  }

  .project-card-wrap {
    top: calc(8rem + var(--card-index, 0) * 28px);
  }

  .project-card {
    border-radius: 60px;
    padding: 2rem;
  }

  .project-col-left img,
  .project-col-right img {
    border-radius: 60px;
  }
}

/* ===== CONTACT ===== */
.contact {
  position: relative;
  z-index: 10;
  margin-top: -2.5rem;
  background: #ffffff;
  border-radius: 40px 40px 0 0;
  padding: 5rem 1.25rem 6rem;
}

.contact-inner {
  max-width: 36rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact-heading {
  text-align: center;
  font-size: clamp(3rem, 12vw, 160px);
  font-weight: 900;
  text-transform: uppercase;
  color: #0c0c0c;
  line-height: 1;
  letter-spacing: -0.025em;
}

.contact-lead {
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  line-height: 1.625;
  color: #0c0c0c;
  opacity: 0.6;
  max-width: 32rem;
}

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-field label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0c0c0c;
  opacity: 0.5;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: 'Kanit', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #0c0c0c;
  background: #f5f5f5;
  border: 1px solid rgba(12, 12, 12, 0.1);
  border-radius: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: rgba(12, 12, 12, 0.35);
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: rgba(118, 33, 176, 0.4);
  box-shadow: 0 0 0 3px rgba(118, 33, 176, 0.1);
}

.btn-contact-submit {
  align-self: center;
  margin-top: 0.5rem;
  border: none;
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.contact-link {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0c0c0c;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.contact-link:hover {
  opacity: 1;
}

.contact-divider {
  color: #0c0c0c;
  opacity: 0.2;
}

@media (min-width: 640px) {
  .contact {
    margin-top: -3rem;
    border-radius: 50px 50px 0 0;
    padding: 6rem 2rem 7rem;
  }

  .contact-inner {
    gap: 2.5rem;
  }
}

@media (min-width: 768px) {
  .contact {
    margin-top: -3.5rem;
    border-radius: 60px 60px 0 0;
    padding: 8rem 2.5rem 9rem;
  }

  .contact-inner {
    gap: 3rem;
  }

  .contact-form {
    gap: 1.5rem;
  }
}

/* ===== FOOTER ===== */
.site-footer {
  position: relative;
  z-index: 10;
  margin-top: -2.5rem;
  background: #0c0c0c;
  border-radius: 40px 40px 0 0;
  padding: 4rem 1.25rem 2rem;
  overflow: hidden;
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-logo {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, #646973 0%, #bbccd7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  max-width: 18rem;
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  font-weight: 300;
  line-height: 1.5;
  color: #d7e2ea;
  opacity: 0.5;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

.footer-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d7e2ea;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-nav a:hover {
  opacity: 0.6;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d7e2ea;
  text-decoration: none;
  border: 1px solid rgba(215, 226, 234, 0.2);
  border-radius: 9999px;
  transition: background-color 0.2s, border-color 0.2s;
}

.footer-social-link:hover {
  background: rgba(215, 226, 234, 0.08);
  border-color: rgba(215, 226, 234, 0.35);
}

.footer-marquee {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid rgba(215, 226, 234, 0.08);
  border-bottom: 1px solid rgba(215, 226, 234, 0.08);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.footer-marquee-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap;
  animation: footer-marquee-scroll 28s linear infinite;
}

@keyframes footer-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.footer-marquee span {
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #d7e2ea;
  opacity: 0.25;
  flex-shrink: 0;
}

.footer-marquee-dot {
  font-size: 0.35rem;
  opacity: 0.15;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-copy {
  font-size: 0.7rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #d7e2ea;
  opacity: 0.35;
}

.footer-made {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #d7e2ea;
  opacity: 0.45;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(123deg, #18011f 7%, #b600a8 37%, #7621b0 72%, #be4c00 100%);
  border-radius: 9999px;
  box-shadow:
    0 2px 8px rgba(181, 1, 167, 0.2),
    2px 2px 8px #7721b1 inset;
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: -2px;
  opacity: 1;
  transition: transform 0.2s, box-shadow 0.2s;
}

.footer-credit:hover {
  transform: translateY(-1px);
  box-shadow:
    0 4px 16px rgba(181, 1, 167, 0.35),
    2px 2px 8px #7721b1 inset;
}

@media (min-width: 640px) {
  .site-footer {
    margin-top: -3rem;
    border-radius: 50px 50px 0 0;
    padding: 5rem 2rem 2.5rem;
  }

  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
    align-items: start;
    gap: 2rem;
    padding-bottom: 3rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.85rem;
  }

  .footer-social {
    flex-direction: column;
    align-items: flex-end;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 768px) {
  .site-footer {
    margin-top: -3.5rem;
    border-radius: 60px 60px 0 0;
    padding: 6rem 2.5rem 2.5rem;
  }

  .footer-top {
    padding-bottom: 3.5rem;
  }

  .footer-marquee {
    padding: 2rem 0;
    margin-bottom: 2rem;
  }
}

/* ===== MOBILE (max 639px) ===== */
@media (max-width: 639px) {
  .hero-nav {
    padding: 1rem 1rem 0;
    gap: 0.25rem;
  }

  .hero-nav a {
    font-size: clamp(0.6rem, 2.8vw, 0.8rem);
    letter-spacing: 0.04em;
    padding: 0.25rem 0;
  }

  .hero-heading-wrap {
    margin-top: 1rem;
  }

  .hero-heading {
    font-size: clamp(2.75rem, 14vw, 4rem);
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 0 1.25rem 1.5rem;
  }

  .hero-tagline {
    max-width: 100%;
    font-size: clamp(0.7rem, 3.2vw, 0.9rem);
  }

  .btn-contact {
    padding: 0.65rem 1.5rem;
    font-size: 0.7rem;
  }

  .marquee {
    padding-top: 4rem;
  }

  .marquee-row img {
    width: min(420px, 68vw);
    border-radius: 0.75rem;
  }

  .about {
    padding: 4rem 1rem;
    min-height: auto;
  }

  .about-deco-moon {
    width: 70px;
    top: 2%;
    left: 0;
    opacity: 0.7;
  }

  .about-deco-object {
    width: 60px;
    bottom: 4%;
    left: 0;
    opacity: 0.7;
  }

  .about-deco-lego {
    width: 70px;
    top: 2%;
    right: 0;
    opacity: 0.7;
  }

  .about-deco-group {
    width: 75px;
    bottom: 4%;
    right: 0;
    opacity: 0.7;
  }

  .about-content {
    gap: 2rem;
    padding: 0 0.5rem;
  }

  .animated-text {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    padding: 0 0.25rem;
  }

  .about-contact {
    margin-top: 2.5rem;
  }

  .services {
    padding: 4rem 1rem;
    border-radius: 32px 32px 0 0;
  }

  .services-heading {
    margin-bottom: 2.5rem;
  }

  .service-item {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem 0;
  }

  .service-number {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .projects {
    padding: 4rem 1rem;
    border-radius: 32px 32px 0 0;
    margin-top: -2rem;
  }

  .projects-title {
    margin-bottom: 2.5rem;
  }

  .project-slot {
    height: auto;
    min-height: 75vh;
  }

  .project-card {
    border-radius: 28px;
    padding: 0.875rem;
  }

  .project-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .project-meta {
    gap: 0.75rem;
  }

  .project-number {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .btn-live {
    width: 100%;
    padding: 0.65rem 1.25rem;
    font-size: 0.75rem;
    text-align: center;
  }

  .project-images {
    flex-direction: column;
    gap: 0.65rem;
  }

  .project-col-left,
  .project-col-right {
    width: 100%;
  }

  .project-col-left img:first-child,
  .project-col-left img:last-child {
    height: clamp(120px, 38vw, 200px);
  }

  .project-col-right img {
    height: clamp(180px, 50vw, 280px);
  }

  .project-col-left img,
  .project-col-right img {
    border-radius: 20px;
  }

  .contact {
    padding: 4rem 1rem 5rem;
    border-radius: 32px 32px 0 0;
    margin-top: -2rem;
  }

  .contact-heading {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .contact-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .contact-divider {
    display: none;
  }

  .site-footer {
    padding: 3rem 1rem 2rem;
    border-radius: 32px 32px 0 0;
    margin-top: -2rem;
  }

  .footer-top {
    gap: 2rem;
    padding-bottom: 2rem;
  }

  .footer-social {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .footer-marquee span {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
  }
}

@media (max-width: 380px) {
  .hero-nav a {
    font-size: 0.58rem;
  }

  .hero-portrait {
    width: min(300px, 82vw);
  }
}

/* ===== CTA POPUP ===== */
.cta-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
    visibility 0.45s;
}

.cta-popup.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.cta-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cta-popup-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  padding: 2.25rem 1.75rem 2rem;
  border-radius: 2rem;
  border: 2px solid rgba(215, 226, 234, 0.2);
  background: linear-gradient(160deg, #141414 0%, #0c0c0c 55%, #1a0a1f 100%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(118, 33, 176, 0.15);
  transform: scale(0.92) translateY(24px);
  transition: transform 0.55s cubic-bezier(0.25, 0.1, 0.25, 1);
  overflow: hidden;
}

.cta-popup.is-open .cta-popup-card {
  transform: scale(1) translateY(0);
}

.cta-popup-glow {
  position: absolute;
  top: -40%;
  right: -30%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 0, 168, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.cta-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(215, 226, 234, 0.08);
  color: #d7e2ea;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cta-popup-close:hover {
  background: rgba(215, 226, 234, 0.15);
}

.cta-popup-eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #d7e2ea;
  opacity: 0.5;
}

.cta-popup-title {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #646973 0%, #bbccd7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-popup-text {
  margin-bottom: 1.75rem;
  font-size: clamp(0.9rem, 3.5vw, 1rem);
  font-weight: 300;
  line-height: 1.6;
  color: #d7e2ea;
  opacity: 0.65;
}

.cta-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.cta-popup-primary {
  text-align: center;
  width: 100%;
}

.cta-popup-secondary {
  padding: 0.75rem 1rem;
  font-family: 'Kanit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #d7e2ea;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.cta-popup-secondary:hover {
  opacity: 0.75;
}

body.cta-popup-open {
  overflow: hidden;
}

/* ===== PAGE LOADER ===== */
body.is-loading {
  overflow: hidden;
}

body.is-loading .main-wrapper {
  visibility: hidden;
  pointer-events: none;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c0c0c;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.page-loader.is-exiting {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.page-loader-portrait {
  position: relative;
  width: min(220px, 52vw);
  animation: loader-wiggle 3.2s ease-in-out infinite;
  will-change: transform;
}

.page-loader-img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 24px 48px rgba(118, 33, 176, 0.35));
}

.page-loader-brand {
  margin-top: 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: linear-gradient(180deg, #646973 0%, #bbccd7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-loader-tagline {
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: rgba(215, 226, 234, 0.55);
}

.page-loader-bar {
  width: min(140px, 40vw);
  height: 3px;
  margin-top: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.page-loader-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b600a8, #7621b0, #be4c00);
  animation: loader-bar 1.4s ease-in-out infinite;
}

@keyframes loader-wiggle {
  0%,
  100% {
    transform: translate(0, 0) rotate(-2.5deg) scale(1);
  }
  20% {
    transform: translate(6px, -10px) rotate(2deg) scale(1.02);
  }
  40% {
    transform: translate(-5px, 4px) rotate(-1.5deg) scale(0.99);
  }
  60% {
    transform: translate(4px, -6px) rotate(2.5deg) scale(1.01);
  }
  80% {
    transform: translate(-3px, 8px) rotate(-2deg) scale(1);
  }
}

@keyframes loader-bar {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

/* ===== SKELETON & LAZY IMAGES ===== */
@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.img-skeleton,
.skeleton-block::before,
.marquee-row.skeleton-row::before {
  background: linear-gradient(90deg, #141414 0%, #222 45%, #141414 90%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.lazy-img-wrap {
  position: relative;
  overflow: hidden;
  display: block;
}

.lazy-img-wrap.img-skeleton.is-loaded,
.lazy-img-wrap:not(.img-skeleton) {
  background: none;
  animation: none;
}

.lazy-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.lazy-img.is-loaded {
  opacity: 1;
}

img.lazy-img-wrap {
  opacity: 0;
  transition: opacity 0.45s ease;
}

img.lazy-img-wrap.is-loaded {
  opacity: 1;
  background: none;
  animation: none;
}

img.lazy-img-wrap:not(.is-loaded):not(.about-deco) {
  background: linear-gradient(90deg, #141414 0%, #222 45%, #141414 90%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.services-list.skeleton-block {
  position: relative;
  min-height: 18rem;
}

.services-list.skeleton-block::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  pointer-events: none;
}

.projects-stack.skeleton-block {
  position: relative;
  min-height: clamp(320px, 55vh, 520px);
}

.projects-stack.skeleton-block::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2.5rem;
  pointer-events: none;
}

.marquee-row.skeleton-row {
  position: relative;
  min-height: clamp(140px, 28vw, 270px);
}

.marquee-row.skeleton-row::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  pointer-events: none;
}

.marquee-row .lazy-img-wrap {
  width: min(420px, 72vw);
  aspect-ratio: 420 / 270;
  flex-shrink: 0;
  border-radius: 1rem;
}

.marquee-row .lazy-img {
  border-radius: 1rem;
}

.project-col-left .lazy-img-wrap,
.project-col-right .lazy-img-wrap {
  width: 100%;
  border-radius: 40px;
}

.project-col-left .lazy-img-wrap:first-child {
  height: clamp(130px, 16vw, 230px);
}

.project-col-left .lazy-img-wrap:last-child {
  height: clamp(160px, 22vw, 340px);
}

.project-col-right .lazy-img-wrap {
  height: 100%;
  min-height: clamp(300px, 38vw, 580px);
}

.project-col-left .lazy-img-wrap .lazy-img,
.project-col-right .lazy-img-wrap .lazy-img {
  border-radius: inherit;
}

@media (min-width: 640px) {
  .cta-popup-card {
    max-width: 28rem;
    padding: 2.5rem 2.25rem 2.25rem;
  }

  .cta-popup-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }

  .cta-popup-primary {
    width: auto;
  }
}
