/* ===========================================
   CSS Variables - Colors & Fonts
   =========================================== */

:root {
  /* Combo 2 Palette */
  --bg-primary: #F2F1DC;
  --bg-secondary: #e8e7d0;
  --text-primary: #2E1C1A;
  --text-secondary: #5a4745;
  --accent: #488CA4;
  --accent-hover: #3a7a90;
  --cta: #EFC532;
  --cta-hover: #ddb422;
  --border: #d5d4c0;

  /* Plus Jakarta Sans */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --heading-weight: 700;
  --heading-letter-spacing: -0.02em;
}

/* ===========================================
   Reset & Base Styles
   =========================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

/* ===========================================
   Typography
   =========================================== */

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-letter-spacing);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ===========================================
   Layout
   =========================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

/* ===========================================
   Navigation
   =========================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 1rem 0;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--text-primary);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-social {
  display: flex;
  gap: 1rem;
}

.nav-social a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.nav-social a:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

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

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

.nav-cta {
  background: var(--text-primary);
  color: var(--bg-primary) !important;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
}

.nav-cta:hover {
  opacity: 0.9;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.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);
}

/* ===========================================
   Buttons
   =========================================== */

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  color: var(--bg-primary);
}

/* ===========================================
   Hero Section
   =========================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
  position: relative;
  overflow: hidden;
}

/* Background Animation */
.hero-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
}

.hero-bg-animation .hero-animation {
  width: 100%;
  height: 100%;
}

.hero-container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: 1.6rem;
  font-weight: 600;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
}

/* ===========================================
   Solutions For Section
   =========================================== */

.solutions {
  background: var(--bg-primary);
  padding: 5rem 0;
}

.solutions h2 {
  margin-bottom: 3rem;
}

/* Three-column grid: problems | steps | solution */
.solutions-layout {
  position: relative;
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  min-height: 360px;
}

/* SVG connector overlay */
.diagram-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* Left column: problem cards */
.problems-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 2;
}

.problem-item {
  padding: 1.1rem 1.4rem;
  min-height: 5.2rem;
  display: flex;
  align-items: center;
  background: var(--text-primary);
  color: var(--bg-primary);
  cursor: pointer;
  border-radius: 12px;
  transition: box-shadow 0.25s ease;
}

.problem-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0;
  color: var(--bg-primary);
  font-weight: 600;
}

.problem-item.active {
  box-shadow: 0 0 0 2.5px var(--cta);
}

/* Center column: step cards */
.diagram-steps-col {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0 70px;
}

.diagram-steps {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.diagram-steps.active {
  display: flex;
}

.diagram-step {
  background: var(--cta);
  color: var(--text-primary);
  padding: 0.875rem 2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

/* Right column: solution card */
.diagram-solution-col {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

.diagram-solution {
  display: none;
  background: var(--accent);
  color: #fff;
  padding: 1rem 1.75rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.diagram-solution.active {
  display: block;
}

/* ===========================================
   Services Section
   =========================================== */

.services {
  background: var(--bg-secondary);
}

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

.service-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Desktop: card-inner is just a container */
.card-inner {
  display: contents;
}

.card-front {
  display: contents;
}

.card-back {
  display: contents;
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.service-card h3 {
  color: var(--text-primary);
}

.service-card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ===========================================
   Work / Carousel Section
   =========================================== */

.work {
  background: var(--bg-primary);
}

.carousel {
  max-width: 800px;
  margin: 0 auto;
}

.carousel-container {
  position: relative;
  min-height: 420px;
}

.project-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.project-card.active {
  opacity: 1;
  visibility: visible;
}

.project-content {
  background: var(--bg-secondary);
  padding: 3rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.project-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.project-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.project-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.project-content p:last-child {
  margin-bottom: 0;
}

.project-content strong {
  color: var(--text-primary);
}

/* Carousel Navigation */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dot:hover {
  border-color: var(--text-primary);
}

.dot.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
}

/* ===========================================
   About Section
   =========================================== */

.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}


/* ===========================================
   Contact Section
   =========================================== */

.contact {
  background: var(--text-primary);
  color: var(--bg-primary);
  text-align: center;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact h2 {
  color: var(--bg-primary);
}

.contact p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
}

.contact .btn-primary {
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 1.5rem 0;
}

.contact .btn-primary:hover {
  background: var(--bg-primary);
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(242, 241, 220, 0.6), 0 0 50px rgba(242, 241, 220, 0.4);
}

/* Contact Form */
.contact-form {
  text-align: left;
  max-width: 500px;
  margin: 2rem auto 0;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.9);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--cta);
  background: rgba(255,255,255,0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn-primary {
  width: 100%;
  margin-top: 0.5rem;
}

/* ===========================================
   Footer
   =========================================== */

.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.6);
  padding: 2rem 0;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  color: rgba(255,255,255,0.6);
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--cta);
}

/* ===========================================
   Responsive - Tablet (1024px and below)
   =========================================== */

@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .about-grid {
    grid-template-columns: 250px 1fr;
    gap: 3rem;
  }

  .solutions-layout {
    grid-template-columns: 200px 1fr auto;
  }

  .diagram-steps-col {
    padding: 0 40px;
  }

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

/* ===========================================
   Responsive - Mobile (768px and below)
   =========================================== */

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  section {
    padding: 4rem 0;
  }

  .container {
    padding: 0 1.25rem;
  }

  /* Mobile Navigation */
  .nav-toggle {
    display: flex;
    z-index: 102;
  }

  .nav-social {
    margin-left: auto;
    margin-right: 1rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 101;
  }

  .nav-links.active {
    right: 0;
  }

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

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

  /* Hero */
  .hero {
    padding-top: 6rem;
    min-height: auto;
    padding-bottom: 4rem;
  }

  .hero-container {
    padding: 0 0.5rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  .hero-sub {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  /* Solutions / Problems I Solve */
  .solutions {
    padding: 3rem 0;
  }

  .solutions h2 {
    margin-bottom: 1.5rem;
  }

  .solutions-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    min-height: auto;
  }

  .diagram-svg {
    display: none;
  }

  .problem-item {
    padding: 1rem 1.25rem;
  }

  .problem-item h3 {
    font-size: 1rem;
  }

  .diagram-steps-col {
    padding: 0;
  }

  .diagram-step {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .diagram-solution {
    white-space: normal;
    text-align: center;
  }

  .diagram-solution-col {
    justify-content: center;
  }

  /* Services / How I Can Help - Flip Cards */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .service-card {
    padding: 0;
    background: transparent;
    border: none;
    perspective: 1000px;
    height: 100px;
  }

  .service-card:hover {
    transform: none;
    box-shadow: none;
  }

  .card-inner {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
  }

  .service-card:hover .card-inner,
  .service-card.flipped .card-inner {
    transform: rotateY(180deg);
  }

  .card-front,
  .card-back {
    display: flex;
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    padding: 1rem;
    align-items: center;
  }

  .card-front {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    gap: 1rem;
  }

  .card-back {
    background: var(--accent);
    transform: rotateY(180deg);
    justify-content: center;
  }

  .card-back p {
    color: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
    text-align: center;
  }

  .service-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 8px;
    margin-bottom: 0;
  }

  .service-icon svg {
    width: 24px;
    height: 24px;
  }

  .service-card h3 {
    font-size: 1rem;
    margin-bottom: 0;
  }

  /* Carousel / Selected Work */
  .carousel-container {
    min-height: 500px;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-content h3 {
    font-size: 1.35rem;
  }

  .project-content p {
    font-size: 0.95rem;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    max-width: 200px;
    margin: 0 auto;
  }

  .about-content p {
    font-size: 1rem;
  }

  /* Contact */
  .contact-content {
    padding: 0 0.5rem;
  }

  .contact-form {
    margin: 1.5rem auto 0;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ===========================================
   Responsive - Small Mobile (480px and below)
   =========================================== */

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .problem-item h3 {
    font-size: 0.9rem;
  }

  .diagram-step {
    font-size: 0.8rem;
    padding: 0.625rem 1rem;
  }

  .diagram-solution {
    font-size: 0.85rem;
    padding: 0.75rem 1.25rem;
  }

  .service-card {
    height: 90px;
  }

  .card-front,
  .card-back {
    padding: 0.875rem;
  }

  .service-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .service-card h3 {
    font-size: 0.9rem;
  }

  .card-back p {
    font-size: 0.8rem;
  }

  .carousel-container {
    min-height: 580px;
  }

  .project-content {
    padding: 1.25rem;
  }

  .project-content h3 {
    font-size: 1.2rem;
  }

  .carousel-nav {
    gap: 1rem;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }
}
