/* =====================================================
   MEDAH PEI137 — Squarespace emulation, static
   Iterate on this file freely. Sections labeled.
   ===================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --line: #e6e6e6;
  --accent: #111111;
  --accent-ink: #ffffff;
  --max: 1280px;
  --pad: clamp(1rem, 4vw, 3rem);
  --radius: 6px;
  --font-display: 'Bricolage Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--muted); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.site-logo img {
  height: 44px;
  width: auto;
}
.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  flex-wrap: wrap;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.site-nav a {
  position: relative;
  padding: 0.4rem 0;
  color: var(--ink);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--ink);
}
.site-nav .ig {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; margin-left: auto; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(420px, 80vh, 820px);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: #f7f4ee;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: 4rem var(--pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
}
.hero__logo {
  width: clamp(220px, 36vw, 440px);
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}
.hero__logo--shadow {
  width: clamp(180px, 30vw, 360px);
  margin-top: -1.5rem;
  opacity: 0.95;
}
.hero__character {
  width: clamp(220px, 38vw, 460px);
  margin-top: -0.5rem;
}
.cta {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,0.2); }

/* ---------- Generic page section ---------- */
.section {
  padding: clamp(3rem, 8vw, 6rem) var(--pad);
}
.section--narrow .container { max-width: 760px; }
.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}
.section--with-bg {
  position: relative;
  color: var(--ink);
}
.section--with-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.squarespace-cdn.com/content/v1/640e095e5a144a745a7be941/fad15d10-f25c-4a5b-a9b8-20617a97ec02/new+website+background.jpg') center/cover no-repeat;
  opacity: 0.18;
  z-index: 0;
}
.section--with-bg > * { position: relative; z-index: 1; }

/* ---------- About ---------- */
.about-photo {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 1rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.about-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.about-text p {
  font-size: 1.05rem;
  margin-bottom: 1.2em;
}
.about-text .signoff {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-top: 2rem;
}
.about-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  justify-content: center;
}

/* ---------- Work / categories grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.work-card {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafafa;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.work-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.02em;
}

/* ---------- Shops ---------- */
.shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.shop-card {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.shop-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eee;
}
.shop-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.shop-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}
.shop-card p {
  font-size: 0.95rem;
  color: var(--muted);
  flex: 1;
}
.shop-card .cta {
  align-self: flex-start;
  margin-top: 1rem;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

/* ---------- Contact ---------- */
.contact-block {
  text-align: center;
  padding: 2rem 0;
}
.contact-block h2 { margin-bottom: 1rem; }
.contact-block p { font-size: 1.1rem; }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}
.contact-links a {
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.contact-links a:hover {
  background: var(--ink);
  color: var(--accent-ink);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #fafafa;
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--pad);
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer h4 {
  margin: 1rem 0 0;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.site-footer strong { color: var(--ink); }

/* ---------- Gallery ---------- */
.no-scroll { overflow: hidden; }

.gallery-page {
  padding: clamp(2rem, 6vw, 4rem) var(--pad);
}
.gallery-header {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}
.gallery-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.gallery-intro {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 1em;
  line-height: 1.65;
}
.gallery-empty {
  text-align: center;
  color: var(--muted);
  padding: 4rem 0;
}

.gallery-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.gallery-cell {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.gallery-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f1ec;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.gallery-cell figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.02em;
}

.gallery-next {
  display: block;
  text-align: center;
  margin: 4rem auto 0;
  padding: 0.85rem 1.6rem;
  max-width: max-content;
  background: var(--ink);
  color: var(--accent-ink);
  border-radius: 999px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.94);
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #fff;
}
.lightbox--open { display: flex; }
.lightbox__stage {
  flex: 1;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 1rem 0;
}
.lightbox__img {
  max-width: min(94vw, 1400px);
  max-height: 78vh;
  object-fit: contain;
  background: #111;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__info {
  text-align: center;
  padding: 0.5rem 1rem 0;
  max-width: 800px;
}
.lightbox__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.3em;
}
.lightbox__caption {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  margin: 0;
}
.lightbox__counter {
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,0.18); transform: scale(1.05); }
.lightbox__close { top: 1rem; right: 1.2rem; }
.lightbox__nav--prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox__nav--next:hover { transform: translateY(-50%) scale(1.05); }

@media (max-width: 600px) {
  .lightbox__nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .lightbox__title { font-size: 1.1rem; }
  .lightbox__counter { font-size: 0.75rem; }
}

/* Hover-zoom magnifier */
.lightbox__magnifier {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 12px 32px rgba(0, 0, 0, 0.6);
  background-color: #111;
  z-index: 220;
  opacity: 0;
  transition: opacity 0.12s ease;
  /* Crisp scaling for art with sharp edges */
  image-rendering: -webkit-optimize-contrast;
}
.lightbox__magnifier--on { opacity: 1; }

@media (hover: none) and (pointer: coarse) {
  .lightbox__magnifier { display: none !important; }
}

/* Custom cursor on the lightbox image to hint zoom */
.lightbox__img {
  cursor: zoom-in;
}
@media (hover: none) {
  .lightbox__img { cursor: default; }
}
