@layer library, reset, base, demo;
@import 'https://unpkg.com/open-props@2.0.0-beta.5' layer(library);
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..700&display=swap');

@layer reset {

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

  :where(:not(dialog)) {
    margin: 0;
  }
}

@layer base {
  html {
    --nav-block-size: 74px;
    --brand-gradient: linear-gradient(227deg,
        #1400c7 0%,
        #00bbff 100%);

    @media (prefers-reduced-motion: no-preference) {
      scroll-behavior: smooth;
    }
  }

  body {
    font-family: 'Inter', sans-serif;
    min-block-size: 100dvb;
  }
}

@layer demo {
  .navbar {
    min-block-size: var(--nav-block-size);
    display: grid;
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    background-color: white;
    z-index: var(--layer-3);
    place-items: center end;
    padding-block: var(--size-3);
    padding-inline: var(--size-5);

    @media (width >=600px) {
      padding-inline: 6dvi;
    }
  }

  .nav-cta-btn {
    font-size: var(--font-size-1);
    font-weight: var(--font-weight-7);
    inline-size: max-content;
    white-space: nowrap;
    text-decoration: none;
    padding-block: var(--size-3);
    padding-inline: var(--size-7);
    border: var(--border-size-2) solid transparent;
    color: black;
    position: relative;
    isolation: isolate;

    background: linear-gradient(white, white) padding-box,
      var(--brand-gradient) border-box;
    border-radius: var(--radius-6);
    overflow: hidden;

    &::before {
      content: '';
      display: block;
      position: absolute;
      inset: 0;

      background: var(--brand-gradient);
      mix-blend-mode: screen;
    }

    &:hover {
      color: white;

      &::before {
        background: var(--brand-gradient) padding-box,
          var(--brand-gradient) border-box;
        background-repeat: no-repeat;
        background-size: contain;
        mix-blend-mode: normal;
        z-index: -1;
      }
    }
  }

  .section {
    --section-block-size: max(400px, 100dvb);
    display: grid;
    background-color: white;
    min-block-size: var(--section-block-size);
    position: relative;
    block-size: 100%;
    display: grid;

    >* {
      grid-area: 1/1;
    }
  }

  .section-wrapper {
    position: relative;
    display: grid;

    @media (width >=960px) {
      grid-template-columns: 1fr 1fr;
    }

    @media (width < 960px) {
      padding-block-start: calc(var(--nav-block-size) + var(--size-7));
      padding-block-end: var(--size-7);
    }
  }

  .video {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    position: relative;
    z-index: -1;
  }

  .content-wrapper {
    display: grid;

    @media (width < 960px) {
      gap: 20px;
      padding: 16px 12px;
    }
  }

  .meta {
    display: grid;
    gap: var(--size-3);
  }

  .content {
    display: grid;
    inline-size: 100%;
    place-items: center;
    padding-block: var(--size-7);
    padding-inline: var(--size-5);

    @media (width >=960px) {
      padding: var(--size-10);
      min-block-size: 100cqb;
      place-items: center end;
    }

    @media (width < 960px) {
      gap: 16px;
      padding: 20px 16px;
      background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
      border-radius: 16px;
      margin: 12px 0;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }
  }

  .mobile-visual {
    inline-size: 100%;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 16px;

    @media (width >=960px) {
      display: none;
    }
  }

  .headline {
    font-size: var(--font-size-7);
    font-weight: var(--font-weight-4);
    max-inline-size: var(--size-content-1);
    text-wrap: pretty;

    @media (width < 960px) {
      font-size: var(--font-size-6);
      font-weight: var(--font-weight-7);
      text-align: center;
      margin-bottom: 8px;
      line-height: 1.2;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
  }

  .desc {
    font-size: var(--font-size-4);
    line-height: 1.5;
    max-inline-size: 40ch;
    text-wrap: pretty;

    @media (width < 960px) {
      font-size: var(--font-size-3);
      text-align: center;
      line-height: 1.5;
      color: #4a5568;
      margin-top: 4px;
      padding: 0 4px;
    }
  }

  .visual {
    display: grid;
    position: sticky;
    block-size: var(--section-block-size);
    inset-block-start: 0;
    container-type: size;

    @media (width < 960px) {
      display: none;
    }
  }

  .video-visual {
    inline-size: 100%;
    block-size: var(--section-block-size);
    display: block;
    position: sticky;
    inset-block-start: 0;
    isolation: isolate;
    filter: hue-rotate(210deg);
  }

  .card-wrapper {
    container-type: size;
    display: grid;
    place-items: center;
    overflow: clip;

    >* {
      grid-area: 1/1;
    }
  }

  .card {
    aspect-ratio: var(--ratio-square);
    inline-size: 70cqi;
    border-radius: var(--radius-3);
    scale: 0.4;
  }

  .card-img {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    border-radius: 16px;
  }

  .card-1 {
    scale: 1;
  }

  .card-2 {
    translate: -35cqi 30cqb;
    opacity: 0.3;
  }

  .card-3 {
    translate: 0cqi 50cqb;
    opacity: 0.5;
  }

  .card-4 {
    translate: 45cqi 40cqb;
    opacity: 0.5;
  }

  .content-1 {
    --_text-gradient: linear-gradient(227deg,
        #1400c7 0%,
        #00bbff 100%);
  }

  .content-2 {
    --_text-gradient: linear-gradient(227deg,
        #28dc28 0%,
        #00bbff 100%);
  }

  .content-3 {
    --_text-gradient: linear-gradient(227deg,
        #1400c7 0%,
        #b800b1 100%);
  }

  .content-4 {
    --_text-gradient: linear-gradient(227deg,
        #b800b1 0%,
        #f50000 100%);
  }

  .text-highlight {
    background: var(--_text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
  }
}

@supports (animation-timeline: scroll()) {
  body {
    timeline-scope: --content-1, --content-2, --content-3, --content-4;
  }

  .section {
    view-timeline-name: --section;
  }

  .content-1 {
    view-timeline-name: --content-1;
  }

  .content-2 {
    view-timeline-name: --content-2;
  }

  .content-3 {
    view-timeline-name: --content-3;
  }

  .content-4 {
    view-timeline-name: --content-4;
  }

  .card {
    animation-timing-function: linear;
    animation-fill-mode: forwards;
  }

  .card-1 {
    animation-timeline: --content-1;
    animation-name: slide-up-first-card;
  }

  .card-2 {
    animation-timeline: --content-2;
    animation-name: slide-up-card;
  }

  .card-3 {
    animation-timeline: --content-3;
    animation-name: slide-up-card;
  }

  .card-4 {
    animation-timeline: --content-4;
    animation-name: slide-up-card;
  }

  .video-visual {
    animation-timeline: --section;
    animation-range-end: exit 110%;
    animation-name: update-hue;
    animation-timing-function: step-end;
    animation-fill-mode: forwards;
  }

  @keyframes update-hue {
    0% {
      filter: hue-rotate(210deg);
    }

    25% {
      filter: hue-rotate(150deg);
    }

    45% {
      filter: hue-rotate(300deg);
    }

    60% {
      filter: hue-rotate(4deg);
    }
  }

  @keyframes slide-up-first-card {
    50% {
      translate: 0;
      opacity: 1;
    }

    90% {
      translate: 0 -50cqi;
      scale: 0.6;
    }

    100% {
      translate: 0 -100cqi;
      opacity: 0;
    }
  }

  @keyframes slide-up-card {
    50% {
      opacity: 1;
      translate: 0;
      scale: 1;
    }

    90% {
      opacity: 0.5;
      scale: 0.6;
      translate: 0 -50cqb;
    }

    100% {
      translate: 0 -100cqi;
      opacity: 0;
    }
  }
}

/* Enhanced Mobile Layout */
@media (width < 960px) {
  .section-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 20px 16px;
  }
  
  .content-wrapper {
    gap: 24px;
    padding: 0;
  }
  
  .content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px 20px;
    margin: 0;
    box-shadow: 
      0 20px 40px rgba(0, 0, 0, 0.1),
      0 8px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  
  .content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6);
    border-radius: 24px 24px 0 0;
  }
  
  .content:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
      0 32px 64px rgba(0, 0, 0, 0.15),
      0 16px 32px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-visual {
    border-radius: 20px;
    box-shadow: 
      0 20px 40px rgba(0, 0, 0, 0.2),
      0 8px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }
  
  .mobile-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
      45deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 50%,
      transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .mobile-visual:hover {
    transform: scale(1.05);
    box-shadow: 
      0 32px 64px rgba(0, 0, 0, 0.3),
      0 16px 32px rgba(0, 0, 0, 0.2);
  }
  
  .mobile-visual:hover::after {
    opacity: 1;
  }
  
  .headline {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.3;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
  }
  
  .headline::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border-radius: 2px;
  }
  
  .desc {
    font-size: 16px;
    text-align: center;
    line-height: 1.6;
    color: #4a5568;
    margin-top: 16px;
    padding: 0 8px;
    font-weight: 400;
  }
  
  .text-highlight {
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    font-weight: 700;
  }
  
  @keyframes gradient-shift {
    0%, 100% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
  }
  
  /* Staggered animation for content cards */
  .content:nth-child(1) { animation-delay: 0s; }
  .content:nth-child(2) { animation-delay: 0.1s; }
  .content:nth-child(3) { animation-delay: 0.2s; }
  .content:nth-child(4) { animation-delay: 0.3s; }
  
  .content {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
  }
  
  @keyframes slideInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Headings and titles */
h1, h2, h3, h4, h5, h6,
.headline, .skw-page__heading, .white-heading, .heading, .about-title, .about-card-title, .panel-title {
    font-family: Helvetica, Arial, sans-serif !important;
}

/* Content/body text */
p, .desc, .about-card-text, .panel-description, .skw-page__description {
    font-family: 'Inter', sans-serif !important;
}