/* ============================================
   Code Singers — Portfolio Website
   style.css
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #1f4f95;
  --primary-dark: #173a70;
  --primary-light: #4b79c2;
  --secondary: #2f67bd;
  --accent: #8cb4f2;
  --gradient: linear-gradient(135deg, #173a70 0%, #1f4f95 55%, #2f67bd 100%);
  --gradient-text: linear-gradient(135deg, #8cb4f2, #1f4f95 55%, #2f67bd);

  --bg: #090b10;
  --bg-card: #0f141d;
  --bg-card-hover: #141b26;
  --bg-section: #0c1018;

  --text: #f3f7ff;
  --text-muted: #97a6bd;
  --text-light: #d2dceb;

  --border: rgba(220, 232, 255, 0.12);
  --border-hover: rgba(31, 79, 149, 0.45);

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(31, 79, 149, 0.28);

  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;

  --nav-height: 70px;
  --transition: 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 10%, rgba(31, 79, 149, 0.2), transparent 42%),
    radial-gradient(circle at 90% 15%, rgba(140, 180, 242, 0.12), transparent 38%);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

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

/* ---------- Utilities ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(31, 79, 149, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(31, 79, 149, 0.48);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border-hover);
}

.btn-secondary:hover {
  background: rgba(31, 79, 149, 0.12);
  border-color: var(--primary);
  color: var(--primary-light);
}

/* ---------- Section Headers ---------- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header.reveal-visible .section-title {
  animation: titleSweep 0.8s ease both;
}

@keyframes titleSweep {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.section-badge {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(31, 79, 149, 0.15);
  border: 1px solid rgba(31, 79, 149, 0.35);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(8, 12, 20, 0.62);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(8, 12, 20, 0.95);
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-img-circle {
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(31, 79, 149, 0.55);
  padding: 3px;
  box-shadow: 0 3px 10px rgba(31, 79, 149, 0.18);
  animation: logoPulse 3.4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%,
  100% {
    box-shadow: 0 3px 10px rgba(31, 79, 149, 0.18);
  }
  50% {
    box-shadow: 0 6px 18px rgba(31, 79, 149, 0.3);
  }
}

.logo-text .accent {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.btn-nav {
  padding: 10px 24px !important;
  background: var(--gradient);
  color: #fff !important;
  border-radius: 50px;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(31, 79, 149, 0.38);
}

.btn-nav:hover {
  box-shadow: 0 6px 20px rgba(31, 79, 149, 0.5) !important;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 60px) 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: var(--primary);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: #173a70;
  bottom: -100px;
  right: -100px;
  animation-delay: 3s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: #8cb4f2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 6s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}

.blob-3 {
  animation: blobFloat3 8s ease-in-out infinite;
  animation-delay: 6s;
}

@keyframes blobFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  33% { transform: translate(calc(-50% + 20px), calc(-50% - 20px)) scale(1.05); }
  66% { transform: translate(calc(-50% - 15px), calc(-50% + 15px)) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-content > * {
  opacity: 0;
  transform: translateY(18px);
  animation: heroReveal 0.85s ease forwards;
}

.hero-content > *:nth-child(1) {
  animation-delay: 0.1s;
}

.hero-content > *:nth-child(2) {
  animation-delay: 0.25s;
}

.hero-content > *:nth-child(3) {
  animation-delay: 0.4s;
}

.hero-content > *:nth-child(4) {
  animation-delay: 0.55s;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(31, 79, 149, 0.15);
  border: 1px solid rgba(31, 79, 149, 0.35);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- About ---------- */
.about {
  padding: 100px 0;
  background: var(--bg-section);
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--transition);
}

.about-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.about-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Products ---------- */
.products {
  padding: 100px 0;
  background: var(--bg);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: all var(--transition);
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(31, 79, 149, 0.22);
}

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 4px 14px;
  background: rgba(31, 79, 149, 0.2);
  border: 1px solid rgba(31, 79, 149, 0.45);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-visual {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.trip-visual {
  background: linear-gradient(135deg, #0c1f3a 0%, #1f4f95 100%);
}

.valentine-visual {
  background: linear-gradient(135deg, #132a4d 0%, #2f67bd 100%);
}

.product-icon-wrap {
  font-size: 5rem;
  z-index: 1;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
  animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.product-dots {
  position: absolute;
  bottom: 20px;
  display: flex;
  gap: 8px;
}

.product-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.product-body {
  padding: 28px;
}

.product-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}

.product-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.product-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.product-features .fa-check {
  color: var(--primary-light);
  font-size: 0.8rem;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(31, 79, 149, 0.12);
  border: 1px solid rgba(31, 79, 149, 0.35);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-light);
  transition: all var(--transition);
}

.product-link:hover {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  transform: translateX(4px);
}

.product-link .fa-arrow-right {
  transition: transform var(--transition);
}

.product-link:hover .fa-arrow-right {
  transform: translateX(4px);
}

/* ---------- Services ---------- */
.services {
  padding: 100px 0;
  background: var(--bg-section);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.service-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all var(--transition);
}

.service-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.service-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.service-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.services-cta {
  text-align: center;
}

.services-cta p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 500;
}

/* ---------- Contact ---------- */
.contact {
  padding: 100px 0;
  background: var(--bg);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
}

.contact-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
}

.contact-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text);
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-detail .fa {
  width: 40px;
  height: 40px;
  background: rgba(31, 79, 149, 0.16);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-detail > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-detail a {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  word-break: break-all;
}

.contact-detail a:hover {
  color: var(--primary-light);
}

.contact-tagline {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.contact-tagline p {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

/* ---------- Contact Form ---------- */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
}

.form-group label span {
  color: var(--primary-light);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: rgba(31, 79, 149, 0.08);
  box-shadow: 0 0 0 3px rgba(31, 79, 149, 0.16);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--primary-light);
}

.field-error {
  font-size: 0.8rem;
  color: var(--primary-light);
  display: none;
}

.field-error.visible {
  display: block;
}

.btn-submit {
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 16px;
  margin-top: 4px;
}

.form-status {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  display: none;
  text-align: center;
}

.form-status.success {
  display: block;
  background: rgba(31, 79, 149, 0.1);
  border: 1px solid rgba(31, 79, 149, 0.35);
  color: var(--accent);
}

.form-status.error {
  display: block;
  background: rgba(31, 79, 149, 0.1);
  border: 1px solid rgba(31, 79, 149, 0.3);
  color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-section);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  line-height: 1.7;
  max-width: 260px;
}

.footer-links-group h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links-group ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-group a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
  word-break: break-all;
}

.footer-links-group a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-blob,
  .product-icon-wrap,
  .scroll-arrow,
  .logo-img-circle,
  .hero-content > * {
    animation: none !important;
  }

  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(8, 12, 20, 0.98);
    padding: 24px;
    flex-direction: column;
    gap: 24px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 28px 20px;
  }

  .contact-info {
    padding: 28px 20px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    justify-content: center;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}
