/* gst.lv — modelled on the Adobe Portfolio "mell" theme the site used before */
:root {
  --text: #444;
  --muted: #bbb;
  --bg: #fff;
  --line: #e6e6e6;
  --font: "Roboto Slab", Rockwell, Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 300 16px/1.5 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 50px 40px; }

/* header: full-width banner, centred nav and social icons */
.site-header { text-align: center; padding-bottom: 90px; }
.logo img { width: 100%; }
.main-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 56px; margin-top: 38px; padding: 0 16px; }
.main-nav a { color: var(--muted); font-size: 40px; line-height: 1.1; text-decoration: none; transition: color .15s; }
.main-nav a:hover, .main-nav a.active { color: var(--text); }

.social { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 26px; }
.site-header .social { margin-top: 34px; }
.social a { display: block; width: 18px; height: 18px; color: #999; transition: color .15s; }
.social a:hover { color: var(--text); }
.social svg { width: 100%; height: 100%; fill: currentColor; }

/* page content */
h1 { font-size: 56px; font-weight: 300; line-height: 1.15; margin: 0 auto 70px; text-align: center; }
.text { max-width: 800px; margin: 0 auto 32px; font-size: 16px; line-height: 1.6; }
.text p { margin: 0 0 14px; }
.text a { color: var(--text); text-underline-offset: 3px; }
/* justified rows: each tile grows in proportion to its aspect ratio (--r = w/h) */
.media { display: flex; flex-wrap: wrap; gap: 8px; max-width: 1134px; margin: 0 auto 40px; }
.media::after { content: ""; flex-grow: 999; }
.media a { flex: var(--r) 1 calc(var(--r) * 270px); display: block; cursor: zoom-in; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.single a { flex: 1 1 100%; }
.media.single img { width: auto; max-width: 100%; margin: 0 auto; }

/* lightbox */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
            border: 0; background: #fff; display: none; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 60px); width: auto; height: auto; }
.lightbox button { position: absolute; border: 0; background: none; color: var(--text); font: 300 44px/1 var(--font);
                   padding: 16px 22px; cursor: pointer; opacity: .6; }
.lightbox button:hover { opacity: 1; }
.lightbox .lb-close { top: 4px; right: 6px; }
.lightbox .lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 0 0 40px; }
.button { display: inline-block; padding: 12px 28px; border: 1px solid var(--text); border-radius: 3px;
          text-decoration: none; font-size: 14px; letter-spacing: .02em; transition: background .15s, color .15s; }
.button:hover { background: var(--text); color: var(--bg); }

/* gallery covers */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px 5%; }
.cover { display: block; text-decoration: none; text-align: center; }
.cover img { width: 100%; aspect-ratio: 202 / 158; object-fit: cover; transition: filter .2s; }
.cover:hover img { filter: brightness(.85); }
.cover .title { display: block; font-size: 24px; line-height: 28px; padding: 8% 5% 10px; }
.cover .date { font-family: "Helvetica Neue", Arial, sans-serif; }
.cover .date { display: block; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 18px; }

/* contact form */
.contact-form { max-width: 600px; display: grid; gap: 8px; }
.contact-form label { font-size: 14px; margin-top: 12px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px; border: 1px solid var(--line);
  border-radius: 3px; font: inherit; color: var(--text); background: #fafafa; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--muted); outline-offset: 1px; }
.contact-form button { justify-self: start; margin-top: 16px; padding: 12px 36px; border: 1px solid var(--text);
  border-radius: 3px; background: var(--text); color: var(--bg); font: inherit; font-size: 14px; cursor: pointer; }
.contact-form button:hover { background: var(--bg); color: var(--text); }
.contact-form button:disabled { opacity: .5; cursor: default; }

/* footer */
.site-footer { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--line); text-align: center;
               font-size: 13px; color: #888; }

@media (max-width: 932px) {
  .wrap { padding: 0 24px 30px; }
  .site-header { padding-bottom: 50px; }
  .main-nav a { font-size: 28px; }
  .main-nav { gap: 10px 30px; }
  h1 { font-size: 36px; margin-bottom: 40px; }
  .media a { flex-basis: calc(var(--r) * 180px); }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 36px 5%; }
  .cover .title { font-size: 18px; line-height: 21px; }
}
@media (max-width: 540px) {
  .wrap { padding: 0 16px 24px; }
  .site-header { padding-bottom: 36px; }
  .main-nav { margin-top: 22px; gap: 8px 22px; }
  .site-header .social { margin-top: 20px; }
  h1 { font-size: 28px; }
  .media a { flex-basis: calc(var(--r) * 120px); }
  .lightbox img { max-width: 100vw; }
  .main-nav a { font-size: 21px; }
  .main-nav { gap: 8px 18px; }
  .gallery { grid-template-columns: 1fr; }
  .cover .title { font-size: 17px; padding-top: 12px; }
}
