/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Segoe UI", sans-serif;
  color: #0b1120; /* darker base text */
  background: #faf9f6;
  display: flex;
  flex-direction: column;
}

/* Top navigation bar */
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 12rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
}

.nav-brand {
  margin-right: auto;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #111827;
}

.nav-brand:hover {
  color: #1d4ed8;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #111827;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover {
  color: #000000;
  border-bottom-color: #9ca3af;
}

/* Main content: two-column hero */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 980px;
  width: 100%;
}

.hero-left {
  flex: 1.1;
  max-width: 540px;
}

.hero-right {
  flex: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-greeting {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #4b5563;
  margin-bottom: 1rem;
}

.hero-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #111827;
}

.hero-text + .hero-text {
  margin-top: 1.1rem;
}

.hero-photo {
  max-width: 100%;
  max-height: 360px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

/* Engineering projects layout */
.projects {
  max-width: 980px;
  width: 100%;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.projects-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.projects-intro {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 2rem;
}

/* Responsive grid of project cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.project-card-active {
  grid-column: span 2;      /* makes the clicked card wider in the grid */
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  border-color: #9ca3af;
}

.project-card-title {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.project-card-tagline {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Modal styles */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

/* Updated dialog */
.modal-dialog {
  position: relative;
  max-width: 1200px;
  width: 95%;
  max-height: 80vh;        /* limit height to 80% of viewport */
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem 2.5rem 1.75rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Make just the content scroll */
.modal-title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.modal-body {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #374151;
  margin-top: 0.5rem;
  overflow-y: auto;        /* vertical scroll if needed */
}

.modal-image {
  width: 100%;
  max-height: 260px;
  object-fit: scale-down;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.modal-image-row {
  display: flex;
  gap: 0.75rem;       /* space between the two images */
  margin-bottom: 1rem;
}

.modal-image-row .modal-image {
  width: 50%;
  max-height: 220px;
  object-fit: scale-down;
  border-radius: 0.75rem;
}

.modal-video {
  margin-top: 1.25rem;
}

.modal-video-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;  /* keep YouTube video 16:9 */
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.25);
}

.modal-video-inner iframe {
  width: 100%;
  height: 100%;
  border: 0;
}


.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

.modal-close:hover {
  color: #111827;
}

.project-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.6rem;
  margin-bottom: 0.75rem;
  display: block;
}

/* Contact page */
.contact {
  max-width: 780px;
  width: 100%;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
}

.contact-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.contact-intro {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 2rem;
}

.contact-card {
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.contact-subtitle {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.contact-text {
  font-size: 1rem;
  color: #4b5563;
}

.contact-email {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 500;
}

.contact-email:hover {
  text-decoration: underline;
}


/* Resources page */
.resources {
  max-width: 980px;
  width: 100%;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
}

.resources-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.resources-intro {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 2.25rem;
}

/* Resource groups */
.resource-group + .resource-group {
  margin-top: 2rem;
}

.resource-group-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource-item {
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.03);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.resource-item + .resource-item {
  margin-top: 0.75rem;
}

.resource-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border-color: #cbd5f5;
}

.resource-item a {
  display: inline-block;
  font-weight: 500;
  color: #1d4ed8;
  text-decoration: none;
}

.resource-item a:hover {
  text-decoration: underline;
}

.resource-description {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: #4b5563;
}

/* Creative categories page */
.creative-categories {
  max-width: 980px;
  width: 100%;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
}

.creative-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.creative-intro {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 2.25rem;
}

/* Grid similar to engineering cards */
.creative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}

/* Base tile style */
.creative-tile {
  border-radius: 0.9rem;
  border: 1px solid transparent;
  padding: 2.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease,
    background 160ms ease;
}

.creative-tile:hover,
.creative-tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  border-color: rgba(15, 23, 42, 0.12);
}

.creative-label {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0f172a;
}

/* Different colors per category */
.creative-art {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
}

.creative-music {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.creative-crafts {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
}

.creative-photo {
  background: linear-gradient(135deg, #e0f2fe, #cffafe);
}

/* ===== Creative page only ===== */

/* Animated background ONLY on creative page */
.creative-page {
  /* keep your existing font/color from body; only override background */
  background: radial-gradient(circle at 0% 0%, #f97316 0, transparent 45%),
    radial-gradient(circle at 100% 0%, #fbbf24 0, transparent 45%),
    radial-gradient(circle at 0% 100%, #22c55e 0, transparent 45%),
    radial-gradient(circle at 100% 100%, #ef4444 0, transparent 50%),
    linear-gradient(135deg, #f97316, #facc15, #22c55e, #0ea5e9, #a855f7);
  background-size: 200% 200%;
  animation: creative-bg 22s ease-in-out infinite;
}

/* Wrapper card on creative page */
.creative-page .creative-categories {
  position: relative;
  max-width: 1200px;
  width: 100%;
  margin: 3.5rem auto 4rem;
  padding: 2.5rem 2.5rem 3.25rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}


/* make inner content sit above swirls */
.creative-page .creative-categories > * {
  position: relative;
  z-index: 1;
}

/* Creative heading + intro (scoped) */
.creative-page .creative-title {
  font-size: 2.4rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.creative-page .creative-intro {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
  line-height: 1.9;
  text-align: center;
  color: #4b5563;
}

/* Grid of tiles (same structure, only scoped) */
.creative-page .creative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.75rem;
}

/* Base tile style */
.creative-page .creative-tile {
  border-radius: 1.25rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 2.3rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
  transition:
    transform 160ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 200ms ease;
  position: relative;
  overflow: hidden;
}

.creative-page .creative-tile::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.creative-page .creative-tile:hover,
.creative-page .creative-tile:focus-visible {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 0 22px 65px rgba(15, 23, 42, 0.2);
  border-color: rgba(15, 23, 42, 0.16);
}

.creative-page .creative-tile:hover::after {
  opacity: 1;
}

/* Creative label typography */
.creative-page .creative-label {
  font-family: "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #0f172a;
}

/* Category colors (Hispanic-inspired palette) */
.creative-page .creative-art {
  background: linear-gradient(135deg, #fb923c, #facc15);
}

.creative-page .creative-music {
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
}

.creative-page .creative-crafts {
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.creative-page .creative-photo {
  background: linear-gradient(135deg, #ec4899, #a855f7);
}

/* Services page */
.services {
  max-width: 980px;
  width: 100%;
  margin: 3.5rem auto 4rem;
  padding: 0 1.5rem 3rem;
}

.services-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.services-intro {
  font-size: 1.02rem;
  line-height: 1.9;
  color: #374151;
  margin-bottom: 2.25rem;
}

/* Service cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.service-card {
  background: #ffffff;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem 1.6rem;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.service-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.service-card-body {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #4b5563;
}

/* Pricing note */
.services-note {
  font-size: 0.98rem;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 2rem;
}

/* Call to action */
.services-cta {
  text-align: center;
}

.services-button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #f9fafb;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.45);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.services-button:hover,
.services-button:focus-visible {
  background: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(30, 64, 175, 0.55);
}



/* Keyframes used by creative background and orbs */
@keyframes creative-bg {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Stack columns on smaller screens */
@media (max-width: 768px) {
  main {
    padding: 2.5rem 1.25rem;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .hero-left,
  .hero-right {
    max-width: 100%;
  }
}
