body {
  letter-spacing: 0.4px;
}

.container {
  max-width: 1256px;
  margin: 0 auto;
  padding: 0 8px;
}

section {
  padding: 80px 0;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 20px;
  color: var(--dark);
}

p {
  margin-bottom: 15px;
}

section#about {
  padding-top: 190px;
  padding-bottom: 190px;
}

#about p {
  font-size: 3.2em;
}

#about span.text-a {
  color: #335ccc;
}

#about span.text-b {
  color: var(--primary);
}

#about span.text-c {
  color: #335ccc;
}

#about span.text-d {
  color: var(--primary);
}

#about span.text-e {
  color: #335ccc;
}

.typewriter {
  white-space: normal;
  font-family: "FK Display";
}

.typewriter span {
  font-family: "FK Display";
}

/* let browser wrap naturally */

.word {
  display: inline-block;
}

/* group characters, wrap still works between words */
.char {
  opacity: 0;
  display: inline-block;
  transform: translateY(0.25em);
}

.typewriter.reveal .char {
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(0);
  transition-delay: calc(var(--i) * 20ms);
}

.typewrite.hide {
  display: none;
}

.fadein {
  opacity: 0;
  animation: fadeIn 2s ease-in forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Text Section */

.text-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.text-content h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
}

.text-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

/* Horizontal Scroll Section */
.scroll-section {
  background: var(--light);
}

.scroll-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.section-nav {
  display: flex;
  justify-content: left;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-left: 6rem;
  padding-right: 7rem;
}

.nav-number {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5f7fa;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  background: #f5f7fa1a;
  border: 1px solid #f5f7fa33;
  backdrop-filter: blur(10px);
}

.nav-number.active {
  background: #f6f1ec;
  color: #343666;
}

@media (hover: hover) and (pointer: fine) {
  .nav-number:hover {
    border-color: #F5F7FA;
  }
}

.scroll-container {
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

section#explain {
  background-repeat: repeat;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  position: relative;
  z-index: 0;
  background-image: url("../img/explain-1-bg.jpg");
}

section#explain .container {
  position: relative;
  z-index: 1;
}

section#explain h3 {
  font-size: 2.5rem;
  font-weight: 400;
  max-width: 500px;
  line-height: 120%;
}

section#explain p {
  line-height: 160%;
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0;
}

.bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: -1;
}

.bg-layer.active {
  opacity: 1;
}

.explain-bg-1 {
  background-image: url("../img/explain-1-bg.jpg");
}

.explain-bg-2 {
  background-image: url("../img/explain-2-bg.jpg");
}

.explain-bg-3 {
  background-image: url("../img/explain-3-bg.jpg");
}

.subsections {
  display: flex;
  width: 300%;
}

.subsection {
  flex: 0 0 33.333%;
  padding: 3rem 7rem 3rem 6rem;
  scroll-snap-align: start;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: start;
}

.subsection h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #f5f7fa;
  font-family: "FK Display";
}

.subsection p {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  color: #cbd5e0;
}

.subsection-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.subsection-column {
  flex: 1;
}

/* Formatted Text Section */
.formatted-text {
  padding-top: 160px;
  padding-bottom: 0px;
}

.formatted-text.track-record {
  padding-bottom: 0px;
}

.formatted-text.collaboration {
  padding-top: 80px;
}

.formatted-content {
  max-width: 776px;
  margin: 0 auto;
}

.formatted-content h2 {
  text-align: center;
  font-size: 3.75rem;
  margin-bottom: 40px;
  line-height: 120%;
  font-weight: 400;
  max-width: 776px;
}

.formatted-content h2 span.fc-highlight {
  color: #335ccc;
}

@media (max-width: 455px) {
  span.fc-highlight.smaller-width {
    display: block;
    max-width: 240px;
  }
}

.formatted-columns {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.chainlist {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 30px;
  margin: 0 auto;
}

@media (min-width: 868.02px) {
  .chainlist {
    max-width: 564px;
  }
}

.chainlist-item {
  position: relative;
  margin-bottom: 40px;
  display: flex;
  align-items: flex-start;
  font-size: 1.5rem;
  line-height: 160%;
}

.chainlist-item:last-child {
  margin-bottom: 0px;
}

.formatted-content p {
  font-size: 1.5rem;
  line-height: 160%;
}

.formatted-content p strong,
.chainlist-item strong {
  font-weight: 600;
}

.ftc-center {
  text-align: center;
}

@media (min-width: 868.02px) {
  .chainlist-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 28px;
    left: 9px;
    height: calc(100%);
    background: repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 5px,
      #335ccc 5px,
      #335ccc 11px
    );
    width: 2px;
  }

  .chainlist-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #335ccc;
    margin-right: 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin-top: 8px;
  }
}

.chainlist-content {
  flex: 1;
}

.col {
  flex: 1;
}

/* Footer */

.footer {
  padding-bottom: 40px;
  color: #335ccc;
}

.footer a {
  color: #335ccc;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
  padding-left: 60px;
  padding-right: 60px;
}

.footer-left {
  text-align: left;
}

.footer-right {
  text-align: right;
}

@media (max-width: 868px) {
  .footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .footer-left,
  .footer-right {
    text-align: center;
    margin: 0.25rem 0;
  }

  .chainlist {
    padding-left: 10px;
  }

  .section-nav {
    gap: 1rem;
  }

  .nav-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .subsection {
    padding: 2rem;
    min-height: 350px;
  }

  .formatted-columns {
    flex-direction: column;
    gap: 20px;
  }

  .subsection-columns {
    flex-direction: column;
  }

  .subsection-column {
    min-width: 100%;
    flex: none;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo img {
    max-width: 158px;
  }

  #about p {
    font-size: 1.75em;
    padding-left: 10px;
    padding-right: 10px;
    line-height: 180%;
  }

  .formatted-text.track-record {
    padding-top: 120px;
  }

  .chainlist-item {
    font-size: 1.125rem;
  }

  .formatted-text.collaboration h2,
  .formatted-text.track-record h2 {
    font-size: 2em;
    text-align: left;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    line-height: 140%;
  }

  .formatted-text.collaboration p {
    font-size: 1.125rem;
    text-align: left;
    padding-left: 0.5rem;
  }

  section#about {
    padding-top: 160px;
    padding-bottom: 160px;
  }

  .subsection {
    padding: 0.5rem;
  }

  section#explain {
    background-image: url("../img/explain-1-bg-mobile.jpg");
  }

  .explain-bg-1 {
    background-image: url("../img/explain-1-bg-mobile.jpg");
  }

  .explain-bg-2 {
    background-image: url("../img/explain-2-bg-mobile.jpg");
  }

  .explain-bg-3 {
    background-image: url("../img/explain-3-bg-mobile.jpg");
  }

  section#explain h3,
  .subsection h3 {
    font-size: 1.5rem;
    line-height: 140%;
    margin-bottom: 45px;
    margin-top: 30px;
  }

  section#explain p {
    font-size: 1.125rem;
    line-height: 160%;
  }

  .section-nav {
    padding-left: 0.5rem;
  }

  #character-counter {
    font-size: 0.875rem;
  }

  .footer-content {
    flex-direction: column;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Legal page layout */
.legal-page {
  background-color: var(--mainbg);
  color: var(--text-dark);
  min-height: 100vh;
}

.legal-main {
  padding: 80px;
}

.legal-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: justify;
}

.legal-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.legal-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.legal-content p,
.legal-content li {
  line-height: 1.7;
  font-size: 1.05rem;
}

.legal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.legal-content a {
  color: #335ccc;
}

.recaptcha-notice {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--text-dark);
}

@media (max-width: 868px) {
  .legal-main {
    padding: 48px;
  }

  .legal-title {
    font-size: 2rem;
  }
}
