/* -------------------------------- 

File#: _2_tabbed-features-v2
Title: Tabbed Features v2
Descr: A list of features filterable using a tabbed navigation
Usage: codyhouse.co/license

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

* {
  font: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  background-color: hsl(0, 0%, 100%);
  font-family: system-ui, sans-serif;
  color: hsl(230, 7%, 23%);
  font-size: 1rem;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: hsl(230, 13%, 9%);
  font-weight: 700;
}

h1 {
  font-size: 2.0736rem;
}

h2 {
  font-size: 1.728rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.2rem;
}

ol, ul, menu {
  list-style: none;
}

button, input, textarea, select {
  background-color: transparent;
  border-radius: 0;
  color: inherit;
  line-height: inherit;
  appearance: none;
}

textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top;
}



table {
  border-collapse: collapse;
  border-spacing: 0;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

@media (min-width: 64rem) {
  body {
    font-size: 1.25rem;
  }

  h1 {
    font-size: 3.051rem;
  }

  h2 {
    font-size: 2.44rem;
  }

  h3 {
    font-size: 1.75rem;
  }

  h4 {
    font-size: 1.5625rem;
  }
}

/* variables */
:root {
  /* colors */
  --tz9-color-primary-hsl: 250, 84%, 54%;
  --tz9-color-contrast-medium-hsl: 225, 4%, 47%;
  --tz9-color-contrast-high-hsl: 230, 7%, 23%;
  --tz9-color-contrast-higher-hsl: 230, 13%, 9%;
  --tz9-color-bg-hsl: 0, 0%, 100%;
  --tz9-color-bg-light-hsl: 0, 0%, 100%;
  --tz9-color-black-hsl: 230, 13%, 9%;

  /* spacing */
  --tz9-space-xs: 0.5rem;
  --tz9-space-sm: 0.75rem;
  --tz9-space-md: 1.25rem;

  /* typography */
  --tz9-text-sm: 0.833rem;
}

@media(min-width: 64rem){
  :root {
    /* spacing */
    --tz9-space-xs: 0.75rem;
    --tz9-space-sm: 1.125rem;
    --tz9-space-md: 2rem;

    /* typography */
    --tz9-text-sm: 1rem;
  }
}

/* component */
.tab-features-v2 {
  display: grid;
  gap: var(--tz9-space-md);
}

.tab-features-v2__controls-list {
  position: relative;
  display: flex;
  gap: var(--tz9-space-xs);
  overflow: auto;
}

.tab-features-v2__controls-list > * {
  flex: 1 0 180px;
}

.tab-features-v2__text-crop-gradient {
  /* gradient used to crop text */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  right: 0;
  flex: 0 0 40px;
  background: linear-gradient(to right, hsla(var(--tz9-color-bg-hsl), 0), hsla(var(--tz9-color-bg-hsl), 1));
  pointer-events: none;
}

.tab-features-v2__control {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
  padding: 0 0 var(--tz9-space-md);
  border: 0px solid hsla(var(--tz9-color-contrast-higher-hsl), 0.1);
  border-bottom-width: 1px;
  transition: 0.2s;
}

.tab-features-v2__control-title {
  display: block;
  color: hsl(var(--tz9-color-contrast-medium-hsl));
  font-weight: 500;
  margin-bottom: var(--tz9-space-xxs);
  transition: color 0.2s;
}

.tab-features-v2__control-description {
  color: hsl(var(--tz9-color-contrast-medium-hsl));
  line-height: 1.4;
  font-size: var(--tz9-text-sm);
}

.tab-features-v2__control:hover {
  border-color: hsla(var(--tz9-color-contrast-higher-hsl), 0.5);
}

.tab-features-v2__control:hover .tab-features-v2__control-title {
  color: hsl(var(--tz9-color-contrast-higher-hsl));
}

.tab-features-v2__control[aria-selected=true] {
  border-color: hsl(var(--tz9-color-primary-hsl));
}

.tab-features-v2__control[aria-selected=true] .tab-features-v2__control-title {
  color: #163C6B;
}

.tab-features-v2__panels {
  position: relative;
}

.tab-features-v2__panel {
  opacity: 0;
}

.tabs--no-interaction .tab-features-v2__panel {
  -webkit-animation-duration: 0s;
          animation-duration: 0s;
  -webkit-animation-delay: 0s;
          animation-delay: 0s;
}

.tab-features-v2__panel--display {
  -webkit-animation: tab-features-v2-panel-entry-anim 0.5s 0.2s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
          animation: tab-features-v2-panel-entry-anim 0.5s 0.2s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.tab-features-v2__panel--hide {
  position: absolute;
  visibility: hidden;
  top: 0;
  width: 100%;
  transition: position 0s 0.5s, visibility 0s 0.5s;
  -webkit-animation: tab-features-v2-panel-exit-anim 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
          animation: tab-features-v2-panel-exit-anim 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.tab-features-v2__img {
  display: block;
  width: 100%;
  border-radius: 0.375em;
}

@-webkit-keyframes tab-features-v2-panel-entry-anim {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-20px);
            transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}

@keyframes tab-features-v2-panel-entry-anim {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-20px);
            transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}

@-webkit-keyframes tab-features-v2-panel-exit-anim {
  0% {
    opacity: 1;
    -webkit-transform: translateY(0px);
            transform: translateY(0px);
  }
  100% {
    opacity: 0;
    -webkit-transform: translateY(20px);
            transform: translateY(20px);
  }
}

@keyframes tab-features-v2-panel-exit-anim {
  0% {
    opacity: 1;
    -webkit-transform: translateY(0px);
            transform: translateY(0px);
  }
  100% {
    opacity: 0;
    -webkit-transform: translateY(20px);
            transform: translateY(20px);
  }
}

@media (min-width: 64rem) {
  .tab-features-v2 {
    align-items: start;
    grid-template-columns: 2fr 6fr;
  }

  .tab-features-v2__controls-list {
    flex-direction: column;
    overflow: visible;
  }
  
  .tab-features-v2__controls-list > * {
    flex: 1 0 auto;
  }

  .tab-features-v2__text-crop-gradient {
    display: none;
  }

  .tab-features-v2__control {
    border-width: 0px;
    border-radius: 0.375em;
    padding: var(--tz9-space-sm) var(--tz9-space-md);
  }

  .tab-features-v2__control:hover, .tab-features-v2__control[aria-selected=true] {
    background-color: hsl(var(--tz9-color-bg-light-hsl));
    box-shadow: 0 0.3px 0.4px hsla(var(--tz9-color-black-hsl), 0.025),0 0.9px 1.5px hsla(var(--tz9-color-black-hsl), 0.05), 0 3.5px 6px hsla(var(--tz9-color-black-hsl), 0.1);
  }
}