/* hero */
/* Force enable scrolling on Chrome mobile for homepage */
html.js body.pages.index {
  overscroll-behavior-y: auto !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh !important;
}

/* ========================================
   Scroll Reveal Animation
   ======================================== */
.reveal-hidden {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal-hidden {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Homepage-only header override: 9vh as requested */
body.pages.index {
  --header-height: 9dvh;
}

/* Ensure homepage main fills viewport so footer sits at bottom when content is short */
main.ffw.subgrid {
  min-height: 100dvh;
}

/* ========================================
   Laptop header overrides (13–14" at 100%)
   Reduces header elements by ~20%
   ======================================== */
@media (min-width: 1025px) and (max-width: 1500px) {
  body.pages.index .header-logo-container {
    margin-left: 18px;
    width: clamp(7.5em, 4em + 9.5vw, 10em);
  }

  body.pages.index .logo-link {
    height: 34px;
  }

  body.pages.index .logo-link .logo {
    height: 24px;
  }

  body.pages.index .header-right-nav {
    margin-right: 18px;
    gap: 12px;
  }

  body.pages.index .header-right-nav-ul {
    gap: 16px;
  }

  body.pages.index .site-header.transparent .atelier-button,
  body.pages.index .site-header:not(.transparent) .atelier-button,
  body.pages.index .site-header.-shw .atelier-button {
    padding: 8px 17px;
    font-size: 11px;
  }

  body.pages.index .sign-in-button {
    padding: 6px 12px;
    font-size: 11px;
    min-width: 58px;
  }

  body.pages.index .sign-up-button {
    font-size: 11px;
    margin-right: 12px;
  }

  body.pages.index .header-right-nav .search-icon > svg,
  body.pages.index .header-right-nav .icon-btn > svg,
  body.pages.index .header-right-nav .hamburger-btn > svg {
    width: 19px;
    height: 19px;
  }
}

.homepage-bg {
  width: 100%;
  height: 91dvh;
  overflow: hidden;
  position: relative;
  z-index: 0;
  padding: 0 16px 16px 16px;
  box-sizing: border-box;
}

/* Ensure minimum height on very small screens */
@media (max-width: 640px) {
  body.pages.index {
    --header-height: 56px;
  }

  .homepage-bg {
    min-height: 500px;
  }
}

/* The frame stays fixed with rounded corners */
.hero-video-frame {
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  bottom: 16px;
  border-radius: 5px;
  overflow: hidden;
  z-index: 0;
}

/* The video moves inside the frame */
.background-image {
  position: absolute;
  top: -10%;
  /* Start slightly higher */
  left: 0;
  width: 100%;
  height: 120%;
  /* Oversized to allow parallax movement */
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Text sits on top */
.hero-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

/* Optional styling */
.hero-description {
  color: #fafaf8;
  text-align: center;
  font-family: Montserrat;
  font-size: clamp(17px, 2.28vw, 52px);
  font-style: normal;
  font-weight: 600;
  line-height: 1.2em;
  letter-spacing: clamp(3px, 0.35vw, 6px);
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  padding: 0 var(--minim);
  white-space: nowrap;
}

/* Allow wrapping only on small screens where nowrap would overflow */
@media (max-width: 640px) {
  .hero-description {
    white-space: normal;
    font-size: clamp(20px, 6vw, 32px);
    letter-spacing: 2px;
  }
}

@media (max-width: 900px) {
  .hero-overlay {
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .hero-overlay {
    gap: 12px;
  }
}

.homepage-heading {
  color: var(--mb);
  font-family: var(--font-sans);
  font-size: 48px;
  font-style: normal;
  font-weight: 440;
  line-height: 52px;
  letter-spacing: 1.92px;
  text-transform: uppercase;
}

.homepage-subheading {
  color: var(--mb);
  font-family: Montserrat, sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 540;
  line-height: 28px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

/* Laptop devices */
@media (max-width: 1500px) {
  .homepage-heading {
    font-size: 40px;
    line-height: 44px;
    letter-spacing: 1.5px;
  }

  .homepage-subheading {
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
  }
}

/* Scope h1 size reduction to homepage only on laptop screens */
@media (min-width: 1025px) and (max-width: 1500px) {
  body.pages.index .homepage-section h1 {
    font-size: 2em;
    line-height: 1.1;
    margin: 0.5em 0;
  }
}

/* Tablet devices */
@media (max-width: 900px) {
  .homepage-heading {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: 1.2px;
  }

  .homepage-subheading {
    font-size: 16px;
    line-height: 20px;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
  }
}

/* Mobile devices */
@media (max-width: 640px) {
  .homepage-heading {
    font-size: 24px;
    line-height: 28px;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
  }

  .homepage-subheading {
    font-size: 14px;
    line-height: 18px;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
  }
}

#brows_by_subject {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

#brows_by_subject .browse-grid {
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: stretch;
  width: 100%;
}

#brows_by_subject .browse-item {
  text-align: center;
  flex: 1;
  min-width: 0;
}

#brows_by_subject .browse-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  width: 100%;
}

#brows_by_subject .browse-img {
  display: block;
  max-width: 100%;
  height: auto;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

#brows_by_subject .browse-label {
  margin: 0;
  color: var(--mb);
  font-family: Montserrat, sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 540;
  line-height: 28px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Tablet devices */
@media (max-width: 900px) {
  #brows_by_subject .browse-grid {
    gap: 24px;
  }

  #brows_by_subject .browse-label {
    font-size: 20px;
    line-height: 24px;
  }

  #brows_by_subject .browse-link {
    gap: 16px;
  }
}

/* Mobile devices */
@media (max-width: 640px) {
  #brows_by_subject {
    align-items: center;
  }

  #brows_by_subject .browse-grid {
    flex-direction: column;
    gap: 32px;
    width: 100%;
    justify-content: center;
  }

  #brows_by_subject .browse-label {
    font-size: 16px;
    line-height: 20px;
    letter-spacing: 0.08em;
  }

  #brows_by_subject .browse-link {
    gap: 12px;
  }
}

.homepage-commonplace {
  background: var(--grey-100);
}

/* ========================================
   The Commonplace Section
   ======================================== */

#commonplace .section-inner {
  padding-left: 60px;
  padding-right: 60px;
}

.commonplace-title {
  color: var(--mb);
  font-family: var(--font-sans);
  font-size: 48px;
  font-weight: 440;
  line-height: 52px;
  letter-spacing: 1.92px;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 24px;
}

.commonplace-subtitle {
  color: var(--mb);
  font-family: Montserrat, sans-serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0;
}

/* Laptop */
@media (max-width: 1500px) {
  .commonplace-title {
    font-size: 40px;
    line-height: 44px;
    letter-spacing: 1.5px;
  }

  .commonplace-subtitle {
    font-size: 18px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  #commonplace .section-inner {
    padding-left: 32px;
    padding-right: 32px;
  }

  .commonplace-title {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: 1.2px;
    margin-bottom: 16px;
  }

  .commonplace-subtitle {
    font-size: 16px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  #commonplace .section-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .commonplace-title {
    font-size: 24px;
    line-height: 28px;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
  }

  .commonplace-subtitle {
    font-size: 14px;
    letter-spacing: 0.02em;
    line-height: 20px;
  }
}

/* Commonplace Articles Grid (2 articles) */
.articles-homepage-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--breve);
  row-gap: var(--semibreve);
  margin: var(--semibreve) 0;
}

@media (max-width: 900px) {
  .articles-homepage-container {
    column-gap: var(--semibreve);
    row-gap: 32px;
    margin: 32px 0;
  }
}

@media (max-width: 640px) {
  .articles-homepage-container {
    grid-template-columns: 1fr;
    row-gap: 32px;
    margin: 24px 0;
  }
}

/* ========================================
   Commonplaces Section - The Commonplace
   ======================================== */

#commonplaces {
  background-color: #5f5f5b;
  padding: 48px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto 128px;
}

.commonplaces-header {
  margin-bottom: 32px;
}

.commonplaces-title {
  color: #fafaf8;
  font-family: "Bodoni Moda", serif;
  font-size: 48px;
  font-weight: 440;
  line-height: 1.08;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 16px 0;
}

.commonplaces-subtitle {
  color: #fafaf8;
  font-family: Montserrat, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.04em;
  text-transform: capitalize;
  margin: 0;
}

.commonplaces-cta-button {
  display: inline-flex;
  padding: 10px 22px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 3px;
  border: 1px solid #fafaf8;
  background: transparent;
  color: #fafaf8;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 540;
  line-height: 1.22;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 32px;
  align-self: flex-end;
}

.commonplaces-cta-button:hover {
  background-color: #fafaf8;
  color: #5f5f5b;
}

/* Two-column grid for commonplace cards */
.commonplaces-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 32px;
}

/* Commonplace card styling */
.commonplaces-grid .articles-preview-container {
  display: flex;
  flex-direction: column;
}

.commonplaces-grid .articles-preview-cover-image {
  width: 100%;
  aspect-ratio: 4 / 2;
  object-fit: cover;
  object-position: center;
  border-radius: 3px;
  margin-bottom: 16px;
}

.commonplaces-grid .articles-preview-title {
  color: #fafaf8;
  font-family: Montserrat, sans-serif;
  font-size: 20px;
  font-weight: 540;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 16px 0 12px 0;
  min-height: calc(1.4em * 2);
  text-decoration: none;
}

.commonplaces-grid .article-preview-title-link,
.commonplaces-grid .article-preview-title-link:hover,
.commonplaces-grid .article-preview-title-link:focus,
.commonplaces-grid .article-preview-title-link:active {
  text-decoration: none;
}

.commonplaces-grid .article-preview-title-link:hover .articles-preview-title,
.commonplaces-grid .article-preview-title-link:focus .articles-preview-title,
.commonplaces-grid .article-preview-title-link:active .articles-preview-title {
  text-decoration: none;
}

.commonplaces-grid .articles-index-blurb-text {
  color: #fafaf8;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.29;
  letter-spacing: 0.02em;
  margin: 0 0 24px 0;
  min-height: calc(1.29em * 3);
}

.commonplaces-grid .articles-preview-footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: auto;
}

.commonplaces-grid .articles-preview-footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 24px;
  width: 100%;
  margin-bottom: 10px;
}

.commonplaces-grid .articles-preview-footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 50%;
}

.commonplaces-grid .articles-preview-author {
  color: #fafaf8;
  font-family: "Bodoni Moda", serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.commonplaces-grid .articles-preview-meta-line {
  width: 100%;
  height: 1px;
  background-color: #b2b3ad;
}

.commonplaces-grid .articles-read-time {
  color: #b2b3ad;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
}

.commonplaces-grid .articles-preview-date {
  color: #fafaf8;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

/* Laptop */
@media (max-width: 1500px) {
  #commonplaces {
    padding: 36px;
  }

  .commonplaces-title {
    font-size: 40px;
  }

  .commonplaces-cta-button {
    top: 36px;
    right: 36px;
  }

  .commonplaces-grid {
    column-gap: 24px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  #commonplaces {
    width: 100%;
    margin: 0 0 64px;
    padding: 32px;
  }

  .commonplaces-title {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .commonplaces-subtitle {
    font-size: 14px;
  }

  .commonplaces-cta-button {
    margin-top: 24px;
  }

  .commonplaces-header {
    margin-bottom: 24px;
  }

  .commonplaces-grid {
    column-gap: 24px;
    row-gap: 32px;
  }

  .commonplaces-grid .articles-preview-title {
    font-size: 18px;
    min-height: calc(1.4em * 2);
  }
}

/* Mobile: 1 column */
@media (max-width: 640px) {
  #commonplaces {
    padding: 24px;
    margin: 0 0 48px;
  }

  .commonplaces-title {
    font-size: 24px;
    line-height: 1.1;
    margin-bottom: 8px;
  }

  .commonplaces-subtitle {
    font-size: 13px;
    line-height: 1.3;
  }

  .commonplaces-grid {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }

  .commonplaces-grid .articles-preview-title {
    font-size: 16px;
    line-height: 1.3;
    min-height: auto;
  }

  .commonplaces-grid .articles-index-blurb-text {
    font-size: 13px;
    margin-bottom: 16px;
    min-height: auto;
  }

  .commonplaces-grid .articles-preview-author {
    font-size: 14px;
    white-space: normal;
  }

  .commonplaces-grid .articles-preview-footer-top {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .commonplaces-grid .articles-preview-footer-bottom {
    width: 100%;
    gap: 10px;
  }
}

/* ========================================
   Article Card Mobile Fixes
   (Shared by both Commonplace + Commonplaces)
   ======================================== */

/* Fix article preview cards overflowing on mobile */
@media (max-width: 640px) {
  .articles-homepage-container .articles-preview-container,
  .commonplaces-grid .articles-preview-container {
    width: 100%;
    overflow: hidden;
  }

  .articles-homepage-container .articles-preview-title,
  .commonplaces-grid .articles-preview-title {
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 0.04em;
    margin-bottom: 0;
  }

  .articles-homepage-container .articles-index-blurb-text,
  .commonplaces-grid .articles-index-blurb-text {
    font-size: 13px;
    line-height: 18px;
    margin-bottom: 24px;
  }

  .articles-homepage-container .articles-preview-date,
  .commonplaces-grid .articles-preview-date {
    padding-right: 0;
    font-size: 11px;
  }

  .articles-homepage-container .articles-preview-author,
  .commonplaces-grid .articles-preview-author {
    font-size: 13px;
  }

  .articles-homepage-container .articles-preview-footer,
  .commonplaces-grid .articles-preview-footer {
    gap: 12px;
  }
}

/* Tablet adjustments */
@media (max-width: 900px) {
  .articles-homepage-container .articles-preview-date,
  .commonplaces-grid .articles-preview-date {
    padding-right: 0;
  }

  .articles-homepage-container .articles-preview-title,
  .commonplaces-grid .articles-preview-title {
    font-size: 18px;
    line-height: 24px;
  }
}

/* British Landscape Artists - 2 cards taking full width */
#british_landscape .artists-list-container .search-results {
  display: flex;
  flex-direction: row;
  gap: 32px;
  width: 100%;
}

#british_landscape .artists-list-container .search-result-card {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  width: 100%;
}

#british_landscape .artists-list-container .result-link {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#british_landscape .artists-list-container .search-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin: 0;
}

@media (max-width: 640px) {
  #british_landscape .artists-list-container .search-results {
    flex-direction: column;
    gap: 24px;
  }
}

.homepage-hero-section {
  height: 100dvh;
  padding-top: var(--header-height);
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--minim);
  border-bottom: var(--grey-400) 1px solid;
}

/* other sections */
.homepage-section {
  min-height: auto;
  padding-top: 64px;
  padding-bottom: 64px;
}

.homepage-section.step {
  grid-column: full-start / full-end;
}

/* Tablet devices */
@media (max-width: 900px) {
  .homepage-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* Mobile devices */
@media (max-width: 640px) {
  .homepage-section {
    padding-top: 36px;
    padding-bottom: 36px;
    min-height: auto;
  }
}

/* steps */
.homepage-step-container {
  background: linear-gradient(180deg, var(--ib) 0%, #163b42 100%);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;

  &:not(:last-child) {
    border-bottom: 1px solid var(--shw);
  }

  & > :first-child {
    border-right: 1px solid rgba(from var(--shw) r g b / 0.2);
  }
}

.homepage-step-image {
  object-fit: contain;
  width: 100%;
  height: 100%;
  padding: var(--semibreve);
}

.homepage-step-text-container {
  padding: var(--semibreve);

  & * {
    color: var(--shw);
  }
}

.homepage-step-title {
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
}

.homepage-step-description {
  line-height: 2;
  margin-bottom: var(--semibreve);
}

.homepage-iconed-details-container {
  display: flex;
  flex-direction: column;
  gap: var(--breve);
  margin-top: var(--breve);
}

.homepage-commonplace-section {
  grid-column: full-start / full-end;
  background-color: var(--ib);
  display: grid;
  grid-template-columns: 1fr;
}

.homepage-commonplace-portrait-container {
  justify-self: center;
  padding: var(--semibreve);
}

.homepage-commonplace-portrait {
  aspect-ratio: 5 / 8;
  max-width: 250px;
  max-height: 400px;
  object-fit: cover;
  object-position: center;
}

.homepage-commonplace-text-container {
  padding: var(--semibreve);

  & > p,
  & > h2 {
    color: var(--shw);
  }
}

.homepage-commonplace-title {
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.homepage-commonplace-blurb {
  margin-bottom: var(--semibreve);
}

.homepage-bottom-logoo {
  width: 50px;
}

.homepage-logoo-container {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media only screen and (min-width: 640px) {
  .homepage-iconed-details-container {
    flex-direction: row;
    justify-content: space-between;
  }

  .homepage-section.step {
    grid-column: pad-start / pad-end;
  }

  .homepage-step-container {
    border-radius: var(--crotchet);
    grid-template-columns: 1fr 1fr;
  }

  .homepage-step-container:not(:last-child) {
    margin-bottom: var(--breve);
    border-bottom: none;
  }

  .homepage-step-container[image="first"] {
    grid-template-columns: 2fr 1fr;
  }

  .homepage-step-container[image="last"] {
    grid-template-columns: 1fr 2fr;
  }

  .homepage-commonplace-section {
    grid-column: pad-start / pad-end;
    border-radius: var(--crotchet);
    grid-template-columns: 1fr 2fr;
  }

  .homepage-commonplace-text-container {
    border-left: 1px solid rgb(from var(--shw) r g b / 0.2);
  }
}

/* ========================================
   Homepage Artist Grid Overrides
   Restores flexible grid behavior for homepage
   (searchpage.css uses fixed widths for search results)
   ======================================== */

/* Override fixed grid layout from searchpage.css */
.homepage-section .search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
  justify-content: start;
  align-items: start;
  margin-left: 0;
}

/* Override fixed card dimensions from searchpage.css */
.homepage-section .search-result-card {
  width: 100%;
  height: auto;
  margin-bottom: 0;
}

.homepage-section .result-link {
  width: 100%;
}

/* Override fixed image dimensions from searchpage.css */
.homepage-section .search-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  margin-left: 0;
  margin-right: 0;
}

/* Responsive adjustments for homepage grids */
@media (max-width: 768px) {
  .homepage-section .search-results {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }
}

/* ========================================
   Artists Carousel Styles
   ======================================== */

.artists-carousel-wrapper {
  position: relative;
  width: 100%;
}

.artists-carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Override the search-results grid for homepage carousel */
.artists-carousel .search-results {
  display: flex;
  gap: 24px;
  transition: transform 0.4s ease-out;
}

/* Artist cards in carousel - show 4 on desktop */
.artists-carousel .search-result-card {
  flex: 0 0 calc((100% - 72px) / 4);
  /* 4 cards with 3 gaps of 24px */
  max-width: 280px;
  min-width: 0;
  margin-bottom: 0;
  /* Override fixed 320px width */
}

.artists-carousel .artist-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Override fixed image dimensions for carousel */
.artists-carousel .search-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
}

/* Position arrows OUTSIDE the section using absolute positioning */
/* Position at 40% from top to center on image area (cards have text below images) */
.artists-carousel-wrapper .gallery-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
}

.artists-carousel-wrapper .gallery-arrow--left {
  left: -60px;
}

.artists-carousel-wrapper .gallery-arrow--left .arrow-img {
  transform: scaleX(-1);
}

.artists-carousel-wrapper .gallery-arrow--right {
  right: -60px;
}

.artists-carousel-wrapper .gallery-arrow:disabled {
  visibility: hidden;
  pointer-events: none;
}

/* Laptop devices - show 4 at reduced size */
@media (max-width: 1500px) {
  .artists-carousel .search-result-card {
    flex: 0 0 calc((100% - 72px) / 4);
    /* 4 cards with 3 gaps of 24px */
    max-width: 240px;
  }

  .artists-carousel .search-img {
    aspect-ratio: 3 / 4;
  }

  /* Price row: shrink line width and font so it fits laptop cards cleanly */
  .artists-carousel .search-result-card .tags {
    margin-top: 10px;
    min-height: 24px;
    font-size: 16px;
    font-weight: 400;
  }
}

/* Tablet devices - show 2 artists */
@media (max-width: 900px) {
  .artists-carousel .search-result-card {
    flex: 0 0 calc((100% - 24px) / 2);
    /* 2 cards with 1 gap of 24px */
  }

  .artists-carousel-wrapper .gallery-arrow--left {
    left: -45px;
  }

  .artists-carousel-wrapper .gallery-arrow--right {
    right: -45px;
  }
}

/* Mobile devices - show 1 artist, arrows hidden, swipe enabled */
@media (max-width: 768px) {
  .artists-carousel .search-result-card {
    flex: 0 0 100%;
    /* 1 card per view */
  }

  .artists-carousel-wrapper .gallery-arrow--left,
  .artists-carousel-wrapper .gallery-arrow--right {
    display: none;
  }

  /* Enable swipe on mobile */
  .artists-carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
  }

  .artists-carousel-container::-webkit-scrollbar {
    display: none;
  }

  .artists-carousel .search-results {
    scroll-snap-type: x mandatory;
  }

  .artists-carousel .search-result-card {
    scroll-snap-align: center;
  }

  /* Taller images on mobile for more visual impact */
  .artists-carousel .search-img {
    aspect-ratio: 3 / 5;
  }

  .artists-carousel .artist-name {
    margin-bottom: 4px;
  }

  .artists-carousel .tags {
    font-size: 20px;
  }

  /* Show price line on mobile as a flex item to avoid overlapping text */
  .artists-carousel .search-result-card .tags .price-line {
    display: block !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 40px !important;
    margin-right: 8px !important;
  }
}

/* Improve touch targets on mobile */
@media (max-width: 640px) {
  .homepage-section .button,
  .homepage-section .button-right {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 24px;
  }
}

/* Ensure images don't overflow on small screens */
@media (max-width: 640px) {
  .homepage-section img,
  .homepage-bg img {
    max-width: 100%;
    height: auto;
  }
}

/* British Portraitists - Mobile specific overrides */
@media (max-width: 640px) {
  /* Show the price line as a flex item on mobile */
  #portraitists .artists-carousel .search-result-card .tags .price-line {
    display: block !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 40px !important;
    margin-right: 8px !important;
  }

  /* Left align text instead of center - using !important to override searchpage.css */
  #portraitists .artists-carousel .search-result-card .tags,
  #portraitists .artists-carousel .search-result-card .artist-location,
  #portraitists .artists-carousel .search-result-card .artist-name {
    text-align: left !important;
    justify-content: flex-start !important;
  }

  #portraitists .artists-carousel .result-link {
    align-items: flex-start !important;
  }
}

/* British Landscape Artists - Mobile specific overrides */
@media (max-width: 640px) {
  /* Show the price line as a flex item on mobile */
  #british_landscape
    .artists-list-container
    .search-result-card
    .tags
    .price-line {
    display: block !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 40px !important;
    margin-right: 8px !important;
  }

  /* Left align text instead of center - using !important to override searchpage.css */
  #british_landscape .artists-list-container .search-result-card .tags,
  #british_landscape
    .artists-list-container
    .search-result-card
    .artist-location,
  #british_landscape .artists-list-container .search-result-card .artist-name {
    text-align: left !important;
    justify-content: flex-start !important;
  }

  #british_landscape .artists-list-container .result-link {
    align-items: flex-start !important;
  }
}

/* Impressionists - Mobile specific overrides */
@media (max-width: 640px) {
  /* Show the price line as a flex item on mobile */
  #landscapes .artists-carousel .search-result-card .tags .price-line {
    display: block !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 40px !important;
    margin-right: 8px !important;
  }

  /* Left align text instead of center - using !important to override searchpage.css */
  #landscapes .artists-carousel .search-result-card .tags,
  #landscapes .artists-carousel .search-result-card .artist-location,
  #landscapes .artists-carousel .search-result-card .artist-name {
    text-align: left !important;
    justify-content: flex-start !important;
  }

  #landscapes .artists-carousel .result-link {
    align-items: flex-start !important;
  }
}

/* ========================================
   Landscapes Section - 3 cards, landscape images
   ======================================== */

/* Desktop: 3 cards with landscape 4:3 images */
#landscapes .artists-carousel .search-result-card {
  flex: 0 0 calc((100% - 48px) / 3);
  /* 3 cards with 2 gaps of 24px */
  max-width: none;
}

#landscapes .artists-carousel .search-img {
  aspect-ratio: 4 / 3;
}

/* Laptop: still 3 cards */
@media (max-width: 1500px) {
  #landscapes .artists-carousel .search-result-card {
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: none;
  }

  #landscapes .artists-carousel .search-img {
    aspect-ratio: 4 / 3;
  }
}

/* Tablet: 2 cards */
@media (max-width: 900px) {
  #landscapes .artists-carousel .search-result-card {
    flex: 0 0 calc((100% - 24px) / 2);
  }
}

/* === Homepage About Teaser === */
#about-teaser.homepage-about-teaser {
  padding: 48px var(--body-padding);
}

.homepage-about-teaser-card {
  background-color: var(--grey-100);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 460px;
}

.homepage-about-teaser-image-col {
  overflow: hidden;
}

.homepage-about-teaser-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 32px;
}

.homepage-about-teaser-text-col {
  display: flex;
  flex-direction: column;
  padding: 32px;
}

.homepage-about-teaser-eyebrow {
  display: inline-flex;
  flex-direction: column;
  align-self: flex-end;
  gap: 8px;
  margin-bottom: 24px;
}

.homepage-about-teaser-label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 540;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-800);
  margin: 0;
}

.homepage-about-teaser-rule {
  width: 100%;
  border: none;
  border-top: 1px solid var(--grey-700);
  margin: 0;
  min-width: 0;
}

.homepage-about-teaser-heading {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 540;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mb);
  text-align: center;
  line-height: 1.4;
  max-width: 100%;
  margin: 0 0 48px;
}

.homepage-about-teaser-body {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--mb);
  line-height: 1.57;
  max-width: 100%;
  text-align: left;
  margin-bottom: 24px;
}

.homepage-about-teaser-text-col .button {
  margin-top: auto;
  align-self: flex-end;
}

@media (max-width: 900px) {
  #about-teaser.homepage-about-teaser {
    padding: 32px var(--body-padding);
  }

  .homepage-about-teaser-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .homepage-about-teaser-image-col {
    height: 420px;
  }

  .homepage-about-teaser-text-col {
    padding: 32px;
    align-items: center;
  }

  .homepage-about-teaser-eyebrow {
    align-self: center;
  }

  .homepage-about-teaser-body {
    text-align: center;
  }

  .homepage-about-teaser-text-col .button {
    align-self: center;
  }
}

@media (max-width: 640px) {
  #about-teaser.homepage-about-teaser {
    padding: 24px var(--body-padding);
  }

  .homepage-about-teaser-image-col {
    height: 340px;
  }

  .homepage-about-teaser-text-col {
    padding: 24px;
    align-items: center;
  }

  .homepage-about-teaser-heading {
    font-size: 15px;
    margin-bottom: 24px;
  }
}
