/* ==========================================================================
   MOTUS — International Exhibition of Art Photography
   Shared stylesheet.  Replaces the inline styles that used to live in every
   page.  Palette is sampled from the site itself: the navy is the MOTUS logo,
   the teal was already the link colour, #f4f4f9 was already the results
   background.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@400;500;600&display=swap');

:root {
  --navy:      #101890;   /* sampled from the logo */
  --navy-dark: #0d1272;
  --teal:      #0085a6;   /* the existing link colour — rules, borders, large type */
  --teal-txt:  #007997;   /* the same teal, one step down, for small text:
                             #0085a6 measures 3.90 on #f4f4f9, under the 4.5 WCAG AA
                             floor; this reads identical and measures 4.58 */
  --teal-lite: #4fc3e0;
  --ink:       #0a0a0c;
  --ink-2:     #101318;   /* dark sections */
  --ink-3:     #2c313c;   /* hairlines on dark */
  --body:      #464b59;
  --muted:     #6b7080;
  --muted-d:   #73788a;   /* muted, on the near-black footer: #6b7080 measures 4.01 there */
  --muted-i:   #8a90a2;   /* muted, on dark */
  --soft-i:    #b9bece;   /* body text, on dark */
  --line:      #e6e6ee;
  --line-2:    #dedee8;
  --surface:   #ffffff;
  --surface-2: #f4f4f9;

  --gold:   #c9a227;
  --silver: #9aa2b1;
  --bronze: #a8703f;

  --s1: 4px;  --s2: 8px;   --s3: 12px;  --s4: 16px;  --s5: 24px;
  --s6: 32px; --s7: 48px;  --s8: 72px;  --s9: 96px;  --s10: 128px;

  --gutter: 96px;
  --section: 96px;

  --display: "Bebas Neue", "Haettenschweiler", Impact, sans-serif;
  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--teal-txt); text-decoration: none; }
a:hover { color: var(--navy); }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--navy); color: #fff; padding: 12px 20px; font-weight: 600;
}
.skip:focus { left: 0; color: #fff; }

/* ---------------------------------------------------------------- layout */

.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section); padding-bottom: var(--section); }
.section--tight { padding-top: var(--s8); padding-bottom: var(--s8); }
.section--dark { background: var(--ink-2); color: #fff; }
.section--soft { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--navy { background: var(--navy); color: #fff; }

.stack { display: flex; flex-direction: column; }
.gap-2 { gap: var(--s2); } .gap-3 { gap: var(--s3); } .gap-4 { gap: var(--s4); }
.gap-5 { gap: var(--s5); } .gap-6 { gap: var(--s6); } .gap-7 { gap: var(--s7); }

.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8); }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s6); }
.cols-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ------------------------------------------------------------ typography */

.dsp { font-family: var(--display); font-weight: 400; letter-spacing: .02em; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .01em; }
h1 { font-size: 72px; line-height: .93; }
h2 { font-size: 56px; line-height: .95; }
h3 { font-size: 34px; line-height: 1; letter-spacing: .03em; }

p { margin: 0; color: var(--body); text-wrap: pretty; }
.lead { font-size: 18px; line-height: 1.65; }
.small { font-size: 14px; }
.tiny { font-size: 13px; }

.eyebrow, .lbl {
  font-size: 12px; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.section--dark .lbl, .section--navy .lbl { color: var(--muted-i); }
.num { font-size: 11px; font-weight: 600; letter-spacing: .2em; color: var(--teal-txt); }
/* on the dark bands the darker teal drops to 3.71 — go the other way instead */
.section--dark .num, .section--navy .num, .lb .num { color: var(--teal-lite); }
.rule { width: 46px; height: 1px; background: var(--teal); }

.sec-head { display: flex; align-items: center; gap: var(--s3); }

.figure { font-family: var(--display); color: var(--navy); line-height: .8; }
.section--dark .figure, .section--navy .figure { color: #fff; }

/* ------------------------------------------------------------------- nav */

.nav { background: var(--ink); }
.nav__inner {
  display: flex; justify-content: center; align-items: center;
  flex-wrap: wrap; gap: 46px; min-height: 70px;
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--display); font-size: 20px; letter-spacing: .1em;
  text-transform: uppercase; color: #d6d8e0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--teal); }

.nav__toggle { display: none; }

/* --------------------------------------------------------------- hero */

.hero-split { display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 28px;
  font-family: var(--display); font-size: 21px; letter-spacing: .07em;
  background: var(--navy); color: #fff; border: 1px solid var(--navy);
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--dark { background: var(--ink); border-color: var(--ink); }
.btn--dark:hover { background: #000; border-color: #000; }
.btn--wide { width: 100%; }

.chip {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 13px;
  border: 1px solid #c9cbdb; font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--body);
}
.chip--solid { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip--ghost-i { border-color: var(--ink-3); color: #d6d8e0; border-radius: 999px; padding: 0 16px;
                 min-height: 32px; font-weight: 400; letter-spacing: .04em; text-transform: none; font-size: 13px; }

/* ------------------------------------------------------- PHOTOGRAPHS ----
   The rule that outranks the layout: an author's photograph is never cropped
   and never recoloured.  Plates keep their own aspect ratio; if one does not
   fit, the layout gives way, not the picture.
   ------------------------------------------------------------------------ */

.masonry { column-count: 4; column-gap: var(--s5); }
.plate { break-inside: avoid; display: block; margin: 0 0 30px; color: inherit; }
.plate img { width: 100%; height: auto; display: block; background: var(--surface-2); }
.plate:hover img { opacity: .9; }
.plate__cap { display: flex; flex-direction: column; gap: 3px; padding-top: var(--s3); }
.plate__title { font-family: var(--display); font-size: 24px; line-height: 1.05;
                letter-spacing: .03em; color: var(--ink); }
.plate__by { font-size: 13px; color: var(--body); }

.medal { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.medal--gold { color: var(--gold); }
.medal--silver { color: var(--silver); }
.medal--bronze { color: var(--bronze); }

/* A single whole photograph, e.g. the hero or a section plate.  The homepage
   draws these at random, so a tall portrait can land in a slot sized for a
   landscape.  Capping the height scales the whole picture down — it never
   crops — and keeps the fold from being pushed off the screen. */
.shot img { width: 100%; height: auto; display: block; }
/* Fit to whichever edge runs out first: a landscape photograph fills the width,
   an upright one fills the height.  object-fit:contain scales — it does not
   crop — so the whole photograph is always visible, and the frame keeps a
   fixed height so the three section plates line up and nothing jumps while
   the picture loads. */
.hero-split .shot {
  display: flex; align-items: center; justify-content: center;
  height: min(58vh, 460px);
}
.hero-split .shot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

/* The three Awards plates each fill their own column and keep their natural
   height; the row bottom-aligns them.  A fixed box with object-fit here was a
   mistake — it left the wide photograph bound by width and the others bound by
   height, so the three no longer shared a width and the row read as ragged. */
.cols-3 .shot { display: block; }
.cols-3 .shot img { width: 100%; height: auto; }

/* Three juror portraits shot in three different orientations still have to
   line up, so they share one square frame with the image contained inside. */
.portrait {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; background: var(--surface-2);
  border: 1px solid var(--line); overflow: hidden;
}
.portrait img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; }
.portrait--sm { width: 78px; height: 78px; aspect-ratio: auto; flex-shrink: 0; }

/* --------------------------------------------------------------- tables */

.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.rows > * {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s5); padding: 15px 0; border-bottom: 1px solid var(--line);
}
.rows dt, .rows .k { font-size: 15px; font-weight: 500; color: var(--ink); }
.rows dd, .rows .v { margin: 0; font-family: var(--display); font-size: 26px;
                     letter-spacing: .03em; color: var(--navy); }
.section--navy .rows { border-color: rgba(255,255,255,.18); }
.section--navy .rows > * { border-color: rgba(255,255,255,.18); }
.section--navy .rows .k { color: #c9cee9; font-weight: 400; }
.section--navy .rows .v { color: #fff; }

/* ---------------------------------------------------------------- modal */

/* A closed modal must be completely inert.  Its overlay is position:fixed, and
   a fixed child is NOT clipped by an ancestor's overflow:hidden — so without
   visibility/pointer-events the invisible overlay sits over the whole viewport
   and swallows every click on the page. */
.modal {
  position: fixed; inset: 0; z-index: 999;
  width: 0; height: 0; opacity: 0; overflow: hidden;
  visibility: hidden; pointer-events: none;
}
.modal:target {
  width: auto; height: auto; opacity: 1; overflow-y: auto;
  visibility: visible; pointer-events: auto;
  transition: opacity .35s ease;
}
/* The overlay only exists while the modal is open.  Left as a permanent
   position:fixed layer it covers the viewport and eats every click on the
   page — a fixed child is not clipped by the parent's overflow:hidden. */
.modal__overlay { display: none; background: rgba(10,10,12,.72); cursor: pointer; }
.modal:target .modal__overlay { display: block; position: fixed; inset: 0; }
.modal__dialog {
  position: relative; z-index: 2; width: 92%; max-width: 860px; max-height: 82vh;
  margin: 6vh auto; background: #fff; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(10,10,12,.32);
}
.modal__head {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  padding: 20px 26px; background: var(--ink); color: #fff; flex-shrink: 0;
}
.modal__head .dsp { font-size: 26px; letter-spacing: .04em; color: #fff; }
.modal__close {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -7px -10px -7px 0;
  color: var(--muted-i); font-size: 26px; line-height: 1;
}
.modal__close:hover { color: #fff; }
.modal__body { padding: 28px 26px 34px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal__body h4 {
  font-family: var(--display); font-size: 26px; letter-spacing: .03em;
  margin: 0 0 var(--s2); color: var(--ink);
}
.modal__body section + section { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.modal__body p + p { margin-top: var(--s3); }

/* ------------------------------------------------------------- lightbox */

.lb {
  position: fixed; inset: 0; z-index: 1200; display: none;
  background: rgba(10,10,12,.975);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  align-items: center; justify-content: center; flex-direction: column; gap: var(--s5);
  padding: 64px 24px 24px;
}
.lb[open], .lb.is-open { display: flex; }
.lb__img { max-width: 92vw; max-height: 72vh; width: auto; height: auto; display: block; }

/* The homepage lightbox carries a strip of ten, so the picture gets less height. */
.lb--strip .lb__img { max-height: 54vh; }
.lb__strip {
  display: flex; gap: 8px; max-width: min(94vw, 1080px);
  overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin;
}
.lb__strip button {
  flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0;
}
.lb__strip img {
  height: 62px; width: auto; display: block; opacity: .45;
  transition: opacity .15s; outline: 2px solid transparent; outline-offset: 2px;
}
.lb__strip button:hover img { opacity: .8; }
.lb__strip button[aria-current="true"] img { opacity: 1; outline-color: var(--teal); }
.lb__all {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--teal-lite); font-weight: 600; font-size: 15px;
}
.lb__all:hover { color: #fff; }

/* the homepage photographs invite a click */
a.shot { cursor: zoom-in; display: block; }
.hero-split a.shot { display: flex; justify-content: center; }
.cols-3 a.shot { display: flex; align-items: flex-end; justify-content: center; }

@media (max-width: 620px) {
  .hero-split .shot { height: min(46vh, 320px); }
  .lb--strip .lb__img { max-height: 44vh; }
  .lb__strip img { height: 48px; }
}
.lb__close { position: absolute; top: 14px; right: 18px; width: 48px; height: 48px;
             display: flex; align-items: center; justify-content: center;
             color: #fff; font-size: 30px; line-height: 1; background: none; border: 0; cursor: pointer; }
.lb__count { position: absolute; top: 24px; left: 24px; font-size: 12px; font-weight: 600;
             letter-spacing: .16em; text-transform: uppercase; color: var(--muted-i); }
.lb__bar { display: flex; align-items: center; gap: 26px; }
.lb__nav { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
           background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.24);
           color: #fff; cursor: pointer; font-size: 20px; }
.lb__nav:hover { background: rgba(255,255,255,.2); }
.lb__meta { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 280px; text-align: center; }
.lb__title { font-family: var(--display); font-size: 30px; letter-spacing: .03em; color: #fff; }
.lb__by { font-size: 14px; color: var(--soft-i); }
.lb__full { font-size: 13px; color: var(--teal-lite); }

/* --------------------------------------------------------------- footer */

.foot { background: var(--ink); color: #fff; padding: 56px var(--gutter); }
.foot__top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s7); flex-wrap: wrap; }
.foot a { color: #d6d8e0; display: inline-flex; align-items: center; min-height: 44px; }
.foot__addr { min-height: 0; }
.foot a:hover { color: #fff; }
.foot .mail { color: var(--teal-lite); }
.foot__addr { font-size: 14px; color: var(--muted-i); line-height: 1.7; }
.foot__social { display: flex; gap: var(--s3); }
.foot__social a {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid #2a2a33;
}
.foot__social a:hover { border-color: var(--teal); }
.foot .stack.gap-3 { gap: 0; }
.foot__bar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s5);
  margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid #22222a;
  font-size: 13px; color: var(--muted-d); flex-wrap: wrap;
}
.foot .lbl { color: var(--muted-d); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1200px) {
  :root { --gutter: 56px; --section: 80px; }
  h1 { font-size: 60px; } h2 { font-size: 46px; }
  .masonry { column-count: 3; }
  .cols-2 { gap: var(--s7); }
}

@media (max-width: 1000px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split > div:last-child { padding: 40px var(--gutter) !important; }
}

@media (max-width: 900px) {
  :root { --gutter: 32px; --section: 64px; }
  h1 { font-size: 48px; } h2 { font-size: 38px; }
  .masonry { column-count: 2; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
  .cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__inner { gap: 26px; padding-top: 12px; padding-bottom: 12px; }
  .nav a { font-size: 18px; }
}

@media (max-width: 620px) {
  :root { --gutter: 20px; --section: 48px; }
  h1 { font-size: 38px; } h2 { font-size: 32px; } h3 { font-size: 28px; }
  .masonry { column-count: 1; }
  .cols-2, .cols-3, .cols-4, .cols-5 { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .rows > * { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 0; }
  .foot { padding: 40px var(--gutter); }
  .foot__top { flex-direction: column; gap: var(--s5); }
  .modal__dialog { width: 100%; max-width: none; max-height: 100vh; margin: 0; }
  .lb__meta { min-width: 0; }
}

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

@media print {
  .nav, .lb, .modal, .foot__social { display: none !important; }
  body { font-size: 11pt; }
}
