/* Sofya Gray: a copy of the look of sofyagray.com (IONOS MyWebsite Now), written by hand. */

@font-face { font-family: "Bebas Neue"; src: url("/fonts/BebasNeue-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Anton"; src: url("/fonts/Anton-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cabin"; src: url("/fonts/Cabin-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Oswald"; src: url("/fonts/Oswald-Regular.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #000;
  --ink: #fff;
  --muted: #777;
  --grey: #b3b3b3;
  --error: #ff6b6b;
  --wrap: 960px;
  --gutter: 4px;
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --body: "Cabin", "Helvetica Neue", Arial, sans-serif;
}

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

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/normal var(--body);
  hyphens: manual;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1 0 auto; }

img { display: block; max-width: 100%; }

a { color: inherit; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 139px;
}

.logo {
  display: block;
  color: var(--ink);
  margin-bottom: 10px;
  font: 400 56px/normal var(--display);
  text-decoration: none;
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 12px; margin-right: 10px; }

.nav a {
  display: block;
  padding: 8px 10px;
  color: var(--ink);
  font: 400 18px/normal "Oswald", "Arial Narrow", sans-serif;
  text-decoration: none;
}

.nav a:hover { background: rgba(255, 255, 255, .1); }
.nav a[aria-current="page"] { background: var(--ink); color: #000; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -4px;
  padding: 10px 7px;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 30px;
  height: 3px;
  background: currentColor;
  content: "";
  transition: transform .15s ease, background-color .15s ease;
}

.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -9px; }
.nav-toggle span::after { position: absolute; top: 9px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-9px) rotate(-45deg); }

/* Footer */

.site-footer { padding: 40px 0 34px; text-align: center; }

.footer-logo {
  display: inline-block;
  color: var(--grey);
  font: 400 31px/normal "Anton", Impact, sans-serif;
  text-decoration: none;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 12px;
  margin: 49px 8px 0 0;
}

.footer-nav a {
  display: block;
  padding: 8px 10px;
  color: var(--ink);
  line-height: 22px;
  text-decoration: none;
}

.footer-nav a:hover { background: rgba(255, 255, 255, .05); }
.footer-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }

.copyright { margin: 20px 0 0; }

/* Home */

.hero {
  position: relative;
  height: 488px;
  background:
    linear-gradient(rgba(0, 0, 0, .4), rgba(0, 0, 0, .4)),
    url("/img/hero-bg.jpg") center / cover fixed no-repeat;
}

.hero-portrait {
  position: absolute;
  top: 48px;
  left: calc(50% - 236px);
  width: 415px;
  height: 392px;
  object-fit: cover;
}

.hero .wrap { position: relative; height: 100%; }

.hero h1 {
  position: absolute;
  top: 200.6px;
  left: var(--gutter);
  margin: 0;
  color: var(--ink);
  font: 400 56px/68px var(--display);
}

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 167px;
  color: var(--muted);
}

.intro p { margin: 0; }
.intro p:first-child { padding: 50px 12px 16px; }
.intro p:last-child { padding: 41px 4px 16px; }

/* Gallery */

.page-title {
  margin: 54px 0 32px;
  color: var(--ink);
  font: 400 56px/normal var(--display);
  text-align: center;
}

.gallery-unavailable { padding: 40px 20px; text-align: center; }

.gallery-section + .gallery-section { margin-top: 77.5px; }
.gallery-section:last-child { padding-bottom: 36px; }

.gallery-section h2 {
  margin: 0 0 18px;
  font: 400 18px/22px var(--body);
  text-align: center;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.art-grid--square { column-gap: 16px; }
.art-grid--inset { padding-inline: 56px; }

.art-grid li { min-width: 0; }

.art-link {
  display: block;
  padding: 0;
  width: 100%;
  background: none;
  border: 0;
  color: inherit;
  cursor: zoom-in;
  overflow: hidden;
}

.art-link img {
  width: 100%;
  height: auto;
  aspect-ratio: 311 / 476;
  object-fit: cover;
  object-position: 50% 50%;
  transition: opacity .15s ease;
}

.art-link:hover img { opacity: .85; }

.art-grid--square .art-link img { aspect-ratio: 1; }
.art-grid--inset .art-link img { aspect-ratio: 273 / 420; }

.art-title {
  margin: 0;
  padding-top: 9.5px;
  line-height: 22px;
  text-align: center;
}

.art-grid--square .art-title { padding-top: 8px; line-height: 23px; }

/* Lightbox */

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 72px;
  background: rgba(0, 0, 0, .92);
}

.lightbox-frame {
  display: flex;
  flex-direction: column;
  max-width: min(100%, 980px);
  max-height: 100%;
  margin: 0;
  padding: 8px;
  background: #fff;
  border-radius: 14px;
  color: #000;
}

.lightbox-frame img {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(100dvh - 140px);
  width: auto;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 6px 6px 0 0;
}

.lightbox-frame figcaption {
  padding: 10px 16px;
  background: #eee;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
}

.lightbox-frame strong { display: block; font-weight: 400; font-family: var(--body); -webkit-text-stroke: .3px currentColor; }
.lightbox-frame span { display: block; margin-top: 6px; font-size: 14px; }

.lightbox button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
}

.lightbox button:disabled { opacity: .2; cursor: default; }
.lightbox button svg { width: 26px; height: 26px; }
.lightbox-close { top: 12px; right: 14px; }
.lightbox-prev { top: 50%; left: 14px; margin-top: -22px; }
.lightbox-next { top: 50%; right: 14px; margin-top: -22px; }

/* Contacts */

.contacts-title {
  margin: 39px 0 0;
  color: var(--ink);
  font: 400 48px/normal var(--display);
}

.social { display: flex; margin: 35px 0 24px; }
.social a { display: block; width: 36px; height: 36px; margin: 0 4px; }
.social svg { display: block; width: 36px; height: 36px; fill: #fff; }

.contact-form { padding-inline: 4px; }
.field { margin-bottom: 20px; }

.field label,
.consent-label { display: block; font: inherit; }

.field input,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  font: inherit;
}

.field input { height: 50px; }
.field textarea { height: 248px; resize: none; }
.field input:hover, .field textarea:hover { background: rgba(255, 255, 255, .05); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--grey); }

.consent { display: flex; align-items: center; margin: 38px 0 18px; }

.consent input {
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0 8px 0 0;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
}

.consent input:checked {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.consent-label { cursor: pointer; }

.error-text { margin: 4px 0 0; color: var(--error); }
.error-text[hidden] { display: none; }
.has-error input, .has-error textarea, .has-error.consent input { border-color: var(--error); }

.required-note { margin: 34.4px 0 16px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.turnstile-slot:empty { display: none; }
.turnstile-slot { margin-bottom: 16px; }

.send {
  display: block;
  width: 100%;
  padding: 8px 16px;
  background: var(--ink);
  border: 2px solid transparent;
  color: #000;
  font: inherit;
  line-height: 22px;
  cursor: pointer;
}

.send:hover { background: rgba(255, 255, 255, .9); }
.send[disabled] { opacity: .6; cursor: progress; }

.form-message { margin: 16px 0 0; }
.form-message[hidden] { display: none; }
.form-message.is-error { color: var(--error); }

.contacts-page { padding-bottom: 12px; }

/* Tablet */

@media (max-width: 1023.95px) {
  .wrap { padding-inline: 12px; }
  .hero-portrait {
    left: calc(50% - 16.5vw);
    width: calc(33vw * .8785);
    height: auto;
    aspect-ratio: 415 / 392;
    top: 50%;
    transform: translateY(-50%);
  }
  .hero { height: 400px; }
  .hero h1 { top: 30%; left: 12px; }
}

/* Phone */

@media (max-width: 767.95px) {
  .wrap { padding-inline: 20px; }

  .site-header .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 81px auto;
    align-items: center;
    min-height: 0;
  }

  .logo { margin: 0; font-size: 30px; }

  .nav-toggle { display: block; }

  .nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding-block: 0 16px;
    text-align: center;
  }

  .nav.is-open { display: flex; }

  .hero {
    height: auto;
    padding-block: 48px 40px;
    background-attachment: scroll;
  }

  .hero-portrait {
    position: static;
    width: calc((100% - 40px) * .8785);
    height: auto;
    margin-inline: 20px;
    transform: none;
    aspect-ratio: 415 / 392;
  }

  .hero .wrap { height: auto; }

  .hero h1 {
    position: static;
    margin-top: 40px;
    font-size: 56px;
    line-height: 69px;
  }

  .intro { grid-template-columns: 1fr; min-height: 0; }
  .intro p:first-child { padding: 40px 12px 40px; }
  .intro p:last-child { padding: 0 0 16px; }

  .art-grid,
  .art-grid--inset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 10px;
    padding-inline: 0;
  }

  .art-grid--square { column-gap: 16px; }

  .art-link img,
  .art-grid--inset .art-link img { aspect-ratio: 163 / 168; }

  .art-grid--square .art-link img { aspect-ratio: 1; }

  .contacts-title { margin-top: 16px; }

  .lightbox { padding: 56px 8px 64px; }
  .lightbox-frame img { max-height: calc(100dvh - 190px); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 8px; margin: 0; }
  .lightbox-prev { left: calc(50% - 56px); }
  .lightbox-next { right: calc(50% - 56px); }
}

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