:root {
  --black: black;
  --light-grey: #999;
  --white: white;
  --clementine-orange: #ffa911;
  --sunset-orange: #ec4c20;
  --burnt-sienna: #661b07;
  --transition-time: 0.3s ease-in-out;
  --background-color: black;
  --site-padding: 1rem;
  --gap: 1rem;
}

@font-face {
  font-family: Roca;
  src: url(fonts/Roca.ttf);
}

@font-face {
  font-family: Roca;
  src: url(fonts/RocaBlack.ttf);
  font-weight: bold;
}

@font-face {
  font-family: Roca;
  src: url(fonts/RocaLight.ttf);
  font-weight: lighter;
}

html {
  scroll-behavior: smooth;
}

h1,
h2,
h3 {
  font-family: "Roca", serif;
  margin: 0;
}

a {
  font-family: "Roca", serif;
  font-weight: lighter;
  text-decoration: none;
}

p {
  font-family: "Urbanist", sans-serif;
  margin: 0;
}

body {
  margin: 0;
}

/* --- NAVIGATION --- */
.word-logo {
  display: flex;
  gap: 10px;
  font-size: 1.2rem;
}

.word-logo img {
  height: 15px;
  width: auto;
  position: relative;
  top: 4px;
}

.nav-button {
  background: linear-gradient(90deg, #ec4c20 40%, #ec4c2000 60%);
  background-size: 300% 100%;
  background-position: left;
  color: var(--white);
  border-radius: 40px;
  padding: 1rem 2rem;
  font-family: "Roca";
  border: 2px solid var(--sunset-orange);
  text-decoration: none;
  text-align: center;
}

.nav-button:hover {
  background-position: right;
  border: 2px solid var(--sunset-orange);
  color: var(--sunset-orange) !important;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0; /* ensure it starts at the left */
  right: 0; /* ensure it ends at the right */
  padding: 1rem 24px; /* inner spacing */
  max-width: 100%;
  margin: 0 auto;
  margin: var(--site-padding);
  z-index: 100;
  transition: 0.8s;
  background-color: white;
  border-radius: 30px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.2));
  transform: translateY(-150px);
}

.no-translate {
  transform: translateY(0px);
}

nav a {
  text-decoration: none;
  color: var(--black);
  font-size: 1.2rem;
}

.word-logo {
  color: var(--black);
  transition: var(--transition-time);
  z-index: 100;
}

#menu-toggle {
  cursor: pointer;
}

/* --- HAMBURGER MENU --- */
#hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 10px;
  position: relative;
  z-index: 100;
  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
}

#hamburger-menu span {
  width: 33px;
  height: 3px;
  background-color: var(--black);
  border-radius: 3px;
  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1),
    background-color var(--transition-time), opacity 0.55s ease;
}

#hamburger-menu span:nth-last-child(2) {
  transform-origin: 0% 100%;
}

/* --- HAMBURGER ACTIVE STATE --- */
.menu-active#hamburger-menu {
  transform: translate(16px, 3px);
}

.menu-active span {
  transform: rotate(45deg) translate(-13px, 4px);
  background: var(--black);
}

.menu-active span:nth-last-child(2) {
  transform: rotate(-45deg) translate(-13px, 4px);
}

/* --- MENU PANEL --- */
#menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: flex;
  padding: 4rem 0 2rem;
  justify-content: flex-end; /* Right aligned */
  align-items: center;
  background: var(--white);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-time), transform var(--transition-time),
    visibility 0s var(--transition-time);
  z-index: 5;
  border-radius: 30px;
}

#menu.menu-visible {
  opacity: 1;
  visibility: visible;
  transition: var(--transition-time);
}

/* --- MENU ITEMS --- */
#menu-items {
  display: flex;
  flex-direction: column;
  gap: var(--site-padding);
  padding: var(--site-padding) 24px;
  transition: var(--transition-time);
}

#menu-items a {
  transform: translateY(50px);
  opacity: 0;
  text-align: right;
  transition: var(--transition-time);
}

#menu-items a:hover {
  color: var(--clementine-orange);
}

#menu-items.menu-items-transition a {
  transform: translateY(0);
  opacity: 1;
}

#menu-items.menu-items-transition a:nth-last-child(1) {
  transition-delay: 0.3s;
}
#menu-items.menu-items-transition a:nth-last-child(2) {
  transition-delay: 0.2s;
}
#menu-items.menu-items-transition a:nth-last-child(3) {
  transition-delay: 0.1s;
}

#menu-items:not(.menu-items-transition) a {
  transition-delay: 0s;
}

/* --- HEADER --- */

header {
  height: 90vh;
  padding: 100px var(--site-padding);
  background-image: url("../images/cc3.jpg");
  background-size: auto 100%;
  background-position: 50% 0%;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

header h1 {
  text-shadow: 0 4px 12px rgba(0, 0, 0, 1);
}

header .button,
header a.button {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 1);
}

.header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#header-quote {
  padding: 0;
}

.header h1 {
  color: var(--white);
  font-size: 4rem;
}

/* --- MAIN --- */

main {
  padding: 0 var(--site-padding);
  background-color: var(--white);
}

/* --- SERVICES --- */

.section {
  padding: 2rem 0;
}

.card-wrapper {
  display: grid;
  padding: 2rem 0 0;
  gap: 2rem;
}

.about-card-wrapper {
  display: grid;
  gap: 2rem;
}

.about-wrapper {
  display: grid;
  gap: 2rem;
  padding: 2rem 0 0;
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--site-padding);
}

.card h2 {
  padding-top: 1rem;
  border-top: 1px solid black;
}

.about-wrapper img {
  height: 70%;
  width: 100%;
  aspect-ratio: square;
  object-fit: cover;
  margin-top: 2rem;
}

/* --- UTILITY CLASSES --- */
.button,
button {
  background: linear-gradient(90deg, #ec4c20 40%, #ec4c2000 60%);
  background-size: 300% 100%;
  background-position: left;
  color: var(--white);
  border-radius: 30px;
  padding: 1rem;
  font-family: "Roca";
  font-size: 1rem;
  border: 2px solid var(--sunset-orange);
  text-decoration: none;
  transition: 0.4s ease-in-out;
  width: 8rem;
  text-align: center;
}

.button:hover,
button:hover {
  background-position: right;
  border: 2px solid var(--sunset-orange);
  color: var(--sunset-orange);
}

.white {
  color: var(--white);
}

.bg-white {
  background-color: var(--white) !important;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
}

.header,
#header-quote > * {
  opacity: 0;
  transform: translateY(-30px);
}

.spacing {
  height: 2rem;
}

/* --- QUOTE --- */
.autoquote-wrapper {
  display: flex;
  flex-direction: column;
  filter: drop-shadow(0 8px 4px rgba(0, 0, 0, 0.2));
  background-color: var(--white);
  border-radius: 0 0 30px 30px;
  padding: 2rem 1rem;
}

.toggle-buttons {
  display: flex;
  justify-content: space-between;
  background-color: var(--white);
  border-radius: 30px 30px 0 0;
  filter: drop-shadow(0 8px 4px rgba(0, 0, 0, 0.2));
}

.toggle-buttons button {
  all: unset;
  color: var(--black);
  border: none;
  background-color: rgb(245, 245, 245);
  font-family: "Roca", serif;
  font-size: 1rem;
  flex: 1;
  padding: 1rem;
  cursor: pointer;
  text-align: center;
}

.toggle-buttons button:first-child {
  border-radius: 30px 0 0 0;
}

.toggle-buttons button:last-child {
  border-radius: 0 30px 0 0;
}

.toggle-btn.active {
  background-color: var(--white);
}

.quote-type {
  display: grid;
  gap: 2rem;
}

.quote-section {
  gap: 1rem;
  display: grid;
}

label {
  display: block;
  font-family: "Urbanist", sans-serif;
}

input:focus {
  outline: none;
  border: 1px solid var(--sunset-orange);
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-option {
  flex: 1;
  padding: 1rem 2rem;
  border: 1px solid var(--sunset-orange);
  background: linear-gradient(
    90deg,
    var(--white) 40%,
    var(--sunset-orange) 60%
  );
  background-size: 300% 100%;
  background-position: left;
  color: var(--sunset-orange);
  border-radius: 36px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  font-family: "Roca", serif;
  transition: var(--transition-time);
}

.btn-option.active {
  background-position: right;
  color: white;
}

.get-quote-button {
  background: linear-gradient(90deg, #ec4c20 40%, #ec4c2000 60%);
  background-size: 300% 100%;
  background-position: left;
  color: var(--white);
  border-radius: 30px;
  padding: 1rem;
  font-family: "Roca", serif;
  font-size: 1rem;
  border: 2px solid var(--sunset-orange);
  text-decoration: none;
  transition: 0.4s ease-in-out;
  width: 100%;
  text-align: center;
  cursor: pointer;
}

.get-quote-button:hover {
  background-position: right;
  border: 2px solid var(--sunset-orange);
  color: var(--sunset-orange);
}

.quote-page-wrapper {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.quote {
  font-family: "Roca", serif;
  font-size: 2rem;
}

.quote-main {
  margin-top: 100px;
}

.details {
  font-family: "Urbanist", sans-serif;
}

.quote-contact {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 0 2rem;
  border-top: 1px solid var(--black);
}

#back-button {
  color: var(--black);
  font-size: 1.5rem;
  transition: var(--transition-time);
}

#back-button:hover {
  color: var(--clementine-orange);
  font-size: 1.5rem;
}

/* --- RESULTS --- */
.before-after-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 2rem;
}

.ba-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 30px;
}

.ba-image {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.ba-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ba-after {
  clip-path: inset(0 0 0 50%);
}

.ba-slider {
  all: unset;
  height: 100%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  background: transparent;
  -webkit-appearance: none; /* Remove default styling */
  appearance: none;
  z-index: 10;
  cursor: ew-resize;
}

/* Remove default track styling in Chrome/Safari */
.ba-slider::-webkit-slider-runnable-track {
  background: transparent;
}

/* Chrome, Safari, Edge, Opera - Custom thumb */
.ba-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2px;
  height: 1000px;
  background: var(--white);
  border-radius: 0;
  cursor: ew-resize;
  position: relative;
  z-index: 20;
}

/* Firefox */
.ba-slider::-moz-range-track {
  height: 6px;
  background: #ccc;
  border-radius: 3px;
}

.ba-slider::-moz-range-thumb {
  width: 4px;
  height: 30px;
  background: #000;
  border-radius: 0;
  cursor: ew-resize;
  box-shadow: none;
  position: relative;
  z-index: 20;
}

/* --- CONTACT FORM --- */

.contact-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-sizing: content-box;
}

.contact-form button {
  cursor: pointer;
}

.contact-form form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 600px;
}

.contact-form form div {
  display: grid;
  gap: 8px;
}

.span {
  grid-column: span 2;
}

input,
textarea {
  padding: 8px;
  border: 1px solid var(--black);
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  resize: none;
}

/* --- FOOTER --- */
footer {
  padding: 1rem var(--site-padding);
  position: relative;
  background-color: var(--clementine-orange);
}

footer .button {
  width: auto;
}

.footer-flex {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.footer-flex img {
  width: 100%;
  height: auto;
  overflow: hidden;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-contact {
  display: grid;
  gap: 1rem;
  text-align: center;
}

.footer-contact a {
  font-size: 1.2rem;
  color: white;
  transition: var(--transition-time);
}

.footer-contact a:hover {
  color: var(--sunset-orange);
}

/* --- MEDIA QUERY --- */
/* Medium devices (tablets) */
@media (min-width: 768px) {
  header {
    height: 80vh;
    justify-content: space-between;
    gap: 2rem;
    background-size: cover;
    background-position: 50% 30%;
    background-repeat: no-repeat;
    flex-direction: row;
    align-items: start;
  }
  .header {
    height: 100%;
    justify-content: center;
  }
  #header-quote {
    width: 400px;
    margin-top: 100px;
  }
  .card-wrapper {
    grid-template-columns: 1fr 1fr;
  }
  .about-wrapper {
    grid-template-columns: 1fr 1fr;
  }
  .before-after-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  footer {
    padding: 1rem var(--site-padding);
    position: relative;
    background-color: var(--clementine-orange);
  }

  footer .button {
    width: 8rem;
  }

  .footer-flex {
    flex-direction: row;
  }

  .footer-flex img {
    width: auto;
    height: 2rem;
    overflow: hidden;
  }

  .footer-contact {
    display: grid;
    gap: 1rem;
  }

  .footer-contact a {
    text-align: left;
  }
}

/* Desktops */
@media (min-width: 1024px) {
  :root {
    --site-padding: 2rem;
    --gap: 2rem;
  }

  #header-quote {
    width: 400px;
  }

  #hamburger-menu {
    display: none;
  }

  nav {
    padding: 5px;
    border-radius: 40px;
    align-items: center;
  }

  .word-logo {
    margin-left: calc(var(--site-padding) - 5px);
  }

  #menu {
    all: unset;
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    background-color: transparent;
    padding: 0;
    align-items: center;
  }

  #menu-items {
    display: flex;
    flex-direction: row;
    gap: var(--gap);
    padding: 0;
    align-items: center;
  }

  #menu-items a {
    opacity: 1 !important;
    transform: translateY(0) !important;
    font-size: 1rem;
  }
  .nav-button:hover {
    filter: none;
  }
  footer {
    padding: 2rem var(--site-padding);
  }
}

/* Large screens */
@media (min-width: 1440px) {
  .card-wrapper {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
  .about-wrapper {
    gap: 4rem;
  }
}
