/* ============================================
   PAGES - Specific styles per page
   ============================================ */

/* === HERO === */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-9) 0 var(--space-7);
  background: var(--gradient-ebony);
  color: var(--cream-light);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  will-change: transform;
  display: block;
  filter: brightness(0.85) contrast(1.1);
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg, rgba(26, 14, 9, 0.85) 0%, rgba(44, 24, 16, 0.7) 50%, rgba(122, 58, 15, 0.55) 100%);
  pointer-events: none;
}

.hero__container {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  width: 100%;
  padding: 0 var(--container-padding);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-accent);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: var(--space-5);
  animation: fadeInUp 1s var(--transition-slow) 0.2s both;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 100%);
}

.hero__eyebrow::before {
  background: linear-gradient(90deg, transparent 0%, var(--gold) 100%);
}

.hero__eyebrow::after {
  background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
}

.hero__title {
  font-size: var(--fs-3xl);
  color: var(--cream-light);
  margin-bottom: var(--space-5);
  font-weight: 700;
  line-height: 1.05;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 1s var(--transition-slow) 0.4s both;
}

.hero__title .highlight {
  color: var(--terracotta-light);
  font-style: italic;
  display: inline-block;
  text-shadow: 0 2px 16px rgba(184, 57, 30, 0.3);
}

.hero__title .cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background-color: var(--terracotta-light);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 12px rgba(184, 57, 30, 0.5);
}

.hero__subtitle {
  font-size: var(--fs-md);
  color: rgba(247, 233, 199, 0.9);
  margin-bottom: var(--space-7);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  animation: fadeInUp 1s var(--transition-slow) 0.6s both;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  animation: fadeInUp 1s var(--transition-slow) 0.8s both;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--cream-light);
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: fadeInUp 1s var(--transition-slow) 1.2s both;
  z-index: 10;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background-color: rgba(247, 233, 199, 0.4);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--gold) 0%, var(--terracotta) 100%);
  animation: scrollLine 2s ease-in-out infinite;
}

/* Hero variants */
.hero--short {
  min-height: 60vh;
}

.hero--subpage {
  min-height: 50vh;
}

/* === ABOUT SECTION === */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-9);
  align-items: center;
}

.about__image {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-lg);
}

.about__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--transition-slow);
}

.about__image:hover img {
  transform: scale(1.05);
}

.about__image::before {
  content: '';
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  border: 2px solid var(--terracotta-light);
  border-radius: var(--border-radius-md);
  z-index: 1;
  pointer-events: none;
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about__title {
  font-size: var(--fs-2xl);
  line-height: 1.15;
  margin-bottom: var(--space-3);
}

.about__text {
  font-size: var(--fs-base);
  line-height: 1.8;
  color: var(--text-secondary);
}

.about__features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.about__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--border-radius-md);
  background-color: var(--ivory-soft);
  transition: all var(--transition-base);
}

.about__feature:hover {
  background-color: var(--cream-warm);
  transform: translateX(4px);
}

.about__feature-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--gradient-terracotta);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-light);
  font-size: 1.25rem;
}

.about__feature-text {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

/* === SERVICES GRID === */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* === ABOUT VARIANTS === */
.about--image-left {
  grid-template-columns: 1fr 1.2fr;
}

.about--image-right {
  grid-template-columns: 1.2fr 1fr;
}

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

  .about,
  .about--image-left,
  .about--image-right {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .about__features {
    grid-template-columns: 1fr;
  }
}

/* === GALLERY === */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: var(--space-4);
}

.gallery__item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  cursor: pointer;
  background-color: var(--cream-warm);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-slow);
}

.gallery__item:hover {
  box-shadow: var(--shadow-xl);
  transform: scale(1.02);
  z-index: 1;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  filter: grayscale(20%);
}

.gallery__item:hover img {
  transform: scale(1.08);
  filter: grayscale(0%);
}

.gallery__item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(26, 14, 9, 0.95) 100%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-5);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gallery__item:hover .gallery__item-overlay {
  opacity: 1;
}

.gallery__item-title {
  color: var(--cream-light);
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.gallery__item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery__item:nth-child(4) {
  grid-column: span 2;
}

.gallery__item:nth-child(7) {
  grid-row: span 2;
}

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

  .gallery__item:nth-child(1),
  .gallery__item:nth-child(4) {
    grid-column: span 1;
  }

  .gallery__item:nth-child(1),
  .gallery__item:nth-child(7) {
    grid-row: span 1;
  }
}

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background-color: rgba(62, 39, 35, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.lightbox.active .lightbox__content {
  transform: scale(1);
}

.lightbox__image {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-xl);
}

.lightbox__caption {
  text-align: center;
  color: var(--cream-light);
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  margin-top: var(--space-4);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background-color: rgba(250, 243, 224, 0.1);
  color: var(--cream-light);
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(250, 243, 224, 0.2);
}

.lightbox__close {
  top: var(--space-5);
  right: var(--space-5);
  font-size: 1.5rem;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

.lightbox__nav--prev {
  left: var(--space-5);
}

.lightbox__nav--next {
  right: var(--space-5);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background-color: var(--terracotta);
  border-color: var(--terracotta);
}

/* === PROCESS TIMELINE === */
.process-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-6) 0;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 32px;
  width: 2px;
  background: linear-gradient(to bottom, var(--terracotta) 0%, var(--wood-cedar) 100%);
}

.process-step {
  position: relative;
  padding-left: 88px;
  margin-bottom: var(--space-7);
}

.process-step:last-child {
  margin-bottom: 0;
}

.process-step__number {
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  background: var(--gradient-terracotta);
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-light);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  box-shadow: var(--shadow-md);
  z-index: 1;
  transition: transform var(--transition-bounce);
}

.process-step:hover .process-step__number {
  transform: scale(1.1) rotate(-6deg);
}

.process-step__content {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border-left: 4px solid var(--terracotta);
}

.process-step:hover .process-step__content {
  box-shadow: var(--shadow-lg);
  transform: translateX(8px);
}

.process-step__title {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.process-step__text {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: 0;
}

.process-step__list {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.process-step__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.process-step__list li::before {
  content: '✓';
  color: var(--forest-green);
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .process-timeline::before {
    left: 24px;
  }

  .process-step {
    padding-left: 64px;
  }

  .process-step__number {
    width: 48px;
    height: 48px;
    font-size: var(--fs-base);
  }

  .process-step__list li {
    display: block;
    position: relative;
    padding-left: 18px;
  }

  .process-step__list li::before {
    position: absolute;
    left: 0;
    top: 0;
  }

  .process-step__list li strong {
    display: inline;
    margin-right: 4px;
  }
}

/* === MATERIALS === */
.materials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.material-card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.material-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.material-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--cream-warm);
  position: relative;
}

.material-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.material-card:hover .material-card__image img {
  transform: scale(1.08);
}

.material-card__body {
  padding: var(--space-5) var(--space-6);
}

.material-card__name {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.material-card__desc {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.material-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

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

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-7);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-info__title {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}

.contact-info__text {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  background-color: var(--ivory-soft);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-base);
  border: 1px solid var(--border-light);
}

.contact-item:hover {
  background-color: var(--white);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--terracotta);
}

.contact-item__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--gradient-terracotta);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-light);
  font-size: 1.25rem;
}

.contact-item__label {
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-1);
}

.contact-item__value {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-primary);
}

.contact-item__value a {
  color: var(--text-primary);
}

.contact-item__value a:hover {
  color: var(--terracotta);
}

.contact-form-wrapper {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-md);
}

.contact-form__title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
}

.contact-form__text {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-5);
}

@media (max-width: 968px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* === CTA SECTION === */
.cta-section {
  position: relative;
  padding: var(--space-9) 0;
  text-align: center;
  overflow: hidden;
  background: var(--gradient-ebony);
  color: var(--cream-light);
}

.cta-section__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cta-section__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  filter: brightness(0.7) contrast(1.1);
}

.cta-section__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-overlay);
}

.cta-section__container {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.cta-section__title {
  font-size: var(--fs-2xl);
  color: var(--cream-light);
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.cta-section__text {
  color: rgba(247, 233, 199, 0.85);
  font-size: var(--fs-md);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.cta-section__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* === STATS / NUMBERS === */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  padding: var(--space-7) 0;
}

.stat {
  text-align: center;
  padding: var(--space-4);
}

.stat__number {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  background: var(--gradient-terracotta);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  display: block;
  margin-bottom: var(--space-2);
  line-height: 1;
}

.stat__label {
  font-family: var(--font-accent);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* === WHATSAPP FLOATING === */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-sticky);
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-base);
  animation: pulse 2.5s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #1DA851;
  color: var(--white);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

/* === RESPONSIVE === */

/* Desktop: extra top padding on subpage heroes so the content
   clears the fixed navbar and doesn't sit flush against it.
   Mobile is fine as-is (navbar is shorter, 50vh gives enough room). */
@media (min-width: 769px) {
  .hero--subpage {
    padding-top: calc(var(--space-9) + var(--space-6));
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
    min-height: 100vh;
    padding: var(--space-8) 0 var(--space-9);
  }

  .hero__bg img {
    opacity: 0.3;
  }

  .hero__bg::after {
    background: linear-gradient(
      135deg,
      rgba(26, 14, 9, 0.92) 0%,
      rgba(44, 24, 16, 0.85) 50%,
      rgba(26, 14, 9, 0.95) 100%
    );
  }

  .hero__title {
    font-size: var(--fs-xl);
    line-height: 1.1;
  }

  .hero__subtitle {
    font-size: var(--fs-base);
    margin-bottom: var(--space-6);
  }

  .hero__cta {
    gap: var(--space-3);
  }

  .hero__cta .btn--lg {
    padding: var(--space-3) var(--space-5);
    font-size: var(--fs-sm);
    min-height: 48px;
    width: 100%;
  }

  .hero__eyebrow {
    font-size: var(--fs-xs);
    letter-spacing: 0.2em;
    margin-bottom: var(--space-3);
  }

  .hero__eyebrow::before,
  .hero__eyebrow::after {
    width: 20px;
  }

  .hero__scroll {
    bottom: var(--space-4);
    font-size: 0.65rem;
  }

  .hero__scroll-line {
    height: 28px;
  }

  .about__image {
    aspect-ratio: 4 / 3;
  }

  .service-card {
    min-height: 320px;
  }

  .contact-form-wrapper {
    padding: var(--space-5);
  }

  .cta-section__buttons {
    flex-direction: column;
    width: 100%;
  }

  .cta-section__buttons .btn {
    width: 100%;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: var(--fs-lg);
  }

  .hero__title .cursor {
    height: 0.85em;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .stat__number {
    font-size: var(--fs-xl);
  }

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .gallery__item:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .section__title {
    font-size: var(--fs-lg);
  }

  .btn--lg {
    padding: var(--space-3) var(--space-5);
    font-size: var(--fs-sm);
    min-height: 48px;
  }
}
