/* ==============================================================================
   Le Quatrieme Homme Primary Styles 
   Converted to modern CSS
   ============================================================================== */

/* ------------------------------------------------------------------------------
   ROOT
   ------------------------------------------------------------------------------ */
:root {
  /* Fonts */
  --font-body: "Lora", serif;
  --font-logo: "Montserrat", sans-serif;
  --font-title: "Montserrat", sans-serif;

  /* Colors */
  --color-brand: #00324f;
  --color-nav: white;
  --color-text: #767676;
  --color-footer: #bbbbbb;
  --color-bg: white;
  --color-bg-secondary: #f0f2f4;
  --color-bg-tertiary: #fcfcfc;

  /* Padding */
  --padding-section-vertical: 3rem;
  @media screen and (min-width: 768px) {
    --padding-section-vertical: 5rem;
  }
  @media screen and (min-width: 1024px) {
    --padding-section-vertical: 6rem;
  }
}

/* ------------------------------------------------------------------------------
   RESET & BASE STYLES
   ------------------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

address {
  font-style: normal;
}

/* ------------------------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------------------------ */
html {
  font-size: 14px;
  @media (min-width: 1024px) {
    font-size: 15px;
  }
  @media (min-width: 1400px) {
    font-size: 16px;
  }
}

body {
  font-size: 1.1rem;
  line-height: 1.625em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: "Montserrat", "Helvetica", "Arial", sans-serif;
  color: #343434;
  font-weight: 600;
  line-height: 1.3em;
  font-variant-ligatures: common-ligatures;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.8em;
  @media (min-width: 768px) {
    font-size: 1.9rem;
  }
  @media (min-width: 1024px) {
    font-size: 2rem;
  }
}

a {
  color: var(--color-text);
}

/* ------------------------------------------------------------------------------
   CONTAINER
   ------------------------------------------------------------------------------ */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-right: 1rem;
  padding-left: 1rem;
  max-width: 100%;

  @media (min-width: 768px) {
    max-width: 720px;
  }
  @media (min-width: 1024px) {
    max-width: 960px;
  }
  @media (min-width: 1400px) {
    max-width: 1320px;
  }
}

/* ------------------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------------------ */
section.hero {
  position: relative;
  height: 40vh;
  min-height: 20rem;
  background-color: #2d2d31;
  display: grid;
  align-content: center;
  justify-content: center;
  @media (min-width: 768px) {
    height: 60vh;
  }

  .hero-image {
    position: absolute;
    z-index: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-size: cover !important;
    background-position: 50% 50% !important;
    transition: 0.3s linear;
    opacity: 0.8;
    background: #222;
    background: url("img/hero-3b.jpg");
    background-position: 50% 100% !important;
  }

  .hero-text h1 {
    position: relative;
    z-index: 1;

    & div:first-of-type {
      padding: 0 1rem;
      font-size: 2rem;
      line-height: 1.2em;
      font-weight: 500;
      font-family: var(--font-title);
      text-align: center;
      letter-spacing: -1px;
      color: white;
      text-shadow: 0px 1px 2px #888;
      margin-bottom: 0.75rem;

      @media (min-width: 1024px) {
        font-size: 3rem;
      }
      @media (min-width: 1400px) {
        font-size: 4rem;
      }
    }

    & div:nth-of-type(2) {
      padding: 0 1rem;
      font-size: 1.2rem;
      line-height: 1.6em;
      font-weight: 500;
      font-family: var(--font-title);
      text-align: center;
      color: #eeeeee;
      text-shadow: 0px 1px 2px #888;
      margin-bottom: 1.2em;

      @media (min-width: 768px) {
        font-size: 1.8rem;
      }
      @media (min-width: 1024px) {
        font-size: 2rem;
      }
      @media (min-width: 1400px) {
        font-size: 2.2rem;
      }
    }
  }
}

/* ------------------------------------------------------------------------------
   INTRO & SUMMARY SECTIONS
   ------------------------------------------------------------------------------ */
section.intro,
section.summary {
  padding-top: var(--padding-section-vertical);
  padding-bottom: var(--padding-section-vertical);

  @media (min-width: 1024px) {
    padding-left: 0;
    padding-right: 0;
  }

  p + P {
    margin-top: 1rem;
  }
}

section.intro {
  background-color: var(--color-bg-tertiary);
}

section.summary {
  background-color: var(--color-bg-secondary);
}

/* ------------------------------------------------------------------------------
   TWO COLUMNS SECTIONS
   ------------------------------------------------------------------------------ */
section.techno,
section.work {
  display: flex;
  flex-direction: column;
  @media (min-width: 768px) {
    flex-direction: row;
  }

  .image,
  .content {
    @media (min-width: 768px) {
      &.is-left {
        order: 1;
      }
      &.is-right {
        order: 2;
      }
    }
  }

  .image {
    width: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;

    @media (min-width: 768px) {
      width: 30%;
    }
    @media (min-width: 1024px) {
      width: 50%;
    }
  }

  .content {
    width: 100%;
    padding: var(--padding-section-vertical) 0;
    @media (min-width: 768px) {
      width: 70%;
    }
    @media (min-width: 1024px) {
      width: 50%;
    }

    .content-text {
      padding-left: 1rem;
      padding-right: 1rem;
      margin-left: auto;
      margin-right: auto;
      @media (min-width: 768px) {
        max-width: calc(720px * 0.7);
      }
      @media (min-width: 1024px) {
        max-width: calc(960px / 2);
      }

      p:first-of-type {
        margin-bottom: 1rem;
      }
      ul {
        margin-bottom: 1em;
        li {
          padding-bottom: 0.2rem;
          margin-left: 1.2rem;
        }
      }
      a {
        text-decoration: underline;
        font-weight: 600;
      }
      strong {
        font-weight: 600;
      }
    }
  }
}

section.techno {
  background-color: var(--color-bg-secondary);
  & .image {
    background-image: url("img/techno.jpg");
  }
}

section.work {
  background-color: var(--color-bg-tertiary);
  & .image {
    background-image: url("img/portfolio.jpg");
  }
}

.note {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.4em;
  color: var(--color-text);
  font-style: italic;
  margin-bottom: 0.25rem;
}

/* ------------------------------------------------------------------------------
   SIGNATURE
   ------------------------------------------------------------------------------ */
.signature {
  margin-top: 2rem;

  .signature-image {
    margin: 0.5rem 0;
    width: 8rem;
    border-radius: 50%;
  }

  .signature-text {
    font-family: "Montserrat", "Helvetica", "Arial", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
  }

  a {
    color: var(--color-text);
  }
}

/* ------------------------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------------------------ */
footer {
  color: var(--color-footer);
  padding: var(--padding-section-vertical) 0;
  background-color: #232323;
  line-height: 1.7em;

  .footer-parts {
    @media (min-width: 768px) {
      display: grid;
      grid-template-columns: repeat(3, auto);
      gap: 2rem;
    }
  }

  .footer-part + .footer-part {
    margin-top: 3rem;
    @media (min-width: 768px) {
      margin-top: 0;
    }
  }

  h3 {
    margin-top: 0;
    color: var(--color-footer);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
    margin-bottom: 1rem;
  }

  a {
    display: block;
    color: var(--color-footer);
  }

  .tva {
    margin-top: 0.5rem;
  }
}

.show-image {
  cursor: zoom-in;
  font-weight: 600;
  text-decoration: underline;
}
