/* =========================================
   CSS CUSTOM PROPERTIES
   ========================================= */
:root {
  /* Colors */
  --color-blue-950: hsl(233, 26%, 24%);
  --color-green-500: hsl(136, 64%, 51%);
  --color-cyan-400: hsl(192, 69%, 51%);
  --color-gray-600: hsl(233, 8%, 62%);
  --color-gray-100: hsl(220, 16%, 96%);
  --color-gray-50: hsl(0, 0%, 98%);
  --color-white: hsl(0, 100%, 100%);
 
  /* Typography */
  --font-family: 'Public Sans', sans-serif;
  --font-size-body: 1.125rem; /* 18px */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-bold: 700;
 
  /* Layout */
  --container-max: 1440px;
  --container-padding: 10.3125rem; /* 165px each side */
}
 
/* =========================================
   RESET & BASE
   ========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
 
html {
  font-size: 100%;
  scroll-behavior: smooth;
}
 
body {
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-light);
  color: var(--color-gray-600);
  background-color: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
}
 
img {
  display: block;
  max-width: 100%;
}
 
ul {
  list-style: none;
}
 
a {
  text-decoration: none;
  color: inherit;
}
 
/* =========================================
   BUTTON
   ========================================= */
.btn {
  display: inline-block;
  padding: 0.875rem 2.1875rem;
  border-radius: 2rem;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
 
.btn--primary {
  background: linear-gradient(20deg, var(--color-cyan-400),var(--color-green-500));
  color: var(--color-white);
  transition: 0.2s ease;
}

.btn--primary:hover {
  filter: brightness(1.25) saturate(0.7);
}
 
/* =========================================
   NAVIGATION
   ========================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--color-white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
 
.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 calc(var(--container-padding) - 2.2rem);
  height: 5rem; /* 80px */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}
 
.nav__logo img {
  height: 1.75rem; /* 20px */
}
 
.nav__links {
  display: flex;
  gap: 1.875rem; /* 30px */
  margin: 0 auto;
}
 
.nav__links a {
  font-size: 0.875rem;
  font-weight: var(--font-weight-regular);
  color: var(--color-gray-600);
  position: relative;
  padding-bottom: 1.85rem;
}
 
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--color-green-500), var(--color-cyan-400));
  opacity: 0;
  transition: opacity 0.2s ease;
}
 
.nav__links a:hover {
  color: var(--color-blue-950);
}
 
.nav__links a:hover::after {
  opacity: 1;
}
 
/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 100vh;
  padding-top: 5rem; /* offset for fixed nav */
  background-color: var(--color-gray-50);
  overflow: visible;
  position: relative;
}
 
.hero__content {
  padding-left: var(--container-padding);
  padding-right: 2rem;
  padding-top: 6.875rem; /* 110px */
  padding-bottom: 6.875rem;
  max-width: 44rem;
}
 
.hero__title {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: var(--font-weight-light);
  color: var(--color-blue-950);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
 
.hero__text {
  font-size: 1rem;
  color: var(--color-gray-600);
  margin-bottom: 2.25rem;
  max-width: 27rem;
  line-height: 1.75;
}
 
.hero__image {
  position: relative;
  height: 100%;
  min-height: 40rem;
  align-self: stretch;
}
 
.hero__bg {
  position: absolute;
  top: -14.5rem;
  right: -24rem;
  width: 154%;;
  max-width: none;
  pointer-events: none;
}
 
.hero__mockups {
  position: absolute;
  top: -10rem;
  right: -8rem;
  width:  110%;
  max-width: 46.875rem; /* 750px */
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 15px 8px rgba(0, 0, 0, 0.20));
}
 
/* =========================================
   WHY SECTION
   ========================================= */
.why {
  background-color: var(--color-gray-100);
  padding: 5.625rem var(--container-padding); /* 90px */
}
 
.why__intro {
  margin-bottom: 4.375rem; /* 70px */
  max-width: 37.5rem;
}
 
.why__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: var(--font-weight-light);
  color: var(--color-blue-950);
  margin-bottom: 1.375rem;
}
 
.why__text {
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-right: 4rem;
}
 
.why__features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.875rem; /* 30px */
}
 
.feature__icon {
  width: 4.375rem; /* 70px */
  height: 4.375rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-green-500), var(--color-cyan-400));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem; /* 40px */
}
 
.feature__icon img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}
 
.feature__title {
  font-size: 1.25rem;
  font-weight: var(--font-weight-light);
  color: var(--color-blue-950);
  margin-bottom: 1.625rem; /* 26px */
}
 
.feature__text {
  font-size: 0.9375rem;
  line-height: 1.75;
  
}
 
/* =========================================
   ARTICLES SECTION
   ========================================= */
.articles {
  background-color: var(--color-gray-50);
  padding: 5.625rem 0;
}
 
.articles__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  
}
 
.articles__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: var(--font-weight-light);
  color: var(--color-blue-950);
  margin-bottom: 2.5rem; /* 40px */
}
 
.articles__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem; /* 30px */
}
 
/* Article Card */
.card {
  background-color: var(--color-white);
  border-radius: 0.3125rem; /* 5px */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
 
.card__image-link {
  display: block;
  overflow: hidden;
}
 
.card__image {
  width: 100%;
  height: 12.5rem; /* 200px */
  object-fit: cover;
}
 
.card__body {
  padding: 0rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  
}
 
.card__author {
  font-size: 0.625rem; /* 10px */
  color: var(--color-gray-600);
  margin-bottom: 0.75rem;
  padding-top:1.3rem;
  padding-left:1rem;
}
 
.card__title {
  font-size: 1rem;
  font-weight: var(--font-weight-light);
  color: var(--color-blue-950);
  line-height: 1.3;
  padding-left:1rem;
  margin-right:1rem;
}
 
.card__title a {
  color: inherit;
}
 
.card__title a:hover {
  color: var(--color-green-500);
}
 
.card__text {
  font-size: 0.8rem; /* 13px */
  line-height: 1.4;
  color: var(--color-gray-600);
  padding-top:0.5rem;
  padding-left:0.9rem;
  padding-bottom:1rem;
  margin-right:1rem;
}
 
/* =========================================
   FOOTER
   ========================================= */
.footer {
  background-color: var(--color-blue-950);
  padding: 2.5rem var(--container-padding); /* 40px */
}
 
.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
 
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 3.6rem;
}
 
.footer__logo img {
  height: 1.25rem;
}
 
.footer__social {
  display: flex;
  gap: 1rem;
  align-items: center;
}
 
.footer__social a {
  display: flex;
  align-items: center;
}
 
.footer__social img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}
 
.footer__social a:hover img {
  filter: brightness(0) saturate(100%) invert(64%) sepia(61%) saturate(441%) hue-rotate(103deg) brightness(102%) contrast(88%);
}
 
.footer__nav {
  display: flex;
  gap: 5rem; /* 80px */
  align-items: flex-start;
}
 
.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.875rem; /* 14px */
}
 
.footer__nav a {
  font-size: 0.9375rem;
  color: var(--color-gray-100);
}
 
.footer__nav a:hover {
  color: var(--color-green-500);
}
 
.footer__cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.625rem; /* 26px */
}
 
.footer__copy {
  font-size: 0.9375rem;
  color: var(--color-gray-600);
}
 
/* =========================================
   ATTRIBUTION
   ========================================= */
.attribution {
  font-size: 0.6875rem;
  text-align: center;
  padding: 1rem;
  background-color: var(--color-blue-950);
  color: var(--color-gray-600);
}
 
.attribution a {
  color: hsl(228, 45%, 44%);
}


/* =========================================
   HAMBURGER BUTTON (mobile only)
   ========================================= */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  z-index: 200;
}

.nav__toggle img {
  width: 1.7rem;
  height: auto;
}

/* =========================================
   MOBILE OVERLAY MENU
   ========================================= */
.nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, rgba(45, 49, 77, 0.85), transparent);
  z-index: 99;
  pointer-events: none;
  opacity: 0;
}

.nav__overlay.is-open {
  pointer-events: all;
  opacity: 1;
}

/* =========================================
   RESPONSIVE — max 768px
   ========================================= */
@media (max-width: 900px) {

  /* --- NAV --- */
  .nav__toggle {
    display: block;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 5.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background-color: var(--color-white);
    border-radius: 0.3125rem;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 1.5rem 0;
    z-index: 150;
    box-shadow: 0 8px 24px rgba(45, 49, 77, 0.15);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links li {
    width: 100%;
    text-align: center;
  }

  .nav__links a {
    display: block;
    padding: 0.875rem 0;
    font-size: 1.125rem;
    color: var(--color-blue-950);
  }

  .nav__links a::after {
    display: none;
  }

  .nav__overlay {
    display: block;
  }

  .nav__overlay.is-open {
    opacity: 1;
  }

  /* Nasconde il btn "Request Invite" nella nav su mobile */
  .nav__inner > .btn {
    display: none;
  }

  .nav__inner {
    padding: 0 2rem;
  }

  /* --- HERO --- */
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: auto;
    text-align: center;
    padding-top: 5rem;
  }

  .hero__image {
    order: -1;
    min-height: 18rem;
    height: 20rem;
    overflow: hidden;
    position: relative;
  }

  .hero__bg {
    content: url('./images/bg-intro-mobile.svg');
    top: -9.6rem;
    right: 0;
    left: 0;
    width: 100%;
  }

  .hero__mockups {
    top: -9rem;
    right: 50%;
    transform: translateX(50%);
    width: 78%;
    max-width: 23rem;
  }

  .hero__content {
    padding: 2.5rem 4rem 4rem;
    max-width: 100%;
  }

  .hero__title {
    font-size: clamp(2.4rem, 9vw, 3rem);
    margin-bottom: 1.25rem;
  }

  .hero__text {
    max-width: 100%;
    margin-bottom: 2rem;
  }

  /* --- WHY --- */
  .why {
    padding: 3rem 4rem;
    text-align: center;
  }

.why__title {
    font-size: clamp(3rem, 8vw, 3rem);
  }
  .why__intro {
    margin-bottom: 3rem;
    max-width: 100%;
  }

  .why__features {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .why__text{
    margin-right: auto;
  }

  .feature__icon {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.75rem;
  }

  .feature__title {
    font-size: 1.7rem;
    margin-bottom: 1rem;
  }

  /* --- ARTICLES --- */
  .articles {
    padding: 4rem 2.5rem;
  }

 .articles__title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .articles__inner {
    padding: 0 1.5rem;
    text-align: center;
  }

  .articles__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card__image {
    height: 14rem;
  }

  .card__text{
    text-align: left;
  }
  .card__title{
    text-align: left;
  }
  .card__author{
    text-align: left;
  }
  /* --- FOOTER --- */
  .footer {
    padding: 4rem 1.5rem 2.5rem;
    text-align: center;
  }

  .footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .footer__brand {
    align-items: center;
    gap: 2rem;
  }

  .footer__nav {
    flex-direction: column;
    gap: 0.875rem;
    align-items: center;
  }

  .footer__nav ul {
    align-items: center;
  }

  .footer__cta {
    align-items: center;
  }
}