/* Yafo Art — contemporary gallery, Jaffa */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --white: #FAFAF8;
  --ink: #111111;
  --teal: #1F6F6A;
  --coral: #E85A4F;
  --stone: #E8E4DC;
  --muted: #6B6B66;
  --line: rgba(17, 17, 17, 0.12);
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 5rem;
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  width: min(100% - 3rem, var(--max));
  margin-inline: auto;
}

/* —— Typography —— */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.display-xl { font-size: clamp(3.5rem, 12vw, 9.5rem); }
.display-lg { font-size: clamp(2.75rem, 7vw, 5.5rem); }
.display-md { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.display-sm { font-size: clamp(1.5rem, 3vw, 2.25rem); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--muted);
  max-width: 36ch;
  line-height: 1.7;
}

/* —— Cursor accent —— */
.cursor-dot {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--teal);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.2s;
  opacity: 0;
}
.cursor-dot.is-on { opacity: 0.85; }
.cursor-dot.is-hover { width: 36px; height: 36px; opacity: 0.35; }
@media (hover: none) { .cursor-dot { display: none; } }

/* —— Header —— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}
.site-header.is-scrolled {
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  width: min(100% - 3rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.logo span { color: var(--teal); }

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
  z-index: 110;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.4rem;
  height: 1.5px;
  background: var(--ink);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: 0.3s var(--ease);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  left: 0; top: 0;
  transform: none;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after { transform: translateY(6px); }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: rotate(45deg); }
.nav-toggle.is-open span::after { transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s var(--ease);
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav a { font-size: 1.75rem; font-family: var(--font-display); }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn--teal {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.btn--teal:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost { border-color: transparent; padding-inline: 0; }
.btn--ghost:hover { background: transparent; color: var(--teal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* —— Badge NOW —— */
.badge-now {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
}
.badge-now::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse 1.6s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* —— Clip-path image reveal —— */
.clip-reveal {
  overflow: hidden;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.2s var(--ease);
}
.clip-reveal.is-in { clip-path: inset(0 0 0 0); }
.clip-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.4s var(--ease);
}
.clip-reveal.is-in img { transform: scale(1); }

/* —— Hero —— */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: end start;
  position: relative;
  padding: calc(var(--header-h) + 2rem) 0 4rem;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17,17,17,0.25) 0%, rgba(17,17,17,0.15) 40%, rgba(17,17,17,0.78) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(31,111,106,0.25), transparent 55%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  width: min(100% - 3rem, var(--max));
  margin-inline: auto;
}
.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 16vw, 12rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero__brand em {
  font-style: italic;
  color: #c8e6e3;
}
.hero__line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.25);
}
.hero .lede { color: rgba(255,255,255,0.78); }
.hero .btn { border-color: rgba(255,255,255,0.7); color: var(--white); }
.hero .btn:hover { background: var(--white); color: var(--ink); }
.hero .btn--teal { border-color: var(--teal); }

.scroll-hint {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  z-index: 2;
  writing-mode: vertical-rl;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
}
@media (max-width: 700px) { .scroll-hint { display: none; } }

/* —— Sections —— */
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section--stone { background: var(--stone); }
.section--ink { background: var(--ink); color: var(--white); }
.section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section__head .lede { margin-top: 1rem; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: -1; }
}

/* —— Horizontal exhibition strip —— */
.h-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--teal) transparent;
}
.h-scroll::-webkit-scrollbar { height: 4px; }
.h-scroll::-webkit-scrollbar-thumb { background: var(--teal); }
.h-scroll__track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  padding: 0 1.5rem 1rem;
  cursor: grab;
  user-select: none;
}
.h-scroll__track.is-dragging { cursor: grabbing; }
.h-scroll__card {
  width: min(78vw, 380px);
  flex-shrink: 0;
}
.h-scroll__card figure {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--stone);
}
.h-scroll__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.h-scroll__card:hover img { transform: scale(1.05); }
.h-scroll__meta { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.h-scroll__card h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.1;
}
.h-scroll__card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.section--ink .h-scroll__card p { color: rgba(255,255,255,0.55); }

/* —— Lightbox —— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17,17,17,0.94);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.4s var(--ease);
  padding: 2rem;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  transform: scale(0.94);
  transition: transform 0.5s var(--ease);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  color: var(--white);
  font-size: 1.5rem;
  border: 1px solid rgba(255,255,255,0.3);
}
.lightbox__caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  text-align: center;
}
.lb-trigger { cursor: zoom-in; }

/* —— Grid cards (artists / exhibits) —— */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.artist-card figure,
.exhibit-card figure {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--stone);
  margin-bottom: 1.15rem;
}
.artist-card img,
.exhibit-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.artist-card:hover img,
.exhibit-card:hover img { transform: scale(1.04); }
.artist-card h3,
.exhibit-card h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1.1;
}
.artist-card .role,
.exhibit-card .dates {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.artist-card p,
.exhibit-card p {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 38ch;
}

.exhibit-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-bottom: 3rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.exhibit-card--featured figure { aspect-ratio: 16 / 10; margin: 0; }
@media (max-width: 800px) {
  .exhibit-card--featured { grid-template-columns: 1fr; }
}

/* —— Page hero —— */
.page-hero {
  padding: calc(var(--header-h) + 4rem) 0 3rem;
  border-bottom: 1px solid var(--line);
}
.page-hero .display-lg { margin: 0.75rem 0 1.25rem; }

/* —— About —— */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.stat-row strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  color: var(--teal);
}
.stat-row span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 600px) {
  .stat-row { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-block h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.contact-block p,
.contact-block a {
  color: var(--muted);
  font-size: 1.05rem;
}
.contact-block a:hover { color: var(--teal); }
.contact-block + .contact-block { margin-top: 2rem; }

.form {
  display: grid;
  gap: 1.25rem;
}
.form label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.form input,
.form textarea,
.form select {
  font: inherit;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.25s;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--teal);
}
.form textarea { min-height: 140px; resize: vertical; }
.form__note {
  font-size: 0.8rem;
  color: var(--muted);
}
.form__success {
  display: none;
  padding: 1rem;
  border: 1px solid var(--teal);
  color: var(--teal);
  font-size: 0.95rem;
}
.form__success.is-shown { display: block; }

/* —— Legal —— */
.legal {
  max-width: 720px;
}
.legal h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 2.5rem 0 0.75rem;
}
.legal p, .legal li {
  color: var(--muted);
  margin-bottom: 1rem;
}
.legal ul { padding-left: 1.25rem; list-style: disc; }
.legal a { color: var(--teal); text-decoration: underline; }

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 4rem 0 2rem;
  background: var(--white);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.footer__brand span { color: var(--teal); }
.footer__tag { color: var(--muted); font-size: 0.95rem; max-width: 28ch; }
.footer__col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--ink);
}
.footer__col a,
.footer__col p {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.footer__col a:hover { color: var(--teal); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.footer__legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }
@media (max-width: 800px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* —— Cookie banner —— */
.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  z-index: 300;
  max-width: 520px;
  background: var(--ink);
  color: var(--white);
  padding: 1.5rem;
  display: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.cookie-banner.is-visible { display: block; animation: slideUp 0.5s var(--ease); }
@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.cookie-banner p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin: 0.5rem 0 1.25rem;
  line-height: 1.55;
}
.cookie-banner a { color: #c8e6e3; text-decoration: underline; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cookie-banner .btn { border-color: rgba(255,255,255,0.4); color: var(--white); padding: 0.75rem 1.25rem; }
.cookie-banner .btn:hover { background: var(--white); color: var(--ink); }
.cookie-banner .btn--teal { background: var(--teal); border-color: var(--teal); }

/* —— Misc —— */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.quote {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.25;
  max-width: 22ch;
  font-style: italic;
}
.quote cite {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.hours-table td {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.hours-table td:last-child { text-align: right; color: var(--muted); }

.visit-strip {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  min-height: 420px;
}
.visit-strip__media { overflow: hidden; }
.visit-strip__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}
.visit-strip__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--stone);
}
@media (max-width: 800px) {
  .visit-strip { grid-template-columns: 1fr; }
}

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 1rem 0;
  background: var(--white);
}
.marquee__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}
.marquee__track span { white-space: nowrap; }
.marquee__track em { font-style: italic; color: var(--teal); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
