/* makepad.nl/products: the product pages' layout, on top of /css/reset.css and /css/main.css. */

#page-products #header {
    height: auto;
}

#page-products #hero .flex-col {
    flex-basis: var(--paragraph-width);
}

#page-products #hero p {
    max-width: 640px;
}

#page-products #hero .lead {
    font-size: 1.25em;
    color: var(--makepad-beige);
}

/* Product tabs under the header */
.pp-nav {
    gap: 8px 24px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 1px solid var(--makepad-beige-light);
    border-bottom: 1px solid var(--makepad-beige-light);
}

.pp-nav a {
    color: var(--text);
}

.pp-nav a:hover,
.pp-nav a[aria-current="page"] {
    color: var(--makepad-beige);
}

.pp-nav a[aria-current="page"] {
    border-bottom: 2px solid var(--makepad-orange);
}

/* Buttons */
.pp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    align-items: center;
    margin: 28px 0 8px 0;
}

.pp-button {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--makepad-orange);
    color: var(--makepad-orange);
    font-family: PlexBold;
    line-height: 1.4em;
    text-align: center;
}

.pp-button:hover {
    border-color: var(--makepad-beige);
    color: var(--makepad-beige);
}

.pp-button.solid {
    background: var(--makepad-orange);
    color: var(--makepad-blue-dark);
}

.pp-button.solid:hover {
    background: var(--makepad-beige);
    color: var(--makepad-blue-dark);
}

/* Sections */
.pp-section {
    display: block;
    padding-top: 20px;
    padding-bottom: 20px;
}

.pp-section > h2,
.pp-two h2 {
    margin-top: 0.5em;
}

.pp-section p {
    max-width: 760px;
    margin: 0 0 1em 0;
}

.pp-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px 48px;
    width: 100%;
}

.pp-list {
    margin: 0.5em 0 1em 0;
    padding: 0;
}

.pp-list li {
    position: relative;
    margin: 0 0 0.9em 0;
    padding: 0 0 0 22px;
    font-size: 1.05em;
    line-height: 1.6em;
}

.pp-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.55em;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 9px solid var(--makepad-orange);
}

.pp-list li strong {
    font-family: PlexBold;
    color: var(--makepad-beige);
}

/* Pictures of the running apps */
.pp-shot {
    margin: 8px 0 4px 0;
    width: 100%;
}

.pp-shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--makepad-beige-light);
    box-shadow: 0 14px 30px #000a;
}

.pp-shot figcaption {
    display: block;
    margin-top: 10px;
    font-size: 0.9em;
    line-height: 1.5em;
    color: var(--text);
}

/* Product cards on the overview */
.pp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px 48px;
    width: 100%;
}

.pp-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pp-card > a:first-child {
    display: block;
    line-height: 0;
}

.pp-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center top;
    border: 1px solid var(--makepad-beige-light);
    transition: transform .2s ease-in-out;
}

.pp-card img:hover {
    transform: scale(1.02);
}

.pp-card h3 {
    font-size: 1.6em;
    margin: 14px 0 0 0;
}

.pp-card p {
    margin: 0;
}

/* Steps to get a product */
.pp-steps {
    counter-reset: step;
    margin: 0.5em 0 0 0;
    padding: 0;
    max-width: 760px;
}

.pp-steps li {
    counter-increment: step;
    position: relative;
    margin: 0 0 1.2em 0;
    padding: 0 0 0 40px;
    font-size: 1.05em;
    line-height: 1.6em;
}

.pp-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    border: 1px solid var(--makepad-orange);
    color: var(--makepad-orange);
    font-family: PlexBold;
    font-size: 0.9em;
    line-height: 24px;
    text-align: center;
}

.pp-code {
    display: block;
    max-width: 100%;
    margin: 8px 0 4px 0;
    padding: 10px 12px;
    overflow-x: auto;
    white-space: nowrap;
    background: var(--makepad-blue-dark);
    border: 1px solid var(--makepad-beige-light);
    color: var(--makepad-beige);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.5em;
}

/* Pricing */
.pp-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    width: 100%;
    margin: 12px 0 8px 0;
}

.pp-plan {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #ffffff0d;
    border: 1px solid var(--makepad-beige-light);
}

.pp-plan.featured {
    border-color: var(--makepad-orange);
}

.pp-plan h3 {
    margin: 0;
    font-size: 1.3em;
}

.pp-plan .price {
    margin: 10px 0 2px 0;
    color: var(--makepad-beige);
    font-family: PlexBold;
    font-size: 2.2em;
    line-height: 1.2em;
}

.pp-plan .price small {
    font-family: Plex;
    font-size: 0.45em;
    color: var(--text);
}

.pp-plan .for {
    margin: 0 0 12px 0;
    font-size: 0.95em;
}

.pp-plan .pp-list {
    flex-grow: 1;
}

.pp-plan .pp-list li {
    font-size: 1em;
    margin-bottom: 0.6em;
}

.pp-plan .pp-button {
    margin-top: 8px;
}

.pp-note {
    font-size: 0.95em;
}

/* Phones: 16px gutters, nothing wider than the screen */
@media screen and (max-width: 600px) {
    #page-products .site-padding {
        padding-left: 16px;
        padding-right: 16px;
    }

    #page-products #footer .site-padding {
        padding-left: 0;
        padding-right: 0;
    }

    #page-products h1 {
        font-size: 2.6em;
        margin: 28px 0 12px 0;
    }

    #page-products h2 {
        font-size: 1.5em;
    }

    #page-products #hero .lead {
        font-size: 1.1em;
    }

    #page-products #menu {
        gap: 16px 24px;
        padding-top: 32px;
    }

    .pp-cards,
    .pp-two,
    .pp-plans {
        grid-template-columns: 1fr;
    }

    .pp-plan {
        padding: 20px 16px;
    }
}

/* Grid cells may shrink below their content (long code lines scroll inside them) */
.pp-cards > *,
.pp-two > *,
.pp-plans > * {
    min-width: 0;
}

/* main.css gives every div in #hero a 450px flex-basis; the button row is not a column */
#page-products #hero .pp-actions {
    flex-basis: auto;
}
