/* ==========================================================================
   SURMA COLLECTIVE — one stylesheet for every page
   --------------------------------------------------------------------------
   1. Fonts            5. Home page          9. Contact form
   2. Settings         6. Text pages        10. Enlarged work (lightbox)
   3. Basics           7. Exhibitions       11. Tablets and phones
   4. Header, footer   8. Works grid
   ========================================================================== */


/* 1. FONTS — the files live in /fonts, so nothing is loaded from other websites
   ========================================================================== */

/* Fira Sans: everything except the works captions */
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/fira-sans-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/fira-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: italic; font-weight: 300; font-display: swap;
  src: url("../fonts/fira-sans-latin-300-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/fira-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/fira-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Fira Sans Condensed: the small print in the strip at the bottom of the footer */
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/fira-sans-condensed-latin-300-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Inter: artist names and titles under the works */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Accented letters beyond Western European (for example š, č, ž, ā): only fetched if a page uses them */
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 300; font-display: swap;
  src: url("../fonts/fira-sans-latin-ext-300-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/fira-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Fira Sans"; font-style: italic; font-weight: 300; font-display: swap;
  src: url("../fonts/fira-sans-latin-ext-300-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }


/* 2. SETTINGS — change a value here and it changes on every page
   ========================================================================== */

:root {
  --text: #333333;            /* body text and headings */
  --nav: #000000;             /* Exhibitions / About / Contact */
  --muted: #767676;           /* "View Exhibition" */
  --link: #135980;            /* the booking sentence */
  --icon: #7c6263;            /* Instagram symbol */
  --page: #ffffff;            /* page background */
  --header-bg: #f8f8f8;       /* header: a shade darker than the page, neutral */
  --footer-band: #f8f8f8;     /* strip at the very bottom: the same colour as the header */
  --footer-rule: #bdbdbd;     /* thin line above the footer */
  --field-line: #69727d;      /* lines under the contact form boxes */
  --button: #ebebeb;          /* Send button */

  --content: 1120px;          /* widest the text and grid ever get */
  --side: 20px;               /* minimum space at the screen edges */

  --header-h: 116px;          /* header height at the top of a page */
  --header-h-scrolled: 84px;  /* header height once the page has been scrolled */
  --logo-size: 39px;

  --sans: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  --condensed: "Fira Sans Condensed", "Fira Sans", "Arial Narrow", Arial, sans-serif;
  --caption: "Inter", "Helvetica Neue", Arial, sans-serif;
}


/* 3. BASICS
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);        /* room for the fixed header */
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

main { flex: 1 0 auto; }               /* pushes the footer to the bottom on short pages */

img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }

.container {
  width: min(var(--content), calc(100% - 2 * var(--side)));
  margin-left: auto;
  margin-right: auto;
}

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 8px 14px; background: #fff; color: #000; font-size: 16px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Each page fades in softly when it opens. The header does not fade, so it stays put from page to page.
   To make the fade slower or quicker, change 0.7s (seconds). */
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
main, .site-footer { animation: page-fade-in 0.7s ease-out both; }

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


/* 4. HEADER AND FOOTER — identical on every page
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5.2vw, 70px) 0 18px;
  background: var(--header-bg);
  transition: height 0.25s ease;
}
.is-scrolled .site-header { height: var(--header-h-scrolled); }

/* SURMA COLLECTIVE */
.logo {
  display: block;
  color: var(--text);
  font-size: var(--logo-size);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.097em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  top: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  top: 3px;                            /* sits a touch below the middle of the name, as in the mock-up */
}
.site-nav a { color: var(--nav); text-decoration: none; }
.site-nav a:hover { opacity: 0.6; }
.site-nav .site-nav__icon { display: block; position: relative; top: 2px; margin-left: 6px; color: var(--icon); line-height: 0; }
.site-nav__icon svg { display: block; width: 22px; height: 25px; }

/* The three lines that open the menu on tablets and phones. Hidden on computers (see section 11). */
.menu-button {
  display: none;
  flex: none;
  position: relative;
  top: 1px;
  width: 44px; height: 44px;           /* a comfortable size for a finger; the lines themselves are smaller */
  margin-right: -8px;                  /* so the lines, not the invisible button, line up with the page edge */
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.menu-button__lines,
.menu-button__lines::before,
.menu-button__lines::after {
  position: absolute;
  left: 8px;
  width: 28px; height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.menu-button__lines { top: 21px; }
.menu-button__lines::before { content: ""; left: 0; top: -9px; }
.menu-button__lines::after { content: ""; left: 0; top: 9px; }
/* when the menu is open the three lines become a cross */
.menu-open .menu-button__lines { background-color: transparent; }
.menu-open .menu-button__lines::before { transform: translateY(9px) rotate(45deg); }
.menu-open .menu-button__lines::after { transform: translateY(-9px) rotate(-45deg); }

.site-footer { flex: none; }

.site-footer__main {
  padding: 36px 0 24px;
  border-top: 1px solid var(--footer-rule);
  font-size: 16px;
  font-weight: 300;
  line-height: 24px;
  letter-spacing: 1px;
}
.site-footer__name { font-weight: 400; text-transform: uppercase; }
.site-footer__hours { margin-top: 14px; }
.site-footer__email { margin-top: 24px; }
.site-footer__email a { text-decoration: none; }
.site-footer__email a:hover { text-decoration: underline; }

.site-footer__band {
  padding: 10px 0 25px;
  background: var(--footer-band);
  font-family: var(--condensed);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.48;
}
.site-footer__band .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
}
.site-footer__band a { text-decoration: none; }
.site-footer__band a:hover { text-decoration: underline; }
.site-footer__copyright { margin-top: 20px; }
.caps { text-transform: uppercase; }


/* 5. HOME PAGE
   ========================================================================== */

.home { padding: 104px 0 167px; }
.home__inner {
  width: min(768px, calc(100% - 2 * var(--side)));
  margin: 0 auto;
}
.home__image { display: block; width: 100%; }
.home__title {
  margin-top: 26px;
  font-size: 33px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
}
.home__dates, .home__link { font-size: 16px; line-height: 26px; }
.home__dates { margin-top: 5px; }
.home__link { margin-top: 1px; }
.home__link a { color: var(--muted); }
.home__link a:hover { color: var(--text); }


/* 6. TEXT PAGES — About, Privacy Policy and the top of Exhibitions
   ========================================================================== */

.page { padding: 84px 0 150px; }

.page__heading {                       /* ABOUT, PRIVACY POLICY */
  font-size: 26px;
  font-weight: 300;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}
.page__heading + .prose { margin-top: 38.5px; }

.prose {                               /* the running text on About, Exhibitions and Privacy Policy */
  font-weight: 300;
  line-height: 1.85;
}

.prose p + p,
.prose ul + p,
.prose p + ul { margin-top: 14.5px; }
.prose h2 {
  margin: 34px 0 10px;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.5;
}
.prose ul { list-style: none; }
.prose li { position: relative; padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose li::before { content: "–"; position: absolute; left: 0; }
.prose a { color: var(--link); }


/* 7. EXHIBITIONS
   ========================================================================== */

.exhibition__label {                   /* CURRENT EXHIBITION */
  font-size: 26px;
  font-weight: 300;
  line-height: 1.2;
  text-decoration: underline;
  text-transform: uppercase;
}
.exhibition__title {                   /* WHERE ECHOES GATHER */
  margin-top: 44px;
  font-size: 33px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
}
.exhibition__dates {
  margin-top: 7px;
  font-size: 16px;
  line-height: 24px;
}
.exhibition__text { margin-top: 33px; }
.exhibition__booking {
  margin-top: 43px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}
.exhibition__booking a { color: var(--link); text-decoration: none; }
.exhibition__booking a:hover { text-decoration: underline; }


/* 8. WORKS GRID — four to a line on a computer
   ========================================================================== */

.works__heading {                      /* WORKS IN THE EXHIBITION */
  margin-top: 122px;
  padding-bottom: 18.5px;
  border-bottom: 1px solid #000;
  font-size: 26px;
  font-weight: 300;
  line-height: 1.2;
  text-transform: uppercase;
}
.works {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 56px 20px;
  margin-top: 40.5px;
  list-style: none;
}
.work__link { display: block; cursor: zoom-in; }
.work__link img { display: block; width: 100%; aspect-ratio: 1 / 1; }
.work__caption {
  margin-top: 20px;
  font-family: var(--caption);
  font-size: 15.5px;
  line-height: 24.5px;
}
.work__artist { text-transform: uppercase; }
.work__title { font-style: italic; }


/* 9. CONTACT FORM
   ========================================================================== */

.contact { padding: 55.5px 0 155px; }

.field { display: block; margin-bottom: 6.5px; }
.field__label { display: block; font-size: 16px; line-height: 24px; letter-spacing: 0.2px; }
.field__input {
  display: block;
  width: 100%;
  height: 35.5px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid var(--field-line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  -webkit-appearance: none;
  appearance: none;
}
textarea.field__input { height: 90.5px; min-height: 60px; resize: vertical; }
.field__input:focus { outline: none; border-bottom: 2px solid var(--text); padding-bottom: 4px; }

.contact__send {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--button);
  color: #0b0b0b;
  font: inherit;
  font-size: 15px;
  line-height: 40px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.contact__send:hover { background: #e0e0e0; }
.contact__send[disabled] { cursor: default; opacity: 0.6; }


/* 10. ENLARGED WORK — opens over the page when a work is clicked
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 28px;
  background: #ffffff;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  max-height: calc(100dvh - 170px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__caption {
  margin-top: 14px;
  font-family: var(--caption);
  font-size: 15.5px;
  line-height: 24.5px;
  text-align: center;
}
.lightbox__close {
  position: absolute;
  top: 14px; right: 18px;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: 300 34px/44px var(--sans);
  cursor: pointer;
}
.has-lightbox { overflow: hidden; }


/* 11. TABLETS AND PHONES
   ========================================================================== */

/* Below 1160px wide: a little more breathing room at the screen edges */
@media (max-width: 1160px) {
  :root { --side: clamp(20px, 4.5vw, 44px); }
}

/* Below 960px (tablets held upright, phones): the header can no longer hold the menu, so it becomes
   three lines on the right. Pressing them drops the menu down underneath, on its own white panel. */
@media (max-width: 959px) {
  :root {
    --logo-size: clamp(20px, calc((100vw - 92px) / 10.3), 39px);   /* full size on tablets, shrinks to fit phones */
  }
  .site-header { padding: 0 var(--side); }
  .menu-button { display: block; }

  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    padding: 8px var(--side) 22px;
    background: var(--menu-bg, #ffffff);
    border-bottom: 1px solid #e4e4e4;
    box-shadow: 0 18px 30px -22px rgba(0, 0, 0, 0.28);
    /* closed: */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .menu-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .site-nav a { display: block; padding: 15px 0 15px 32px; }
  .site-nav .site-nav__icon { top: 0; margin: 0; padding: 12px 0 12px 32px; }

  /* If a visitor's browser has scripts switched off (very rare) the button cannot work,
     so the menu simply sits on a second line under the name instead. */
  :root:not(.js) {
    --logo-size: clamp(22px, 7.4vw, 34px);
    --header-h: calc(var(--logo-size) + 66px);
    --header-h-scrolled: var(--header-h);
  }
  :root:not(.js) .site-header { flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; transition: none; }
  :root:not(.js) .menu-button { display: none; }
  :root:not(.js) .site-nav {
    position: static; flex-direction: row; align-items: center; gap: clamp(18px, 5vw, 34px);
    padding: 0; background: none; border: 0; box-shadow: none; font-size: 15px;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  :root:not(.js) .site-nav a { padding: 0; }
  :root:not(.js) .site-nav .site-nav__icon { top: 1px; }
  :root:not(.js) .site-nav__icon svg { width: 19px; height: 22px; }

  body { font-size: 18px; }
  .home { padding: 60px 0 110px; }
  .page { padding: 56px 0 110px; }
  .contact { padding: 40px 0 110px; }
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 20px; }
  .works__heading { margin-top: 90px; }
}

/* Below 640px (phones) */
@media (max-width: 639px) {
  :root.js {
    --header-h: calc(var(--logo-size) + 50px);     /* a shorter header on phones, and it stops shrinking */
    --header-h-scrolled: var(--header-h);
  }
  .menu-button { top: 0; }
  .menu-button__lines, .menu-button__lines::before, .menu-button__lines::after { width: 24px; }
  .menu-button__lines { left: 12px; }
  .menu-button__lines::before { top: -8px; }
  .menu-button__lines::after { top: 8px; }
  .menu-open .menu-button__lines::before { transform: translateY(8px) rotate(45deg); }
  .menu-open .menu-button__lines::after { transform: translateY(-8px) rotate(-45deg); }
  .site-nav { font-size: 16px; }
  body { font-size: 17px; }
  .home__title, .exhibition__title { font-size: 26px; }
  .page__heading, .exhibition__label, .works__heading { font-size: 22px; }
  .exhibition__title { margin-top: 32px; }
  .exhibition__text { margin-top: 24px; }
  .exhibition__booking { margin-top: 32px; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 16px; margin-top: 28px; }
  .works__heading { margin-top: 72px; }
  .work__caption { margin-top: 10px; font-size: 14px; line-height: 20px; }
  .home { padding-top: 48px; }
  .home, .contact { padding-bottom: 80px; }
  .page { padding: 44px 0 80px; }
  .site-footer__band .container { grid-template-columns: 1fr; row-gap: 1.48em; }
  .lightbox { padding: 56px 12px 20px; }
}

/* Visitors who have asked their device for less motion get no fade and no shrinking header */
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-nav, .menu-button__lines, .menu-button__lines::before, .menu-button__lines::after { transition: none; }
  main, .site-footer { animation: none; }
}
