:root {
  --ink: #4a3530;
  --ink-soft: #7a5f58;
  --ivory: rgba(255, 250, 246, 0.62);
  --hairline: rgba(176, 138, 62, 0.45);
  --gold-1: #7a571c;
  --gold-2: #a57d2c;
  --gold-3: #c9a24e;
  --gold-4: #f3e2a8;
  --gold-gradient: linear-gradient(100deg,
      var(--gold-1) 0%, var(--gold-2) 16%, var(--gold-3) 30%, var(--gold-4) 36%,
      var(--gold-3) 42%, var(--gold-2) 56%, var(--gold-1) 72%, var(--gold-2) 88%, var(--gold-1) 100%);
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #f6e3df;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(233, 207, 138, .55); color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Background ---------- */
.backdrop {
  position: fixed; inset: -4%;
  z-index: -2;
  background: #f6e3df url("assets/background-small.jpg") center / cover no-repeat;
  animation: drift 40s var(--ease) infinite alternate;
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: url("assets/background.jpg") center / cover no-repeat;
}
.veil {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255, 251, 248, .55) 0%, rgba(255, 251, 248, .18) 55%, rgba(255, 251, 248, 0) 80%);
  transition: background .8s var(--ease);
}
body:not(.is-home) .veil { background: rgba(255, 249, 246, .38); }

@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.06) translate3d(-1%, -1%, 0); }
}

/* ---------- Gold ---------- */
.gold {
  /* background-clip: text only paints inside the box, so give descenders
     (g, p, y) and italic overhangs room, then take the space back */
  padding: .08em .14em .3em;
  margin-bottom: -.22em;
  background: var(--gold-gradient);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer 9s linear infinite;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .55)) drop-shadow(0 2px 10px rgba(140, 106, 43, .18));
}
@keyframes shimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 250% 50%; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem clamp(1rem, 4vw, 3.5rem);
  transition: background .5s var(--ease), padding .5s var(--ease), box-shadow .5s var(--ease);
}
.site-header.is-scrolled {
  padding-top: .9rem; padding-bottom: .9rem;
  background: rgba(255, 249, 246, .7);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 1px 0 var(--hairline);
}

.monogram {
  font-family: var(--serif);
  font-style: italic; font-weight: 300;
  font-size: 1.7rem; letter-spacing: .02em;
  text-decoration: none;
  color: var(--gold-1);
  border: 1px solid var(--hairline);
  border-radius: 50%;
  width: 3.1rem; height: 3.1rem;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding-bottom: .15em;
  transition: border-color .4s, transform .6s var(--ease);
}
.monogram span { color: var(--gold-2); }
.monogram:hover { border-color: var(--gold-2); transform: rotate(-8deg); }

.primary-nav { display: flex; gap: clamp(1.2rem, 3vw, 2.8rem); }
.primary-nav a,
.subnav a {
  position: relative;
  font-family: var(--sans); font-weight: 300;
  font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  padding: .4rem 0;
  transition: color .4s;
}
.primary-nav a::after,
.subnav a::after {
  content: ""; position: absolute; left: 0; right: .32em; bottom: 0;
  height: 1px; background: var(--gold-2);
  transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease);
}
.primary-nav a:hover, .subnav a:hover,
.primary-nav a[aria-current="page"], .subnav a[aria-current="page"] { color: var(--gold-1); }
.primary-nav a:hover::after, .subnav a:hover::after,
.primary-nav a[aria-current="page"]::after, .subnav a[aria-current="page"]::after {
  transform: scaleX(1); transform-origin: left;
}

.menu-toggle {
  display: none;
  background: none; border: 0; padding: .6rem; cursor: pointer;
  width: 2.75rem; height: 2.75rem;
  position: relative;
}
.menu-toggle span:not(.sr-only) {
  position: absolute; left: .6rem; right: .6rem; height: 1px;
  background: var(--gold-1);
  transition: transform .5s var(--ease), top .5s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 1.1rem; }
.menu-toggle span:nth-child(2) { top: 1.6rem; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 1.35rem; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 1.35rem; transform: rotate(-45deg); }

/* ---------- Views ---------- */
main { flex: 1; display: flex; flex-direction: column; }

.view {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 5rem) clamp(1rem, 4vw, 3rem) 5rem;
}
.view:not([hidden]) { animation: rise 1.1s var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.eyebrow {
  margin: 0 0 .6rem;
  font-family: var(--sans); font-weight: 300;
  font-size: .68rem; letter-spacing: .5em; text-transform: uppercase;
  color: var(--ink-soft);
}

.rule {
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  margin: 1.4rem auto 1.8rem;
  width: min(220px, 60%);
}
.rule::before, .rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}
.rule span {
  width: 6px; height: 6px; transform: rotate(45deg);
  border: 1px solid var(--gold-2);
}

.title {
  margin: 0;
  font-weight: 300; font-style: italic;
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 1.05; letter-spacing: .01em;
}
.lede {
  font-style: italic; font-size: 1.35rem; color: var(--ink-soft);
  margin: 0 auto 1.6rem; max-width: 34ch;
}
.view-head { text-align: center; margin-bottom: 3rem; }

.panel {
  background: var(--ivory);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, .7);
  outline: 1px solid var(--hairline);
  outline-offset: 10px;
  padding: clamp(2.2rem, 6vw, 4.5rem) clamp(1.5rem, 6vw, 5rem);
  text-align: center;
  box-shadow: 0 30px 80px -40px rgba(120, 70, 60, .35);
}
.panel-narrow { max-width: 680px; margin: 0 auto; }
.panel p { margin: 0 0 1.1rem; }
.panel .lede { margin-bottom: 2rem; }

.signature {
  margin-top: 2.2rem !important;
  font-style: italic; font-size: 1.4rem; color: var(--gold-1);
}

/* ---------- Home ---------- */
.view-home {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding-top: 0; padding-bottom: 8vh;
}
.wordmark {
  margin: 0;
  font-weight: 300; font-style: italic;
  font-size: clamp(2.4rem, 12.5vw, 9rem);
  line-height: 1.1;
  letter-spacing: -.005em;
}
.tagline {
  margin: 0 0 3rem;
  font-family: var(--sans); font-weight: 300;
  font-size: .75rem; letter-spacing: .55em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: .55em;
}
.view-home .eyebrow { margin-bottom: 1.4rem; }
.view-home .eyebrow,
.view-home .wordmark,
.view-home .rule,
.view-home .tagline,
.view-home .enter { animation: rise 1.6s var(--ease) both; }
.view-home .wordmark { animation-delay: .15s; }
.view-home .rule     { animation-delay: .45s; }
.view-home .tagline  { animation-delay: .6s; }
.view-home .enter    { animation-delay: .8s; }

.enter {
  display: inline-block;
  font-family: var(--sans); font-weight: 300;
  font-size: .7rem; letter-spacing: .45em; text-transform: uppercase;
  color: var(--gold-1); text-decoration: none;
  padding: 1rem 2.4rem 1rem 2.85rem;
  border: 1px solid var(--gold-2);
  background: transparent;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: color .6s var(--ease);
  isolation: isolate;
}
.enter::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--gold-1), var(--gold-2), var(--gold-3), var(--gold-2));
  transform: scaleX(0); transform-origin: right;
  transition: transform .7s var(--ease);
}
.enter:hover { color: #fffaf3; }
.enter:hover::before { transform: scaleX(1); transform-origin: left; }

/* ---------- Photography ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.2vw, 2rem);
}
.frame { margin: 0; }
.frame:nth-child(even) { margin-top: 3.5rem; }
.frame-btn {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: rgba(255, 250, 246, .7);
  padding: .55rem;
  box-shadow: 0 25px 60px -30px rgba(90, 50, 40, .45);
  outline: 1px solid var(--hairline); outline-offset: 6px;
  overflow: hidden;
}
.frame-btn img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  filter: saturate(.9);
  transition: transform 1.4s var(--ease), filter 1.2s var(--ease);
}
.frame-btn:hover img { transform: scale(1.045); filter: saturate(1.05); }
.frame figcaption {
  margin-top: 1.4rem; text-align: center;
  font-style: italic; font-size: 1.15rem;
}
.frame figcaption span {
  font-family: var(--sans); font-style: normal; font-size: .7rem;
  letter-spacing: .3em; color: var(--gold-1); margin-right: .4rem;
}

/* ---------- Art ---------- */
.art-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 3rem);
  max-width: 980px; margin: 0 auto;
}
.art-piece { margin: 0; text-align: center; }
.canvas {
  aspect-ratio: 3 / 4;
  border: 10px solid rgba(255, 250, 246, .85);
  outline: 1px solid var(--hairline); outline-offset: 8px;
  box-shadow: 0 25px 60px -30px rgba(90, 50, 40, .45);
  position: relative; overflow: hidden;
}
.canvas::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.55), transparent 55%);
}
.c1 { background: radial-gradient(circle at 70% 70%, #e9a7a0, #f6d9d3 60%, #fbefe9); }
.c2 { background: linear-gradient(160deg, #fbefe9 0%, #f0c2b9 45%, #e9cf8a 100%); }
.c3 { background: radial-gradient(circle at 30% 80%, #e9cf8a 0%, #f3d3cb 40%, #fdf4f0 85%); }
.art-piece figcaption { margin-top: 1.4rem; font-style: italic; }
.art-piece figcaption em { color: var(--ink-soft); }

/* ---------- Poetry ---------- */
.subnav {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: .6rem clamp(1.6rem, 5vw, 3.6rem);
  margin: -1.2rem 0 3rem;
}
.poem { text-align: left; }
.poem .eyebrow, .poem .poem-title, .poem .signature { text-align: center; }
.poem-title {
  margin: 0 0 2.4rem;
  font-weight: 400; font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  letter-spacing: .08em; line-height: 1.35; text-transform: uppercase;
  color: var(--ink);
}
.collection .poem-title { margin-bottom: 1.2rem; }
.stanza { margin: 0 auto 1.8rem; max-width: 38ch; }
.stanza p { margin: 0; font-size: 1.3rem; line-height: 1.75; }
.poem .signature { text-align: right; max-width: 38ch; margin-left: auto; margin-right: auto; }

.urdu {
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  font-size: 2rem; color: var(--gold-1); margin-bottom: 1.4rem !important;
}
.poem-list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 420px; text-align: left;
}
.poem-list li {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 1.2rem;
}
.poem-list li::after { content: none; }
.poem-list li span { flex: 1; }
.poem-list li em {
  font-family: var(--sans); font-style: normal;
  font-size: .65rem; letter-spacing: .35em; text-transform: uppercase;
  color: var(--gold-1);
}

/* ---------- Contact ---------- */
.contact-form { display: grid; gap: 1.6rem; text-align: left; margin-top: 1rem; }
.contact-form label { display: grid; gap: .3rem; }
.contact-form label span {
  font-family: var(--sans); font-weight: 300;
  font-size: .66rem; letter-spacing: .4em; text-transform: uppercase;
  color: var(--ink-soft);
}
.contact-form input,
.contact-form textarea {
  font: inherit; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--hairline);
  padding: .5rem 0; border-radius: 0;
  resize: vertical;
  transition: border-color .4s;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-bottom-color: var(--gold-1); }
.contact-form .enter { justify-self: center; margin-top: .8rem; }
.form-note { text-align: center; font-style: italic; color: var(--gold-1); min-height: 1.7em; margin: 0 !important; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.6rem clamp(1rem, 4vw, 3.5rem);
  font-family: var(--sans); font-weight: 300;
  font-size: .66rem; letter-spacing: .35em; text-transform: uppercase;
  color: var(--ink-soft);
}
.site-footer .gold { font-family: var(--serif); font-style: italic; font-size: 1.1rem; letter-spacing: .02em; text-transform: none; }
body.is-home .site-footer { justify-content: center; }
body.is-home .site-footer .gold { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 1rem;
  background: rgba(40, 26, 24, .82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fade .5s var(--ease) both;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: min(92vw, 900px); max-height: 80vh; display: block; margin: 0 auto; }
.lightbox figcaption {
  margin-top: 1.2rem; color: var(--gold-4);
  font-style: italic; font-size: 1.3rem;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: 0; cursor: pointer;
  color: var(--gold-3); font-size: 2.4rem; font-weight: 300; line-height: 1;
  width: 3rem; height: 3rem;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

:focus-visible { outline: 1px solid var(--gold-1); outline-offset: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .frame:nth-child(even) { margin-top: 2.5rem; }
  .frame:nth-child(3) { margin-top: -2.5rem; }
  .frame:nth-child(4) { margin-top: 0; }
}

@media (max-width: 760px) {
  .menu-toggle { display: block; z-index: 2; }
  .primary-nav {
    position: fixed; inset: 0;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 2.2rem;
    background: rgba(255, 247, 244, .92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    opacity: 0; visibility: hidden;
    transition: opacity .5s var(--ease), visibility .5s;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; }
  .primary-nav a { font-size: .85rem; }
  .art-grid { grid-template-columns: 1fr; max-width: 360px; }
  .panel { outline-offset: 6px; }
  .tagline { letter-spacing: .35em; padding-left: .35em; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .frame:nth-child(n) { margin-top: 0; }
  .gallery { padding: 0 .5rem; }
  .frame-btn { outline-offset: 4px; }
  .site-footer { flex-direction: column; letter-spacing: .25em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
