@import url(reset.css);
@import url(spacing.css);
@import url(fonts.css);
@import url(typography.css);

:root {
  --tx-font-family-sans-serif: Montserrat;
  --tx-font-family-display: "Bebas Neue";
  --tx-background-color: #fff;
  --tx-color: #333;
  --tx-primary-200: #a1f0ff;
  --tx-primary-400: #1accf6;
  --tx-primary: #018bba;
  --tx-primary-800: #115a79;
  --tx-primary-900: #134a66;
  --tx-primary-999: #021a27;
  --tx-secondary: #330081;
  --tx-secondary-999: #160039;
  --tx-secondary-200: #daceff;
}

:is(h1, h2, h3, h4, h5, h6),
.balance {
  text-wrap: balance;
}

p,
div,
blockquote,
li {
  text-wrap: pretty;
}

body {
  font-family: var(--tx-font-family-sans-serif);
  font-size: var(--step-0);
  color: var(--tx-primary-999);
}

a {
  text-decoration: none;
  color: var(--tx-primary);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
}

.tx-section-inline {
  padding-inline: var(--space-s);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--tx-secondary-999);
}

/* Responsive utility classes */

@media (min-width: 901px) {
  .hide-lg {
    display: none;
  }
}
@media (max-width: 900px) {
  .hide-sm {
    display: none;
  }
}

body.home > header {
  background-color: transparent;
  padding-block: 4px;
  margin-bottom: -120px;
  position: relative;
  z-index: 2;
}

body.page > header {
  background-color: var(--tx-secondary);
  padding-block: 4px;
  margin-bottom: -120px;
  position: relative;
  z-index: 2;
}

.header__container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
}
a.logo {
  flex: 0 0 140px;
}

nav.primary-navigation li {
  display: inline-block;
  margin: 0;
  padding: 0 var(--space-2xs);
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 500;
}

nav.primary-navigation li a {
  color: var(--tx-primary);
}
nav.primary-navigation li a:hover {
  color: var(--tx-primary-800);
}

.page nav.primary-navigation li a {
  color: var(--tx-primary-400);
}

.page__wrapper {
  margin-bottom: 0;
  padding-block: 8rem;
  position: relative;
  min-height: calc(100dvh - 40px);
  background: url("../images/Q.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: 66%;
}

@media (min-width: 1024px) {
  .page__wrapper {
    background-size: 33%;
  }
}

.page__text {
  max-width: 60ch;
  margin: 0 auto;
}

.page__text__wide {
  max-width: 100%;
  margin: 0 auto;
}

.page__text > * + *,
.page__text__wide > * + *,
.hero__text > * + * {
  margin-block-start: 1.5rem;
}
.page__text ul,
.hero__text ul {
  padding-block: var(--space-s);
  padding-inline: var(--space-xs);
}

.page__text ul > * + *,
.hero__text ul > * + * {
  margin-block-start: 0.75rem;
}

/* Home */

.hero {
  min-height: 100vh;
  background: url("../images/hero-horizontal-qvalue.webp");
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: cover;
  margin-bottom: 0;
  padding-block: 8rem;
  position: relative;
}

.hero__content {
  background: url("../images/Q.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-size: 33%;
  display: flex;
  flex-direction: row;
}

@media (min-width: 1024px) {
  .hero__content {
    background-size: 66%;
  }
}

.hero__title {
  font-family: var(--tx-font-family-display);
  font-weight: 400;
  font-size: var(--step-5);
  color: var(--tx-primary);
}
.hero__subtitle {
  font-size: var(--step-2);
  color: var(--tx-primary);
  font-weight: 500;
}

.hero__text {
  font-size: var(--step-0);
  font-weight: 400;
  max-width: 70ch;
}

/* @media (min-width: 1024px) {
  .hero__text {
    flex: 0 1 55%;
  }
} */

.hero__overlay_bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 400px;
  opacity: 0.05;
}

footer {
  background-color: var(--tx-primary-900);
  color: #f4f1ff;
  padding-block: var(--space-2xs);
  font-size: var(--step-0);
}

footer a {
  color: var(--tx-primary-200);
}
footer a:hover {
  color: var(--tx-primary-400);
}

footer .container {
  display: flex;
  justify-content: center;
}

/* Griglia comitato scientifico */
.grid-3-col {
  display: grid;
  grid-column-gap: 2rem;
  grid-row-gap: 2rem;
  margin-block: 3rem;
}

@media (min-width: 600px) {
  .grid-3-col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3-col {
    grid-template-columns: repeat(3, 1fr);
    grid-column-gap: 3rem;
    grid-row-gap: 3rem;
  }
}

figure img {
  border-radius: 8px;
  box-shadow: 2.1px 2.1px 2.1px rgba(0, 0, 0, 0.018),
    7.1px 7.1px 7.1px rgba(0, 0, 0, 0.024), 32px 32px 32px rgba(0, 0, 0, 0.07);
}

.membrics {
  display: flex;
  flex-direction: column;
  row-gap: 2rem;
}

.membrics__item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .membrics__item {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 1.5rem;
  }
}

.membrics__item > * {
  margin: 0;
}

.membrics__text > * {
  margin: 0;
}

.membrics__text h2 {
  font-size: var(--step-1);
}

.membrics__text p {
  font-size: 1rem;
}

/* Dialog Mobile Menu */
.dialog-menu,
.dialog-menu[open].dialog-menu--closing {
  position: fixed;
  transition: 0.3s;
  margin: 0;
  margin-left: auto;
  min-height: 100vh;
  width: 360px;
  min-width: 320px;
  max-width: 80%;
  transform: translateX(100%);
}
.dialog-menu[open] {
  display: flex;
  margin: 0;
  margin-left: auto;
  flex-direction: column;
  transform: translateX(0);
  transition: 0.3s;
}

.close-dialog {
  margin: 1rem auto;
}

button {
  font-size: 16px;
  background: #018bba;
  border: 1px solid white;
  color: white;
  padding: 1rem;
  line-height: 1;
  text-transform: uppercase;
}
button:hover {
  background: white;
  border-color: var(--tx-primary);
  color: var(--tx-secondary);
}

.dialog-menu {
  background-color: var(--tx-primary-900);
  justify-content: start;
}
.dialog-menu ul {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}
.dialog-menu li + li {
}
.dialog-menu a {
  display: block;
  padding-block: 1rem;
  padding-inline: 0.5rem;
  text-decoration: none;
  color: white;
  text-transform: uppercase;
}

.dialog-menu a:hover {
  color: var(--tx-primary-800);
  background-color: #fff;
}

/* Custom */
.text-large {
  font-size: var(--step-1);
  font-weight: 500;
}

mark {
  margin: 0 -0.4em;
  padding: 0.1em 0.4em;
  border-radius: 0.8em 0.3em;
  background: transparent;
  background-image: linear-gradient(
    to right,
    rgba(255, 225, 0, 0.1),
    rgba(1, 139, 186, 0.6) 4%,
    rgba(51, 0, 129, 0.2)
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
