/* Homepage styles. Loaded by routes/index.tsx on top of app.css and reuses
   its design tokens; the body override below undoes the editor's fixed
   fullscreen layout for a scrolling page. */

@layer application {
  .home {
    max-width: 46rem;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
    color: var(--text-110);
  }

  /* --- top navigation ----------------------------------------------------- */

  .home-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
  }

  .home-wordmark {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.2rem;
    color: var(--text-120);
  }

  .home-wordmark > svg {
    width: 2rem;
    height: 2rem;
    fill: currentColor;
    filter: brightness(1.75);
  }

  .home-cta {
    text-decoration: none;
    width: fit-content;
  }

  .home-cta-big {
    font-size: 1.1rem;
    padding: 0.5rem 1.25rem;
    border-color: var(--accent-100);
    color: var(--text-130);
  }

  /* --- hero ---------------------------------------------------------------- */

  .home-hero {
    padding: 4rem 0 3rem;
  }

  .home-hero h1 {
    font-size: clamp(2.4rem, 7vw, 3.6rem);
    font-weight: 200;
    line-height: 1.1;
    color: var(--text-130);
    margin-bottom: 1.25rem;
  }

  .home-hero p {
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.6;
    max-width: 38rem;
  }

  .home-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
  }

  .home-hint {
    font-size: 0.9rem;
    color: var(--text-100);
  }

  /* --- feature sections ---------------------------------------------------- */

  .home-section {
    padding: 2.5rem 0;
  }

  .home-section h2 {
    font-size: 1.7rem;
    font-weight: 300;
    color: var(--text-130);
    margin-bottom: 0.75rem;
  }

  .home-copy p {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 40rem;
  }

  .home-copy em {
    color: var(--text-120);
    font-style: normal;
  }

  /* --- embedded demos ------------------------------------------------------ */

  .demo {
    background-color: var(--background-110);
    border: 1px solid var(--background-130);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .demo-transport {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .demo-play {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .demo-play.playing {
    color: var(--accent-100);
    border-color: var(--accent-100);
  }

  .demo-loading {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--text-100);
    border-top-color: transparent;
    border-radius: 50%;
    animation: demo-spin 0.8s linear infinite;
  }

  @keyframes demo-spin {
    to {
      transform: rotate(360deg);
    }
  }

  .demo-wave {
    position: relative;
    flex-grow: 1;
    height: 4.5rem;
    background-color: var(--background-100);
    border-radius: 0.25rem;
    overflow: hidden;
  }

  .demo-wave > canvas {
    width: 100%;
    height: 100%;
    display: block;
  }

  .demo-playhead {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background-color: var(--text-130);
  }

  .demo-knobs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--accent-100);
  }

  .demo-knobs .number-knob > span {
    color: var(--text-110);
  }

  /* --- drum pads ------------------------------------------------------------ */

  .demo-pads {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .demo-pad {
    flex: 1 1 5.5rem;
    height: 5rem;
    justify-content: center;
    font-size: 1rem;
    border-radius: 0.5rem;
    touch-action: manipulation;
  }

  .demo-pad.active {
    color: var(--accent-100);
    border-color: var(--accent-100);
  }

  /* --- feature grid ---------------------------------------------------------- */

  .home-grid-section h2 {
    margin-bottom: 1.5rem;
  }

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

  .home-grid > li {
    background-color: var(--background-110);
    border: 1px solid var(--background-130);
    border-radius: 0.5rem;
    padding: 1rem;
  }

  .home-grid h3 {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-120);
    margin-bottom: 0.5rem;
  }

  .home-grid p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* --- closing / footer ------------------------------------------------------ */

  .home-closing {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 4rem;
  }

  .home-closing p {
    line-height: 1.6;
    max-width: 34rem;
  }

  .home-footer {
    text-align: center;
    padding-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-100);
  }

  .home-footer a {
    color: inherit;
  }

  .home-footer a:hover {
    color: var(--text-120);
  }
}
