/* ==========================================================================
   Global / layout
   ========================================================================== */

/* ==========================================================================
   Header — liquid glass island
   ========================================================================== */

/* ==========================================================================
   Hero / footer secondary heading
   ========================================================================== */

/* ==========================================================================
   CTA
   ========================================================================== */

/* ==========================================================================
   Text vertical swap (shared: .cta__label, .contact-list__label, .header__link)
   ========================================================================== */

/* ==========================================================================
   Section heading
   ========================================================================== */

/* ==========================================================================
   Sticky note (generic, used in hero + footer)
   ========================================================================== */

/* ==========================================================================
   Contact list
   ========================================================================== */

/* ==========================================================================
   Status bar
   ========================================================================== */

/* ==========================================================================
   Footer
   ========================================================================== */

/* ==========================================================================
   Global / layout
   ========================================================================== */

html,
body {
  scrollbar-width: none;
  font-family: var(--f);
}

.smooth-wrapper {
  -webkit-overflow-scrolling: auto;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

.background {
  background-color: var(--color-gray-100);
  padding: var(--grid-space);
}

.sections>*:not(:last-child),
.background>*:not(:last-child) {
  margin-bottom: var(--grid-space);
}

.section {
  padding-top: 9.375rem;
  padding-bottom: 9.375rem;
  background-color: var(--color-white);
}

.section--dark {
  transition: background-color 0.6s ease, color 0.6s ease;
}

.section--dark.active {
  background-color: var(--color---color-bg);
  color: var(--color-white);
}

.background {
  transition: background-color 0.6s ease;
}

.background.active {
  background-color: var(--color-black);
}

.section-title {
  font-family: var(--f);
  font-weight: 500;
}

@media (min-width: 1024px) {
  .hero {
    height: calc(100vh - calc(2 * var(--grid-space)));
    overflow: hidden;
  }

  .hero,
  .section,
  footer {
    border-radius: var(--border-radius-40);
  }

  .section-title {
    font-size: var(--unit-28);
  }
}

@media (max-width: 63.9375rem) {
  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero,
  .section,
  footer {
    border-radius: var(--border-radius-12);
  }

  .grid-container>*:not(:last-child) {
    margin-bottom: 3rem;
  }

  .hero {
    padding: 7rem 0 3rem 0;
  }

  .section-title {
    font-size: var(--unit-24);
  }

  .section-hero-two,
  .page--contact footer {
    padding-top: 8rem;
  }
}

/* ==========================================================================
   Header — liquid glass island
   ========================================================================== */

.header {
  position: fixed;
  top: calc(var(--grid-space) + var(--unit-8));
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999999;
  width: max-content;
}

.header__inner {
  display: flex;
  align-items: center;
  padding: var(--unit-4);
  border-radius: var(--unit-full);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--color-gray-100);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.header__nav {
  display: flex;
  align-items: center;
  position: relative;
  gap: 0;
}

.header__pill {
  position: absolute;
  height: 100%;
  border-radius: var(--unit-full);
  background: rgba(0, 0, 0, 0.1);
  pointer-events: none;
  z-index: 0;
  transition: none;
}

.header__link {
  position: relative;
  z-index: 1;
  font-family: var(--f);
  font-weight: 500;
  font-size: var(--unit-15);
  color: var(--color-gray-700);
  text-decoration: none;
  padding: var(--unit-8) var(--unit-20);
  border-radius: var(--unit-full);
  white-space: nowrap;
}

.header__link--active {
  opacity: 1;
  color: var(--color-gray-900);
  font-family: var(--f);
  font-weight: 500;
}

/* contact page variant */

body.page--contact .header__inner {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

body.page--contact .header__logo,
body.page--contact .header__link {
  color: var(--color-gray-900);
}



@media (min-width: 64rem) {
  .header__inner {
    gap: 15rem;
  }

}

@media (max-width: 63.9375rem) {
  .header {
    top: var(--unit-12);
  }

  .header__inner {
    width: 100%;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
  }

  .header__nav {
    gap: var(--unit-8);
  }

  .header__link {
    font-size: var(--unit-14);
  }
}

/* ==========================================================================
   Hero / footer secondary heading
   ========================================================================== */

.section--hero-secondary h1,
.footer--secondary h1 {
  font-weight: var(--f-r);
}

@media (min-width: 64rem) {

  .section--hero-secondary,
  .footer--secondary {
    padding-top: 20vh;
  }

  .section-top h1,
  .footer--secondary h1 {
    font-size: 5vw;
    letter-spacing: -2px;
  }

  .last-section {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35),
      0 10px 8px rgba(0, 0, 0, 0.2);
  }

}

@media (max-width: 63.9375rem) {

  .section--hero-secondary,
  .footer--secondary {
    padding-top: 15vh;
  }
}

/* ==========================================================================
   CTA
   ========================================================================== */

.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--unit-8);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--f);
  font-weight: 500;
  font-size: var(--unit-18);
  line-height: 1;
  border: none;
  background: none;
}

.cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--unit-20);
  aspect-ratio: 17 / 16;
  flex-shrink: 0;
  transition: transform var(--transition) ease;
}

/* --- filled --- */

.cta--filled {
  padding: var(--unit-12) var(--unit-24);
  border-radius: var(--unit-full);
  background: var(--color-gray-900);
  transition: filter var(--transition) ease;
}

.cta--filled .cta__label,
.cta--filled .cta__icon {
  color: var(--color-white);
}

.cta--filled:hover {
  filter: brightness(0.92);
}

.cta__label {
  font-family: var(--f);
  font-weight: 500;
  font-size: var(--unit-16);
}

/* --- link --- */

.cta--link .cta__label,
.cta--link .cta__icon {
  color: var(--color-primary);
}

.cta--link-dark .cta__label,
.cta--link-dark .cta__icon {
  color: var(--color-gray-900);
}

/* underline sweep — outer wrapper, NOT clipped by the text-swap overflow */

.cta--link .cta__label {
  position: relative;
  padding-bottom: 2px;
}

.cta--link .cta__label::before,
.cta--link .cta__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.cta--link .cta__label::before {
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.cta--link .cta__label::after {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  transition-delay: 0s;
}

.cta--link:hover .cta__label::before {
  transform: scaleX(0);
  transform-origin: right;
}

.cta--link:hover .cta__label::after {
  transform: scaleX(1);
  transform-origin: left;
  transition-delay: 0.15s;
}

.cta:hover .hover-swap__line--original,
.cta:hover .hover-swap__line--clone {
  transform: translateY(-100%);
}

/* ==========================================================================
   Text vertical swap (shared: .cta__label, .contact-list__label, .header__link)
   ========================================================================== */

.hover-swap__inner {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  height: 1.2em;
}

.hover-swap__line {
  display: block;
  line-height: 1.2em;
  transition: transform 0.4s ease;
}

.hover-swap__line--clone {
  position: absolute;
  top: 100%;
  left: 0;
  white-space: nowrap;
}

/* ==========================================================================
   Section heading
   ========================================================================== */

.section-heading__title .line {
  overflow: hidden;
  display: block;
  padding-bottom: 0.15em;
}

.section-heading__title .word {
  display: inline-block;
}

.js-text .char {
  display: inline-block;
  will-change: transform;
}

@media (max-width: 63.9375rem) {
  .section__counter {
    display: none;
  }

  .js-text .char {
    will-change: unset;
  }

  .cta--filled {
    padding: var(--unit-24) var(--unit-40);
  }

  .cta__label {
    font-size: var(--unit-18);
  }

}

/* ==========================================================================
   Sticky note (generic, used in hero + footer)
   ========================================================================== */

.sticky-note {
  width: 15rem;
  background-color: var(--color-primary);
  border-radius: var(--border-radius-12);
  padding: var(--unit-18);
  display: flex;
  flex-direction: column;
  gap: var(--unit-8);
  transform: rotate(-5deg);
  box-shadow:
    4px 6px 20px rgba(0, 0, 0, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-note__list {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: var(--unit-12);
  margin: 0;
}

.card-note__list li {
  font-family: Sticky-Notes;
  font-size: var(--unit-20);
  color: var(--color-gray-900);
  line-height: 1.1;
  position: relative;
  will-change: transform;
  position: relative;
}


/* footer variant */

.footer-sticky-note {
  position: relative;
  width: 15rem;
  background-color: var(--color-primary);
  border-radius: var(--unit-8);
  padding: var(--unit-12);
  display: flex;
  flex-direction: column;
  gap: var(--unit-8);
  transform: rotate(-3deg);
  box-shadow:
    4px 6px 20px rgba(0, 0, 0, 0.35),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.footer-sticky-note .card-note__list li {
  font-family: Sticky-Notes;
  font-size: var(--unit-20);
  color: var(--color-gray-900);
  line-height: 1.3;
}

.footer-sticky-note__status {
  display: flex;
  align-items: center;
  gap: var(--unit-8);
}

/* ==========================================================================
   Contact list
   ========================================================================== */

.contact-list__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--unit-24);
  padding: var(--unit-20) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: var(--color-gray-900);
  overflow: hidden;
}

.contact-list__item:first-child {
  padding-top: 0;
}

.contact-list__item::before,
.contact-list__item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--color-gray-900);
}

.contact-list__item::before {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.contact-list__item::after {
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.contact-list__item:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-list__item:hover::after {
  transform: scaleX(0);
  transform-origin: right;
  transition-delay: 0s;
}

.contact-list__item:hover .hover-swap__line--original,
.contact-list__item:hover .hover-swap__line--clone {
  transform: translateY(-100%);
}

.contact-list__label {
  font-family: var(--f);
  font-weight: 500;
  font-size: var(--unit-20);
}

.contact-list__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--unit-20);
  aspect-ratio: 1;
  flex-shrink: 0;
  color: var(--color-gray-900);
  transition: transform 0.3s ease;
}


.contact-list__arrow--out {
  transform: rotate(0deg);
}

a[href*=".pdf"] img {
  display: none !important;
}

/* ==========================================================================
   Status bar
   ========================================================================== */

.status-bar__dot {
  position: relative;
  display: inline-block;
  width: var(--unit-12);
  height: var(--unit-12);
  border-radius: var(--unit-full);
  background-color: var(--color-info-500);
  flex-shrink: 0;
}

.status-bar__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--unit-full);
  background-color: var(--color-info-500);
  animation: dot-pulse 2s ease-out infinite;
}

@keyframes dot-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}



/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  color: var(--color-black);
  background-color: var(--color-white);
  background-image: radial-gradient(circle, #f3efef 1.2px, transparent 1.2px);
  background-size: 15px 15px;
}

footer .section-heading__index {
  color: var(--color-gray-900);
}

footer .section-top {
  border-color: var(--color-gray-900);
}

/* NOTE: .footer__me gets a margin, then is hidden entirely below — check whether display: none is still intentional */
.footer__me {
  margin-top: 2rem;
  display: none;
}

.footer__me svg {
  width: 15rem;
}

.footer__al-dente img {
  border-radius: 8px;
}

.footer__al-dente svg path {
  fill: var(--color-gray-900);
}

.footer__title svg path {
  fill: var(--color-gray-900);
}

.footer__contact {
  background-color: var(--color-primary);
  background-image: unset;
}

@media (min-width: 1024px) {
  .hero {
    height: calc(100vh - calc(2 * var(--unit-16)));
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  footer {
    height: calc(100vh - calc(2 * var(--grid-space)));
    overflow: hidden;
    padding: 5rem 0;
    position: relative;
    z-index: 1;
  }

  .section-about {
    position: relative;
    z-index: 2;
  }

  .footer .grid-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .footer__al-dente img {
    width: 15rem;
  }
}

@media (max-width: 63.9375rem) {
  .footer .grid-container {
    display: flex;
    flex-direction: column-reverse;
  }

  .footer .grid-container>*:not(:last-child) {
    margin-bottom: 0;
  }

  .footer {
    padding: 3rem 0;
  }

  .footer .status-bar {
    gap: unset;
    justify-content: space-between;
  }

  .footer .contact-list {
    margin-top: 4rem;
  }

  .footer .footer__al-dente {
    margin-top: 4rem;
  }

  .footer .footer__al-dente img {
    width: 100%;
  }

  .footer__title {
    margin-top: 2rem;
  }

  .footer__contact {
    padding-top: 8rem;
  }

  .p-22 {
    font-size: var(--unit-18);
  }
}
