/* ===============================
   CSS VARIABLES & RESET
   =============================== */

@font-face {
  font-family: "Gantari";
  src: url("../fonts/gantari-variablefont_wght.woff2") format("woff2"),
    url("../fonts/gantari-variablefont_wght.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

:root {
  --color-rose: #e08f8f;
  --color-cream: #f6f0e6;
  --color-sand: #ddbea9;
  --color-caramel: #cb997e;
  --color-ink: #1f221c;
  --color-olive: #888b75;
  --color-ruby: #d86f6f;
  --color-persia: #c13333;
  --color-lemon: #efe699;
  --color-reseda: #6b705c;
  --color-sage: #a5a58d;
  --color-ash-grey: #b7b7a4;
  --color-orange: #cd4e01;

  --font-main: "Gantari", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: var(--font-main);
  overflow-x: hidden;
}

/* ===============================
   HEADER STYLES
   =============================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  z-index: 1000;
  width: 100%;
  transition: all 0.3s ease;
  color: white;
  height: 5rem;
}

header.shrink {
  background-color: var(--color-ash-grey);
  padding: 0.5rem 1.875rem;
  font-size: 0.9rem;
  height: 4.375rem;
  backdrop-filter: blur(10px);
}

.title-link {
  all: unset;
  cursor: pointer;
}

.title-link img {
  height: 3rem;
  display: block;
}

/* ===============================
   NAVIGATION STYLES
   =============================== */

.navbar {
  display: flex;
  gap: 1.25rem;
}

.navbar a {
  color: var(--color-ink);
  text-decoration: none;
  font-size: 19px;
  padding: 0.3125rem 0.5rem;
  transition: all 0.3s ease;
  border-radius: 1.25rem;
}

.navbar a:hover {
  background-color: rgba(168, 159, 104, 0.2);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.3125rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--color-ink);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 0.125rem;
}

.menu {
  display: flex;
  justify-content: center;
  gap: 1.875rem;
  flex-wrap: wrap;
}

.menu a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5rem 1.25rem;
  transition: all 0.3s ease;
  border-radius: 1.5625rem;
}

.menu a:hover {
  background-color: rgba(208, 177, 122, 0.15);
  transform: translateY(-0.125rem);
}

.contatti {
  background-color: var(--color-ruby);
  align-content: center;
  color: white !important;
}

.contatti:hover {
  background-color: var(--color-persia) !important;
}

@media (min-width: 1024px) {
  .contatti {
    padding: 0 1rem !important;
  }
}

/* ===============================
   FOOTER STYLES
   =============================== */

.footer {
  background-color: var(--color-ash-grey);
  color: #c4bfa8;
  padding: 1rem 1.25rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 75rem;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.author,
.verification-link {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-ink);
  font-weight: 400;
  transition: all 0.3s ease;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  background-color: transparent;
  text-decoration: none;
}

.right-column {
  font-size: 0.85rem;
  color: var(--color-ink);
  font-weight: 400;
}

.right-column p {
  margin-bottom: 5px;
}

.right-column li {
  margin-bottom: 2px;
}

.right-column li a {
  text-decoration: none;
  color: var(--color-ink);
}

.right-column li a:hover {
  color: #ffffff;
  background-color: rgba(245, 253, 198, 0.15);
  transform: translateY(-0.0625rem);
}

.author:hover,
.verification-link:hover {
  color: #ffffff;
  background-color: rgba(245, 253, 198, 0.15);
  transform: translateY(-0.0625rem);
}

.verification-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verification-text {
  white-space: nowrap;
}

.verification-icon {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.verification-link:hover .verification-icon {
  opacity: 1;
}

/* ===============================
   SHARED ANIMATIONS
   =============================== */

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(182deg);
  }
  50% {
    transform: translateY(-6px) rotate(184deg);
  }
}

@keyframes floatFlipped {
  0%,
  100% {
    transform: scaleX(-1) translateY(0px) rotate(10deg);
  }
  50% {
    transform: scaleX(-1) translateY(-6px) rotate(8deg);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fade-in-section {
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-section:nth-child(even) {
  transform: translateX(20px);
}

.fade-in-section:nth-child(odd) {
  transform: translateX(-20px);
}

.fade-in-section.fade-in-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===============================
   RESPONSIVE STYLES
   =============================== */

/* Tablet & Medium Screens */
@media (max-width: 1024px) {
  .title-link img {
    height: 2.5rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .navbar {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-ash-grey);
    flex-direction: column;
    padding: 1.25rem;
    gap: 0;
  }

  .navbar.active {
    display: flex;
  }

  .navbar a {
    padding: 1rem 1.25rem;
    border-bottom: 0.2rem solid rgba(245, 253, 198, 0.15);
    text-align: center;
    font-size: 1.1rem;
  }
}

/* Mobile Devices */
@media (max-width: 768px) {
  header {
    padding: 1rem 1.25rem;
    height: 4.375rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  header h4 {
    font-size: 0.8rem;
  }

  .menu {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .menu a {
    width: 12.5rem;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  header {
    padding: 0.5rem 1rem;
    height: 3.75rem;
  }

  header h1 {
    font-size: 1.3rem;
  }

  header h4 {
    font-size: 0.7rem;
  }

  .title-link img {
    height: 2rem;
  }

  .footer {
    padding: 1.25rem 1rem;
  }

  .author,
  .verification-link {
    font-size: 0.8rem;
  }

  .verification-link {
    gap: 0.375rem;
  }

  .verification-icon {
    width: 1.125rem;
    height: 1.125rem;
  }
}

/* Extra Small Devices */
@media (max-width: 378px) {
  header {
    padding: 0.5rem;
  }

  header h1 {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
