@font-face {
  font-family: 'WickedScaryMovie';
  src: url('/fonts/WickedScaryMovie.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  font-size: 1.25rem;
  line-height: 1.618;
  --primary: hsl(340, 100%, 59%);
  --primary-dark: hsl(349, 100%, 40%);
  --primary-light: hsl(340, 97%, 64%);
}



body {
  background: hsl(258.26deg 65.71% 6.86%);
  font-size: 1rem;
  font-family: Inter,sans-serif;
  color: hsl(217, 23%, 78%);
}

body * {
  box-sizing: border-box;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-light);
}

p {
  margin: 1em 0;
  font-size: 0.9rem;
}

b {
  color: hsl(180, 95%, 60%);
}

.footer b {
  color: inherit;
}

h1 {
  font-size: 1.9em;
  color: var(--primary)
}

h2 {
  font-size: 1.5em;
  line-height: 1.35;
  margin-top: 2em;
  margin-bottom: .6em;
  color: hsl(0, 0%, 100%);
}

h2 + p,
h3 + p {
  margin-top: 0.5em;
}

.container {
  padding: 0 1em;
  max-width: 50ch;
}

.fbz-banner {
  box-sizing: border-box;
  height: 504px;
  width: 100%;
  max-width: 100%;
  background-image: url('/img/fbz-banner.jpg');
  background-size: cover;
  background-position: left top;
  background-repeat: no-repeat;
}

.header {
  position: absolute;
  right: 0;
  display: grid;
  grid-template-rows: 58px;
  justify-items: end;
  margin-right: 2em;
}

.header h1 {
  color: hsl(258, 70%, 19%);
  text-shadow: 0px 1px 0px hsl(171, 84%, 72%);
  font-family: Inter,sans-serif;
  font-size: 1.35rem;
  margin: 0;
  align-self: center;
  grid-row: 1;
  grid-column: 1;
}

.signin {
  color: hsl(0, 0%, 100%);
  color: var(--primary);
  font-family: Inter,sans-serif;
  align-self: end;
  font-size: 0.65rem;
  grid-row: 1;
  grid-column: 1;
  margin-right: 1px;
}

.signin:hover {
  color: var(--primary-light);
}

.fbz-title {
  font-family: 'WickedScaryMovie';
  color: var(--primary);
  font-size: 8rem;
  text-shadow: 0 2px 4px hsl(254.12deg 100% 3.33%);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  position: relative;
  bottom: 21px;
}

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.p-before-code {
  /* margin-bottom: 0; */
}

h2 {
  font-family: Inter,sans-serif;
}

h2 + p {
  /* margin-top: 0; */
}

.strike {
  color: hsla(195, 100%, 66%, 0.4);
  text-decoration: line-through;
}

.illustration {
  min-height: 500px;
  grid-column: 1 / -1;
}

.grid-is-hard-pic {
  background: url(/img/grid-is-hard.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top right;
  z-index: -1;
}

.master-it-pic {
  background: url(/img/master-it.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: top left;
  z-index: -1;
}

.grid-game-pic {
  background: url(/img/grid-game.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center right;
  z-index: -1;
}

.section {
  grid-column-start: 1;
  grid-column-end: 3;
}

.grid-is-hard-pic {
  grid-row: 1;
}

.grid-is-hard {
  grid-row: 2;
}

h2.first {
  margin-top: 0.3em;
}

.master-it-pic {
  grid-row: 3;
}

.master-it {
  grid-row: 4;
}

.grid-game-pic {
  grid-row: 5;
}

.grid-game {
  grid-row: 6;
}

h2:first-of-type {
  /* margin-top: 0; */
}

.outline-intro {
  margin-top: 2rem;
  padding: 0 1em;
  display: grid;
  max-width: 50ch;
  margin: 2rem auto;
}

.chapters {
  display: grid;
  grid-row-gap: 2em;
  justify-items: center;
  margin-top: 2em;
  margin-bottom: 2em;
}

.chapter {
  width: calc(100% - 30px);
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  overflow: hidden;
  /* flat border just for small screens */
  border-top: 2px solid;
}

.chapter svg {
  transform-origin: bottom center;
  transform: scaleY(1.1);
}

.chapter h3 {
  /* make it not stretch to full width, for SVG calcs */
  display: inline-block;
  justify-self: start;
  font-family: Inter,sans-serif;
  font-size: 1em;
  margin: 1em;
}

h3.right {
  justify-self: end;
}

.chapter video {
  max-width: calc(100% - 5px);
  justify-self: center;
}

ul {
  font-size: 0.9rem;
  list-style: none;
  padding: 0.5em 1em 2em 2em;
  margin: 0 0 0.6em;
}

li {
  position: relative;
  margin: 0.6em 0;
}

li::before {
  content: "•";
  line-height: 0;
  font-size: 30px;
  display: inline-block;
  position: absolute;
  top: 0.38em;
  bottom: 0;
  left: -0.8em;
}

.none {
  padding-left: 0;
  padding-bottom: 1em;
}

.none li::before {
  visibility: hidden;
}

/* colors */
.purple h3,
.purple li::before,
.purple code {
  color: hsl(258, 100%, 76%) !important;
}
.purple video,
.purple.chapter {
  border-color: hsl(258, 100%, 76%);
}

.blue h3,
.blue li::before,
.blue code {
  color: hsl(196, 72%, 45%) !important;
}
.blue video,
.blue.chapter {
  border-color: hsl(196, 72%, 45%);
}

.lime h3,
.lime li::before,
.lime code {
  color: hsl(75, 100%, 34%) !important;
}
.lime video,
.lime.chapter {
  border-color: hsl(75, 100%, 34%);
}

.red h3,
.red li::before,
.red code {
  color: hsl(343, 96%, 32%) !important;
}
.red video,
.red.chapter {
  border-color: hsl(343, 96%, 32%);
}

.teal h3,
.teal li::before,
.teal code {
  color: hsl(191, 71%, 29%) !important;
}
.teal video,
.teal.chapter {
  border-color: hsl(191, 71%, 29%);
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(auto, 48ch));
  grid-gap: 5em;
  justify-content: center;
  margin: 3em 0;
  margin-bottom: 1em;
  padding: 2em 0;
}

.testimonial {
  position: relative;
}

.testimonial::before {
  content: "“";
  color: hsl(261, 59%, 30%);
  position: absolute;
  font-size: 4rem;
  top: -20px;
  left: -25px;
}

.testimonial::after {
  content: "”";
  color: hsl(261, 59%, 30%);
  position: absolute;
  font-size: 4rem;
  top: -20px;
  right: -25px;
}

.testimonial .by {
  align-self: end;
  font-weight: bold;
}

.testimonial .cred {
  align-self: start;
  font-size: .70rem;
}

.testimonial img {
  width: 85px;
  border: 5px solid hsl(261, 59%, 30%);
  border-radius: 50px;
  grid-row: 1 / 3;
}

.social {
  display: grid;
  grid-template-columns: 85px 1fr;
  grid-template-rows: 1fr 1fr;
  grid-column-gap: 1.2rem;
  justify-content: center;
}

@keyframes pulse {
  0% {
    filter: drop-shadow(0px 0px 0px hsla(204, 100%, 73%, 0.5));
  }
  8% {
    filter: drop-shadow(15px 15px 0px hsla(204, 100%, 73%, 0.05));
  }
  16% {
    filter: drop-shadow(0px 0px 0px hsla(204, 100%, 73%, 0.5));
  }
}

@keyframes pulse2 {
  0% {
    filter: drop-shadow(0px 0px 0px hsla(204, 100%, 73%, 0.5));
  }
  8% {
    filter: drop-shadow(-15px -15px 0px hsla(204, 100%, 73%, 0.05));
  }
  16% {
    filter: drop-shadow(0px 0px 0px hsla(204, 100%, 73%, 0.5));
  }
}

@keyframes pulse3 {
  0% {
    filter: drop-shadow(0px 0px 0px hsla(204, 100%, 73%, 0.5));
  }
  8% {
    filter: drop-shadow(-15px 15px 0px hsla(204, 100%, 73%, 0.05));
  }
  16% {
    filter: drop-shadow(0px 0px 0px hsla(204, 100%, 73%, 0.5));
  }
}

.callout {
  margin-top: 2em;
  color: hsl(180, 95%, 60%);
  font-style: italic;
}

/* prism overrides */
.token.selector {
  color: hsl(258, 100%, 76%);
}


.action {
  display: grid;
  justify-items: center;
  background-color: hsl(261, 59%, 16%);
}

.action svg {
  animation: pulse 4s 0s cubic-bezier(0.64, 0.57, 0.67, 1.53) infinite;
  filter: drop-shadow(0px 0px 0px hsla(75, 100%, 44%, 0.7));
}

.action svg:nth-of-type(2) {
  animation: pulse2 4s 0s cubic-bezier(0.64, 0.57, 0.67, 1.53) infinite;
  filter: drop-shadow(0px 0px 0px hsla(75, 100%, 44%, 0.7));
}

.action svg:nth-of-type(3) {
  animation: pulse3 4s 0s cubic-bezier(0.64, 0.57, 0.67, 1.53) infinite;
  filter: drop-shadow(0px 0px 0px hsla(75, 100%, 44%, 0.7));
}

.action-button {
  position: relative;
  margin: 2em;
  margin-bottom: 4em;
  display: grid;
  border: 3px solid var(--primary-dark);
  border-radius: 100px;
  background-color: var(--primary);
  transition-property: border-color, background-color;
  transition-duration: 0.15s;
  font-weight: bold;
}

.action-button:hover {
  animation: none;
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.action-button:hover a {
  color: hsl(195, 100%, 66%);
}

.action-button:hover .strike {
  color: hsl(257, 35%, 37%);
}

.action-button:hover .price {
  color: hsl(258, 100%, 76%);
}

.action-button:hover path {
  stroke: hsl(258, 100%, 76%);
}

.action-button:active a {
  color: hsl(262, 100%, 56%);
}

.action-button:active {
  border-color: hsl(262, 100%, 56%);
  transition-duration: 0s;
  background-color: hsla(262, 100%, 56%, 0.4);
}

.action-button:active .strike {
  color: hsl(256, 44%, 33%);
}

.action-button:active .price {
  color: hsl(262, 100%, 56%);
}

.action-button:active path {
  stroke: hsl(262, 100%, 56%);
}

.action a {
  font-family: Inter,sans-serif;
  color: hsl(261.25deg 58.54% 16.08%);
  z-index: 1;
  padding: 1em;
  padding-right: 1em;
  text-decoration: none;
  transition-property: color;
  transition-duration: 0.2s;

  &:hover {
    color: hsl(261.25deg 58.54% 16.08%);
  }
}

.price {
  font-family: Inter,sans-serif;
  /* color: hsl(75, 100%, 34%); */
  color: hsl(195, 100%, 66%);
  font-size: 1.25rem;
}

.footer {
  display: grid;
  justify-items: center;
  width: 100%;
  color: hsla(0, 0%, 100%, 0.4);
  background-color: hsl(261, 59%, 13%);
}

.footer h2 {
  color: hsla(0, 0%, 100%, 0.4);
}

.intro-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  background: linear-gradient(135deg, hsl(258, 65%, 8%) 0%, hsl(258, 65%, 6%) 100%);
}

.intro-container {
  max-width: 980px;
  width: 100%;
  text-align: center;
}

.intro-text {
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.intro-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: hsl(217, 23%, 85%);
  margin: 0;
}

.intro-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.feature-item {
  position: relative;
  background: linear-gradient(135deg, hsl(258, 65%, 8%), hsl(258, 65%, 5%));
  border: 2px solid rgba(220, 38, 38, 0.3);
  border-radius: 0.5rem;
  padding: 0.5rem 1.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: slideUp 0.8s ease-out both;
}

/* First box - Primary Pink/Magenta Theme */
.feature-item:nth-child(1) {
  background: linear-gradient(135deg, hsl(340, 60%, 8%), hsl(340, 60%, 5%));
  border: 2px solid hsla(340, 100%, 59%, 0.4);
}

.feature-item:nth-child(1) .feature-icon {
  color: hsl(340, 100%, 59%);
}

.feature-item:nth-child(1) .feature-title {
  color: hsl(340, 100%, 70%);
}

.feature-item:nth-child(1) .feature-progress {
  background: linear-gradient(to right, hsl(340, 100%, 59%), hsl(340, 100%, 70%));
}

.feature-item:nth-child(1)::before {
  background: hsla(340, 100%, 59%, 0.1);
}

.feature-item:nth-child(1)::after {
  background: linear-gradient(135deg, hsla(340, 100%, 59%, 0.2), transparent);
}

.feature-item:nth-child(1):hover {
  box-shadow: 0 20px 40px hsla(340, 100%, 59%, 0.3);
  border-color: hsl(340, 100%, 59%);
}

/* Second box - Light Blue Theme */
.feature-item:nth-child(2) {
  background: linear-gradient(135deg, hsl(210, 60%, 8%), hsl(210, 60%, 5%));
  border: 2px solid hsla(210, 55%, 55%, 0.4);
}

.feature-item:nth-child(2) .feature-icon {
  color: hsl(210, 55%, 55%);
}

.feature-item:nth-child(2) .feature-title {
  color: hsl(210, 55%, 65%);
}

.feature-item:nth-child(2) .feature-progress {
  background: linear-gradient(to right, hsl(210, 55%, 55%), hsl(210, 55%, 65%));
}

.feature-item:nth-child(2)::before {
  background: hsla(210, 55%, 55%, 0.1);
}

.feature-item:nth-child(2)::after {
  background: linear-gradient(135deg, hsla(210, 55%, 55%, 0.2), transparent);
}

.feature-item:nth-child(2):hover {
  box-shadow: 0 20px 40px hsla(210, 55%, 55%, 0.3);
  border-color: hsl(210, 55%, 55%);
}

/* Third box - Purple Theme */
.feature-item:nth-child(3) {
  background: linear-gradient(135deg, hsl(258, 60%, 8%), hsl(258, 60%, 5%));
  border: 2px solid hsla(258, 100%, 76%, 0.4);
}

.feature-item:nth-child(3) .feature-icon {
  color: hsl(258, 100%, 76%);
}

.feature-item:nth-child(3) .feature-title {
  color: hsl(258, 100%, 80%);
}

.feature-item:nth-child(3) .feature-progress {
  background: linear-gradient(to right, hsl(258, 100%, 76%), hsl(258, 100%, 80%));
}

.feature-item:nth-child(3)::before {
  background: hsla(258, 100%, 76%, 0.1);
}

.feature-item:nth-child(3)::after {
  background: linear-gradient(135deg, hsla(258, 100%, 76%, 0.2), transparent);
}

.feature-item:nth-child(3):hover {
  box-shadow: 0 20px 40px hsla(258, 100%, 76%, 0.3);
  border-color: hsl(258, 100%, 76%);
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }

.feature-item:hover {
  transform: scale(1.05) rotateY(5deg);
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  filter: blur(2rem);
  transform: translate(4rem, -4rem);
}

.feature-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.feature-item:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  transition: transform 0.6s ease;
}

.feature-item:hover .feature-icon {
  transform: rotate(360deg) scale(1.2);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 0.8rem;
  position: relative;
}

.feature-text {
  color: #d1d5db;
  line-height: 1.6;
  font-size: 0.875rem;
}

.feature-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.feature-item:hover .feature-progress {
  transform: scaleX(1);
}

/* Glitch Effect */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch.active::before,
.glitch.active::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.glitch.active::before {
  color: hsl(340, 100%, 59%);
  transform: translateX(-2px);
  animation: glitch1 0.2s ease-in-out;
}

.glitch.active::after {
  color: hsl(180, 95%, 60%);
  transform: translateX(2px);
  animation: glitch2 0.2s ease-in-out;
}

/* Individual glitch colors for each feature item */
.feature-item:nth-child(1) .glitch.active::before {
  color: hsl(340, 100%, 59%);
}

.feature-item:nth-child(1) .glitch.active::after {
  color: hsl(340, 100%, 80%);
}

.feature-item:nth-child(2) .glitch.active::before {
  color: hsl(210, 55%, 55%);
}

.feature-item:nth-child(2) .glitch.active::after {
  color: hsl(210, 55%, 75%);
}

.feature-item:nth-child(3) .glitch.active::before {
  color: hsl(258, 100%, 76%);
}

.feature-item:nth-child(3) .glitch.active::after {
  color: hsl(258, 100%, 90%);
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glitch1 {
  0%, 100% { transform: translateX(-2px); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(-1px); }
  75% { transform: translateX(-3px); }
}

@keyframes glitch2 {
  0%, 100% { transform: translateX(2px); }
  25% { transform: translateX(4px); }
  50% { transform: translateX(1px); }
  75% { transform: translateX(3px); }
}

.intro-game-description p {
  font-size: 1.2rem;
  margin-top: 2rem;
  line-height: 1.6;
  color: hsl(217, 23%, 78%);
  margin: 0;
  padding: 0 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .intro-features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .feature-item {
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .intro-section {
    padding: 0 2rem;
  }
  
  .intro-text p {
    font-size: 1.2rem;
  }
  
  .feature-text {
    font-size: 1.1rem;
  }
}

/* code highlighter */
pre,
code {
  background: none !important;
  color: hsl(185, 96%, 61%) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

pre code {
  font-size: 0.627rem;
  /* font-size: 9px !important; */
}

.token.property {
  color: hsl(0, 0%, 100%);
}

.token.punctuation {
  opacity: 0.5;
}

.token.function {
  color: hsl(108, 95%, 71%);
}

@media (min-width: 450px) {
  pre code {
    font-size: 0.81rem !important;
  }
}

@media (min-width: 600px) {
  .chapter {
    width: calc(100% - 2em);
    border: none;
  }

  .chapter svg {
    transform: none;
  }

  .action a {
    font-size: 1.5em;
  }
}

/* 
intro becomes split layout, 
chapters becomes 2-column
*/
@media (min-width: 1220px) {
  :root {
    font-size: 1.25rem;
  }

  .header {
    height: 122px;
    grid-template-rows: repeat(3, 33.33%);
    margin-right: 8em;
  }

  .header h1 {
    grid-row: 2;
    font-size: 1.8rem;
  }

  h2.first {
    margin-top: 1.6em;
  }

  .signin {
    grid-row: 3;
    align-self: start;
    font-size: 0.75em;
  }

  .section {
    justify-self: unset;
  }

  .intro {
    grid-row-gap: 3.2em;
  }

  .grid-is-hard {
    grid-column: 1 / 2;
    grid-row: 1;
    justify-self: center;
    padding-right: 0;
  }

  .grid-is-hard-pic {
    grid-area: 1 / 1 / 2 / 3;
  }

  .master-it {
    grid-area: 2 / 2 / 3 / 3;
    padding-left: 0;
    justify-self: center;
  }

  .master-it-pic {
    grid-area: 2 / 1 / 3 / 3;
    width: 85%;
    background-position: top center;
  }

  .grid-game {
    grid-area: 3 / 1 / 4 / 2;
    justify-self: center;
    padding-right: 0;
  }

  .grid-game-pic {
    grid-area: 3 / 1 / 4 / 3;
  }

  .chapter {
    width: 880px;
    max-width: 880px;
    grid-template-rows: 70px 478px auto;
  }

  .action-button {
    margin-top: 3em;
    margin-bottom: 5em;
  }
}

@media (min-width: 1500px) {
  :root {
    font-size: 1.35rem;
  }

  .chapters {
    grid-template-columns: auto auto;
    grid-column-gap: 2em;
    justify-content: center;
  }

  .chapter {
    max-width: 715px;
    grid-template-rows: 70px auto auto;
  }
}

@media (min-width: 1820px) {
  :root {
  }
}
