/*
  Features 14 — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy these three
  files into any project and open index.html as-is.
*/

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

:root {
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-900: #0f172a;
  --violet-600: #7c3aed;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--slate-900);
  background-color: var(--white);
  line-height: 1.5;
}

.features {
  padding: clamp(4rem, 3.5rem + 2vw, 6rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

.features__inner {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
}

.intro {
  max-width: 34rem;
}

.kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--violet-600);
}

.heading {
  margin: 0.75rem 0 0;
  font-weight: 600;
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.lede {
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--slate-600);
}

.layout {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 2.5rem;
}

.accordion {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.item {
  border-top: 1px solid var(--slate-200);
}

.item--last {
  border-bottom: 1px solid var(--slate-200);
}

.item__heading {
  margin: 0;
}

.trigger {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 1.25rem;
  border: none;
  background: none;
  padding: 1.75rem 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  outline: none;
}

.trigger:focus-visible {
  outline: 2px solid var(--violet-600);
  outline-offset: 2px;
}

.number {
  width: 2.5rem;
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--slate-300);
  transition: color 200ms ease;
}

.number.is-open {
  color: var(--violet-600);
}

.trigger__label {
  flex: 1;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--slate-500);
  transition: color 200ms ease;
}

.trigger.is-open .trigger__label {
  font-weight: 600;
  color: var(--slate-900);
}

.arrow {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: var(--violet-600);
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 250ms ease,
    transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.trigger.is-open .arrow {
  opacity: 1;
  transform: translateX(0);
}

.panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

.panel.is-open {
  grid-template-rows: 1fr;
}

.panel__inner {
  overflow: hidden;
}

.panel__text {
  margin: 0;
  max-width: 28rem;
  padding: 0 0 1.75rem 3.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--slate-600);
}

.visual-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--slate-200);
  background-color: var(--slate-50);
}

.visual {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.visual.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Themes mockup */
.mockup-themes {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
}

.mockup-themes__swatches {
  display: flex;
  gap: 0.5rem;
}

.swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
}

.swatch--violet {
  background-color: var(--violet-600);
}

.swatch--blue {
  background-color: #3b82f6;
}

.swatch--emerald {
  background-color: #10b981;
}

.swatch--amber {
  background-color: #fbbf24;
}

.mockup-themes__type-lg {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 700;
}

.mockup-themes__type-sm {
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 600;
  color: var(--slate-500);
}

/* Workflows mockup */
.mockup-workflows {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 2rem;
}

.mockup-workflows__col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: 0.5rem;
  background-color: var(--white);
  padding: 0.5rem;
}

.mockup-workflows__label {
  display: block;
  width: 66%;
  height: 0.5rem;
  border-radius: 999px;
  background-color: var(--slate-300);
}

.mockup-workflows__card {
  display: block;
  height: 2.5rem;
  border-radius: 0.375rem;
  background-color: var(--slate-50);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* Shortcuts mockup */
.mockup-shortcuts {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem;
}

.mockup-shortcuts__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--slate-200);
  background-color: var(--white);
  padding: 0.5rem 0.75rem;
}

.mockup-shortcuts__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background-color: var(--slate-200);
}

.mockup-shortcuts__search-line {
  flex: 1;
  height: 0.5rem;
  border-radius: 999px;
  background-color: var(--slate-200);
}

.mockup-shortcuts__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.375rem;
  background-color: var(--white);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--slate-600);
}

.mockup-shortcuts__key {
  border-radius: 0.25rem;
  border: 1px solid var(--slate-300);
  background-color: var(--slate-50);
  padding: 0.125rem 0.375rem;
  font-family: ui-monospace, monospace;
  font-size: 0.625rem;
  color: var(--slate-500);
}

/* Dashboards mockup */
.mockup-dashboards {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 2rem;
}

.mockup-dashboards__tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 0.5rem;
  background-color: var(--white);
  padding: 0.75rem;
}

.mockup-dashboards__bar {
  display: block;
  width: 50%;
  height: 0.375rem;
  border-radius: 999px;
}

.mockup-dashboards__value {
  font-size: 1.125rem;
  font-weight: 700;
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
  }

  .visual-frame {
    aspect-ratio: auto;
  }
}

/* Motion — the panel height and visual opacity are functional state
   transitions (see script.js), so they stay on at a near-instant
   duration under reduced motion rather than being removed outright; the
   masked-reveal keyframe below is purely decorative and fully gated. */
@media (prefers-reduced-motion: reduce) {
  .panel,
  .visual {
    transition-duration: 1ms;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes al-features14-reveal {
    from {
      opacity: 0;
      clip-path: inset(9% round 1rem);
      transform: scale(0.98);
    }
    to {
      opacity: 1;
      clip-path: inset(0% round 1rem);
      transform: scale(1);
    }
  }

  .visual.is-active.is-entering {
    animation: al-features14-reveal 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
