:root {
  --clr-limegreen: hsl(75 75% 50%);
}

/* CSS reset */

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

* {
  margin: 0;
  padding: 0;
  font: inherit;
}

html {
  color-scheme: light;
}

body {
  min-height: 100vh;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

/* global styling */

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter Tight", system-ui, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1em;
  font-weight: 300;
  background: #1b1b1b;
  color: white;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Mohave", system-ui, Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1em;
  margin: 0.5em 0;
}

h6 {
  font-size: 1.125rem;
}

h5 {
  font-size: 1.25em;
}

h4 {
  font-size: 1.75em;
}

h3 {
  font-size: 2em;
}

h2 {
  font-size: 2.25em;
}

h1 {
  font-size: 2.5em;
}

p {
  margin: 0.5em 0;
  line-height: 1.5em;
}

a {
  text-decoration: none;
}

p a {
  color: var(--clr-limegreen);
  border-bottom: 1px solid var(--clr-limegreen);
}

@media (pointer: fine) {
  p a {
    border-bottom: 0;
    background-image: linear-gradient(
      var(--clr-limegreen),
      var(--clr-limegreen)
    );
    background-repeat: no-repeat;
    background-size: 100% 1px;
    background-position: 50% 100%;
    transition: background-size 500ms ease;
  }

  p a:hover {
    background-size: 0 1px;
  }
}

ul,
ol {
  margin: 0.5em 0;
}

ul li,
ol li {
  margin-left: 1.75rem;
  line-height: 1.5em;
}

button,
a.button {
  display: inline-block;
  padding: 1em 2.5em;
  font-family: "Mohave", system-ui, Helvetica, Arial, sans-serif;
  font-weight: 500;
  color: white;
  border: 1px solid var(--clr-limegreen);
  border-radius: 3px;
  cursor: pointer;
  transition:
    background-color 250ms ease-in-out,
    box-shadow 250ms ease-in-out;
}

@media (pointer: fine) {
  button:hover,
  a.button:hover {
    background-color: var(--clr-limegreen);
    box-shadow: 0 0 10px hsl(75 75% 50%);
  }
}

.container {
  display: block;
  width: min(100%, 1300px);
  margin-inline: auto;
  padding: 0 5vw;
}

/* header */

header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2;
}

#topbar {
  display: flex;
  gap: 1.25rem;
}

#topbar > .branding {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.75rem 1.25rem;
  background-color: var(--clr-limegreen);
}

#topbar > .branding > img {
  height: 100px;
}

#topbar > nav#main-menu ul {
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

#topbar > nav#main-menu li {
  margin: 0;
  padding: 0;
}

#topbar > nav#main-menu a {
  display: block;
  margin: 0.75rem 0;
  font-family: "Mohave", system-ui, Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
  color: white;
  transition: color 500ms ease;
}

@media (pointer: fine) {
  #topbar > nav#main-menu a:hover {
    color: var(--clr-limegreen);
  }
}

/* hero slider */

section#hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: clamp(600px, 100svh, 900px);
  background-color: black;
  background-image: url("../images/hero-background.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right;
}

section#hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(hsl(0 0% 0% / 0.5) 50%, hsl(0 0% 0% / 0.9));
}

section#hero .container {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  margin-bottom: 1rem;
  padding-top: 12rem;
  z-index: 1;
}

section#hero .content {
  height: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms ease-in-out;
}

section#hero .active {
  height: auto;
  visibility: visible;
  opacity: 1;
}

#hero-content {
  display: flex;
  flex-direction: column;
  max-width: 50ch;
  margin-bottom: clamp(2.5rem, 10vw, 10vh);
}

@media (min-width: 600px) {
  #hero-content {
    margin-bottom: min(15vw, 15vh);
  }
}

@media (min-width: 1300px) {
  #hero-content {
    margin-bottom: min(20vw, 20vh);
  }
}

#hero-content p {
  font-size: 0.85rem;
}

@media (min-width: 600px) {
  #hero-content p {
    font-size: clamp(0.85rem, 2vw, 1rem);
  }
}

#hero-content a.button {
  margin-top: 1rem;
}

#hero-controls {
  padding: 1rem 0;
  /* border-top: 1px solid hsl(0 0% 100% / .75); */
}

@media (min-width: 1300px) {
  #hero-controls {
    position: absolute;
    left: 0;
    bottom: min(20vw, 20vh);
    margin: 0;
    padding: 0;
    border: 0;
    transform: rotate(180deg);
    writing-mode: vertical-lr;
  }
}

#hero-controls > a {
  display: block;
  padding: 0.5em 0;
  font-family: "Mohave", system-ui, Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  color: white;
  opacity: 0.75;
  transition:
    color 250ms ease-in-out,
    opacity 250ms ease-in-out;
}

@media (min-width: 600px) {
  #hero-controls > a {
    display: inline-block;
    margin-right: 2rem;
  }
}

@media (min-width: 1300px) {
  #hero-controls > a {
    margin: 0;
    padding: 0 0 2rem 0;
  }
}

@media (pointer: fine) {
  #hero-controls a:hover {
    color: var(--clr-limegreen);
    opacity: 1;
  }
}

#hero-controls > a.active {
  font-weight: 700;
}

#hero-controls a > span {
  margin-right: 0.5rem;
  font-family: "Inter Tight", system-ui, Helvetica, Arial, sans-serif;
  font-weight: 100;
  color: var(--clr-limegreen);
}

/* sections */

section.offer,
section#contact {
  display: grid;
}

@media (min-width: 1000px) {
  section#workshop {
    grid-template-columns: 50% 50%;
    grid-template-rows: auto 25vw;
  }

  section#tire-service {
    grid-template-columns: 50% 50%;
    grid-template-rows: 25vw auto 50vw;
  }
}

/* decoration image : workshop, tire service */

section.offer .big-image {
  position: relative;
  height: 50vw;
  overflow: hidden;
}

@media (min-width: 1000px) {
  section#workshop .big-image {
    grid-row: 1 / 3;
    height: 100%;
  }

  section#tire-service .big-image {
    grid-row: 2 / 4;
    height: 100%;
  }
}

section#workshop .big-image::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: hsl(0 0% 0% / 0.5);
}

section.offer .big-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* content : offer, contact */

section.offer .content,
section#contact .content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 75vw;
}

@media (min-width: 1000px) {
  section.offer .content,
  section#contact .content {
    min-height: auto;
  }

  section#tire-service .content {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
  }
}

section.offer .entry,
section#contact .entry {
  width: min(100%, 600px);
  padding: max(2rem, 5vw) 5vw;
}

@media (min-width: 1000px) {
  section.offer .entry,
  section#contact .entry {
    width: min(100%, 800px);
    padding: max(10vh, 5vw);
  }
}

section.offer .entry h2,
section#contact .entry h2 {
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: clamp(2rem, 7.5vw, 2.25rem);
  text-transform: uppercase;
}

section.offer .entry a.button,
section#contact .entry a.button {
  margin-top: 2rem;
}

/* mini gallery : workshop, tire service */

section.offer .mini-gallery {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

@media (min-width: 1000px) {
  section.offer .mini-gallery {
    max-width: 50vw;
  }
}

section.offer .mini-gallery ul {
  display: flex;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 1000px) {
  section.offer .mini-gallery ul {
    flex-wrap: wrap;
  }
}

section.offer .mini-gallery li {
  width: 50%;
  height: 50vw;
  margin: 0;
  padding: 0;
}

@media (min-width: 1000px) {
  section.offer .mini-gallery li {
    height: 25vw;
  }
}

section.offer .mini-gallery li a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

section.offer .mini-gallery li a::before {
  content: url("../../img/icon-open.svg");
  position: absolute;
  top: 50%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 500ms ease-in-out;
  z-index: 2;
}

section.offer .mini-gallery li a:hover::before {
  opacity: 1;
}

section.offer .mini-gallery li a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: hsl(0 0% 0% / 0);
  border: 5px solid hsl(0 0% 0% / 0);
  transition:
    border-color 500ms ease-in-out,
    background-color 500ms ease-in-out;
}

section.offer .mini-gallery li a:hover::after {
  background-color: hsl(0 0% 0% / 0.75);
  border-color: var(--clr-limegreen);
}

section.offer .mini-gallery img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

section.offer .mini-gallery.tire-service ul {
  flex-wrap: wrap;
  width: 100%;
}

section.offer .mini-gallery.tire-service li {
  width: 50%;
}

/* contact spcecific */

section#contact {
  display: grid;
}

@media (min-width: 1000px) {
  section#contact {
    grid-template-columns: 50% 50%;
    grid-template-rows: auto auto auto;
  }
}

section#contact .branding {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--clr-limegreen);
  padding: clamp(5vh, 5vw, 5rem) 0;
}

@media (min-width: 1000px) {
  section#contact .branding {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  section#contact .content {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }
}

section#contact .branding img {
  height: clamp(75px, 12.5vh, 150px);
}

section#contact .details {
  display: flex;
  justify-content: center;
  align-items: center;
  color: black;
  background-color: white;
}

section#contact ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 10vw;
  margin: 0;
  padding: 5vh 0;
  list-style: none;
}

section#contact li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: clamp(1rem, 5vw, 2rem) 0;
  font-family: "Mohave", system-ui, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: black;
}

#contact li.info {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

#contact li.address {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

#contact li.fb,
#contact li.inst {
  align-items: flex-start;
}

section#contact li a {
  display: flex;
  align-items: center;
  color: black;
}

section#contact ul img {
  display: inline-block;
  height: 25px;
  margin-right: 0.5rem;
}

section#contact #mapbox {
  height: 100vw;
  background: lightgray;
}

@media (min-width: 1000px) {
  section#contact #mapbox {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
    height: auto;
  }
}

#mapbox > #map {
  width: 100%;
  height: 100%;
}

/* footer */

footer {
  background-color: black;
  padding: 1rem 0;
}

footer > .container {
  display: flex;
  justify-content: space-between;
}

footer .branding img {
  height: 60px;
}

footer .copyright {
  display: flex;
  align-items: center;
}

footer small {
  font-size: min(3vw, 0.85rem);
}
