/* Nour Assi — paintings */
:root {
  --bg: #f3efe8;
  --bg-2: #ebe5dc;
  --ink: #1f1c19;
  --ink-2: #4f4841;
  --muted: #8b8178;
  --line: #d9d1c5;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: #e9b7c0; }

.label {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.wrap { padding: 0 var(--gutter); max-width: 1500px; margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 26px var(--gutter);
  background: linear-gradient(var(--bg) 40%, transparent);
}
.signature { font-style: italic; font-size: 1.55rem; text-decoration: none; letter-spacing: 0.01em; }
.nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav a { text-decoration: none; font-size: 1.1rem; font-style: italic; color: var(--ink-2); position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: currentColor; transition: right .5s cubic-bezier(.2,.7,.2,1); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Home: opening ---------- */
.opening {
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr auto;
  gap: 0 clamp(12px, 2vw, 28px);
  padding: 110px var(--gutter) 40px;
}
.opening figure { margin: 0; }
.opening__a { grid-column: 2 / span 4; grid-row: 1; align-self: center; }
.opening__b { grid-column: 8 / span 3; grid-row: 1; align-self: end; margin-bottom: 4vh; }
.opening img { box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 24px 50px -24px rgba(40,25,10,.35); }
.opening__name {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 18px; margin-top: 36px;
}
.opening__name h1 { margin: 0; font-weight: 400; font-size: clamp(3.4rem, 10vw, 9.5rem); line-height: .85; letter-spacing: -0.02em; }
.opening__name p { margin: 0 0 .5em; font-style: italic; color: var(--ink-2); font-size: 1.25rem; max-width: 17em; text-align: right; }
figcaption { margin-top: 12px; font-size: .98rem; color: var(--ink-2); }
figcaption em { color: var(--ink); }
@media (max-width: 820px) {
  .opening { grid-template-columns: repeat(6, 1fr); padding-top: 96px; grid-template-rows: auto auto auto; }
  .opening__a { grid-column: 1 / span 5; }
  .opening__b { grid-column: 3 / span 4; margin: 32px 0 0; grid-row: 2; }
  .opening__name { grid-row: 3; }
  .opening__name p { text-align: left; }
}

/* ---------- Statement ---------- */
.statement { padding: clamp(100px, 16vw, 220px) var(--gutter); }
.statement p {
  font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.25; margin: 0 auto; max-width: 21em;
  text-indent: 3em;
}

/* ---------- Series ---------- */
.series-head {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 clamp(12px, 2vw, 28px);
  border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: clamp(56px, 8vw, 120px);
}
.series-head .num { grid-column: 1 / span 2; font-size: clamp(3rem, 6vw, 5.5rem); line-height: .9; font-style: italic; color: var(--muted); }
.series-head h2 { grid-column: 3 / span 5; margin: 0; font-weight: 400; font-size: clamp(2.8rem, 6vw, 5.5rem); line-height: .9; }
.series-head p { grid-column: 9 / span 4; margin: 8px 0 0; color: var(--ink-2); font-size: 1.1rem; }
@media (max-width: 820px) {
  .series-head { grid-template-columns: 1fr; }
  .series-head .num, .series-head h2, .series-head p { grid-column: 1; }
  .series-head p { margin-top: 18px; }
}

.plates { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(48px, 7vw, 110px) clamp(12px, 2vw, 28px); padding-bottom: clamp(120px, 14vw, 200px); }
.plate { margin: 0; }
.plate a { display: block; text-decoration: none; }
.plate img { width: 100%; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 22px 44px -26px rgba(40,25,10,.4); transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.plate a:hover img { transform: translateY(-4px); }
.plate--detail img { box-shadow: none; }
.plate--detail figcaption { font-style: italic; }
.p-1 { grid-column: 1 / span 8; }
.p-2 { grid-column: 10 / span 3; align-self: end; }
.p-3 { grid-column: 3 / span 4; }
.p-4 { grid-column: 8 / span 4; margin-top: 18vh; }
.p-5 { grid-column: 2 / span 3; align-self: center; }
.p-6 { grid-column: 6 / span 5; }
.p-7 { grid-column: 4 / span 5; }
.p-8 { grid-column: 1 / span 4; align-self: end; }
.p-9 { grid-column: 6 / span 4; margin-top: 12vh; }
.p-10 { grid-column: 10 / span 3; align-self: center; }
@media (max-width: 820px) {
  .plates { grid-template-columns: repeat(6, 1fr); }
  .p-1, .p-6, .p-7 { grid-column: 1 / -1; }
  .p-2, .p-5, .p-8, .p-10 { grid-column: 3 / span 4; margin-top: 0; }
  .p-3, .p-4, .p-9 { grid-column: 1 / span 5; margin-top: 0; }
}

/* ---------- Full-bleed texture ---------- */
.bleed { height: clamp(320px, 70vh, 760px); overflow: hidden; position: relative; }
.bleed img { position: absolute; left: 0; top: -20%; width: 100%; height: 140%; object-fit: cover; will-change: transform; }
.bleed .label { position: absolute; right: var(--gutter); bottom: 18px; color: rgba(255,255,255,.9); }

.quote { padding: clamp(100px, 14vw, 200px) var(--gutter); text-align: center; }
.quote blockquote { margin: 0 auto; max-width: 22em; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.3; font-style: italic; }
.quote cite { display: block; margin-top: 26px; font-style: normal; }

/* ---------- In situ strip ---------- */
.situ { padding: clamp(80px, 10vw, 140px) 0; background: var(--bg-2); }
.situ__head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.situ__head h2 { margin: 0; font-weight: 400; font-style: italic; font-size: clamp(2.2rem, 4vw, 3.4rem); }
.strip { display: flex; gap: clamp(14px, 2vw, 28px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 18px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.strip figure { margin: 0; flex: 0 0 auto; width: clamp(260px, 32vw, 500px); scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Coda ---------- */
.coda { padding: clamp(110px, 14vw, 200px) var(--gutter); text-align: center; }
.coda p { max-width: 25em; margin: 18px auto 0; font-size: 1.35rem; color: var(--ink-2); }
.textlink { text-decoration: none; font-style: italic; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .3s; }
.textlink:hover { border-color: var(--ink); }

/* ---------- Pages ---------- */
.page-top { padding: 150px var(--gutter) clamp(50px, 7vw, 90px); }
.page-top h1 { margin: 0; font-weight: 400; font-size: clamp(3.2rem, 9vw, 8rem); line-height: .9; letter-spacing: -0.02em; }
.page-top p { max-width: 30em; margin: 24px 0 0; font-size: 1.25rem; color: var(--ink-2); font-style: italic; }

/* Works index */
.series-filter { display: flex; gap: 26px; margin-top: 36px; }
.series-filter button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-style: italic; font-size: 1.2rem; color: var(--muted); border-bottom: 1px solid transparent; }
.series-filter button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.index { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(60px, 7vw, 100px) clamp(20px, 3vw, 48px); padding-bottom: 160px; align-items: end; }
@media (max-width: 900px) { .index { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .index { grid-template-columns: 1fr; } }
.work { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.work__frame { display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 1; }
.work__frame img { max-height: 100%; width: auto; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 20px 40px -24px rgba(40,25,10,.4); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.work:hover .work__frame img { transform: translateY(-5px); }
.work .tag { display: block; margin-top: 18px; font-size: 1.05rem; color: var(--ink-2); }
.work .tag em { color: var(--ink); font-size: 1.2rem; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b3342f; margin-left: 8px; vertical-align: 2px; }

/* Work viewer */
dialog.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); }
dialog.viewer::backdrop { background: var(--bg); }
.viewer__grid { display: grid; grid-template-columns: 1.5fr 1fr; height: 100%; }
.viewer__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 70px 40px 110px; overflow: hidden; min-height: 0; }
.viewer__stage img { max-height: 100%; max-width: 100%; object-fit: contain; box-shadow: 0 24px 50px -26px rgba(40,25,10,.45); }
.viewer__thumbs { position: absolute; left: 40px; bottom: 30px; display: flex; gap: 10px; }
.viewer__thumbs button { width: 54px; height: 54px; padding: 0; border: 0; background: none; cursor: pointer; opacity: .45; transition: opacity .3s; }
.viewer__thumbs button[aria-pressed="true"] { opacity: 1; outline: 1px solid var(--ink); outline-offset: 3px; }
.viewer__thumbs img { width: 100%; height: 100%; object-fit: cover; box-shadow: none; }
.viewer__text { padding: 120px clamp(28px, 4vw, 70px) 60px 20px; overflow-y: auto; }
.viewer__text h2 { margin: 10px 0 18px; font-weight: 400; font-size: clamp(2.6rem, 4vw, 3.8rem); line-height: .95; font-style: italic; }
.viewer__text p { color: var(--ink-2); font-size: 1.2rem; }
.viewer__text dl { margin: 30px 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: 1.05rem; }
.viewer__text dt { color: var(--muted); font-family: var(--sans); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; padding-top: 6px; }
.viewer__text dd { margin: 0; }
.viewer__close { position: absolute; top: 22px; right: var(--gutter); z-index: 3; background: none; border: 0; cursor: pointer; font: inherit; font-style: italic; font-size: 1.15rem; color: var(--ink-2); }
.viewer__close:hover { color: var(--ink); }
.loupe-hint { position: absolute; bottom: 44px; right: 40px; }
@media (max-width: 860px) {
  .viewer__grid { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; min-height: 100%; }
  dialog.viewer { overflow-y: auto; }
  .viewer__stage { height: 62vh; padding: 64px 16px 86px; }
  .viewer__thumbs { left: 16px; bottom: 20px; }
  .viewer__text { padding: 20px var(--gutter) 60px; }
  .loupe-hint { display: none; }
}

/* Loupe */
.loupe {
  position: fixed; width: 220px; height: 220px; border-radius: 50%;
  pointer-events: none; z-index: 100; opacity: 0; transition: opacity .25s;
  box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 18px 40px rgba(0,0,0,.35);
  background-repeat: no-repeat; transform: translate(-50%, -50%);
}
.loupe.on { opacity: 1; }
@media (pointer: coarse) { .loupe { display: none; } }

/* Studio */
.prose { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 clamp(12px, 2vw, 28px); padding-bottom: clamp(90px, 12vw, 160px); }
.prose__side { grid-column: 1 / span 3; }
.prose__body { grid-column: 5 / span 7; }
.prose__body p { margin: 0 0 1.1em; font-size: 1.3rem; line-height: 1.55; color: var(--ink-2); }
.prose__body p.lead { font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.3; color: var(--ink); }
.draft { color: var(--muted) !important; font-style: italic; font-size: 1.05rem !important; }
@media (max-width: 820px) { .prose { grid-template-columns: 1fr; } .prose__side, .prose__body { grid-column: 1; } .prose__side { margin-bottom: 18px; } }
.textures { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.5vw, 20px); padding-bottom: clamp(90px, 12vw, 160px); }
.textures figure { margin: 0; }
.textures figcaption { font-size: .92rem; font-style: italic; }
@media (max-width: 760px) { .textures { grid-template-columns: repeat(2, 1fr); } }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ledger li { display: flex; justify-content: space-between; gap: 6px 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.15rem; flex-wrap: wrap; }
.ledger li span:last-child { font-style: italic; color: var(--ink-2); }

/* Contact — a letter */
.letter { max-width: 760px; padding-bottom: 160px; }
.letter .line { display: flex; align-items: baseline; gap: 18px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.letter .line label { flex: 0 0 90px; }
.letter input, .letter select, .letter textarea {
  flex: 1; min-width: 0; font: inherit; font-size: 1.3rem; background: transparent; border: 0; color: var(--ink); padding: 0; outline: none;
}
.letter select { font-style: italic; cursor: pointer; -webkit-appearance: none; appearance: none; }
.letter textarea { display: block; width: 100%; min-height: 260px; resize: vertical; line-height: 1.6; margin-top: 22px;
  background-image: linear-gradient(transparent calc(1.6em - 1px), var(--line) calc(1.6em - 1px), var(--line) 1.6em, transparent 1.6em);
  background-size: 100% 1.6em; background-attachment: local; }
.letter input::placeholder, .letter textarea::placeholder { color: #b0a69b; font-style: italic; }
.send { margin-top: 36px; background: none; border: 0; padding: 0 0 4px; font: inherit; font-size: 1.45rem; font-style: italic; cursor: pointer; border-bottom: 1px solid var(--ink); color: var(--ink); }
.send:hover { color: var(--ink-2); }
.aside-note { margin-top: 56px; color: var(--ink-2); font-size: 1.15rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px var(--gutter) 34px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 18px 40px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 26px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; font-style: italic; color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); }

/* Motion */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.4s ease, transform 1.4s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.fade-in { animation: fade 1.8s ease both; }
.fade-in.d2 { animation-delay: .35s; }
.fade-in.d3 { animation-delay: .7s; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .fade-in { opacity: 1; transform: none; transition: none; animation: none; }
  html { scroll-behavior: auto; }
}
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); background: var(--ink); color: var(--bg); padding: 12px 22px; font-style: italic; transition: transform .4s; z-index: 200; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.viewer__close:focus { outline: none; } .viewer__close:focus-visible { text-decoration: underline; }

/* Made for you (home) */
.made { padding: clamp(110px, 14vw, 200px) 0; }
.made__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 clamp(12px, 2vw, 28px); align-items: start; }
.made__text { grid-column: 1 / span 5; grid-row: 1 / span 2; padding-top: 4vh; }
.made__text h2 { margin: 14px 0 28px; font-weight: 400; font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: .95; }
.made__text p { font-size: 1.3rem; color: var(--ink-2); max-width: 24em; }
.made__img { margin: 0; }
.made__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.made__img figcaption { font-style: italic; }
.made__img--a { grid-column: 7 / span 3; grid-row: 1; }
.made__img--b { grid-column: 10 / span 3; grid-row: 1; margin-top: 16vh; }
@media (max-width: 820px) {
  .made__grid { grid-template-columns: repeat(6, 1fr); }
  .made__text { grid-column: 1 / -1; grid-row: auto; margin-bottom: 40px; }
  .made__img--a { grid-column: 1 / span 3; grid-row: auto; }
  .made__img--b { grid-column: 4 / span 3; grid-row: auto; margin-top: 12vh; }
}

/* Commissions page */
.spaces { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); padding-bottom: clamp(90px, 12vw, 160px); }
.spaces figure { margin: 0; }
.spaces figure:nth-child(2) { margin-top: 14vh; }
.spaces img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.spaces h3 { margin: 24px 0 10px; font-weight: 400; font-style: italic; font-size: clamp(2rem, 3vw, 2.6rem); }
.spaces p { font-size: 1.2rem; color: var(--ink-2); max-width: 28em; }
@media (max-width: 760px) { .spaces { grid-template-columns: 1fr; } .spaces figure:nth-child(2) { margin-top: 0; } }
.begins { list-style: none; margin: 0; padding: 0; counter-reset: b; }
.begins li { counter-increment: b; position: relative; padding: 22px 0 22px 64px; border-top: 1px solid var(--line); font-size: 1.3rem; color: var(--ink-2); line-height: 1.5; }
.begins li:last-child { border-bottom: 1px solid var(--line); }
.begins li::before { content: counter(b, lower-roman) "."; position: absolute; left: 0; top: 20px; font-style: italic; font-size: 1.6rem; color: var(--muted); }
.begins em { color: var(--ink); }
@media (max-width: 520px) { .nav { gap: 14px; } .nav a { font-size: 1rem; } .signature { font-size: 1.3rem; } }
.thanks { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.2; margin: 40px 0; }
.thanks em { color: var(--ink-2); }
