/* =============================================
   ENVISION — Section-Specific Styles
   Hero, about, artists, gallery, process, contact.
   ============================================= */

/* ---- Hero Section ---- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-ink);
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(1, 39, 40, 0.85);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero__inner {
  max-width: 760px;
  margin-inline: auto;
}

.hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 var(--space-4);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1.05;
  color: var(--color-text-on-dark);
  margin: 0 0 var(--space-5);
  font-weight: 700;
  text-shadow: 0 2px 40px rgba(1, 39, 40, 0.5);
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 auto var(--space-8);
  max-width: 600px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

/* Video background container (Phase 5) */
.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Hide hero video for reduced-motion users — poster fallback shows instead */
@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }
  .hero {
    background-image: url('/assets/images/meta/hero-poster.jpg');
    background-size: cover;
    background-position: center;
  }
}

/* Scroll indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero__scroll-arrow {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-text-on-dark-secondary);
  border-bottom: 2px solid var(--color-text-on-dark-secondary);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.4; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}

/* Mobile hero height */
@media (max-width: 767px) {
  .hero {
    min-height: 80vh;
  }
  .hero__cta .btn--lg {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
  }
}

/* ---- About Section ---- */

.about__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
}

.about__text h2 {
  margin-bottom: var(--space-4);
}

.about__text h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background-color: var(--color-gold);
  margin-bottom: var(--space-4);
}

.about__text .btn {
  margin-top: var(--space-4);
  align-self: flex-start;
}

.about__image {
  display: flex;
  align-items: center;
}

.about__image-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* Mobile: reverse about grid order */
@media (max-width: 767px) {
  .about__text {
    order: 2;
  }

  .about__image {
    order: 1;
  }
}

/* ---- Artists Section ---- */

.artists-layout {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1.2fr;
  column-gap: var(--space-10);
  align-items: center;
}

.artists-layout .artists-grid {
  display: contents;
}

.artists-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

@media (max-width: 767px) {
  .artists-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.artists__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
}

.artists__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin: 0;
}

.artists__intro h2 {
  margin: 0;
}

.artist-showcase {
  overflow: hidden;
}

.artist-showcase__image-wrap {
  position: relative;
  overflow: hidden;
  height: 500px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

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

.artist-showcase:hover .artist-showcase__image-wrap img {
  transform: scale(1.03);
}

.artist-showcase__overlay {
  display: none;
}

.artist-showcase__styles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.artist-showcase__styles .tag {
  background: rgba(201, 169, 110, 0.15);
  border-color: var(--color-gold);
  color: var(--color-text-on-dark);
  font-size: var(--text-xs);
}

.artist-showcase__info {
  padding-top: var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.artist-showcase .artist-showcase__info h3 {
  font-family: var(--font-heading);
  font-size: var(--text-sm) !important;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.artist-showcase__ig {
  color: var(--color-gold);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.artist-showcase__ig:hover {
  color: var(--color-gold-light);
}

.artist-showcase .btn {
  margin-top: var(--space-2);
}

@media (max-width: 767px) {
  .artists-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }
}

/* ---- Featured Gallery ---- */

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Featured gallery grid — uniform sizing, full-width */
.featured-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 300px;
  gap: var(--space-3);
  width: 100%;
  padding-inline: var(--space-8);
  box-sizing: border-box;
}

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

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
}

/* Hover overlay */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1, 39, 40, 0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
  border-radius: 0;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Mobile: two columns */
@media (max-width: 767px) {
  .featured-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

  .gallery-item--wide,
  .gallery-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .featured-gallery .gallery-item:last-child:nth-child(odd) {
    display: none;
  }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
  .featured-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ---- Process Section ---- */

.process-steps {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  position: relative;
}

.process-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: var(--space-6);
  padding-top: calc(var(--space-6) + 12px);
  background: rgba(245, 240, 235, 0.03);
  border: 1px solid rgba(201, 169, 110, 0.1);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.process-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--color-gold);
}

.process-step:hover {
  background: rgba(245, 240, 235, 0.05);
  border-color: rgba(201, 169, 110, 0.25);
  transform: translateY(-2px);
}

.process-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: var(--text-subsection);
  font-weight: var(--weight-bold);
  color: var(--color-gold);
  background: rgba(201, 169, 110, 0.1);
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
  transition: all var(--transition-base);
}

.process-step:hover .process-step__number {
  background-color: var(--color-gold);
  color: var(--color-ink);
  border-color: var(--color-gold);
}

.process-step__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--color-text-on-dark);
}

.process-step__desc {
  font-size: var(--text-sm);
  color: var(--color-text-on-dark-secondary);
}

/* Mobile: stack vertically */
@media (max-width: 767px) {
  .process-steps {
    flex-direction: column;
    gap: var(--space-8);
  }

  .process-step {
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--space-4);
    row-gap: var(--space-1);
    align-items: start;
  }

  .process-step__number {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .process-step__title,
  .process-step__desc {
    grid-column: 2;
    margin: 0;
  }
}

/* ---- Section Divider ---- */

.divider-wrap {
  width: 100%;
  background-color: var(--color-ink);
  padding: 0;
  margin: 0;
}

.divider-wrap hr.section-divider {
  display: block;
  width: 60%;
  height: 1px;
  border: none;
  outline: none;
  margin: 0 auto;
  padding: 0;
  background: #032e2f;
  color: transparent;
}

/* ---- Contact Section ---- */

.contact__info address {
  font-style: normal;
  margin-top: var(--space-4);
}

.contact__info address p,
.contact__hours p {
  margin-bottom: var(--space-1);
  line-height: 1.5;
}

.contact__info a {
  color: var(--color-gold);
}

.contact__info a:hover {
  color: var(--color-gold-light);
}

.contact__hours {
  margin-top: var(--space-4);
}

.contact__map {
  margin-top: var(--space-4);
}

.contact__hours h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
  color: var(--color-text-on-dark);
}

#contact .grid {
  grid-template-columns: 1fr 2fr;
  gap: var(--space-6);
}

.contact__map-placeholder {
  min-height: 300px;
  width: 100%;
}

.contact__map iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
  border-radius: var(--radius-md);
}

.contact__map iframe {
  width: 100%;
  min-height: 300px;
  border: 0;
  border-radius: var(--radius-md);
  display: block;
}

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

/* ---- CTA Section ---- */

.cta-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #8B7340;
}

.cta-section__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(
      135deg,
      #4A3D20 0%,
      #6B5A30 20%,
      #8B7340 40%,
      #A8894F 55%,
      #8B7340 70%,
      #6B5A30 85%,
      #4A3D20 100%
    );
  z-index: 0;
}

.cta-section__content {
  position: relative;
  padding-block: var(--space-12);
}

.cta-section__content h2 {
  font-family: var(--font-heading);
  font-size: var(--text-section);
  color: var(--color-text-on-dark);
  margin-bottom: var(--space-4);
}

.cta-section__subtitle {
  font-family: var(--font-accent);
  font-size: var(--text-lg);
  color: var(--color-text-on-dark);
  font-style: italic;
  opacity: 0.8;
  margin-bottom: var(--space-6);
}

.cta-section .btn--primary {
  background-color: var(--color-text-on-dark);
  color: #8B7340;
}

.cta-section .btn--primary:hover {
  background-color: var(--color-surface);
}

@media (prefers-reduced-motion: no-preference) {
  .cta-section .btn--primary {
    animation: ctaPulse 3s ease-in-out infinite;
  }

  @keyframes ctaPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(1, 39, 40, 0.3); }
    50% { box-shadow: 0 0 20px 4px rgba(1, 39, 40, 0.15); }
  }
}

/* ---- Gallery Page Header ---- */

.gallery-header {
  position: relative;
  overflow: hidden;
  background-color: var(--color-ink);
  color: var(--color-text-on-dark);
  padding-block: var(--space-20) var(--space-16);
  isolation: isolate;
}

.gallery-header__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 85% 15%, rgba(201, 169, 110, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(3, 71, 72, 0.9) 0%, transparent 60%),
    linear-gradient(180deg, #011a1b 0%, var(--color-ink) 45%, #021f20 100%);
  pointer-events: none;
}

.gallery-header__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(201, 169, 110, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(201, 169, 110, 0.04) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7), transparent 70%);
  opacity: 0.6;
}

.gallery-header__noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.79 0 0 0 0 0.66 0 0 0 0 0.43 0 0 0 0.8 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

.gallery-header__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-10);
  align-items: start;
}

.gallery-header__index {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-left: 1px solid rgba(201, 169, 110, 0.35);
  padding-left: var(--space-5);
}

.gallery-header__index-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-on-dark-secondary);
}

.gallery-header__index-num {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--color-gold);
  font-feature-settings: "lnum";
}

.gallery-header__content {
  max-width: 760px;
}

.gallery-header__eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--color-gold);
  margin: 0 0 var(--space-5) 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.gallery-header__eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background-color: var(--color-gold);
}

.gallery-header__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: var(--weight-bold);
  line-height: 0.95;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-on-dark);
  margin: 0 0 var(--space-6) 0;
  text-shadow: 0 2px 60px rgba(0, 0, 0, 0.4);
}

.gallery-header__rule {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.gallery-header__rule-line {
  display: block;
  height: 1px;
  width: 96px;
  background: linear-gradient(90deg, transparent 0%, var(--color-gold) 50%, var(--color-gold) 100%);
}

.gallery-header__rule-line--short {
  width: 40px;
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-gold) 50%, transparent 100%);
}

.gallery-header__rule-diamond {
  display: block;
  width: 8px;
  height: 8px;
  background-color: var(--color-gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(201, 169, 110, 0.6);
}

.gallery-header__intro {
  font-family: var(--font-accent);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: var(--leading-relaxed);
  color: var(--color-text-on-dark-secondary);
  font-style: italic;
  max-width: 60ch;
  margin: 0 0 var(--space-10) 0;
}

.gallery-header__stats {
  display: flex;
  align-items: stretch;
  gap: var(--space-8);
  flex-wrap: wrap;
  margin: 0;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(201, 169, 110, 0.2);
}

.gallery-header__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.gallery-header__stat-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-text-on-dark-secondary);
  order: 2;
  margin: 0;
}

.gallery-header__stat-value {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--color-gold);
  margin: 0;
  order: 1;
  font-feature-settings: "lnum";
}

.gallery-header__stat-sep {
  display: block;
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent 0%, rgba(201, 169, 110, 0.35) 50%, transparent 100%);
}

/* Tablet */
@media (max-width: 1023px) {
  .gallery-header {
    padding-block: var(--space-16) var(--space-14);
  }

  .gallery-header__inner {
    column-gap: var(--space-6);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .gallery-header {
    padding-block: var(--space-14) var(--space-12);
  }

  .gallery-header__inner {
    grid-template-columns: 1fr;
    row-gap: var(--space-6);
  }

  .gallery-header__index {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
    padding: 0 0 0 var(--space-4);
    border-left: 1px solid rgba(201, 169, 110, 0.35);
  }

  .gallery-header__index-num {
    font-size: 2rem;
  }

  .gallery-header__eyebrow {
    letter-spacing: 0.22em;
  }

  .gallery-header__eyebrow::before {
    width: 24px;
  }

  .gallery-header__title {
    font-size: clamp(2.75rem, 12vw, 4.5rem);
  }

  .gallery-header__intro {
    margin-bottom: var(--space-8);
  }

  .gallery-header__stats {
    gap: var(--space-6);
  }

  .gallery-header__stat-value {
    font-size: 2rem;
  }

  .gallery-header__stat-sep {
    display: none;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .gallery-header__stats {
    gap: var(--space-5);
  }
}

/* Reduced motion: no transform/glow animation tweaks beyond global handling */
@media (prefers-reduced-motion: reduce) {
  .gallery-header__rule-diamond {
    box-shadow: none;
  }
}
