.editor-overlay {
  position: fixed;
  inset: 0;
  margin: 2rem;
  background: oklch(99.8% .003 145);
  border-radius: 1.25rem;
  z-index: 100;
  overflow-y: auto;
  box-shadow: 0 12px 48px oklch(25% .06 145 / .06);
  animation: overlayEnter 500ms cubic-bezier(.16, 1, .3, 1) forwards;
}

@keyframes overlayEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.editor-overlay.closing {
  animation: overlayExit 250ms cubic-bezier(.4, 0, 1, 1) forwards;
}

@keyframes overlayExit {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.overlay-content {
  padding: 5rem 3.5rem 6rem;
  max-width: 56rem;
  margin: 0 auto;
}

.close-btn {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  background-color: white;
  border: none;
  color: oklch(0 .03 145);
  border-radius: .5rem;
  cursor: pointer;
  transition: all 150ms ease;

  &:hover {
    background: oklch(96% .008 145 / .8);
    color: oklch(35% .04 145);
  }

  &:active {
    transform: scale(.95);
  }
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
  padding-top: 2rem;
  animation: fadeUp 600ms cubic-bezier(.16, 1, .3, 1) 100ms backwards;

  h1 {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 700;
    color: oklch(22% .03 145);
    line-height: 1.1;
    letter-spacing: -.025em;
  }

  p {
    margin: 0 0 1.5rem;
    font-size: .875rem;
    font-weight: 300;
    color: oklch(10% .02 145);
    line-height: 1.65;
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .35rem 1rem;
  background: oklch(20% 0 0);
  color: oklch(99% 0 0);
  font-size: .875rem;
  font-weight: 400;
  border: none;
  border-radius: .375rem;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;

  &:hover {
    background: oklch(15% 0 0);
  }

  &:active {
    transform: scale(.98);
  }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: .35rem 1rem;
  background: transparent;
  color: oklch(48% .025 145);
  font-size: .875rem;
  font-weight: 400;
  border: 1px solid oklch(68% .01 145 / .5);
  border-radius: .375rem;
  cursor: pointer;
  transition: all 150ms ease;
  white-space: nowrap;

  :hover {
    background: oklch(97% .004 145);
    border-color: oklch(84% .015 145 / .5);
  }
}

.features-section {
  margin-bottom: 5rem;
  padding-top: 4rem;
  animation: fadeUp 600ms cubic-bezier(.16, 1, .3, 1) .2s backwards;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.feature-item {
  padding: 2rem 1.5rem;
  transition: all 200ms ease;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem; height: 2.75rem;
  color: oklch(25% 0 0);
  background: oklch(93% 0 0 / .6);
  border-radius: .625rem;

  svg {
    width: 20px;
    aspect-ratio: 1;
  }
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-block-start: 1rem;

  & strong {
    font-size: 1rem;
    font-weight: 600;
    color: oklch(25% .03 145);
  }

  & p {
    font-size: .9375rem;
    color: oklch(52% .015 145);
    line-height: 1.55;
  }
}

.templates-section {
  padding-top: 4rem;
  animation: fadeUp 600ms cubic-bezier(.16, 1, .3, 1) 300ms backwards;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.template-card {
  display: flex;
  flex-direction: column;
  border-radius: .75rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: left;
  padding: 0;
  background: oklch(99.5% .002 145);
}

.template-card:hover {
  transform: translateY(-3px);
}

.template-card:active {
  transform: translateY(0);
}

.template-preview {
  aspect-ratio: 3/2;
  background: oklch(97% .005 145);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.template-preview svg {
  width: 100%; height: 100%;
  object-fit: cover;
}

.template-name {
  padding: 1rem 1.25rem;
  font-size: .9375rem;
  font-weight: 500;
  color: oklch(35% .03 145);
}

.templates-placeholder {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  border-radius: 1rem;
  background: oklch(98.5% .003 145 / .5);

  & svg {
    margin-bottom: 1.25rem;
    opacity: .4;
    color: oklch(55% .015 145);
  }

  & p {
    font-size: 1.125rem;
    font-weight: 600;
    color: oklch(45% .02 145);
    margin: 0 0 .5rem;
  }

  & span {
    font-size: .9375rem;
    color: oklch(60% .012 145);
  }
}

.bottom-cta {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
}

.root-hero {
  position: relative;
  padding: 2rem 3.5rem;
  animation: fadeUp 600ms cubic-bezier(.16, 1, .3, 1) forwards;
  background: linear-gradient(150deg, oklch(1% 0 0) 0%, oklch(14% .08 250) 50%, oklch(18% .08 250) 100%);

  @media (min-width: 480px) {
    padding: 10rem 3.5rem 12rem;
  }

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: .25;
    pointer-events: none;
  }

  .hero-inner {
    max-width: 56rem;
    margin: 0 auto;
    text-wrap: pretty;
  }

  h1 {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 700;
    color: oklch(98% .002 145);
    line-height: 1.1;
    letter-spacing: -.025em;
    text-shadow: 0 2px 12px oklch(0 0 0 / .3);
  }
}

.editors {
  position: relative;
  padding: 2rem 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
  animation: fadeUp 600ms cubic-bezier(.16, 1, .3, 1) .1s backwards;
  background: white;
  border-radius: 1.5rem 1.5rem 0 0;

  @media (min-width: 480px) {
    margin: -5rem auto 0;
    padding: 3rem 3.5rem;
  }
}

.section-label {
  font-size: .8125rem;
  font-weight: 600;
  color: oklch(55% 0 0);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 2rem;
}

.editors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 2rem;
}

.editor-card {
  display: flex;
  flex-direction: column;
  padding: .5rem;
  border-radius: 1rem;
  border: 1px solid oklch(95% 0 0);
  text-decoration: none;
  transition: all 200ms ease;

  &:hover {
    transform: translateY(-3px);
  }

  &:active {
    transform: translateY(0);
  }
}

.editor-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  aspect-ratio: 4/3;
  background: oklch(99.5% .002 145);
  border-radius: .75rem;
  overflow: hidden;

  & svg {
    width: 100%;
    height: 100%;
  }
}

.editor-name {
  font-size: 1rem;
  font-weight: 500;
  color: oklch(25% 0 0);
  margin-bottom: .25rem;
}

.editor-size {
  font-size: .8125rem;
  color: oklch(75% 0 0);
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .features-list {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 640px) {
  .overlay-content {
    padding: 4rem 1.5rem 5rem;
  }

  .close-btn {
    top: 1rem;
    right: 1rem;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .hero,
  .root-editors {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .editors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
