/* ==========================================================================
   Sobol Photos - site styles
   --------------------------------------------------------------------------
   1. Fonts & colors
   2. Base
   3. Page frame (header, content, footer)
   4. Navigation (desktop + mobile)
   5. Gallery carousel
   6. Text pages (Contact)
   7. Pricing list
   8. Product page
   9. Small screens
   ========================================================================== */


/* 1. Fonts & colors
   The original site uses Adobe's "proxima-nova". If that font is not
   available (it needs an Adobe Fonts licence), "Figtree" from Google Fonts
   is used as a close free look-alike. */
:root {
  --font-main: "proxima-nova", "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --color-text: #444;
  --color-heading: #111;
  --color-link: #000;
  --color-link-hover: #878787;
  --color-nav: #6b6b6b;
  --color-nav-active: #000;
  --color-nav-hover: #a22020;
  --color-subtitle: #b27676;
  --color-image-placeholder: #ae9393;
  --color-light-gray: #f7f7f7;

  --content-width: 1080px;
  --gallery-height: 700px;
}

/* Shorter screens get a shorter gallery (same as the original). */
@media (max-height: 899px) {
  :root {
    --gallery-height: 600px;
  }
}


/* 2. Base */
* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

/* The body is a flex box so short pages sit in the middle of the window. */
body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  margin: 0;
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  color: var(--color-link-hover);
}

h1,
h2,
h3 {
  margin: 1em 0;
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.4em;
}

h1 {
  font-size: 23px;
}

h3 {
  font-size: 14px;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 1em 0;
}

img {
  display: block;
}


/* 3. Page frame */
.site {
  width: 100%;
}

.site-header,
.site-footer {
  max-width: calc(var(--content-width) + 20px);
  margin: 0 auto;
  padding: 20px 10px;
}

.site-header {
  text-align: center;
}

.logo {
  display: block;
  height: 120px;
}

.logo img {
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
}

.logo-subtitle {
  color: var(--color-subtitle);
  font-size: 11px;
  letter-spacing: -0.1px;
  line-height: 1.2em;
}

.page-content {
  padding: 0 10px;
}

.page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 45px 0;
}

/* Gallery pages use the full window width. */
.gallery-page .page-content,
.gallery-page .page {
  max-width: none;
  padding: 0;
}

.site-footer::after {
  content: "";
  display: block;
  clear: both;
}

.footer-contact {
  float: right;
  width: 50%;
  text-align: right;
}

.footer-contact p {
  margin: 0;
}

/* Only shown on small screens. */
.back-to-top {
  display: none;
}


/* 4. Navigation */
.main-nav {
  margin-top: 20px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 39px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-block;
  color: var(--color-nav);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 28px;
}

.nav-list .active a {
  color: var(--color-nav-active);
}

.nav-list a:hover {
  color: var(--color-nav-hover);
}

/* Mobile menu: hidden on big screens. */
.mobile-menu-button,
.mobile-nav {
  display: none;
}


/* 5. Gallery carousel
   All photos sit side by side in one long strip. The strip slides left and
   right so the selected photo is in the middle of the window. */
.gallery {
  position: relative;
  width: 100%;
  height: var(--gallery-height);
  overflow: hidden;
  background: #111;
}

.gallery-strip {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Used when the strip must jump into place without animating. */
.gallery-strip.no-animation {
  transition: none;
}

.gallery-slide {
  position: relative;
  flex: none;
  height: 100%;
  cursor: pointer;
}

.gallery-slide:only-child {
  cursor: default;
}

.gallery-slide img {
  width: auto;
  height: 100%;
}

.gallery-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 30px 20px 15px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(31, 31, 31, 0.5) 100%);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-slide.active .gallery-caption {
  opacity: 1;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 60px;
  margin-top: -30px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 100ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.2);
}

.gallery-arrow svg {
  width: 10px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
}

.gallery-prev {
  left: 0;
}

.gallery-next {
  right: 0;
}

.gallery-message {
  padding: 40px 20px;
  color: #fff;
  text-align: center;
}


/* 6. Text pages (Contact)
   A simple 12-column style grid: every block has 17px padding. */
.content-row {
  display: flex;
  margin: 0 -17px;
}

.content-block {
  padding: 17px;
}

.content-row:first-child .content-block:first-child {
  padding-top: 0;
}

.col-3 {
  width: 25%;
}

.col-6 {
  width: 50%;
}

.col-12 {
  width: 100%;
}

.content-block h1 {
  margin: 0;
}

.content-block p:last-child {
  margin-bottom: 0;
}

.text-center {
  text-align: center;
}

.divider {
  height: 1px;
  margin: 14px 0;
  border: 0;
  background: #ccc;
}

.spacer {
  height: 68px;
}


/* 7. Pricing list
   Four cards per row. The space between rows grows with the page width,
   so it is set with percentage margins (percentages of the list width). */
.product-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 3%;
  margin-top: -3.09%;
}

.product-card {
  display: block;
  width: 22.75%;
  margin-top: 3.09%;
  color: var(--color-link);
}

.product-card:hover {
  color: var(--color-link);
}

/* 3:2 photo, cropped to fill the box. */
.product-card-image {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-image-placeholder);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease-out;
}

.product-card:hover .product-card-image img {
  opacity: 0.8;
}

.product-card-title {
  margin-top: 15px;
  font-size: 15px;
  line-height: 1.5em;
  text-align: center;
}

.product-card-price {
  font-size: 12px;
  line-height: 1.5em;
  text-align: center;
}


/* 8. Product page */
.back-link {
  margin-bottom: 30px;
  text-transform: uppercase;
}

.product {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Title shown above the photo on small screens only. */
.product-title-mobile {
  display: none;
}

/* Square photo, cropped to fill the box. */
.product-image {
  width: 48.5%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-image-placeholder);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-details {
  width: 48.5%;
}

.product-details h1 {
  margin: 0 0 0.5em;
}

.product-price {
  margin: 1em 0;
  font-size: 16px;
  line-height: 1.5em;
}

.product-description ul {
  margin: 14px 0;
  padding-left: 40px;
}

.product-description li p {
  margin: 7px 0;
}

.product-description .note {
  color: #777;
}

.share-button {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
}

.share-icon {
  width: 18px;
  height: 18px;
  fill: #999;
  stroke: #fff;
  stroke-width: 1;
  transition: fill 0.2s;
}

.share-icon .share-dot {
  fill: #fff;
  stroke: none;
}

.share-button:hover .share-icon {
  fill: #222;
}


/* 9. Small screens */
@media (max-width: 800px) {
  .site-header,
  .site-footer,
  .page-content {
    padding: 30px 20px;
  }

  .page {
    padding: 0;
  }

  /* Swap the desktop menu for the "MENU" button. */
  .site-header .main-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
    width: 100%;
    padding: 15px;
    border: 0;
    background: var(--color-light-gray);
    color: #111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 2px;
    line-height: 22.4px;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
  }

  .mobile-nav.open {
    max-height: 999px;
  }

  .mobile-nav .nav-list {
    display: block;
    padding: 1.5em 0;
    text-align: center;
  }

  .mobile-nav .nav-list a {
    display: block;
    padding: 0.7em;
    font-size: 16px;
    line-height: 1.2em;
  }

  /* Gallery becomes a simple column of full-width photos. */
  .gallery-page .page-content {
    padding: 0;
  }

  .gallery {
    height: auto;
    overflow: visible;
    background: none;
  }

  .gallery-strip {
    display: block;
    transform: none !important;
  }

  .gallery-slide {
    width: 100%;
    height: auto;
    cursor: default;
  }

  .gallery-slide img {
    width: 100%;
    height: auto;
  }

  .gallery-caption {
    position: static;
    padding: 20px;
    background: none;
    color: var(--color-text);
    opacity: 1;
  }

  .gallery-arrow {
    display: none;
  }

  .gallery-message {
    color: var(--color-text);
  }

  /* Contact page columns stack. */
  .content-row {
    display: block;
  }

  .col-3,
  .col-6,
  .col-12 {
    width: auto;
  }

  .content-row .content-block:first-child,
  .content-row:first-child .content-block:first-child {
    padding-top: 17px;
  }

  .content-row .content-block:last-child {
    padding-bottom: 17px;
  }

  .spacer {
    display: none;
  }

  /* Footer is centered and shows "Back to Top". */
  .back-to-top {
    display: block;
    text-align: center;
  }

  .footer-contact {
    float: none;
    width: auto;
    padding: 17px 0;
    text-align: center;
  }
}

@media (max-width: 700px) {
  .product-list {
    margin-top: 0;
  }

  .product-card {
    width: 100%;
    margin: 0 0 3%;
  }

  .product {
    display: block;
  }

  .product-title-mobile {
    display: block;
  }

  .product-details h1 {
    display: none;
  }

  .product-image,
  .product-details {
    width: 100%;
  }
}
