/* ============================================================
   sections.css — Homepage Sections (Sprint 2)
   aharsh.com
   ============================================================ */


/* ============================================================
   1. GALLERY PREVIEW
   Horizontal scroll strip of paintings.
   On desktop: GSAP pins and scrolls horizontally.
   On mobile: touch-scroll with scroll-snap.
   ============================================================ */

.section-gallery-preview {
  padding-top: var(--section-v);
  overflow: hidden;
}

.gallery-preview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 44px;
  padding: 0 var(--page-h);
}

.gallery-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-preview-title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.05;
}

/* Horizontal track — wider than the viewport */
.gallery-track-wrap {
  overflow: hidden;
  width: 100%;
}

.gallery-track {
  display: flex;
  gap: 18px;
  padding: 0 var(--page-h) var(--section-v);
  width: max-content;
  will-change: transform;
}

/* Individual painting card */
.gallery-item {
  width: clamp(240px, 26vw, 380px);
  height: clamp(320px, 48vh, 520px);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.9s var(--ease-expo);
  /* Gradient placeholder while image loads */
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Painting title on hover */
.gallery-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 18px 16px;
  background: linear-gradient(to top, rgba(15, 15, 13, 0.88) 0%, transparent 100%);
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth);
  pointer-events: none;
}

.gallery-item:hover .gallery-item-label {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile — native touch scroll */
@media (max-width: 768px) {
  .gallery-track-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .gallery-track-wrap::-webkit-scrollbar { display: none; }

  .gallery-track {
    padding-left: 24px;
  }

  .gallery-item {
    scroll-snap-align: start;
  }
}


/* ============================================================
   2. ABOUT TEASER
   Split layout: text left, portrait photo right.
   Minimum 100vh — full screen section.
   ============================================================ */

.section-about-teaser {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

/* Left side — text */
.about-text-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--section-v) var(--page-h);
  background: var(--bg);
}

.about-text-side .label {
  margin-bottom: 20px;
}

.about-heading {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 28px;
  max-width: 480px;
}

.about-body {
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 420px;
  margin-bottom: 48px;
}

/* Thin gold rule above the bio text */
.about-rule {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 28px;
}

/* Right side — portrait photo */
.about-image-side {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  min-height: 500px;
}

.about-image-side img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.8s var(--ease-expo);
}

.about-image-side:hover img {
  transform: scale(1.03);
}

/* Subtle dark gradient at bottom of portrait */
.about-image-side::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(15,15,13,0.4), transparent);
  pointer-events: none;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .section-about-teaser {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .about-image-side {
    min-height: 60vw;
    max-height: 420px;
    order: -1; /* Image above text on mobile */
  }

  .about-text-side {
    padding: clamp(40px, 8vw, 80px) clamp(24px, 6vw, 48px);
  }
}


/* ============================================================
   3. FEATURED WORKS
   3-column grid of available paintings.
   ============================================================ */

.section-featured {
  padding: var(--section-v) 0;
  background: var(--bg-secondary);
}

.section-featured .container {
  padding: 0 var(--page-h);
}

.featured-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 52px;
}

.featured-header-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.featured-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 300;
  color: var(--text-primary);
}

/* 3-column grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Single painting card */
.featured-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

/* Image wrapper for hover scale effect */
.featured-card-img-wrap {
  overflow: hidden;
  aspect-ratio: 3 / 4; /* Portrait paintings */
  background: var(--bg-card);
  margin-bottom: 20px;
}

.featured-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s var(--ease-expo);
  background: linear-gradient(160deg, var(--bg-card), var(--bg-secondary));
}

.featured-card:hover .featured-card-img-wrap img {
  transform: scale(1.06);
}

/* Card info */
.featured-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.featured-card-name {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-primary);
}

.featured-card-price {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.featured-card-link {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  transition: color 0.3s;
}

.featured-card-link::after {
  content: '→';
  transition: transform 0.3s var(--ease-smooth);
}

.featured-card:hover .featured-card-link {
  color: var(--text-primary);
}

.featured-card:hover .featured-card-link::after {
  transform: translateX(4px);
}

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

  /* Hide 3rd card on tablet — keeps layout clean */
  .featured-card:nth-child(3) {
    display: none;
  }
}

/* Mobile */
@media (max-width: 580px) {
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .featured-card:nth-child(3) {
    display: flex; /* Show all on mobile (they stack anyway) */
  }

  .featured-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}


/* ============================================================
   4. QUOTE SECTION
   Full-width cinematic quote. Clean, minimal.
   ============================================================ */

.section-quote {
  position: relative;
  padding: var(--section-v) 0;
  overflow: hidden;
  /* Optional: set a painting as bg — see HTML comment */
  background: var(--bg);
}

/* Optional background image for this section */
.quote-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.quote-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.12; /* Very subtle — painting behind quote */
}

.quote-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--page-h);
  text-align: center;
}

/* Opening quotation mark */
.quote-inner::before {
  content: '\201C';
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(60px, 8vw, 100px);
  line-height: 0.6;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0.6;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.5vw, 44px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 36px;
}

/* Thin rule before author name */
.quote-rule {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 20px;
}

.quote-author {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-style: normal;
}


/* ============================================================
   5. CONTACT SECTION
   Simple form + contact info.
   ============================================================ */

.section-contact {
  padding: var(--section-v) 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

/* Left: heading + info */
.contact-info .label {
  margin-bottom: 18px;
}

.contact-heading {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 24px;
}

.contact-subtext {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 360px;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-detail-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  width: 64px;
  flex-shrink: 0;
}

.contact-detail-value {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  transition: color 0.3s;
}

a.contact-detail-value:hover {
  color: var(--accent);
}

/* Right: form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group {
  position: relative;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  transition: border-color 0.3s;
}

.form-group:focus-within {
  border-color: var(--accent);
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 22px;
  margin-bottom: 6px;
  transition: color 0.3s;
}

.form-group:focus-within .form-label {
  color: var(--accent);
}

.form-input,
.form-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-primary);
  padding-bottom: 16px;
  resize: none;
  caret-color: var(--accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 100px;
  line-height: 1.6;
}

.form-submit {
  margin-top: 32px;
  align-self: flex-start;
}

/* Success message (shown by JS after submit) */
.form-success {
  display: none;
  padding: 16px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* Mobile contact */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}


/* ============================================================
   6. FOOTER
   ============================================================ */

#footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 60px;
}

/* Footer logo */
.footer-logo {
  display: inline-block;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.footer-logo:hover {
  opacity: 1;
}

.footer-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

/* Footer nav */
.footer-nav {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
}

.footer-nav-link {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-nav-link:hover {
  color: var(--text-primary);
}

/* Footer social */
.footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-social-link {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-social-link:hover {
  color: var(--accent);
}

/* Footer bottom */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.footer-policy {
  display: flex;
  gap: 20px;
}

.footer-policy-link {
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 300;
  color: var(--text-muted);
  transition: color 0.3s;
}

.footer-policy-link:hover {
  color: var(--text-secondary);
}

/* Mobile footer */
@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    gap: 36px;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .footer-policy {
    flex-wrap: wrap;
    gap: 12px 16px;
  }
}
