:root {
  --bg-main: #e9e7e8;
  --bg-dark: #434853;
  --text-main: #32343a;
  --text-sub: #4d4f57;
  --accent: #5b68a4;
  --hero-image: url("../../images/fitit/fitit-main.webp");
  --basic-image: url("../../images/fitit/fitit-basic__Image.webp");
  --active-image: url("../../images/fitit/fitit-activettt__Image.webp");
  --classic-image: url("../../images/fitit/fitit-classic__Image.webp");
  --tech-image: url("../../images/fitit/fitit-technology__Image.webp");
}

body {
  color: var(--text-main);
  background: #faf8f8;
  overflow-x: hidden;
}
    .js body {
      opacity: 0;
      transition: opacity 2.6s ease;
    }

    .js body.is-page-ready {
      opacity: 1;
    }

    .js [data-reveal] {
      opacity: 0;
      transform: translateY(28px);
      transition:
        opacity 1.6s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
      transition-delay: var(--reveal-delay, 0ms);
      will-change: opacity, transform;
    }

    .js [data-reveal].is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .universe-fitit__Lp {
      max-width: 100%;
      width: 100%;
      background: #faf8f8;
    }

    .inner {
      width: min(100% - 40px, var(--content-max));
      margin-inline: auto;
    }

    .hero {
      position: relative;
      height: calc(var(--app-vh, 1vh) * 80);
      min-height: calc(var(--app-vh, 1vh) * 80);
      height: 90dvh;
      min-height: 90dvh;
      background:
        linear-gradient(100deg, rgba(120, 86, 48, 0.55) 0%, rgba(120, 86, 48, 0.25) 28%, rgba(230, 230, 230, 0.04) 46%),
        var(--hero-image),
        linear-gradient(180deg, #b1b5b7 0%, #c7c8c7 56%, #d8d8d7 100%);
      background-repeat: no-repeat;
      background-size: cover, cover, cover;
      background-position: center center;
      overflow: hidden;
    }

    .hero__content {
      position: absolute;
      inset: 0;
      z-index: 4;
    }

    .hero__copy {
      position: absolute;
      left: 25%;
      bottom: 42%;
      max-width: 90%;
      text-align: right;
      color: #f8f8f8;
    }

    .hero__copy h1 {
      margin: 0;
      font-size: clamp(1.8rem, 5vw, 3rem);
      letter-spacing: 0.32em;
      line-height: 1.2;
      font-weight: 400;
      text-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
      text-align: center;
    }

    .hero__title {
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .hero__copy p {
      margin: 12px 0 0;
      font-size: clamp(0.72rem, 1.4vw, 0.9rem);
      letter-spacing: 0.08em;
      text-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
      width: 100%;
      text-align: center;
    }

    .top-nav {
      --wave-scale: 1;
      --wave-width: max(100vw, 1280px);
      --wave-front-ratio: 0.113125;
      --wave-back-ratio: 0.17453125;
      --wave-front-height: max(58px, calc(var(--wave-width) * var(--wave-front-ratio) * var(--wave-scale)));
      --wave-back-height: max(89.5px, calc(var(--wave-width) * var(--wave-back-ratio) * var(--wave-scale)));
      --wave-overlap-y: 14px;
      --wave-layer-offset: calc(var(--wave-back-height) - var(--wave-front-height));
      position: relative;
      width: 100%;
      margin-inline: 0;
      background: var(--bg-dark);
      color: #fff;
      overflow: visible;
    }

    .top-nav::before {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 100%;
      width: var(--wave-width);
      height: var(--wave-front-height);
      background: url("../../images/fitit/fitit-top__wave.svg") center bottom / 100% 100% no-repeat;
      pointer-events: none;
      z-index: 2;
      transform: translateX(-50%) translateY(var(--wave-overlap-y));
      opacity: 1;
    }

    .js .top-nav::before {
      opacity: 0;
    }

    .js body.is-page-ready .top-nav::before {
      animation: topWaveBaseIn 0.8s linear 1.4s forwards;
    }

    .top-nav::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 100%;
      width: var(--wave-width);
      height: var(--wave-back-height);
      background: url("../../images/fitit/fitit-top__waveBack.svg") center bottom / 100% 100% no-repeat;
      pointer-events: none;
      z-index: 1;
      transform: translateX(-50%) translateY(calc(var(--wave-overlap-y) + var(--wave-layer-offset)));
    }

    .top-nav__wave-flow {
      position: absolute;
      left: 50%;
      bottom: 100%;
      width: var(--wave-width);
      height: var(--wave-front-height);
      transform: translateX(-50%) translateY(var(--wave-overlap-y));
      pointer-events: none;
      z-index: 3;
      opacity: 0;
      overflow: hidden;
    }

    .top-nav__wave-svg {
      display: block;
      width: 100%;
      height: 100%;
    }

    .top-nav__parallax > use {
      animation: topWaveFlow 1.2s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
    }

    .top-nav__parallax > use:nth-child(1) {
      animation-delay: -0.18s;
      animation-duration: 0.9s;
    }

    .top-nav__parallax > use:nth-child(2) {
      animation-delay: -0.24s;
      animation-duration: 1.15s;
    }

    .top-nav__parallax > use:nth-child(3) {
      animation-delay: -0.31s;
      animation-duration: 1.45s;
    }

    .top-nav__parallax > use:nth-child(4) {
      animation-delay: -0.39s;
      animation-duration: 1.9s;
    }

    .js body.is-page-ready .top-nav__wave-flow {
      animation:
        topWaveOverlayHold 1.4s linear 0s forwards,
        topWaveOverlayOut 0.8s linear 1.4s forwards;
    }

    @keyframes topWaveFlow {
      0% {
        transform: translate3d(-90px, 0, 0);
      }

      100% {
        transform: translate3d(85px, 0, 0);
      }
    }

    @keyframes topWaveOverlayHold {
      0% {
        opacity: 1;
      }

      100% {
        opacity: 1;
      }
    }

    @keyframes topWaveOverlayOut {
      0% {
        opacity: 1;
      }

      100% {
        opacity: 0;
      }
    }

    @keyframes topWaveBaseIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    /* TEMP: Avenir rendering check (remove when done) */
    body.font-debug-avenir .top-nav a,
    body.font-debug-avenir .hero__copy,
    body.font-debug-avenir .footer__menu a {
      font-family: var(--font-en) !important;
      font-weight: 500 !important;
    }

    .top-nav ul {
      position: relative;
      z-index: 4;
      margin: 0;
      padding: 50px 20px;
      list-style: none;
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 16px;
      font-size: 13px;
      letter-spacing: 0.18em;
      font-weight: 500;
    }

    .top-nav li + li::before {
      content: "|";
      position: absolute;
      left: 0;
      top: 50%;
      transform: translate(-50%, -50%);
      opacity: 0.9;
    }

    .top-nav li {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding-left: 20px;
      padding-right: 20px;
    }

    main {
      padding: 82px 0 0;
      background-color: #faf8f8;
    }

    .lead h2,
    .technology h2 {
      margin: 0;
      font-size: 40px;
      letter-spacing: 0.12em;
      font-weight: 700;
      line-height: 1.45;
    }

    .lead#style,
    #basic-area {
      scroll-margin-top: 40px;
    }

    .lead p {
      margin: 24px 0 0;
      font-size: 20px;
      line-height: 2;
      font-weight: 500;
      letter-spacing: 0.12em;
    }

    .looks {
      margin-top: 80px;
      display: grid;
      gap: 20px;
    }

    .look-card {
      background: center / cover no-repeat;
      height: 450px;
      min-height: 450px;
      position: relative;
      isolation: isolate;
      overflow: hidden;
      border: 1px solid rgba(0, 0, 0, 0.04);
      cursor: pointer;
      transition: filter 0.28s ease;
    }

    .look-card__link {
      position: absolute;
      inset: 0;
      z-index: 5;
      display: block;
      cursor: pointer;
    }

    .look-card__link::after {
      content: "";
      position: absolute;
      inset: 0;
      background: rgba(255, 255, 255, 0);
      transition: background-color 0.24s ease;
      pointer-events: none;
    }

    .look-card:nth-child(1) {
      background-image: var(--basic-image), linear-gradient(160deg, #e7e8ea 0%, #b8b5af 100%);
    }

    .look-card:nth-child(2) {
      background-image: var(--active-image), linear-gradient(160deg, #dee1e6 0%, #d2c6b8 100%);
    }

    .look-card:nth-child(3) {
      background-image: var(--classic-image), linear-gradient(160deg, #b6bcc8 0%, #3f4150 100%);
    }

    .look-card::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 38%),
        linear-gradient(160deg, rgba(125, 110, 88, 0.25) 0%, rgba(86, 93, 109, 0.2) 56%, rgba(58, 59, 71, 0.36) 100%);
    }

    .look-card__label {
      position: absolute;
      top: 0;
      left: 20px;
      margin-top: 80px;
      z-index: 2;
      pointer-events: none;
      font-size: clamp(1rem, 1.7vw, 1.9rem);
      letter-spacing: 0.34em;
      color: #323743;
      font-weight: 500;
    }

    .look-card:nth-child(2)::before {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 38%),
        linear-gradient(160deg, rgba(173, 185, 192, 0.26) 0%, rgba(105, 111, 126, 0.24) 52%, rgba(120, 93, 61, 0.32) 100%);
    }

    .look-card:nth-child(3)::before {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 38%),
        linear-gradient(160deg, rgba(120, 123, 140, 0.22) 0%, rgba(57, 58, 69, 0.38) 58%, rgba(38, 32, 30, 0.46) 100%);
    }

    .look-card:hover,
    .look-card:focus-within {
      filter: brightness(1.08);
    }

    .look-card__link:hover::after,
    .look-card:focus-within .look-card__link::after {
      background: rgba(255, 255, 255, 0.1);
    }

    .technology-wrap {
      margin-top: 92px;
      background: #edebeb;
      padding: 74px 0 88px;
    }

    .footer::before {
      width: 100%;
    }

    .technology h3 {
      margin: 0;
      font-size: 30px;
      letter-spacing: 0.14em;
      font-weight: 700;
    }

    .technology__catch {
      margin-top: 36px;
      text-align: center;
      color: var(--accent);
      letter-spacing: 0.08em;
    }

    .technology__catch-main {
      display: block;
      font-size: 40px;
      line-height: 1.45;
      font-weight: 500;
    }

    .technology__catch-sub {
      display: block;
      margin-top: 2px;
      font-size: clamp(1.45rem, 2.5vw, 2rem);
      line-height: 1.45;
      font-weight: 400;
    }

    .technology__diagram {
      margin-top: 34px;
      display: grid;
      grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr);
      gap: 0;
      align-items: start;
      background: #edebeb;
    }

    .technology__diagram-main {
      min-width: 0;
      align-self: center;
    }

    .technology__diagram-main img {
      width: 100%;
      height: auto;
      display: block;
    }

    .technology__diagram-side {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px 16px;
      width: min(100%, 470px);
      justify-self: end;
    }

    .technology__diagram-tile {
      margin: 0;
      display: grid;
      gap: 8px;
      align-content: start;
    }

    .technology__diagram-tile img {
      width: 100%;
      height: auto;
      display: block;
    }

    .technology__diagram-tile figcaption {
      margin: 0;
      padding-left: 17.5px;
      color: #4f5d96;
    }

    .technology__diagram-title {
      display: block;
      text-align: center;
      font-size: 18px;
      line-height: 1.35;
      letter-spacing: 0.09em;
      font-weight: 700;
      margin-top: 6px;
    }

    .technology__diagram-title::after {
      content: "";
      display: block;
      width: 100%;
      height: 2px;
      margin-top: 9px;
      margin-bottom: 12px;
      background: currentColor;
    }

    .technology__diagram-text {
      display: block;
      font-size: 13px;
      line-height: 1.18;
      font-weight: 400;
    }

    @media (max-width: 1200px) {
      .technology__diagram {
        grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
        gap: 24px;
      }
    }

    .technology__body {
      margin-top: 100px;
      line-height: 2.05;
      font-size: 0.96rem;
      font-weight: 500;
    }

    .technology__body h4 {
      margin: 0 0 16px;
      font-size: clamp(1.15rem, 2vw, 1.7rem);
      letter-spacing: 0.08em;
      line-height: 1.6;
      font-weight: 700;
    }

    .technology__body ul {
      margin: 0;
      padding: 0;
      letter-spacing: -0.021em;
      list-style: none;
    }

    .technology__body li {
      margin-top: 8px;
      font-size: 16px;
    }

    .technology__body li:first-child {
      text-decoration: underline;
      text-underline-offset: 0.2em;
    }

    .technology__body li::before {
      content: "○";
      margin-right: 8px;
    }

    .technology__body li:first-child::before {
      content: none;
      margin-right: 0;
    }

    .technology__note {
      margin-top: 30px;
      padding-top: 28px;
      border-top: 1px solid rgba(55, 58, 64, 0.25);
      font-size: 16px;
      line-height: 2;
    }

    @media (max-width: 900px) {
      .top-nav ul {
        padding: 50px 16px;
        gap: 12px;
        letter-spacing: 0.14em;
      }

      .top-nav li + li::before {
        margin-right: 12px;
      }

      main {
        padding: 64px 0 0;
      }

      .technology-wrap {
        margin-top: 78px;
        padding: 64px 0 74px;
      }

    }

    @media (max-width: 600px) {
      .inner {
        width: min(100% - 28px, var(--content-max));
      }

      .top-nav ul {
        font-size: 13px;
        padding-inline: 12px;
      }

    }

    @media (min-width: 565px) {
      .top-nav ul {
        gap: 0;
      }

      .top-nav li {
        padding-left: 28px;
        padding-right: 28px;
      }
    }

    @media (min-width: 950px) {
      .hero__copy {
        left: auto;
        right: 4.8%;
        top: 43%;
        bottom: auto;
        transform: translateY(-50%);
        width: min(36%, 430px);
        max-width: none;
        text-align: center;
      }

      .hero__copy h1 {
        font-size: 38px;
        letter-spacing: 0.5em;
        line-height: 1.25;
        padding-left: 0.4em;
      }

      .hero__copy p {
        margin-top: 12px;
        font-size: 13px;
        letter-spacing: 0.08em;
      }
    }

    @media (max-width: 949px) {
      .hero__copy {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        text-align: center;
      }
    }

    @media (max-width: 834px) {
      .looks {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
      }

      .look-card {
        height: auto;
        min-height: 0;
        aspect-ratio: 980 / 450;
      }

      .technology__diagram {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .technology__diagram-side {
        width: 100%;
        max-width: none;
        justify-self: stretch;
      }
    }

    @media (min-width: 550px) and (max-width: 834px) {
      .technology__diagram-side {
        padding-right: 1.4em;
      }
    }

    @media (min-width: 445px) and (max-width: 549px) {
      .technology__diagram-side {
        padding-right: 1em;
      }
    }

    @media (min-width: 320px) and (max-width: 444px) {
      .technology__diagram-side {
        padding-right: 3.8%;
      }
    }

    @media (max-width: 768px) {
      .top-nav ul {
        font-size: 13px;
      }

      .lead p {
        font-size: 16px;
      }

      .technology__catch-main {
        font-size: 37px;
      }

      .technology__body li,
      .technology__note {
        font-size: 13px;
      }
    }

    @media (min-width: 426px) and (max-width: 768px) {
      .lead h2,
      .technology h2 {
        font-size: 32px;
      }
    }

    @media (min-width: 320px) and (max-width: 499px) {
      .hero {
        height: calc(var(--app-vh, 1vh) * 100);
        min-height: calc(var(--app-vh, 1vh) * 100);
        height: 100dvh;
        min-height: 100dvh;
      }

      .top-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        row-gap: 10px;
        column-gap: 0;
        padding: 50px 12px;
      }

      .top-nav ul::after {
        content: "";
        flex-basis: 100%;
        width: 0;
        order: 3;
      }

      .top-nav li:nth-child(1) {
        order: 1;
      }

      .top-nav li:nth-child(2) {
        order: 2;
      }

      .top-nav li:nth-child(3) {
        order: 4;
      }

      .top-nav li:nth-child(4) {
        order: 5;
      }

      .top-nav li {
        position: relative;
        text-align: center;
        padding-left: 20px;
        padding-right: 20px;
      }

      .top-nav li + li::before {
        content: none;
      }

      .top-nav li:nth-child(1)::after,
      .top-nav li:nth-child(3)::after {
        content: "|";
        position: absolute;
        right: -1px;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.9;
      }
    }

    @media (min-width: 420px) and (max-width: 425px) {
      .lead h2,
      .technology h2 {
        font-size: 31.6px;
      }

      .technology__catch-main {
        font-size: 31.6px;
      }
    }

    @media (min-width: 376px) and (max-width: 419px) {
      .lead h2,
      .technology h2 {
        font-size: 27.8px;
      }
    }

    @media (max-width: 375px) {
      .lead h2,
      .technology h2 {
        font-size: 27.6px;
      }

      .technology__catch-main {
        font-size: 27.6px;
      }
    }

    @media (min-width: 320px) and (max-width: 340px) {
      .top-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        column-gap: 0;
        padding-inline: 8px;
        row-gap: 8px;
      }

      .top-nav ul::after {
        content: "";
        flex-basis: 100%;
        width: 0;
        order: 3;
      }

      .top-nav li {
        width: auto;
        max-width: none;
        padding-left: 8px;
        padding-right: 8px;
      }

      .top-nav li:nth-child(1),
      .top-nav li:nth-child(3) {
        padding-right: 8px;
      }

      .top-nav li:nth-child(2),
      .top-nav li:nth-child(4) {
        padding-left: 8px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .js body {
        opacity: 1;
        transition: none;
      }

      .js [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
      }

      .js .top-nav::before {
        opacity: 1;
        animation: none;
      }

      .js body.is-page-ready .top-nav__wave-flow {
        opacity: 0;
        animation: none;
      }

      .top-nav__parallax > use {
        animation: none;
      }

    }
