/* ==========================================================
   Juwayriya Abdullahi — site styles
   Colours live in :root so they're easy to change in one place.
   ========================================================== */

:root {
  --paper: #FAFAF8;
  --ink: #1C1A33;        /* deep night indigo, from the sea paintings */
  --muted: #6B6880;
  --line: #E4E2EA;
  --accent: #4B3FA0;     /* dusk violet */

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --body: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --script: "La Belle Aurore", "Snell Roundhand", "Segoe Script", cursive;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1400px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 300 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.05; }
h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.01em; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* small-caps label style used in nav and controls */
.label, .site-nav a, .menu-toggle, .hero-scroll, .work-count, .work-end a {
  font-family: var(--display); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: calc(1.4rem + env(safe-area-inset-top, 0px)) var(--gutter) 1.1rem;
  color: #fff;
  transition: background-color .4s ease, color .4s ease, box-shadow .4s ease, padding .4s ease, transform .5s var(--ease);
}
.site-header.is-solid {
  padding-top: calc(.8rem + env(safe-area-inset-top, 0px)); padding-bottom: .8rem; align-items: center;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px); color: var(--ink); box-shadow: 0 1px 0 var(--line);
}
/* hides while scrolling down, comes back when scrolling up */
.site-header.is-hidden { transform: translateY(-100%); }

.wordmark {
  font-family: var(--script); text-decoration: none;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1;
  display: inline-flex; flex-direction: column;
}
.wordmark span { padding-left: 1.4em; margin-top: -.05em; padding-right: .6em; position: relative; padding-bottom: .1em; }
.wordmark span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform-origin: left; animation: stroke 1.4s .9s var(--ease) both;
}
/* signature writes itself in on load */
.wordmark { animation: sign 1.6s .2s var(--ease) both; }
@keyframes sign { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes stroke { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.site-nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }
.site-nav a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s ease; padding-bottom: .2rem;
}
.site-nav a:hover { background-size: 100% 1px; }
.menu-toggle { display: none; }

@media (max-width: 720px) {
  .menu-toggle { display: block; background: none; border: 0; color: inherit; cursor: pointer; padding: .25rem 0; }
  .site-nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: center; gap: 1.75rem;
    background: var(--ink); color: #fff;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
  }
  .site-nav a { font-size: 2rem; letter-spacing: .02em; text-transform: none; }
  .site-header.menu-open { color: #fff; background: transparent; box-shadow: none; backdrop-filter: none; transform: none; }
  .site-header.menu-open .site-nav { opacity: 1; visibility: visible; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; height: 100vh; height: 100svh; min-height: 520px; background: var(--ink); color: #fff; }
.hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none; }
.hero::before { top: 0; height: 32%; background: linear-gradient(rgba(10, 8, 24, .55), rgba(10, 8, 24, 0)); }
.hero::after  { bottom: 0; height: 30%; background: linear-gradient(rgba(10, 8, 24, 0), rgba(10, 8, 24, .55)); }

.hero-stage { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.hero-stage li {
  position: absolute; inset: 0;
  background-size: cover; background-repeat: no-repeat; background-position: center;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.8s ease, transform 9s ease-out;
}
.hero-stage li.is-active { opacity: 1; transform: scale(1); }

.hero-bottom {
  position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter);
  bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem 2rem;
}
.hero-title {
  grid-column: 1 / -1; margin: 0;
  font-family: var(--display); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.2rem);
}
.hero-title.is-changing { animation: titleIn 1.2s var(--ease) both; }
@keyframes titleIn { from { opacity: 0; transform: translateY(.6em); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

.hero-progress { display: flex; gap: .5rem; }
.hero-progress button {
  position: relative; width: clamp(2.5rem, 6vw, 4.5rem); height: 1.5rem; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.hero-progress button::before, .hero-progress button::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
}
.hero-progress button::before { background: rgba(255, 255, 255, .3); }
.hero-progress button::after { background: #fff; transform: scaleX(0); transform-origin: left; }
.hero-progress button.is-done::after { transform: scaleX(1); }
.hero-progress button.is-active::after { animation: fill var(--dur, 7s) linear forwards; }
.hero-progress.is-paused button.is-active::after { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }

.hero-scroll {
  text-decoration: none; padding-bottom: .3rem; justify-self: end;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
}

/* ---------- Statement ---------- */
.intro { max-width: 62rem; margin: 0 auto; padding: clamp(6rem, 16vw, 12rem) var(--gutter); }
.reveal-words {
  margin: 0; font-family: var(--display); font-size: clamp(1.9rem, 4.4vw, 3.6rem);
  line-height: 1.2; letter-spacing: -0.01em;
}
.reveal-words .w { opacity: .14; transition: opacity .35s ease; }
.reveal-words .w.on { opacity: 1; }

/* ---------- Work: horizontal gallery ---------- */
.work { position: relative; background: var(--ink); color: #fff; }
.work-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 5rem 0 3rem;
}
.work-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0 var(--gutter); margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
.work-count { margin: 0; color: rgba(255, 255, 255, .6); }
.work-current { color: #fff; }

.work-track {
  display: flex; align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding: 0 var(--gutter); width: max-content; will-change: transform;
}
.piece { margin: 0; flex: none; }
/* paintings sit at different heights and sizes, like a salon wall */
.piece:nth-child(3n+1) { --h: 58vh; transform: translateY(-3vh); }
.piece:nth-child(3n+2) { --h: 46vh; transform: translateY(5vh); }
.piece:nth-child(3n)   { --h: 52vh; }
.piece-open {
  display: block; padding: 0; border: 0; background: rgba(255, 255, 255, .06);
  cursor: zoom-in; overflow: hidden;
}
.piece-open img {
  height: var(--h); width: auto; max-width: 80vw; object-fit: contain;
  transition: transform 1s var(--ease), filter .6s ease;
}
.piece-open:hover img { transform: scale(1.04); }
.piece figcaption {
  margin-top: .9rem; font-family: var(--display); font-style: italic; font-size: 1.1rem;
  display: flex; gap: .8rem; align-items: baseline;
}
.piece-num { font-style: normal; font-size: .7rem; letter-spacing: .16em; color: rgba(255, 255, 255, .5); }

.work-end { flex: none; width: min(22rem, 70vw); }
.work-end p { font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.2; margin: 0 0 1.5rem; }
.work-end a { text-decoration: none; padding-bottom: .3rem; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; }

.work-bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 2rem; height: 1px; background: rgba(255, 255, 255, .18); }
.work-bar span { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }

/* Phones and reduced motion: swipe instead of scroll-driven sliding */
.work.is-swipe .work-pin { position: relative; height: auto; padding: clamp(4rem, 12vw, 6rem) 0; }
.work.is-swipe .work-track {
  width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-bottom: 1rem; transform: none !important;
}
.work.is-swipe .work-track::-webkit-scrollbar { display: none; }
.work.is-swipe .piece, .work.is-swipe .work-end { scroll-snap-align: center; }
.work.is-swipe .work-bar { bottom: 1.5rem; }
@media (max-width: 720px) {
  .piece:nth-child(3n+1) { --h: 56vh; }
  .piece:nth-child(3n+2) { --h: 44vh; }
  .piece:nth-child(3n)   { --h: 50vh; }
  .piece-open img { max-width: 82vw; }
}

/* ---------- Parallax band ---------- */
.band { position: relative; height: 85vh; min-height: 420px; overflow: hidden; display: grid; place-items: center; color: #fff; }
.band-image {
  position: absolute; inset: -20% 0; background-size: cover; background-position: center 35%;
  will-change: transform;
}
.band::after { content: ""; position: absolute; inset: 0; background: rgba(15, 12, 35, .35); }
.band-quote {
  position: relative; z-index: 1; max-width: 18ch; margin: 0; padding: 0 var(--gutter); text-align: center;
  font-family: var(--display); font-style: italic; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.12;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}

/* ---------- About ---------- */
.about {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
  max-width: var(--max); margin: 0 auto; padding: clamp(5rem, 10vw, 9rem) var(--gutter);
}
.about-images { position: relative; padding: 0 12% 18% 0; }
.about-b {
  position: absolute; right: 0; bottom: 0; width: 55%;
  box-shadow: 0 20px 50px rgba(28, 26, 51, .25); border: 6px solid var(--paper);
  will-change: transform;
}
.about-text { max-width: 36rem; }
.about-text h2 { margin-bottom: 1.5rem; }
.lede { font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.3; margin: 0 0 1.5rem; }
.about-text p:not(.lede) { color: #3d3a52; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact {
  background: var(--ink); color: #fff; padding: clamp(5rem, 10vw, 8rem) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2rem, 6vw, 6rem);
}
.contact > h2, .contact-intro, .contact-email { grid-column: 1; }
.contact-intro { color: rgba(255, 255, 255, .72); max-width: 32ch; margin: 1.25rem 0 2rem; }
.contact-email {
  font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.2rem);
  text-decoration: none; align-self: start; word-break: break-word;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: .2rem;
}
.contact-form { grid-column: 2; grid-row: 1 / span 3; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-content: start; }
.contact-form label { display: grid; gap: .4rem; font-size: .9rem; color: rgba(255, 255, 255, .72); }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea {
  font: inherit; font-size: 1rem; color: #fff; background: transparent; border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .3); padding: .55rem 0; border-radius: 0; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom-color: #fff; }
.contact-form button {
  justify-self: start; grid-column: 1 / -1; font: 400 1rem var(--body); letter-spacing: .04em;
  color: var(--ink); background: #fff; border: 0; padding: .9rem 2rem; cursor: pointer; transition: background-color .25s ease;
}
.contact-form button:hover { background: #dcd8f0; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .contact-form { grid-column: 1; grid-row: auto; margin-top: 3rem; grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 1.75rem var(--gutter) calc(1.75rem + env(safe-area-inset-bottom, 0px));
  font-size: .85rem; color: var(--muted);
}

/* ---------- "View" cursor (computers only) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
  width: 5.5rem; height: 5.5rem; margin: -2.75rem 0 0 -2.75rem; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--ink);
  font-family: var(--display); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em;
  transform: translate(var(--x, -200px), var(--y, -200px)) scale(0);
  transition: transform .35s var(--ease);
  mix-blend-mode: normal;
}
.cursor.is-on { transform: translate(var(--x), var(--y)) scale(1); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
.has-cursor .piece-open { cursor: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #110F24; color: #fff;
}
.lightbox[open] { display: grid; grid-template-columns: 4rem 1fr 4rem; align-items: center; animation: lbIn .4s ease; }
@keyframes lbIn { from { opacity: 0; } }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; grid-column: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 0 2rem; }
.lightbox img { max-height: calc(100% - 3rem); width: auto; object-fit: contain; transition: opacity .3s ease, transform .4s var(--ease); }
.lightbox img.is-loading { opacity: 0; transform: scale(.98); }
.lightbox figcaption { margin-top: 1rem; font-family: var(--display); font-style: italic; font-size: 1.2rem; }
.lightbox button { background: none; border: 0; color: #fff; cursor: pointer; font-family: var(--body); }
.lb-prev, .lb-next { font-size: 2.75rem; height: 100%; opacity: .7; }
.lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { position: absolute; top: calc(1.25rem + env(safe-area-inset-top, 0px)); right: var(--gutter); font-size: .95rem; letter-spacing: .04em; }
@media (max-width: 600px) {
  .lightbox[open] { grid-template-columns: 0 1fr 0; }
  .lb-prev, .lb-next { display: none; }
  .lightbox figure { padding: 4rem 1rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal-words .w { opacity: 1; }
}
