/* joenicholls.co.uk — rebuilt from the Adobe Portfolio theme measurements (Oct 2026) */
:root {
  --bg: #111111;
  --text: #ffffff;
  --muted: #aeaeae;
  --dim: #999999;
  --field: #373737;
  --font: "Bebas Neue", "Bebas Kai", Impact, "Arial Narrow", sans-serif;
  --gutter: 4%;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 400; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; position: relative; z-index: 3;
  height: 160px; padding: 0 var(--gutter) 10px;
}
.nav { flex: 1; display: flex; flex-wrap: wrap; column-gap: 20px; max-width: 30%; }
.nav a { color: var(--muted); font-size: 19px; line-height: 19px; text-transform: uppercase; transition: color .15s; }
.nav a:hover, .nav a.active { color: #fff; }
.logo { position: absolute; left: 50%; transform: translateX(-50%); font-size: 35px; line-height: 35px; text-transform: uppercase; white-space: nowrap; }
.hamburger { display: none; position: absolute; right: 5%; top: 50%; transform: translateY(-50%); padding: 20px 0 20px 20px; }
.hamburger i { display: block; width: 24px; height: 2px; margin-bottom: 4px; background: #fff; }
.hamburger i:last-child { margin-bottom: 0; }

.mobile-nav { position: fixed; inset: 0; z-index: 99; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.mobile-nav[hidden] { display: none; }
.mobile-nav nav { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.mobile-nav nav a { color: var(--muted); font-size: 22px; line-height: 32px; text-transform: uppercase; }
.mobile-nav nav a.active { color: #fff; }
.mobile-nav__close { position: absolute; top: 30px; right: 5%; width: 40px; height: 40px; }
.mobile-nav__close::before, .mobile-nav__close::after { content: ""; position: absolute; left: 50%; top: 10px; width: 2px; height: 20px; background: #fff; }
.mobile-nav__close::before { transform: rotate(45deg); }
.mobile-nav__close::after { transform: rotate(-45deg); }

main { padding: 0 var(--gutter); }

/* ---------- project covers (Work / Photography) ---------- */
.covers { display: flex; flex-wrap: wrap; gap: 0 5px; }
.cover { position: relative; display: block; width: calc(50% - 2.5px); margin-bottom: 5px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b0b0b; }
.covers > .cover:only-child { width: 100%; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: 0; transition: opacity .2s ease; }
.cover__details { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 8%; text-align: center; opacity: 0; transition: opacity .15s ease; }
.cover:hover::after, .cover:focus-visible::after { opacity: .9; }
.cover:hover .cover__details, .cover:focus-visible .cover__details { opacity: 1; }
.cover__title { font-size: 24px; line-height: 28px; padding-bottom: 3px; text-transform: uppercase; }
.cover__date { color: var(--dim); font-size: 16px; line-height: 20px; padding-top: 5px; }

/* festival-style laurel badge on a cover (e.g. Culling's BSC nomination); stays visible on hover */
.badge { position: absolute; top: 14px; left: 14px; z-index: 2; width: 96px; height: 96px; color: #fff; opacity: .92; pointer-events: none; }
.badge__laurel { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge__text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.badge__text span:first-child { font-size: 15px; letter-spacing: .02em; max-width: 54px; }
.badge__text span:last-child { font-size: 13px; margin-top: 3px; opacity: .85; }
.badge__laurel { filter: drop-shadow(0 1px 4px rgba(0,0,0,.45)); }

/* ---------- project pages ---------- */
.page { max-width: 1400px; margin: 0 auto; }
.page-header { max-width: 620px; margin: 0 auto; padding: 30px 0 80px; text-align: center; }
.page-header h1 { margin: 0; padding-bottom: 20px; font-size: 30px; line-height: 34px; font-weight: 400; text-transform: uppercase; }
.block { padding-bottom: 40px; }
.block--grid { padding-bottom: 20px; }
.block--image { padding-bottom: 20px; }
.ratio { position: relative; height: 0; overflow: hidden; background: #191919; }
.ratio iframe, .ratio video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.block--image img { width: 100%; height: auto; }

/* justified photo grid: each item's basis is its aspect ratio (--r) times a share of the row,
   so about three landscape frames sit per row at any width, like Adobe's media collection */
.block--grid { display: flex; flex-wrap: wrap; margin: 0 -4px; }
.grid__item { position: relative; display: block; margin: 4px; flex: calc(var(--r) * 19) 1 calc(var(--r) * 19%); }
.grid__item > span { display: block; }
.grid__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.grid__spacer { flex-grow: 10000; }
/* grids Adobe capped at N images per row (Culling, Higher in Command: 1; Daniel Abraham: 2) */
.block--grid[data-per-row] .grid__item { flex: 0 0 calc(100% / var(--per-row) - 8px); }
.block--grid[data-per-row] .grid__spacer { display: none; }

.block--columns { display: flex; align-items: center; gap: 40px; }
.block--columns .block { padding-bottom: 0; }
.block--columns .rich-text { text-align: center; }
.rich-text { font-size: 22px; line-height: 1.35; color: #fff; }
.rich-text span[style] { font-size: inherit !important; }

.related { max-width: 1400px; margin: 0 auto; padding: 60px 0; }
.related h3 { margin: 0 0 30px; font-size: 24px; line-height: 26px; font-weight: 400; text-transform: uppercase; }

/* ---------- contact ---------- */
.contact-form { max-width: 600px; margin: 0 auto; padding-bottom: 80px; }
.contact-form label { display: block; font-size: 16px; line-height: 16px; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin: 10px 0 30px; padding: 1px 10px;
  font: inherit; font-size: 16px; line-height: 42px; color: #fff;
  background: var(--field); border: 1px solid var(--field); border-radius: 3px; outline: none;
}
.contact-form textarea { height: 132px; padding: 13px 10px; line-height: 1.3; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #777; }
.contact-form ::placeholder { color: rgba(255, 255, 255, .4); }
.contact-form button { height: 40px; padding: 0 25px; font-size: 18px; line-height: 40px; color: var(--bg); background: #fff; border-radius: 20px; }
.contact-form button:hover { background: #ddd; }
.contact-form .trap { display: none; }
.form-status { min-height: 20px; color: var(--dim); font-size: 16px; }
.center { text-align: center; }

/* ---------- back to top ---------- */
.to-top { position: fixed; right: 40px; bottom: 40px; z-index: 3; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .7); opacity: 0; pointer-events: none; transition: opacity .2s, background .2s, color .2s; }
.to-top svg { width: 24px; height: 24px; }
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: #fff; color: var(--bg); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(17, 17, 17, .97); }
.lb[hidden] { display: none; }
.lb img { max-width: 92vw; max-height: 90vh; object-fit: contain; }
.lb button { position: absolute; color: #fff; font-size: 34px; padding: 20px; opacity: .7; }
.lb button:hover { opacity: 1; }
.lb__close { top: 10px; right: 20px; }
.lb__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 768px) {
  .site-header { height: 160px; padding: 0 5% 6px; justify-content: center; }
  .nav { display: none; }
  .logo { position: static; transform: none; padding: 0 39px; font-size: 23px; line-height: 23px; text-align: center; }
  .hamburger { display: block; }
  main { padding: 0; }
  .page-header { padding: 16px 5% 29px; }
  .page-header h1 { font-size: 19px; line-height: 22px; padding-bottom: 13px; }
  .block { padding-bottom: 18px; }
  .block--columns, .block--text, .contact-form { padding-left: 5%; padding-right: 5%; }
  .related { padding: 25px 0; }
  .related h3 { margin-bottom: 16px; padding: 0 5%; font-size: 15px; line-height: 16px; }
  .covers { padding: 0; }
  .cover__title { font-size: 18px; line-height: 21px; }
  .cover__date { font-size: 14px; }
  .badge { width: 76px; height: 76px; top: 10px; left: 10px; }
  .badge__text span:first-child { font-size: 12px; max-width: 44px; }
  .badge__text span:last-child { font-size: 11px; }
  .block--columns { flex-direction: column; gap: 30px; }
  .rich-text { font-size: 18px; }
  .to-top { display: none; }
}
@media (max-width: 540px) {
  .cover { width: 100%; }
  .grid__item { flex-basis: calc(var(--r) * 30%); }
}
