:root {
  --bg: #f5f9ff;
  --blue-900: #04284a;
  --blue-700: #0b63a8;
  --blue-500: #2ea0ff;
  --cyan-400: #7fe0ff;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.06);
  --shadow: 0 10px 30px rgba(4, 40, 74, 0.12);
  --radius: 14px;
  font-family: "IBM Plex Sans Thai", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #e9f4ff 60%);
  color: var(--blue-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  line-height: 1.45;
  font-size: 16px;
  filter: grayscale(70%);
            -webkit-filter: grayscale(70%);
}

.container {
  max-width: 1305px;
  margin: 0 auto;
  padding: 32px;
}

/* Header */
header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 80px;
  height: 70px;
  border-radius: 11px;
  /* background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); */
  display: grid;
  place-items: center;
  /* color: white; */
  font-weight: 800;
  /* box-shadow: var(--shadow) */
}

nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

nav a {
  color: var(--blue-900);
  text-decoration: none;
  font-weight: 600;
}

.cta {
  background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(46, 160, 255, 0.18);
  display: inline-block;
  transition: all 0.3s ease;
}

/* เอฟเฟกต์เมื่อ hover */
.cta:hover {
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  transform: translateY(-3px); /* ลอยขึ้นเบา ๆ */
  box-shadow: 0 10px 25px rgba(46, 160, 255, 0.35);
  color: linear-gradient(90deg, var(--blue-500), var(--blue-400));
}

/* Banner */
.banner {
  position: relative;
  width: 100%;
  height: 300px;
  background: url("https://images.unsplash.com/photo-1527443224154-c4a14f0547d4?auto=format&fit=crop&w=1400&q=60")
    center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 40, 74, 0.45);
}

.banner-content {
  position: relative;
  z-index: 1;
}

.banner-content h1 {
  font-size: 2.8rem;
  margin: 0;
  font-weight: 800;
}

.banner-content p {
  margin-top: 8px;
  font-size: 1.2rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 36px;
  align-items: center;
  padding: 28px 0;
}

.hero-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.75)
  );
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

h2 {
  font-size: 1.8rem;
  margin-top: 0;
}

p.lead {
  margin: 0 0 18px;
  color: #214764;
}

.features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(11, 99, 168, 0.09);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--blue-700);
}

/* Right side hero card */
.stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    rgba(46, 160, 255, 0.07),
    rgba(127, 224, 255, 0.03)
  );
}

.stat strong {
  font-size: 1.1rem;
}

/* Services */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 28px 0;
}

.card {
  background: var(--white);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(2, 40, 60, 0.06);
  border: 1px solid rgba(2, 40, 60, 0.03);
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: #446279;
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.portfolio-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(4, 40, 74, 0.15);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.portfolio-item:hover img {
  transform: scale(1.08);
}

.portfolio-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px;
  background: rgba(4, 40, 74, 0.55);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

/* CTA strip */
.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
  color: white;
  margin-top: 18px;
}

/* About + Contact */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input,
textarea {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(2, 40, 60, 0.08);
  font-size: 0.95rem;
}

button.primary {
  background: linear-gradient(90deg, var(--cyan-400), var(--blue-500));
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
}

/* Footer */
footer {
  margin-top: 36px;
  padding: 28px 0;
  color: #274a62;
}

.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 20px;
  }

  header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .logo {
    width: 60px;
    height: 50px;
    border-radius: 11px;
    /* background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); */
    display: grid;
    place-items: center;
    /* color: white; */
    font-weight: 800;
    /* box-shadow: var(--shadow) */
  }

  nav {
    display: flex;
    gap: 18px;
    align-items: center;
  }

  nav a {
    color: var(--blue-900);
    text-decoration: none;
    font-weight: 600;
  }

  .cta i:hover {
    background: linear-gradient(90deg, var(--blue-700), var(--blue-500));
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(46, 160, 255, 0.18);
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .nav-hidden {
    display: none;
  }

  .logo {
    width: 44px;
    height: 44px;
  }
}

.kicker {
  font-size: 1.5rem;
  color: var(--blue-700);
  font-weight: 700;
}

.muted {
  color: #5b7b8f;
}

.bg-shape {
  position: absolute;
  right: -120px;
  top: -40px;
  width: 100px;
  height: 520px;
  border-radius: 80px;
  background: linear-gradient(135deg, var(--blue-500), var(--cyan-400));
  filter: blur(60px);
  opacity: 0.22;
  transform: rotate(18deg);
  pointer-events: none;
}
.btn-open {
  background: linear-gradient(90deg, #007bff, #00bfff);
  color: white;
  border: none;
  padding: 12px 22px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 123, 255, 0.4);
}

/* ---------------- Popup ---------------- */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
  z-index: 999;
}

.popup-content {
  background: white;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.popup h2 {
  color: #007bff;
  margin-top: 0;
}

.popup p {
  color: #333;
  margin-bottom: 20px;
}

.btn-close {
  background: #000000;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-close:hover {
  background: #4c4c4d;
}
