:root {
  --bg: #8c4d14;
  --bg-deep: #6c390f;
  --text: #fff7ee;
  --muted: #ead9c9;
  --accent: #f07c2c;
  --accent-700: #d7691e;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  transition: transform 0.3s ease, background 0.3s ease;
}

.navbar__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar__logo {
  height: 36px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar__logo:hover {
  transform: scale(1.05);
}

.navbar__menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 32px;
}

.navbar__item {
  margin: 0;
}

.navbar__link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
}

.navbar__link:hover {
  background: rgba(240, 124, 44, 0.15);
  color: var(--accent);
}

.navbar__link.active {
  color: var(--accent);
}

.navbar__link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Mobile Toggle Button */
.navbar__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.navbar__toggle-bar {
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(2) {
  opacity: 0;
}

.navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu */
@media (max-width: 959px) {
  .navbar__menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: rgba(108, 57, 15, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 24px;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  .navbar__menu.is-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .navbar__link {
    display: block;
    padding: 12px 16px;
    font-size: 18px;
  }
}

/* Desktop Menu */
@media (min-width: 960px) {
  .navbar__toggle {
    display: none;
  }

  .navbar__menu {
    display: flex;
  }
}

/* Sections */
.section {
  padding: 80px 20px;
  background: var(--bg);
}

.section--programs {
  background: transparent;
}

.section--merchandise {
  background: transparent;
}

/* Page sections (for dedicated pages) */
.page-section {
  position: relative;
  min-height: 100vh;
  padding-top: 140px;
  overflow: hidden;
}

.page-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.7);
  z-index: 0;
}

.section__container {
  max-width: 1280px;
  margin: 0 auto;
}

.section__title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  text-align: center;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section__subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  text-align: center;
  color: var(--muted);
  margin: 0 auto 48px;
  max-width: 60ch;
}

/* Programs Grid */
.programs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 48px;
}

.program-card {
  background: rgba(255, 247, 238, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(240, 124, 44, 0.2);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #ff9d5c 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.program-card:hover::before {
  transform: scaleX(1);
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

.program-card__icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.program-card:hover .program-card__icon {
  transform: scale(1.15) rotate(5deg);
}

.program-card__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}

.program-card__description {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 20px;
}

.program-card__btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 0 var(--accent-700);
}

.program-card__btn:hover {
  transform: translateY(-2px);
  background: #ff8c3a;
  box-shadow: 0 6px 0 var(--accent-700);
}

.program-card__btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--accent-700);
}

/* Merchandise Grid */
.merch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  justify-items: center;
}

.merch-card {
  background: rgba(255, 247, 238, 0.06);
  border: 1px solid rgba(240, 124, 44, 0.15);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 320px;
  margin: 0 auto;
}

.merch-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.merch-card__image-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(240, 124, 44, 0.15) 0%, rgba(108, 57, 15, 0.3) 100%);
}

/* Smaller variant for merchandise page */
.merch-card__image-wrap--small {
  aspect-ratio: 1 / 1;
}

.merch-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: transform 0.3s ease;
}

.merch-card:hover .merch-card__placeholder {
  transform: scale(1.05);
}

.merch-card__placeholder-icon {
  font-size: 80px;
  opacity: 0.7;
}

/* Smaller icon for small variant */
.merch-card__image-wrap--small .merch-card__placeholder-icon {
  font-size: 60px;
}

.merch-card__placeholder-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.8;
}

.merch-card__content {
  padding: 12px 16px;
}

.merch-card__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.merch-card__description {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 6px;
}

.merch-card__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 10px;
}

.merch-card__btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 0 var(--accent-700);
  width: 100%;
  text-align: center;
}

.merch-card__btn:hover {
  transform: translateY(-2px);
  background: #ff8c3a;
  box-shadow: 0 6px 0 var(--accent-700);
}

.merch-card__btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--accent-700);
}

/* Image Switching Styles */
.merch-card__image-container {
  position: relative;
}

.merch-card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.merch-card__img.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* Merchandise Navigation Arrows */
.merch-card__nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
  z-index: 10;
}

.merch-card__arrow {
  background: rgba(140, 77, 20, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
  padding: 0;
}

.merch-card__arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.merch-card__arrow svg {
  width: 18px;
  height: 18px;
}

.merch-card__arrow--prev svg {
  margin-right: 1px;
}

.merch-card__arrow--next svg {
  margin-left: 1px;
}

/* Responsive Grids */
@media (min-width: 768px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .merch-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .merch-card {
    max-width: none;
  }
}

@media (min-width: 960px) {
  .programs-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .merch-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 100px 40px;
  }
}

.hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.7);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 24px;
  padding: 96px 20px 40px;
}

.hero__figure-wrap {
  display: flex;
  justify-content: center;
}

.hero__figure {
  width: 66%;
  max-width: 298px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

/* Character idle bob (gated by reduced-motion below) */
.hero__figure {
  animation: heroBob 7.5s ease-in-out infinite;
  transform-origin: 50% 90%;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), filter .5s ease;
}

.hero__figure-wrap:hover .hero__figure {
  animation-play-state: paused;
}

/* Subtle interactive hover: slight lift/tilt/scale with shadow bump */
.hero__figure-wrap:hover .hero__figure {
  transform: translateY(-6px) rotate(-0.8deg) scale(1.015);
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.55));
}

@keyframes heroBob {

  0%,
  100% {
    transform: translateY(0);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
  }

  50% {
    transform: translateY(-6px);
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.5));
  }
}

.hero__text {
  text-align: center;
}

.hero__title {
  margin: 0 0 12px;
  line-height: 0.98;
  font-weight: 900;
  font-size: clamp(30px, 9vw, 70px);
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin: 0 auto 24px;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(16px, 2.6vw, 22px);
}

/* Reveal animation base */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1);
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .06s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 0 var(--accent-700);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--accent-700);
}

.btn.btn--secondary {
  background: transparent;
  outline: 2px solid var(--accent);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
}

.btn.btn--secondary:hover {
  background: rgba(240, 124, 44, 0.1);
}

/* Consultations attention pulse + shimmer */
.btn.btn--consult {
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 0 var(--accent-700), 0 0 0 rgba(240, 124, 44, 0);
}

.btn.btn--consult::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .25) 50%, transparent 100%);
  transform: translateX(-120%);
}

.btn.btn--consult {
  animation: consultPulse 10s ease-in-out infinite;
}

.btn.btn--consult:hover::after {
  animation: none;
}

@keyframes consultPulse {

  0%,
  88%,
  100% {
    box-shadow: 0 6px 0 var(--accent-700), 0 0 0 rgba(240, 124, 44, 0);
  }

  92% {
    box-shadow: 0 6px 0 var(--accent-700), 0 0 22px rgba(240, 124, 44, .55);
  }

  96% {
    box-shadow: 0 6px 0 var(--accent-700), 0 0 0 rgba(240, 124, 44, 0);
  }
}

/* Ripple effect helper */
.ripple {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(255, 255, 255, .6);
  width: 12px;
  height: 12px;
  filter: blur(0.5px);
  animation: ripple .6s ease-out forwards;
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(18);
    opacity: 0;
  }
}

.hero__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
}

.hero__brand {
  opacity: 0.95;
  font-weight: 600;
}

.social {
  width: 28px;
  height: 28px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25));
}

.social--fb {
  background-image: url('../assets/icons/facebook.svg');
}

.social--ig {
  background-image: url('../assets/icons/instagram.svg');
}

.social--tt {
  background-image: url('../assets/icons/tiktok.svg');
}

.social--wa {
  background-image: url('../assets/icons/whatsapp.svg');
}

/* Parallax targets will use will-change to hint GPU */
.hero__figure,
.hero__text {
  will-change: transform;
}

@media (min-width: 960px) {
  .hero__content {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 72px 72px 48px;
    max-width: 1280px;
    margin: 0 auto;
  }

  .hero__figure {
    width: 80%;
    max-width: 498px;
  }

  .hero__text {
    text-align: left;
  }

  .hero__subtitle {
    margin-left: 0;
  }

  .hero__cta {
    justify-content: flex-start;
  }

  .hero__social {
    justify-content: flex-start;
  }
}

/* Respect prefers-reduced-motion: disable non-essential motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__figure {
    animation: none;
  }

  .hero__figure-wrap:hover .hero__figure {
    transform: none;
  }
}

/* Modal styles */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
}

.modal.is-open {
  display: block;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(2px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 94vw);
  height: min(580px, 88vh);
  margin: 6vh auto 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  overflow: hidden;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: .85;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, .85);
}

.modal__frame-wrap {
  height: 100%;
}

.modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

body.modal-open {
  overflow: hidden;
}