@layer base {
  html, body {
    min-height: 100%;
    width: 100%;
    scroll-behavior: smooth;
  }

  body {
    margin: 0;
    font-family: system-ui, sans-serif;
    line-height: 1.5;
  }

  ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  h1 {
    margin: 0;
    font-weight: normal;
  }

  p {
    max-width: 75ch;
  }

  footer {
    text-align: center;
    color: #888;
  }

  @media (max-width: 600px) {
    h1 {
      font-size: 1.5em;
    }
}

@layer {
  #background {
    display: block;
    position: fixed;
    z-index: -10;
  }

  #background-fallback {
    background: linear-gradient(-45deg, #195589, #030A24, #195589, #030A24, #195589, #030A24);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    color: white;
  }
  @keyframes gradient {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }

  header {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .cta {
    background-color: #C0392B;
    color: white;
    border: none;
    cursor: pointer;
    padding: 0.75em 1.5em;
    border-radius: 0.5em;
    font-size: 1em;
    font-weight: bold;
    transition: 0.25s;
  }
  .cta:hover, .cta:focus {
    animation: pulse 1s;
    box-shadow: 0 0 0 2em #FFFFFF00;
  }
  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 #C0392B;
    }
  }

  .panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2em;
  }


  /* ========== */
  /* navigation */
  /* ========== */

  #nav-links {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    gap: 1em;
  }

  #main-nav a,
  #main-nav a:visited {
    color: white;
    text-decoration: underline;
    font-weight: bold;
    margin: 0 1em;
    position: relative;
  }

  #nav-open,
  #main-nav li:has(#nav-close) {
    display: none;
  }

  @media (max-width: 600px) {
    #nav-open {
      display: block;
      background: none;
      border: none;
      color: white;
      font-size: 2rem;
      cursor: pointer;
      position: absolute;
      top: 0;
      right: 0.5em;
    }

    #nav-links {
      display: none;
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100vh;
      background-color: #000b1e;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2em;
    }

    #nav-links.open {
      display: flex;
    }
    #main-nav li:has(#nav-close) {
      display: block;
      position: absolute;
      top: 0;
      right: 0.5em;
    }
    #nav-close {
      background: none;
      border: none;
      color: white;
      font-size: 2rem;
      cursor: pointer;
    }
  }


  /* ============= */
  /* glowing image */
  /* ============= */

  .img-container {
    z-index: -1;
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  .img-container::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: conic-gradient(
      transparent, 
      #ff00de,
      #00d4ff,
      transparent 30%
    );
    animation: rotate 3s linear infinite;
  }
  .img-container img {
    position: relative;
    width: calc(100% - 6px);  /* Adjust subtraction to change border thickness */
    height: calc(100% - 6px);
    object-fit: cover;
    border-radius: 12px;      /* Slightly smaller than container radius */
    z-index: 1;               /* Sits above the rotating gradient */
  }
  .img-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.5), 
                0 0 15px rgba(255, 0, 222, 0.3);
    pointer-events: none;     /* Allows clicking through to the image */
    z-index: 2;
  }
  @keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }


  /* ====== */
  /* slider */
  /* ====== */

  .slider {
    width: 100%;
    max-width: 1000px;
    display: flex;
    gap: 2em;
    overflow-x: scroll;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
  }
  .slide {
    background-color: #eeeeee;
    flex: 0 0 100%;
    width: 100%;
    border-radius: 1em;
    background-color: white;
    color: #001b1e;
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    padding: 2em;
    box-sizing: border-box;
    scroll-snap-align: center;
  }
    .slide > div {
      flex: 1;
    }
    .slide img {
      border-radius: 0.5em;
    }

  .slider::scroll-button(*) {
    border: 0;
    font-size: 2rem;
    background: none;
    color: white;
    opacity: 0.7;
    cursor: pointer;
  }

  .slider::scroll-button(*):hover,
  .slider::scroll-button(*):focus {
    opacity: 1;
  }

  .slider::scroll-button(*):active {
    translate: 1px 1px;
  }

  .slider::scroll-button(*):disabled {
    opacity: 0.2;
    cursor: unset;
  }
  .slider::scroll-button(left) {
    content: "◄";
  }

  .slider::scroll-button(right) {
    content: "►";
  }

  .slider {
    anchor-name: --my-carousel;
  }
  .slider::scroll-button(*) {
    position: absolute;
    position-anchor: --my-carousel;
  }
  .slider::scroll-button(left) {
    right: calc(anchor(left));
  }

  .slider::scroll-button(right) {
    left: calc(anchor(right));
  }
  .slider {
    scroll-marker-group: after;
  }
  .slider::scroll-marker-group {
    position: absolute;
    position-anchor: --my-carousel;
    top: calc(anchor(bottom) - 30px);
    justify-self: anchor-center;

    display: flex;
    justify-content: center;
    gap: 20px;
  }
  .slide::scroll-marker {
    content: "";
    width: 12px;
    height: 12px;
    background-color: transparent;
    border: 2px solid #001323;
    border-radius: 50%;
  }
  .slide::scroll-marker:target-current {
    background-color: #001323;
  }

  @media (max-width: 800px) {
    .slide {
      flex-direction: column;
    }

    .slide img {
      width: 100%;
      aspect-ratio: 1/1;
      object-fit: cover;
    }

    .slider::scroll-button(*) {
      display: none;
    }
  }


  /* ================ */
  /* PANEL: welcome */
  /* ================ */

  #welcome {
    text-align: center;
    gap: 2em;
  }
  #welcome h2,
  #welcome p {
    margin: 0;
  }
  #welcome .cta {
    margin-top: 2em;
  }


  /* ================ */
  /* PANEL: challenge */
  /* ================ */

  #challenge > div {
    margin-top: 6em;
    display: grid;
    grid-template-columns: 1fr 50px 1fr;
    grid-template-rows: auto auto;
    max-width: 800px;
    gap: 1em;
  }
  #challenge > div .img-container {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    align-items: center;
  }
  #challenge > div h3 {
    grid-column: 2 / 4;
    grid-row: 1;
    align-self: center;
    margin: 0;
  }
  #challenge > div p {
    grid-column: 3 / 4;
    grid-row: 2;
    align-self: start;
    margin: 0;
  }

  .text-glow {
    font-size: 3rem;
    font-weight: 900;
    color: transparent;
    filter: drop-shadow(0 0 2px #00d4ff)
            drop-shadow(0 0 10px #00d4ff)
            drop-shadow(0 0 20px #00d4ff);
    -webkit-text-stroke: 2px #00d4ff;
  }

  /* grid under 600px */
  @media (max-width: 600px) {
    #challenge > div {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto;
    }
    #challenge > div .img-container {
      grid-column: 1 / 2;
      grid-row: 1 / 2;
    }
    #challenge > div h3 {
      grid-column: 1 / 2;
      grid-row: 2;
      margin-top: 1em;
    }
    #challenge > div p {
      grid-column: 1 / 2;
      grid-row: 3;
      margin-top: 1em;
    }
  }


  /* ============= */
  /* PANEL: social */
  /* ============= */

  #social > div {
    background: #222c3c;
    margin: 2em;
    border-radius: 1em;
    width: 100%;
    max-width: 1000px;
    padding: 2em;
    box-sizing: border-box;
  }

  #network {
    position: absolute;
    width: 100%;
    aspect-ratio: 3/2;
  }


  /* ============= */
  /* PANEL: steps */
  /* ============= */

  .step {
    width: 100%;
    max-width: 1000px;
    margin: 2em;
    display: flex;
    gap: 2em;
    flex-wrap: wrap;
  }
  .step .img-container {
    flex: 1;
    min-width: 300px;
    height: 300px;
  }
  .step-text {
    font-size: 1.25em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 200px;
  }


  /* ============= */
  /* PANEL: impact */
  /* ============= */

  #impact h2 {
    margin-top: 4em;
  }

  #impact ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
  }
  #impact li {
    padding: 1em;
    background-color: #222C3C;
    border-radius: 0.5em;
    max-width: 300px;
    text-align: center;
  }
  #impact li img {
    width: 100%;
    height: auto;
    border-radius: 0.4em;
  }


  /* ============== */
  /* PANEL: pricing */
  /* ============== */

  #pricing h3 {
    margin-top: 3em;
  }
  .plans {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    width: 100%;
  }
  .plan {
    padding: 1em;
    background-color: #222C3C;
    border-radius: 0.5em;
    max-width: 300px;
    text-align: center;
    width: 100%;
  }
  .plan h4 {
    margin-top: 0;
    color: #d4af37;
  }
  .plan .price {
    font-weight: bold;
  }

  .addons {
    text-align: center;
  }


  /* ================ */
  /* PANEL: reimagine */
  /* ================ */

  #reimagine {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2em;
  }
  #reimagine ul {
    display: flex;
    flex-direction: column;
    gap: 1em;
  }
  #reimagine li {
    text-align: center;
    font-size: 1.25em;
  }
}
