/* =========================
   RESET
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: #f3f3f3;
  color: #111;
  font-family: "Chivo Mono", monospace, sans-serif;
  font-weight: 200;
  line-height: 1.2;
  text-wrap: balance;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
a {
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
}

/* =========================
   LAYOUT BASE
========================= */

.page-shell {
  width: 100%;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 3rem;
}

.section-title {
  margin: 0;
  font-family: "jacquarda-bastarda-9";
  line-height: 0.95;
  font-size: 3rem;
  padding-bottom: 2rem;
}

.section-title-center {
  text-align: center;
}

.section-title-mono {
  margin: 0;
  font-family: "Chivo Mono", monospace, sans-serif;
  line-height: 1.2;
  font-size: 1.5rem;
  padding-bottom: 2rem;
}

/* =========================
   HERO + OVERLAY
========================= */

.hero-parallax {
  position: relative;
  height: 200vh;
  z-index: 0;
}

.hero-parallax-bg {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  background-image: url("media/scontrini.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.site-overlay {
  position: relative;
  z-index: 2;
  margin-top: -100vh;
  background: #f3f3f3;
}

/* =========================
   TICKER
========================= */

.ticker {
  width: 100%;
  min-height: 30px;
  overflow: hidden;
  background: #f3f3f3;
  color: #111;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 30;
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ticker-scroll 30s linear infinite;
}

.ticker-track span {
  white-space: nowrap;
  padding-right: 1rem;
  font-size: 0.85rem;
  font-weight: 400;
  font-variant: small-caps;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.carousel {
  border-bottom: 1px solid #111;
}

/* =========================
   INTRO
========================= */

.intro-section {
  padding-top: 0;
  position: relative;
  z-index: 2;
  background: #f3f3f3;
}

.intro-media {
  width: calc(100% - 60px);
  margin: 2rem auto 2rem;
  padding-top: 8rem;
  padding-bottom: 12rem;
}

.intro-menu-wrap {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #f3f3f3;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
  width: 100%;
}

.intro-content-section {
  background: #f3f3f3;
}

#progetto,
#starter-kit,
#metodo {
  scroll-margin-top: 80px;
}

.intro-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 0 auto;
  padding: 20px 20px;
  text-align: center;
  flex-wrap: wrap;
}

.intro-menu a {
  color: #111;
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
}

.intro-menu a:hover {
  text-decoration: underline;
}

.intro-content {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.intro-content p {
  margin: 1.5rem 0 0;
}

.video-embed {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
}

.video-embed iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border: 1px solid #111;
}

/* =========================
   BUTTONS
========================= */

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid #111;
  background: transparent;
  color: #111;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.download-btn:hover {
  background: #111;
  color: #f3f3f3;
}

/* =========================
   STARTER KIT
========================= */

.starter-kit-section {
  padding-top: 3rem;
}

.starter-kit-heading {
  padding-left: 20px;
  padding-right: 20px;
}

.starter-kit-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid #111;
  margin-top: 2rem;
}

.starter-kit-panel {
  display: flex;
  flex-direction: column;
  padding: 2rem 20px 3rem;
}

.starter-kit-panel + .starter-kit-panel {
  border-top: 1px solid #111;
}

.starter-kit-content {
  flex: 1;
}

.starter-kit-actions {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  justify-content: center;
}

.starter-kit-title {
  padding-bottom: 1.5rem;
}

.starter-kit-video {
  margin-bottom: 0;
}

.starter-kit-steps {
  margin: 0;
  padding-left: 1.2rem;
}

.starter-kit-steps li {
  margin-bottom: 1rem;
}

.starter-strong {
  display: block;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

/* =========================
   METHOD
========================= */

.method-section {
  padding-top: 3rem;
  border-top: 1px solid #111;
}

.method-section .container {
  max-width: 100%;
  margin: 0 auto;
}

.method-intro {
  margin: 0 0 2.5rem;
}

.method-accordion {
  max-width: 100%;
  margin: 2.5rem auto 0;
  position: relative;
}

.method-item {
  position: relative;
}

.method-tab-row {
  display: flex;
  align-items: flex-end;
  position: relative;
  padding-left: 24px;
  margin-bottom: -1px;
  z-index: 3;
}

.method-tab-row::before {
  content: "";
  position: absolute;
  top: 100%;
  left: -100vw;
  width: calc(100vw + 24px);
  height: 1px;
  background: #111;
}

.method-tab {
  width: 210px;
  min-width: 210px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
  color: #111;
  border: 1px solid #111;
  border-bottom: none;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.method-tab::before {
  content: "";
  position: absolute;
  left: -1px;
  bottom: -1px;
  width: 38px;
  height: 18px;
  background: #f3f3f3;
  border-left: 1px solid #111;
}

.method-line {
  flex: 1;
  height: 1px;
  background: #111;
}

.method-panel {
  max-height: 0;
  overflow: hidden;
  position: relative;
  background: #111;
  color: #f3f3f3;
  z-index: 1;
  transition: max-height 0.35s ease;
}

.method-panel-inner {
  opacity: 0;
  padding: 0 38px;
  transition: opacity 0.2s ease;
}

.method-panel-inner p {
  margin: 0 0 1rem;
}

.method-panel-inner p:last-child {
  margin-bottom: 0;
}

.panel-title {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.method-item.is-active .method-tab {
  background: #111;
  color: #f3f3f3;
  border-color: #111;
}

.method-item.is-active .method-tab::before {
  display: none;
}

.method-item.is-active .method-line {
  background: #111;
}

.method-item.is-active .method-panel {
  max-height: 1400px;
  margin-bottom: -64px;
}

.method-item.is-active .method-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -64px;
  height: 64px;
  background: #111;
  z-index: 1;
}

.method-item.is-active .method-panel-inner {
  opacity: 1;
  padding-top: 34px;
  padding-bottom: 120px;
}

.method-item:not(.is-active) {
  z-index: 3;
}

.method-item:not(.is-active) .method-tab {
  background: #f3f3f3;
  color: #111;
  border-color: #111;
}

.method-item:not(.is-active) .method-line {
  background: #111;
}

.method-item:not(.is-active) .method-panel {
  max-height: 0;
}

.method-item.is-active + .method-item {
  margin-top: 0;
  position: relative;
  z-index: 3;
}

.method-item.is-active + .method-item .method-tab-row {
  position: relative;
  z-index: 3;
}

.method-item:not(.is-active) + .method-item:not(.is-active),
.method-item:not(.is-active) + .method-item.is-active {
  margin-top: 16px;
}

/* =========================
   LIFECYCLE
========================= */

.lifecycle-section {
  padding-top: 8rem;
}

.lifecycle-wrapper {
  position: relative;
  margin-top: 2rem;
  padding-bottom: 5rem;
}

.lifecycle-image {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.lifecycle-download {
  width: fit-content;
  margin: 1.5rem auto 0;
}

.lifecycle-wrapper::after,
.lifecycle-wrapper:hover::after {
  display: none;
}

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

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 4rem;
  border-top: 1px solid #111;
}

.footer-logo {
  width: 100%;
  max-width: 180px;
  flex: 0 0 auto;
}

.footer-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.footer-flex {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.footer-flex p {
  margin: 0;
}

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

@media (min-width: 576px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  p {
    width: 80vw;
  }

  .carousel-item img {
    height: 80vh;
    object-fit: cover;
  }

  .intro-media {
    display: flex;
    align-items: center;
    width: calc(80% - 60px);
    margin: 2rem auto 2rem;
    padding-bottom: 6rem;
  }

  .method-panel-inner {
    padding-left: 28px;
    padding-right: 28px;
  }

  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
  }

  .footer-logo {
    width: 40%;
    max-width: 220px;
  }

  .footer-flex {
    width: 60%;
    align-items: flex-end;
    text-align: right;
  }

  .smalltext {
    font-size: 0.8rem;
  }

  .starter-kit-heading {
    padding-left: 24px;
    padding-right: 24px;
  }

  .starter-kit-panel {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (min-width: 768px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  p {
    width: 80vw;
  }

  .intro-media {
    width: 50%;
    margin: 2rem auto 2rem;
    padding-top: 8rem;
    padding-bottom: 12rem;
  }

  .starter-kit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .starter-kit-panel {
    min-height: 100%;
    padding: 2.5rem 32px 3rem;
  }

  .starter-kit-panel + .starter-kit-panel {
    border-top: 0;
    border-left: 1px solid #111;
  }

  .starter-kit-heading {
    padding-left: 32px;
    padding-right: 32px;
  }

  .intro-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin: 0 auto;
    padding: 20px 12rem 20px;
    text-align: center;
    flex-wrap: wrap;
  }

  .intro-content h1 {
    max-width: 80%;
  }

  .method-section {
    padding-top: 4rem;
  }

  .method-accordion {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(4, max-content) 1fr;
    grid-template-rows: auto auto;
    align-items: end;
    column-gap: 0;
    row-gap: 0;
  }

  .method-item {
    display: contents;
  }

  .method-item:nth-child(1) .method-tab-row {
    grid-column: 1;
    margin-left: 24px;
  }

  .method-item:nth-child(2) .method-tab-row {
    grid-column: 2;
  }

  .method-item:nth-child(3) .method-tab-row {
    grid-column: 3;
  }

  .method-item:nth-child(4) .method-tab-row {
    grid-column: 4;
  }

  .method-tab-row {
    grid-row: 1;
    padding-left: 0;
    margin-bottom: 0;
    align-self: end;
  }

  .method-tab-row::before {
    display: none;
  }

  .method-tab {
    width: 210px;
    min-width: 210px;
  }

  .method-tab::before {
    display: none;
  }

  .method-line {
    display: none;
  }

  .method-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: max-height 0.35s ease, opacity 0.2s ease;
  }

  .method-item.is-active .method-panel {
    max-height: 1400px;
    opacity: 1;
  }

  .method-item.is-active .method-panel::after {
    display: none;
  }

  .method-panel-inner {
    opacity: 0;
    padding: 42px 56px 56px;
  }

  .method-item.is-active .method-panel-inner {
    opacity: 1;
    padding: 42px 56px 56px;
  }

  .method-item:not(.is-active) .method-panel {
    max-height: 0;
    opacity: 0;
  }

  .method-item.is-active + .method-item,
  .method-item:not(.is-active) + .method-item:not(.is-active),
  .method-item:not(.is-active) + .method-item.is-active {
    margin-top: 0;
  }
}

/* =========================
   IMAGE FULLSCREEN
========================= */

.no-scroll {
  overflow: hidden;
}

.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.88);
  padding: 2rem;
  justify-content: center;
  align-items: center;
}

.image-modal.is-open {
  display: flex;
}

.image-modal-content {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  background: #f3f3f3;
  border: 1px solid #111;
}

.image-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f3f3f3;
  background: transparent;
  color: #f3f3f3;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.image-close:hover {
  background: #f3f3f3;
  color: #111;
}