/*
  Hero 01 — Fluxboard, standalone HTML/CSS implementation.
  No build step, no framework, no external dependency: copy this file and
  index.html into any project and open it as-is.
*/

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

:root {
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --cyan-400: #22d3ee;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --emerald-600: #059669;
  --sidebar-bg: #0b1224;
  --white: #ffffff;
  --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;
}

a {
  text-decoration: none;
  color: inherit;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--white);
}

/* Motion — disabled entirely under reduced motion; every element already
   renders at its final, fully visible state outside this media query. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-fade {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes al-up {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes al-panel {
    from {
      opacity: 0;
      transform: translateY(18px) scale(0.97);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes al-card {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes al-draw {
    from {
      stroke-dashoffset: 1;
    }
    to {
      stroke-dashoffset: 0;
    }
  }

  @keyframes al-donut {
    from {
      opacity: 0;
      transform: scale(0.85) rotate(-24deg);
    }
    to {
      opacity: 1;
      transform: scale(1) rotate(0deg);
    }
  }

  @keyframes al-menu {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav__menu {
    animation: al-menu 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .nav {
    animation: al-fade 500ms ease-out both;
  }

  .eyebrow,
  .heading,
  .description,
  .actions {
    animation: al-up 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .eyebrow {
    animation-delay: 80ms;
  }
  .heading {
    animation-delay: 160ms;
  }
  .description {
    animation-delay: 240ms;
  }
  .actions {
    animation-delay: 320ms;
  }

  .dashboard__panel {
    animation: al-panel 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 260ms;
  }

  .metric-card {
    animation: al-card 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .metric-card:nth-child(1) {
    animation-delay: 360ms;
  }
  .metric-card:nth-child(2) {
    animation-delay: 450ms;
  }
  .metric-card:nth-child(3) {
    animation-delay: 540ms;
  }

  .chart__line {
    stroke-dasharray: 1;
    animation: al-draw 1500ms cubic-bezier(0.65, 0, 0.35, 1) 650ms both;
  }

  .donut {
    animation: al-donut 700ms cubic-bezier(0.16, 1, 0.3, 1) 500ms both;
  }
}

/* Navigation */
.nav {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--slate-100);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem;
}

.nav__brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.625rem;
  color: var(--slate-900);
}

.nav__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background-image: linear-gradient(to bottom right, var(--blue-600), var(--cyan-400));
}

.nav__mark svg {
  width: 58%;
  height: 58%;
}

.nav__brand span {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav__links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-600);
  transition: color 150ms ease;
}

.nav__links a:hover {
  color: var(--slate-900);
}

.chevron {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: var(--slate-400);
}

.chevron--muted {
  color: var(--slate-400);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.nav__icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: var(--slate-500);
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.nav__icon-btn svg {
  width: 18px;
  height: 18px;
}

.nav__icon-btn:hover {
  background-color: var(--slate-100);
  color: var(--slate-900);
}

.nav__login {
  display: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-600);
  transition: color 150ms ease;
}

.nav__login:hover {
  color: var(--slate-900);
}

.nav__links a:focus-visible,
.nav__login:focus-visible,
.nav__icon-btn:focus-visible,
.nav__menu-btn:focus-visible,
.nav__menu a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mobile/tablet menu — the `nav__links` replacement below the `lg` (1024px)
   breakpoint where they're hidden, so collapsing to icon-only navigation
   never leaves those items with no way to reach them. */
.nav__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 999px;
  color: var(--slate-600);
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.nav__menu-btn:hover {
  background-color: var(--slate-100);
  color: var(--slate-900);
}

.nav__menu-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nav__menu-btn .icon-close {
  display: none;
}

.nav__menu-btn.is-open .icon-menu {
  display: none;
}

.nav__menu-btn.is-open .icon-close {
  display: block;
}

.nav__menu {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 20;
  background-color: var(--white);
  border-bottom: 1px solid var(--slate-100);
  box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.15);
}

.nav__menu[hidden] {
  display: none;
}

.nav__menu-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.nav__menu-inner a {
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  transition:
    background-color 150ms ease,
    color 150ms ease;
}

.nav__menu-inner a:hover {
  background-color: var(--slate-50);
  color: var(--slate-900);
}

.nav__menu-divider {
  margin: 0.25rem 0;
  height: 1px;
  background-color: var(--slate-100);
}

/* Below 640px, "Get started free" moves out of the compact header into the
   menu instead — the header row only fits [logo] [hamburger] cleanly at
   the narrowest widths. Scoped as `.button.nav__cta` (specificity 0,0,2,0)
   rather than bare `.nav__cta` (0,0,1,0): the base `.button { display:
   inline-flex; }` rule below shares this element and has equal
   specificity, so a bare `.nav__cta { display: none; }` would only win by
   accident of source order — this makes it win unconditionally. */
.button.nav__cta {
  display: none;
}

.nav__menu-cta {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-color: var(--blue-600);
  color: var(--white);
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  transition: background-color 150ms ease;
}

.nav__menu-cta:hover {
  background-color: var(--blue-700);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.button--primary {
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  color: var(--white);
  background-color: var(--blue-600);
  box-shadow: 0 8px 20px -8px rgba(37, 99, 235, 0.45);
}

.button--primary:hover {
  background-color: var(--blue-700);
}

.button--secondary {
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  color: var(--slate-900);
  background-color: var(--white);
  border: 1px solid var(--slate-300);
}

.button--secondary:hover {
  background-color: var(--slate-50);
  border-color: var(--slate-400);
}

.button__play {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.button--nav {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--white);
  background-color: var(--blue-600);
}

.button--nav:hover {
  background-color: var(--blue-700);
}

/* Introduction */
.intro {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 2.6rem + 3vw, 6rem) clamp(1rem, 0.3rem + 3vw, 2rem) clamp(4rem, 3rem + 3vw, 7rem);
}

.intro__grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3rem;
}

.intro__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid var(--blue-100);
  background-color: var(--blue-50);
  color: var(--blue-700);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.eyebrow__icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: var(--blue-600);
}

.heading {
  margin: 1.5rem 0 0;
  max-width: 36rem;
  font-weight: 600;
  font-size: clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--slate-900);
}

.heading__accent {
  background-image: linear-gradient(to right, var(--blue-600), var(--cyan-400));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.description {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  color: var(--slate-600);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 2.5rem;
}

/* Dashboard mock — decorative product visual, built entirely from DOM/CSS/SVG. */
.dashboard {
  position: relative;
  width: 100%;
}

.dashboard__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--slate-200);
  background-color: var(--white);
  box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.15);
}

.dashboard__sidebar {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--sidebar-bg);
  padding: 1rem 0.5rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  color: var(--slate-400);
  transition: color 150ms ease;
}

.sidebar-item--active {
  color: var(--white);
  background-color: var(--blue-600);
}

.dashboard__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.dashboard__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-900);
}

.dashboard__header-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 500;
}

.kebab {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--slate-400);
}

.kebab svg {
  width: 14px;
  height: 14px;
}

.metric-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}

.metric-card {
  min-width: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--slate-100);
  background-color: rgba(248, 250, 252, 0.6);
  padding: 0.75rem;
}

.metric-card--tertiary {
  display: none;
}

.metric-card__label {
  font-size: 0.6875rem;
  color: var(--slate-500);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.metric-card__row {
  margin-top: 0.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}

.metric-card__value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-900);
}

.metric-card__delta {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--emerald-600);
}

.metric-card__spark {
  margin-top: 0.375rem;
  height: 1rem;
  width: 100%;
}

.panel-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.panel {
  min-width: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--slate-100);
  padding: 0.75rem;
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.panel__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-900);
}

.panel__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--slate-500);
}

.chart {
  margin-top: 0.75rem;
  height: 6rem;
  width: 100%;
}

.chart__labels {
  display: none;
  margin-top: 0.25rem;
  justify-content: space-between;
}

.chart__labels span {
  font-size: 0.5625rem;
  color: var(--slate-400);
}

.panel--channels {
  display: none;
}

.donut {
  position: relative;
  width: 4rem;
  height: 4rem;
  margin: 0.75rem auto 0;
  border-radius: 50%;
  background-image: conic-gradient(
    #2563eb 0deg 151.2deg,
    #22d3ee 151.2deg 248.4deg,
    #93c5fd 248.4deg 313.2deg,
    #e2e8f0 313.2deg 360deg
  );
}

.donut__hole {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background-color: var(--white);
}

.donut-legend {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.donut-legend li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  color: var(--slate-600);
}

.dot {
  width: 0.375rem;
  height: 0.375rem;
  flex-shrink: 0;
  border-radius: 50%;
}

.donut-legend .value {
  margin-left: auto;
  font-weight: 600;
  color: var(--slate-900);
}

/* Structural breakpoints — reserved for layout changes that genuinely need
   to happen, not ordinary proportional scaling (handled above via clamp). */
@media (min-width: 640px) {
  .actions {
    flex-direction: row;
    width: auto;
  }

  .nav__icon-btn {
    display: inline-flex;
  }

  /* "Get started free" returns to the header from here up — the menu's
     own copy is mobile-only, so it never duplicates the header CTA. */
  .button.nav__cta {
    display: inline-flex;
  }

  .nav__menu-cta {
    display: none;
  }

  .dashboard__panel {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .dashboard__sidebar {
    display: flex;
  }

  .kebab {
    display: flex;
  }

  .metric-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .metric-card--tertiary {
    display: block;
  }

  .chart {
    height: 7rem;
  }

  .chart__labels {
    display: flex;
  }

  .panel--channels {
    display: block;
  }
}

@media (min-width: 1024px) {
  .nav__links,
  .nav__login {
    display: flex;
  }

  .nav__login {
    display: inline-block;
  }

  /* Full nav links/login are visible from here up, so the mobile/tablet
     menu trigger and its panel have nothing left to replace. */
  .nav__menu-btn {
    display: none;
  }

  .nav__menu {
    display: none !important;
  }

  .intro__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 3.5rem;
  }

  .panel-row {
    grid-template-columns: minmax(0, 2fr) minmax(170px, 1fr);
  }
}
