/* ==========================================================================
   Festivida — static site styles
   ========================================================================== */

:root {
  --slate-300: #cbd5e1;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-500: #3b82f6;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --navy: #000984;
  --sky: #31acff;
  --text: #374151;
  --muted: #4b5563;
  --white: #ffffff;

  --band: linear-gradient(to bottom, var(--slate-300), var(--blue-200));
  --btn: linear-gradient(to bottom, #252966, #009dff);

  --container: 1280px;
  --header-h: 84px;
  --radius: 8px;
  --shadow: 0 10px 15px -3px rgba(100, 116, 139, 0.5), 0 4px 6px -4px rgba(100, 116, 139, 0.5);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--blue-800);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

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

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--blue-500);
}

.lead {
  font-size: 1.25rem;
}

.justify {
  text-align: justify;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--blue-800);
  color: var(--white);
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 0;
  border-radius: 6px;
  background: var(--btn);
  color: var(--white);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.75;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.btn-light {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--slate-300), var(--blue-300));
  color: var(--blue-800);
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}

.btn-light:hover {
  background: linear-gradient(to bottom, var(--blue-500), #fde68a);
  color: #374151;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--band);
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1440px;
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 112px);
}

.nav-logo img {
  width: clamp(200px, 20vw, 260px);
  height: auto;
  max-height: calc(var(--header-h) - 12px);
  object-fit: contain;
  transition: opacity 0.2s;
}

.nav-logo:hover img {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  padding: 4px 13px;
  border-radius: 25px;
  color: var(--navy);
  font-weight: 600;
  transition: background 0.2s;
}

.nav-link:hover {
  background: #8dd1ff;
}

.nav-link[aria-current="page"] {
  background: linear-gradient(#4366f5, #353965);
  color: var(--white);
  box-shadow: 0 3px 2px #000;
}

.nav-cta {
  margin-left: clamp(0px, 3vw, 48px);
}

.social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social a {
  display: block;
  transition: opacity 0.2s;
}

.social a:hover {
  opacity: 0.6;
}

.social svg {
  width: 38px;
  height: 38px;
}

.menu-toggle {
  display: none;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.menu-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

/* Mobile drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: min(280px, 85vw);
  padding: 24px 16px;
  background: linear-gradient(to bottom, var(--slate-300), var(--blue-300));
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.25);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}

.drawer img {
  width: 180px;
}

.drawer ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.drawer-open {
  overflow: hidden;
}

body.drawer-open .drawer {
  transform: none;
}

body.drawer-open .drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1100px) {
  .nav-cta {
    margin-left: 0;
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 76px;
  }

  .nav-links,
  .nav > .social {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-logo img {
    width: 210px;
  }
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

main {
  padding-top: var(--header-h);
}

.section {
  padding-block: 56px;
}

.band {
  padding: 24px 16px;
  background: var(--band);
  text-align: center;
}

.band p {
  max-width: 900px;
  margin: 16px auto 0;
  font-size: 1.25rem;
}

.page-intro {
  padding-top: 72px;
  padding-bottom: 32px;
  text-align: center;
}

.page-intro h1 {
  margin-bottom: 32px;
}

.page-intro p {
  max-width: 1100px;
  margin-inline: auto;
  font-size: 1.25rem;
  text-align: justify;
}

/* --------------------------------------------------------------------------
   Home: hero + carousel
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 2fr 4fr;
  align-items: center;
  gap: 40px;
  padding-top: 72px;
  padding-bottom: 24px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  color: var(--blue-900);
  text-transform: uppercase;
}

.hero-copy p {
  font-size: 1.25rem;
  text-align: justify;
}

.carousel {
  position: relative;
  aspect-ratio: 965 / 520;
  width: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 8px -7px 14px -3px rgba(0, 0, 0, 0.53);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.carousel-dots button[aria-current="true"] {
  background: var(--white);
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
  }
}

/* --------------------------------------------------------------------------
   Partners marquee
   -------------------------------------------------------------------------- */

.marquee {
  margin-top: 40px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track img {
  height: 70px;
  width: auto;
  margin-inline: 24px;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.08));
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .marquee-track img {
    height: 44px;
  }
}

/* --------------------------------------------------------------------------
   Home: service tiles
   -------------------------------------------------------------------------- */

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

.tile {
  position: relative;
  display: grid;
  place-items: center;
  height: 350px;
  overflow: hidden;
  isolation: isolate;
}

.tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.3s;
}

.tile:hover img {
  transform: scale(1.06);
}

.tile:hover::after {
  background: rgba(0, 0, 0, 0.5);
}

.tile-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}

.tile-body h3 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

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

  .tile {
    height: 280px;
  }
}

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  max-width: 824px;
  margin: 0 auto;
}

.contact-form .full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-800);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 12px;
  border: 1px solid var(--blue-300);
  border-radius: 4px;
  background: var(--blue-100);
  color: #111827;
  font: inherit;
  font-size: 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9ca3af;
}

.field input:focus,
.field textarea:focus {
  border-color: #4338ca;
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.2);
}

.field textarea {
  height: 144px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.form-status {
  min-height: 1.5em;
  font-weight: 500;
  text-align: center;
}

.form-status.is-success {
  color: #15803d;
}

.form-status.is-error {
  color: #b91c1c;
}

@media (max-width: 640px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Location
   -------------------------------------------------------------------------- */

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.map {
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 360px;
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.info-list {
  margin: 0;
}

.info-list div {
  padding: 16px 24px;
}

.info-list div + div {
  border-top: 1px solid #e5e7eb;
}

.info-list dt {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--blue-800);
}

.info-list dd {
  margin: 4px 0 0 8px;
  font-size: 1.125rem;
  color: var(--blue-800);
}

.info-list a:hover {
  text-decoration: underline;
}

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

/* --------------------------------------------------------------------------
   Services page
   -------------------------------------------------------------------------- */

.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding-block: 40px;
}

.service h2 {
  margin-bottom: 20px;
}

.service p {
  font-size: 1.25rem;
  text-align: justify;
}

.service img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 4px;
}

.service:nth-of-type(even) .service-media {
  order: -1;
}

@media (max-width: 768px) {
  .service {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 24px;
  }

  .service:nth-of-type(even) .service-media {
    order: 0;
  }

  .service p {
    font-size: 1.125rem;
  }

  .service img {
    height: auto;
    aspect-ratio: 3 / 2;
  }
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */

.card {
  padding: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.card h2 {
  margin-bottom: 16px;
}

.card p {
  font-size: 1.25rem;
  text-align: justify;
}

.card img {
  width: 100%;
  margin-top: 16px;
  object-fit: cover;
}

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 56px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.mv-grid .card {
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

.mv-grid .card p {
  flex: 1;
}

.mv-grid img {
  height: 400px;
}

.promise img {
  height: 600px;
}

.why-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0 0 0 20px;
  list-style: none;
}

.why-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.why-list svg {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 4px;
  color: var(--muted);
}

.why-list h3 {
  margin-bottom: 2px;
}

.team {
  padding-block: 64px 96px;
  background: #f9fafb;
  text-align: center;
}

.team .lead {
  margin-top: 20px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px 24px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}

.team-grid img {
  width: 150px;
  height: 150px;
  margin-inline: auto;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}

.team-name {
  margin-top: 24px;
  font-size: 1.125rem;
  font-weight: 600;
  color: #000;
  line-height: 1.25;
}

.team-role {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .promise img {
    height: 400px;
  }

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

  .team-grid img {
    width: 130px;
    height: 130px;
  }
}

/* --------------------------------------------------------------------------
   Portfolio gallery + lightbox
   -------------------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery li {
  overflow: hidden;
  border-radius: var(--radius);
}

.gallery .wide {
  grid-column: span 2;
}

.gallery .tall {
  grid-row: span 2;
}

.gallery .big {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-in-out;
}

.gallery button:hover img,
.gallery button:focus-visible img {
  transform: scale(1.15);
}

@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 10px;
  }

  .gallery .big {
    grid-column: span 2;
  }
}

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.instagram-cta {
  padding-block: 56px;
  text-align: center;
}

.instagram-cta a {
  display: inline-block;
  margin-top: 20px;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 300;
  font-style: italic;
  transition: color 0.2s;
}

.instagram-cta a:hover {
  color: var(--blue-500);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: 16px 16px 8px;
  background: var(--band);
  box-shadow: 0 -20px 40px -12px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.site-footer .footer-logo {
  width: 260px;
  margin: 8px auto 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 40px;
  margin: 32px 0 20px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--muted);
}

.footer-links a:hover {
  color: #6b7280;
  text-decoration: underline;
}

.site-footer .social {
  justify-content: center;
}

.site-footer .social svg {
  width: 36px;
  height: 36px;
}

.copyright {
  margin: 24px 0 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Scroll-to-top
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 40;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sky);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  animation: bounce 1s infinite;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.to-top svg {
  width: 55px;
  height: 55px;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* --------------------------------------------------------------------------
   Scroll-reveal animations (replaces AOS)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.js [data-reveal="up"] {
  transform: translateY(40px);
}

.js [data-reveal="down"] {
  transform: translateY(-40px);
}

.js [data-reveal="left"] {
  transform: translateX(60px);
}

.js [data-reveal="right"] {
  transform: translateX(-60px);
}

.js [data-reveal="zoom"] {
  transform: scale(0.88);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
