/* ===== Variables ===== */
:root {
  --color-primary: #0d9488;
  --color-primary-light: #14b8a6;
  --color-primary-dark: #0f766e;
  --color-accent: #f59e0b;
  --color-bg-dark: #0a1628;
  --color-bg-darker: #060d18;
  --color-bg-light: #f8fafc;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-white: #ffffff;
  --gradient-hero: linear-gradient(135deg, #0a1628 0%, #0f2942 40%, #0d3d4a 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
  --container: 1200px;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--color-white);
}

.logo-text {
  font-size: 1.05rem;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary-light);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(20, 184, 166, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(13, 148, 136, 0.15), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(245, 158, 11, 0.08), transparent);
}

.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: calc(var(--header-height) + 40px) 24px 80px;
}

.hero-welcome {
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.15s forwards;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-light);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.45s forwards;
}

.tag {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--color-white);
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.4);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(13, 148, 136, 0.5);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-light);
  font-size: 0.8rem;
}

.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--color-primary-light);
  border-radius: 2px;
  animation: scrollBounce 2s infinite;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header.light .section-title,
.section-header.light .section-desc {
  color: var(--color-white);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

/* ===== About ===== */
.about {
  background: var(--color-bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text h3 {
  font-size: 1.35rem;
  margin-bottom: 20px;
  color: var(--color-primary-dark);
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  text-align: justify;
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-card {
  padding: 28px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--color-primary);
  transition: transform var(--transition);
}

.about-card:hover {
  transform: translateX(8px);
}

.about-card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.about-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.about-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ===== Services ===== */
.services {
  background: var(--gradient-hero);
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.services .container {
  position: relative;
  z-index: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(20, 184, 166, 0.4);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.service-card h3 {
  color: var(--color-white);
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== Process ===== */
.process {
  background: var(--color-bg-light);
}

.process-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  position: relative;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  z-index: 0;
}

.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 12px;
}

.step-num {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: var(--color-white);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.process-step h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== Projects ===== */
.projects {
  background: var(--color-bg-darker);
}

.projects-note {
  text-align: center;
  color: var(--color-text-light);
  margin-top: 32px;
  font-size: 0.95rem;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.project-cover {
  min-height: 280px;
  background: linear-gradient(145deg, #0f2942, #0d3d4a);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.2) 0%, transparent 50%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 20px,
      rgba(255, 255, 255, 0.02) 20px,
      rgba(255, 255, 255, 0.02) 40px
    );
}

.project-placeholder span {
  padding: 12px 28px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
}

.project-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(13, 148, 136, 0.3);
  color: var(--color-primary-light);
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  width: fit-content;
}

.project-info h3 {
  color: var(--color-white);
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.project-info > p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tags span {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--color-text-light);
  font-size: 0.8rem;
}

/* ===== Contact ===== */
.contact {
  background: var(--gradient-hero);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-card {
  text-align: center;
  padding: 40px 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: transform var(--transition), background var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.contact-card h4 {
  color: var(--color-white);
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.contact-card p,
.contact-card a {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.contact-card a:hover {
  color: var(--color-primary-light);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-bg-darker);
  padding: 40px 0;
  text-align: center;
}

.footer-brand {
  color: var(--color-white);
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-copy,
.footer-icp {
  color: var(--color-text-light);
  font-size: 0.85rem;
  margin-top: 4px;
}

.footer-icp a:hover {
  color: var(--color-primary-light);
}

/* ===== Scroll animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .process-timeline::before {
    display: none;
  }

  .project-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 22, 40, 0.98);
    padding: 24px;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .process-timeline {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 70px 0;
  }
}
