/* Lily McGann — portfolio styles. Colours and sizes live in :root. */
:root {
  --bg: #f8f7fd;          /* soft lavender-white page colour from the Canva layout */
  --ink: #1d1d1f;
  --muted: #6b6a73;
  --gutter: clamp(16px, 4.4vw, 60px);
  --grid-gap: clamp(8px, 1.5vw, 21px);
  --label: 400 13px/1.2 "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: 400 clamp(13px, 1.05vw, 15px)/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--body); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h2 { margin: 0; font: inherit; }

/* ---------- HOME ---------- */
.home { position: relative; height: 100vh; height: 100svh; min-height: 420px; overflow: hidden; background: #111; }
.home__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.note-card { position: absolute; z-index: 2; }
.note-card__img { width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.18)); user-select: none; -webkit-user-drag: none; }
.home__nav {
  position: absolute; left: 0; right: 0; display: flex; justify-content: center; gap: 13%;
  font: 700 clamp(9px, .82vw, 13px)/1 Arial, Helvetica, sans-serif; letter-spacing: .02em; text-transform: uppercase;
}
.home__nav a { padding: 6px 2px; }
.home__nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- SHARED PAGE FRAME ---------- */
.page {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: clamp(28px, 8.5vh, 65px) 0 clamp(28px, 6vh, 50px);
}
.page__head, .page__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--gutter); font: var(--label); text-transform: uppercase;
}
.page__foot a:hover, .page__head a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- WORK GRID ---------- */
.work-grid {
  list-style: none; margin: 0; padding: clamp(32px, 11vh, 90px) 0 clamp(32px, 11vh, 90px);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--grid-gap); align-content: start;
}
.work-tile { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #ddd; cursor: pointer; aspect-ratio: 2 / 1; overflow: hidden; }
.work-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s ease; }
.work-tile__label {
  position: absolute; inset: auto 0 0 0; padding: 10px 12px; text-align: left; color: #fff;
  font: var(--label); text-transform: uppercase; background: linear-gradient(transparent, rgba(0,0,0,.6));
  opacity: 0; transition: opacity .3s ease;
}
@media (hover: hover) {
  .work-tile:hover img { transform: scale(1.04); filter: brightness(.85); }
  .work-tile:hover .work-tile__label, .work-tile:focus-visible .work-tile__label { opacity: 1; }
}

/* ---------- PAPER NOTES (About / Say hi) ----------
   The picture is stretched behind the text so the card always fits its words. */
.paper { position: relative; aspect-ratio: var(--ar, 1.4); container-type: inline-size; }
.paper__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; filter: drop-shadow(0 2px 4px rgba(0,0,0,.06)); }
/* Text size is a fraction of the card width (cqw), so it always lands where it did in Canva. */
.paper__text { position: relative; padding: calc(var(--top, 35%) / var(--ar, 1.4)) 8.4% 6% 7.8%; font-size: var(--fs, 3.45cqw); line-height: 1.45; }
.paper__text p { margin: 0 0 1.45em; }
.paper__text p:last-child { margin-bottom: 0; }
.paper__text--center { text-align: center; }
.paper__text--center a { display: block; text-decoration: underline; text-underline-offset: 2px; line-height: 1.35; }
.paper__text--center a:hover { color: var(--muted); }

/* ---------- ABOUT ---------- */
.about { display: flex; align-items: flex-start; gap: clamp(16px, 2.3vw, 31px); padding: clamp(32px, 15vh, 118px) var(--gutter); }
.about__photo { width: clamp(150px, 16vw, 260px); aspect-ratio: 219 / 272; object-fit: cover; }
.about__note { width: clamp(300px, 28vw, 460px); }

/* ---------- SAY HI ---------- */
.sayhi { display: grid; place-items: center; padding: 40px var(--gutter); }
.sayhi__note { width: clamp(270px, 23vw, 380px); transform: rotate(.6deg); }
.sayhi__note .paper__text { padding-left: 6%; padding-right: 6%; }

/* ---------- LIGHTBOX ---------- */
.lightbox { width: min(1200px, 92vw); max-height: 92vh; padding: 0; border: 0; background: transparent; color: #fff; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 10, 14, .9); }
.lightbox__frame { position: relative; aspect-ratio: 16 / 9; max-height: 80vh; background: #000; }
.lightbox__video { width: 100%; height: 100%; object-fit: contain; }
.lightbox__soon { position: absolute; inset: 0; display: grid; place-items: center; font: var(--label); text-transform: uppercase; background: center / cover no-repeat; }
.lightbox__soon::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.lightbox__soon > * , .lightbox__soon { isolation: isolate; }
.lightbox__close { position: absolute; top: -38px; right: 0; padding: 8px 0; border: 0; background: none; color: #fff; font: var(--label); text-transform: uppercase; cursor: pointer; }
.lightbox__caption { margin: 14px 0 0; font: var(--label); text-transform: uppercase; letter-spacing: .02em; }
.lightbox__caption span { color: #aaa; }
.lightbox[open] { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); padding-left: 0; padding-right: 0; }
  .work-tile__label { opacity: 1; font-size: 10px; padding: 6px 8px; }
  .about { flex-direction: column; align-items: stretch; }
  .about__photo { width: min(62%, 260px); }
  .about__note { width: 100%; max-width: 460px; }
  .sayhi__note { width: min(100%, 340px); }
  .home__nav { font-size: clamp(10px, 2.9vw, 13px); }
}
