/* Carlota Conde, V1
   Background: warm beige (Ana Khouri direction). Type: Montserrat SemiBold for the
   wordmark; Figtree for navigation and text (free stand-in for Proxima Nova, the
   menu typeface on anakhouri.com). */

:root {
  --bg: #eee9e1;
  --bg-deep: #e6e0d6;
  --ink: #1e1c19;
  --muted: #7a746b;
  --line: rgba(30, 28, 25, 0.14);
  --gutter: clamp(16px, 4vw, 40px);
  --gap: clamp(12px, 2.2vw, 32px);
  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
  --wordmark: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --text: "Figtree", "Proxima Nova", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  overflow-x: hidden;
}
body.is-ready { opacity: 1; }
body.is-leaving { opacity: 0; transition-duration: 0.45s; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--gutter);
  transition: background-color 0.6s var(--ease), padding 0.6s var(--ease), transform 0.7s var(--ease);
}
.site-header.is-scrolled {
  background-color: rgba(238, 233, 225, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-top: 18px;
  padding-bottom: 18px;
}
.site-header.is-hidden { transform: translateY(-100%); }

.wordmark {
  font-family: var(--wordmark);
  font-weight: 600;
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.nav { display: flex; gap: clamp(16px, 2.6vw, 40px); }
.nav a {
  position: relative;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero__piece {
  width: min(64vh, 72vw);
  will-change: transform, opacity;
}
.hero__piece img {
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 2.2s var(--ease), transform 2.6s var(--ease);
}
body.is-ready .hero__piece img { opacity: 1; transform: scale(1); }

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 1px;
  height: 46px;
  background: var(--line);
  overflow: hidden;
}
.hero__cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(-100%);
  animation: cue 2.6s var(--ease) 1.6s infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ---------- Editorial gallery ---------- */
.gallery {
  padding: clamp(40px, 8vw, 120px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(64px, 11vw, 180px);
}

.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.row > * { min-width: 0; }
/* Every pair and trio shares the same outer edges, so all rows line up with each other */
.row--pair, .row--trio { padding: 0 clamp(0px, 4vw, 56px); align-items: stretch; }
.row--pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.row--trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row--trio .float { aspect-ratio: 1 / 1; overflow: hidden; } /* overflow stops tall pieces stretching the cell */
.row--trio .float img { width: auto; height: auto; max-width: 62%; max-height: 74%; }
.row--trio > .reveal:nth-child(3) { transition-delay: 0.3s; }
/* a single image is either full-bleed wide or one large jewel */
.row--wide { margin: 0 calc(var(--gutter) * -1); }
.row--solo { justify-items: center; }

.frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
  aspect-ratio: 4 / 5;
}
.frame--wide { aspect-ratio: 16 / 8.5; }
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 2.4s var(--ease);
}
.reveal.is-in .frame img { transform: scale(1); }

.float {
  position: relative;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
}
.float img {
  width: 62%;
  height: auto;
  transform: translateY(18px);
  transition: transform 2s var(--ease);
}
.reveal.is-in .float img { transform: translateY(0); }
.float--solo { aspect-ratio: auto; width: min(780px, 80vw); padding: clamp(20px, 6vw, 80px) 0; }
.float--solo img { width: 100%; }
.float--tall { width: min(460px, 56vw); }

.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1.4s var(--ease), transform 1.6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.row > .reveal:nth-child(2) { transition-delay: 0.15s; }

.more {
  display: flex;
  justify-content: center;
  padding: clamp(80px, 12vw, 180px) 0 clamp(60px, 9vw, 140px);
}
.link-line {
  position: relative;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 6px;
}
.link-line::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.link-line:hover::after { transform: scaleX(0.35); }

/* ---------- Page heads ---------- */
.page { padding: clamp(130px, 18vw, 200px) var(--gutter) 0; min-height: 100vh; }
.page-title {
  margin: 0 0 clamp(48px, 8vw, 110px);
  font-family: var(--text);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* ---------- Designs grid ---------- */
.designs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 48px) var(--gap);
  padding: 0 clamp(0px, 3vw, 40px);
}
.design {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.design img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  transition: transform 1.1s var(--ease);
}
.design:hover img, .design:focus-visible img {
  transform: translateY(-8px) scale(1.03);
}
.design:focus-visible { outline: 1px solid var(--line); outline-offset: 6px; }

.design.is-hidden { display: none; }
.designs.is-switching .design { opacity: 0; transform: translateY(16px); }
.designs .design.is-in { transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px clamp(18px, 3vw, 40px);
  margin: calc(clamp(48px, 8vw, 110px) * -0.55) 0 clamp(48px, 7vw, 96px);
}
.filter {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color 0.4s var(--ease);
}
.filter sup { font-size: 9px; letter-spacing: 0; margin-left: 2px; }
.filter::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.filter:hover, .filter.is-active { color: var(--ink); }
.filter.is-active::after { transform: scaleX(1); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}
.lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox__img {
  max-width: min(78vw, 1100px);
  max-height: 74vh;
  object-fit: contain;
  transition: opacity 0.5s var(--ease), transform 0.8s var(--ease);
}
.lightbox__img.is-switching { opacity: 0; transform: scale(0.98); }
.lightbox button {
  appearance: none;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 10px;
}
.lightbox__close { position: absolute; top: 20px; right: calc(var(--gutter) - 10px); }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: calc(var(--gutter) - 10px); }
.lightbox__next { right: calc(var(--gutter) - 10px); }
.lightbox__count {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
}

/* ---------- About ---------- */
.about {
  max-width: 560px;
  margin: 0 auto;
  padding-bottom: clamp(80px, 10vw, 160px);
}
.about__text { max-width: 560px; }
.about__title {
  margin: 0 0 2em;
  font-family: var(--wordmark);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.about__quote {
  margin: 2.4em 0;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.about__path { margin: 0; padding-top: 1.6em; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.about__path div { display: grid; grid-template-columns: 11em 1fr; gap: 16px; font-size: 12.5px; }
.about__path dt { text-transform: uppercase; letter-spacing: 0.04em; }
.about__path dd { margin: 0; color: var(--muted); }
.about__text p { margin: 0 0 1.4em; font-size: 15px; line-height: 1.75; letter-spacing: 0.03em; }
.about__text .small { color: var(--muted); font-size: 13px; }

/* ---------- Contact ---------- */
.contact {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-bottom: 120px;
}
.contact dl { margin: 0; display: grid; gap: 36px; }
.contact dt { color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
.contact dd { margin: 0; font-size: 16px; letter-spacing: 0.04em; }

/* ---------- Legal notice ---------- */
.legal { max-width: 680px; margin: 0 auto; padding-bottom: clamp(80px, 10vw, 140px); }
.legal section { margin-bottom: 2.6em; }
.legal h2 { margin: 0 0 1em; font-family: var(--wordmark); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.legal p { margin: 0 0 1em; font-size: 14px; line-height: 1.75; letter-spacing: 0.02em; }
.legal a { border-bottom: 1px solid var(--line); }
.legal .small { color: var(--muted); font-size: 12.5px; }
.legal .todo { background: rgba(200, 120, 60, 0.14); padding: 0 4px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .designs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about__path div { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 640px) {
  body { font-size: 13px; }
  .site-header { padding: 20px 16px; }
  .wordmark { font-size: 13px; letter-spacing: 0.12em; }
  .nav { gap: 14px; }
  .nav a { font-size: 11px; }
  .row--pair, .row--trio { padding: 0; }
  .row.row--pair, .row.row--trio { gap: 8px; }
  .row--pair .float img { width: 72%; }
  .float--tall { width: 70vw; }
  .designs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { gap: 6px 18px; }
  .filter { font-size: 11px; }
  .frame--wide { aspect-ratio: 4 / 3; }
  .row--wide { margin: 0 -16px; }
  .gallery { gap: 72px; }
  .row { gap: 48px; }
  .hero__piece { width: 84vw; }
  .lightbox__img { max-width: 86vw; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
