/* ============================================================
   Quilts by Megan: stylesheet
   ============================================================ */

:root {
  --bg:          #F5F3EF;
  --bg-glass:    rgba(245, 243, 239, 0.84);
  --surface:     #ECE8E1;
  --ink:         #191817;
  --muted:       #5C5751;
  --line:        #DCD7CF;
  --line-strong: #A8A197;
  --accent:      #B3362B;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;

  --gutter:   clamp(16px, 4vw, 56px);
  --max:      1440px;
  --radius:   4px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);

  /* Seconds for one full pass of the scrolling quilt strip. */
  --strip-loop: 220s;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { opacity: .7; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
}

.lead { font-size: 18px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn:hover { opacity: .85; }
.btn--accent  { background: var(--accent); color: #fff; }
.btn--ink     { background: var(--ink); color: var(--bg); }
.btn--outline { border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============================================================
   Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-nav__logo { line-height: 0; }
.site-nav__logo img { height: 46px; width: auto; mix-blend-mode: multiply; }
.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  font-size: 15px;
  font-weight: 500;
}
.site-nav__links a { text-decoration: none; padding: 10px 0; }
.site-nav__links .btn { padding: 12px 20px; font-size: 15px; font-weight: 500; }
@media (max-width: 560px) {
  .site-nav { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
  .site-nav__logo img { height: 38px; }
  .site-nav__links { gap: 16px; font-size: 14px; }
  .site-nav__links a:not(.btn) { display: none; }
  .site-nav__links .btn { padding: 10px 16px; font-size: 14px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 64px;
  padding-top: clamp(48px, 8vw, 112px);
  padding-bottom: clamp(32px, 4vw, 56px);
}
.hero__title-col { flex: 999 1 640px; min-width: 0; }
.hero__title-col .eyebrow { margin-bottom: 20px; }
.hero__title {
  font-size: clamp(52px, 8.4vw, 128px);
  line-height: .95;
  letter-spacing: -.02em;
}
.hero__title em { color: var(--accent); }
.hero__intro {
  flex: 1 1 340px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ============================================================
   Quilt tiles (shared)
   ============================================================ */
.tile {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out);
}
.tile:hover img { transform: scale(1.04); }
.tile--portrait { aspect-ratio: 3 / 4; }

/* ============================================================
   Scrolling strip
   ============================================================ */
.strip { overflow: hidden; padding-left: 8px; }
.strip__track {
  display: flex;
  gap: 8px;
  padding-right: 8px;          /* keeps the -50% loop seamless */
  width: max-content;
  animation: strip-scroll var(--strip-loop) linear infinite;
}
.strip:hover .strip__track,
.strip:focus-within .strip__track { animation-play-state: paused; }
.strip .tile { flex: none; width: clamp(220px, 19vw, 380px); }

@keyframes strip-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .strip { overflow-x: auto; }
  .strip__track { animation: none; }
}

/* ============================================================
   Gallery
   ============================================================ */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
}
.section-head h2 { font-size: clamp(40px, 5vw, 72px); }

.gallery { padding-top: clamp(72px, 9vw, 136px); }
.gallery .section-head {
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.size-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.size-toggle button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.size-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.quilt-grid {
  --tile-min: 240px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr));
  gap: clamp(12px, 1.6vw, 24px);
}
.quilt-grid.is-large { --tile-min: 380px; }
@media (max-width: 560px) {
  .quilt-grid { --tile-min: 150px; }
  .quilt-grid.is-large { --tile-min: 280px; }
}

.coming-soon {
  aspect-ratio: 3 / 4;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}
.coming-soon span {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.1;
  color: var(--ink);
}

/* ============================================================
   Up close
   ============================================================ */
.up-close { padding-top: clamp(96px, 11vw, 160px); }
.up-close .section-head { margin-bottom: 40px; gap: 16px 64px; }
.up-close .section-head p { max-width: 420px; color: var(--muted); }
.detail-grid { column-width: 300px; column-gap: 16px; }
.detail-grid .tile {
  break-inside: avoid;
  margin-bottom: 16px;
}
.detail-grid .tile img { height: auto; }

/* ============================================================
   About
   ============================================================ */
.about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px clamp(40px, 6vw, 96px);
  padding-top: clamp(96px, 11vw, 168px);
  padding-bottom: clamp(96px, 11vw, 168px);
}
.about__photo { flex: 1 1 340px; max-width: 520px; }
.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
.about__copy { flex: 999 1 420px; min-width: 0; max-width: 640px; }
.about__copy .eyebrow { margin-bottom: 16px; }
.about__copy h2 { margin-bottom: 32px; font-size: clamp(40px, 5vw, 68px); }
.about__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 18px;
  color: var(--muted);
}
.about__text a { color: var(--ink); }
.about__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  font-size: 14px;
  font-weight: 500;
}

/* ============================================================
   Process
   ============================================================ */
.process {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.process .wrap {
  padding-top: clamp(64px, 8vw, 112px);
  padding-bottom: clamp(64px, 8vw, 112px);
}
.process h2 { margin-bottom: 48px; font-size: clamp(36px, 4vw, 56px); }
.process ol {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px 32px;
}
.process li { border-top: 1px solid var(--ink); padding-top: 20px; }
.process__num {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
}
.process h3 { margin-bottom: 8px; font-size: 18px; font-weight: 600; }
.process li p:last-child { color: var(--muted); font-size: 16px; }

/* ============================================================
   Commission CTA + footer
   ============================================================ */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  padding-top: clamp(96px, 12vw, 176px);
  padding-bottom: clamp(96px, 12vw, 176px);
}
.cta h2 {
  max-width: 980px;
  font-size: clamp(48px, 7vw, 104px);
  line-height: .98;
  letter-spacing: -.01em;
}
.cta p { max-width: 520px; }
.cta .btn { margin-top: 8px; padding: 18px 32px; font-size: 17px; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
}

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 13, 12, .96);
  color: #fff;
}
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(14, 13, 12, .6); }
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 3vw, 32px);
}
.lightbox__count {
  font-size: 14px;
  color: rgba(255, 255, 255, .7);
  font-variant-numeric: tabular-nums;
}
.lightbox__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 32px);
  padding: 0 clamp(8px, 3vw, 32px);
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  object-fit: contain;
  border-radius: 2px;
}
.lightbox__foot { display: flex; justify-content: center; padding: 20px 16px 28px; }
.lightbox__foot a {
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.round-btn {
  flex: none;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
}
.round-btn:hover { background: rgba(255, 255, 255, .16); }
.lightbox :focus-visible { outline-color: #fff; }
@media (max-width: 560px) {
  .lightbox__stage .round-btn { display: none; }
  .lightbox__stage { padding: 0; }
}

/* ============================================================
   Single quilt page
   ============================================================ */
.quilt-page {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px clamp(40px, 5vw, 88px);
  padding-top: clamp(24px, 3vw, 40px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.quilt-page__media {
  flex: 999 1 560px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quilt-page__media > img,
.quilt-page__media figure img {
  width: 100%;
  border-radius: var(--radius);
}
.quilt-page__media figcaption { padding-top: 10px; font-size: 14px; color: var(--muted); }
.quilt-page__info {
  flex: 1 1 340px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 8px;
}
@media (min-width: 960px) {
  .quilt-page__info { position: sticky; top: 104px; }
}
.quilt-page__back {
  align-self: flex-start;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
}
.quilt-page__quote {
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1.04;
  letter-spacing: -.01em;
}
.quilt-page__title { font-size: clamp(64px, 7vw, 112px); line-height: .92; letter-spacing: -.02em; }
.quilt-page__story {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 18px;
  color: var(--muted);
}
.quilt-page__pending {
  padding: 20px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--muted);
}
.specs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  border-top: 1px solid var(--ink);
}
.specs dt, .specs dd { padding: 14px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 14px; color: var(--muted); }
.specs dd { font-size: 15px; }
.quilt-page__pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  font-size: 15px;
  font-weight: 500;
}
.quilt-page__pager a { padding: 10px 0; text-decoration: none; }

.more { border-top: 1px solid var(--line); }
.more .wrap {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(64px, 8vw, 112px);
}
.more h2 { margin-bottom: 32px; font-size: clamp(32px, 3.4vw, 48px); }
.more__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
@media (max-width: 560px) {
  .more__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.more__grid .tile { cursor: pointer; }

/* 404 */
.not-found {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.not-found h1 { font-size: clamp(48px, 7vw, 96px); }
