/*
 * PawTunes landing page: everything added with the 2.0 landing rewrite.
 * Loaded after style.css, which keeps the shared boxes, lists and buttons.
 */

/* Hero
------------------------------- */
/* No photo: the background is drawn with gradients in the Aurora template's colours, so the
   largest paint on the page is the player itself and nothing else has to download first. */
.paw-hero {
    position:   relative;
    overflow:   hidden;
    color:      #fff;
    padding:    4.5rem 0 5rem;
    background: radial-gradient(60rem 28rem at 85% 110%, rgba(214, 64, 69, .55), transparent 70%),
                radial-gradient(48rem 26rem at 10% 115%, rgba(98, 168, 234, .45), transparent 70%),
                radial-gradient(40rem 22rem at 55% -20%, rgba(122, 92, 255, .35), transparent 70%),
                #120f1d;
}

.paw-hero .paw-hero-logo {
    display:       block;
    width:         15rem;
    height:        auto;
    margin-bottom: 1.75rem;
}

.paw-hero h1 {
    font-size:      2.9rem;
    font-weight:    600;
    line-height:    1.15;
    letter-spacing: -.02em;
    color:          #fff;
    margin:         0 0 1.25rem;
    text-wrap:      balance;
}

.paw-hero .paw-hero-lead {
    font-size:   1.3rem;
    line-height: 1.6;
    color:       rgba(255, 255, 255, .82);
    margin:      0 0 2rem;
    max-width:   38rem;
}

.paw-hero-actions {
    display:   flex;
    flex-wrap: wrap;
    gap:       .75rem;
}

.paw-btn {
    display:         inline-flex;
    align-items:     center;
    gap:             .6rem;
    font-size:       1.15rem;
    font-weight:     500;
    line-height:     1;
    padding:         1rem 1.5rem;
    border-radius:   .5rem;
    border:          1px solid transparent;
    text-decoration: none;
    transition:      background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.paw-btn:hover {
    transform: translateY(-1px);
}

.paw-btn:focus-visible {
    outline:        2px solid #fff;
    outline-offset: 2px;
}

.paw-btn.primary {
    color:            #fff;
    background-color: #2f7fd0;
}

.paw-btn.primary:hover {
    color:            #fff;
    background-color: #3d8ee0;
}

.paw-btn.ghost {
    color:            #fff;
    border-color:     rgba(255, 255, 255, .35);
    background-color: rgba(255, 255, 255, .06);
}

.paw-btn.ghost:hover {
    color:            #fff;
    border-color:     rgba(255, 255, 255, .7);
    background-color: rgba(255, 255, 255, .12);
}

/* Version next to a download label */
.paw-version {
    font-size:        .8em;
    font-weight:      500;
    padding:          .25em .55em;
    border-radius:    .35em;
    background-color: rgba(255, 255, 255, .2);
    white-space:      nowrap;
}

.paw-hero-meta {
    list-style: none;
    display:    flex;
    flex-wrap:  wrap;
    gap:        .4rem 1.5rem;
    padding:    0;
    margin:     1.75rem 0 0;
    font-size:  1rem;
    color:      rgba(255, 255, 255, .75);
}

.paw-hero-meta a {
    color:           #fff;
    text-decoration: underline;
}

.paw-hero-meta i {
    margin-right: .4rem;
    opacity:      .8;
}

/* The player shot: a real recording of the Aurora template */
.paw-hero-shot {
    display:       block;
    width:         100%;
    height:        auto;
    aspect-ratio:  960 / 600;
    border-radius: .75rem;
    background:    #1b1626;
    box-shadow:    0 2rem 4rem rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08);
}

@media (max-width: 991.98px) {

    .paw-hero {
        padding: 3rem 0 3.5rem;
    }

    .paw-hero h1 {
        font-size: 2.2rem;
    }

    .paw-hero-shot {
        margin-top: 2.5rem;
    }

}

/* Content
------------------------------- */
.container.project {
    padding-top: 2rem;
}

.container.project .player-box-lifted h2 {
    font-size:   1.6rem;
    font-weight: 600;
    margin:      0 0 1rem;
}

.container.project .player-box-lifted h3 {
    font-size:   1.25rem;
    font-weight: 600;
    margin:      1.75rem 0 .6rem;
}

.container.project .player-box-lifted p:last-child,
.container.project .player-box-lifted ul:last-child {
    margin-bottom: 0;
}

/* Template previews: a looping clip per template, opens the live demo in its popup size */
ul.paw-templates {
    list-style:            none;
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   1rem;
    padding:               0;
    margin:                1.25rem 0 0;
}

ul.paw-templates a {
    display:          flex;
    flex-direction:   column;
    height:           100%;
    color:            inherit;
    text-decoration:  none;
    overflow:         hidden;
    border:           1px solid #e3e6ea;
    border-radius:    .5rem;
    background-color: #f6f7f9;
    transition:       border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

ul.paw-templates a:hover,
ul.paw-templates a:focus-visible {
    border-color: #62a8ea;
    box-shadow:   0 .5rem 1.25rem rgba(35, 59, 82, .15);
    transform:    translateY(-2px);
}

/* Every clip sits in the same box, whatever the template's own shape (Modern is portrait) */
ul.paw-templates .paw-template-shot {
    position:         relative;
    display:          block;
    aspect-ratio:     16 / 11;
    background-color: #1b1626;
}

/* Out of the flow, or a tall clip would stretch the box past its aspect ratio */
ul.paw-templates video {
    position:   absolute;
    inset:      0;
    width:      100%;
    height:     100%;
    object-fit: contain;
}

ul.paw-templates .paw-template-text {
    padding: .9rem 1rem 1rem;
}

ul.paw-templates .paw-template-name {
    display:     block;
    font-size:   1.1rem;
    font-weight: 600;
    color:       #233b52;
}

ul.paw-templates .paw-template-info {
    display:     block;
    font-size:   .9rem;
    line-height: 1.5;
    color:       #6b7280;
    margin-top:  .2rem;
}

@media (max-width: 767.98px) {

    ul.paw-templates {
        grid-template-columns: 1fr;
    }

}

/* Feature tiles */
ul.paw-tiles {
    list-style:            none;
    display:               grid;
    grid-template-columns: repeat(3, 1fr);
    gap:                   1rem;
    padding:               0;
    margin:                1.25rem 0 0;
}

ul.paw-tiles li {
    padding:          1.25rem 1.25rem 1.1rem;
    border:           1px solid #e9ecf0;
    border-radius:    .6rem;
    background-color: #fafbfc;
    transition:       border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

ul.paw-tiles li:hover {
    border-color: #cfe2f6;
    box-shadow:   0 .5rem 1.25rem rgba(35, 59, 82, .08);
    transform:    translateY(-2px);
}

ul.paw-tiles .paw-tile-icon {
    display:          inline-flex;
    align-items:      center;
    justify-content:  center;
    width:            2.9rem;
    height:           2.9rem;
    font-size:        1.3rem;
    color:            #2f7fd0;
    border-radius:    .6rem;
    background-color: #e8f2fc;
    margin-bottom:    .9rem;
}

.container.project .player-box-lifted ul.paw-tiles h3 {
    font-size:   1.1rem;
    font-weight: 600;
    color:       #233b52;
    margin:      0 0 .35rem;
}

ul.paw-tiles p {
    font-size:   .95rem;
    line-height: 1.55;
    color:       #5b6472;
    margin:      0;
}

@media (max-width: 991.98px) {

    ul.paw-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 575.98px) {

    ul.paw-tiles {
        grid-template-columns: 1fr;
        gap:                   .75rem;
    }

    /* Twelve stacked tiles are a long scroll: the icon moves beside the text */
    ul.paw-tiles li {
        display:               grid;
        grid-template-columns: auto 1fr;
        column-gap:            1rem;
        padding:               1rem;
    }

    ul.paw-tiles .paw-tile-icon {
        grid-row:      span 2;
        margin-bottom: 0;
    }

}

/* Developer note: the one dark block of the section, in the hero's colours */
.paw-dev {
    color:         rgba(255, 255, 255, .82);
    padding:       1.5rem 1.6rem;
    margin-top:    1.25rem;
    border-radius: .6rem;
    background:    radial-gradient(30rem 14rem at 100% 120%, rgba(98, 168, 234, .35), transparent 70%), #120f1d;
}

.container.project .player-box-lifted .paw-dev h3 {
    color:  #fff;
    margin: 0 0 .6rem;
}

.paw-dev h3 i {
    color:        #7fb9f0;
    margin-right: .4rem;
}

.paw-dev p {
    color:  inherit;
    margin: 0;
}

.paw-dev a {
    color:           #fff;
    text-decoration: underline;
}

.paw-dev code {
    color:            #9fd0ff;
    padding:          .1em .35em;
    border-radius:    .25em;
    background-color: rgba(255, 255, 255, .08);
}

/* Install commands */
pre.paw-code {
    font-family:      "Consolas", "Menlo", monospace;
    font-size:        .95rem;
    line-height:      1.6;
    color:            #e6e9ef;
    background-color: #1b1626;
    border-radius:    .4rem;
    padding:          .9rem 1.1rem;
    margin:           .5rem 0 1rem;
    overflow-x:       auto;
}

/* FAQ: native details/summary, no script */
.paw-faq details {
    border-bottom: 1px solid #eceef1;
}

.paw-faq details:last-child {
    border-bottom: 0;
}

.paw-faq summary {
    cursor:      pointer;
    font-size:   1.1rem;
    font-weight: 600;
    color:       #233b52;
    padding:     .9rem 0;
}

.paw-faq summary:hover {
    color: #2f7fd0;
}

.paw-faq details p {
    margin: 0 0 1rem;
}

/* Sidebar */

/* Follows the reader down the page, only where the two columns sit side by side.
   align-self: a flex row stretches its columns to full height, and a column that already fills
   the row has nowhere to stick. The offset comes from the page script (see there for why);
   without script it is a plain stick to the top. */
@media (min-width: 992px) {

    .paw-sidebar {
        position:   sticky;
        top:        var(--paw-sidebar-top, 1rem);
        align-self: flex-start;
    }

}

.paw-download .paw-version {
    background-color: rgba(0, 0, 0, .18);
}

ul.features li a {
    color: #999;
}

/* Direct embed demo: cast button of the PawTunes 2 template (paw-demo.css predates it).
   The player removes "hidden" once a Chromecast or AirPlay device is available. */
.pawtunes-demo .pawtunes .player .cast {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    margin-right:    .75rem;
    cursor:          pointer;
}

.pawtunes-demo .pawtunes .player .cast.hidden,
.pawtunes-demo .pawtunes .player .cast .icon-cast-connected,
.pawtunes-demo .pawtunes .player .cast .icon-airplay,
.pawtunes-demo .pawtunes .player .cast.cast-airplay .icon-cast,
.pawtunes-demo .pawtunes .player .cast.cast-chromecast.connected .icon-cast {
    display: none;
}

.pawtunes-demo .pawtunes .player .cast.cast-airplay .icon-airplay,
.pawtunes-demo .pawtunes .player .cast.cast-chromecast.connected .icon-cast-connected {
    display: block;
}

.pawtunes-demo .pawtunes .player .cast svg path {
    transition: fill 250ms ease;
}

.pawtunes-demo .pawtunes .player .cast:hover svg path,
.pawtunes-demo .pawtunes .player .cast.connected svg path {
    fill: #62a8ea;
}

.pawtunes-demo .pawtunes .player .cast.connecting {
    animation: paw-cast-pulse 1.2s ease-in-out infinite;
}

/* While casting the analyser only sees silence */
.pawtunes-demo .pawtunes.casting #analyzer {
    visibility: hidden;
}

@keyframes paw-cast-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .35;
    }
}

@media (prefers-reduced-motion: reduce) {

    .paw-btn,
    ul.paw-tiles li,
    ul.paw-templates a {
        transition: none;
    }

    .paw-btn:hover,
    ul.paw-tiles li:hover,
    ul.paw-templates a:hover {
        transform: none;
    }

}