/*
 * Redesigned homepage (template-parts/home/*). Loaded on the front page.
 */

/* Sections after the hero slide over it while it is pinned (desktop). */
.u-home > section {
    position: relative;
    z-index: 1;
    background: var(--u-surface);
}

.u-home-hero {
    padding: clamp(64px, 7vw, 96px) 0 clamp(48px, 6vw, 72px);
}

@media (min-width: 1024px) {
    .u-home > .u-home-hero {
        position: sticky;
        top: var(--u-header-h);
        z-index: 0;
    }
}

.u-home-hero .u-eyebrow {
    margin-bottom: 22px;
}

.u-home-hero__title {
    max-width: 16ch;
    margin: 0;
    font-size: var(--u-display-xl);
    line-height: 1.02;
    letter-spacing: -0.042em;
    font-weight: 900;
    color: var(--u-ink);
    text-wrap: pretty;
}

.u-home-hero__text {
    max-width: 56ch;
    margin: 26px 0 0;
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.5;
    color: var(--u-text);
    text-wrap: pretty;
}

.u-home-hero__actions {
    margin-top: 34px;
}

.u-home-hero__actions .u-btn--primary {
    padding: 17px 30px;
}

.u-home-hero__note {
    margin-left: 6px;
    font-size: 12px;
    color: var(--u-muted);
}

.u-home-hero__trust {
    margin-top: 28px;
}

/* Showcase: product tabs + panel ------------------------------------ */

.u-home > .u-showcase {
    padding-top: clamp(40px, 5vw, 64px);
    background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF4 22%, var(--u-accent-pale) 62%, var(--u-accent-soft) 100%);
}

.u-showcase__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--u-line);
    border-radius: var(--u-radius);
    background: var(--u-line);
}

/* Prefixed with .u-site: edd-widgets styles every <button> (radius,
   line-height, and a darker background on :hover/:focus) with selectors
   that would otherwise outrank a single class. As in the design, hovering
   a tab changes only the cursor. */
.u-site .u-showcase__tab,
.u-site .u-showcase__tab:hover,
.u-site .u-showcase__tab:focus {
    flex: 1 1 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 16px 18px;
    border: 0;
    border-top: 3px solid transparent;
    border-radius: 0;
    background: #FBFBFC;
    color: var(--u-muted);
    font-family: var(--u-font);
    font-size: 16px;
    line-height: normal;
    text-align: left;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

.u-site .u-showcase__tab[aria-selected="true"],
.u-site .u-showcase__tab[aria-expanded="true"] {
    border-top-color: var(--u-brand);
    background: var(--u-surface);
    color: var(--u-ink);
}

.u-site .u-showcase__tab:focus {
    outline: none;
}

.u-site .u-showcase__tab:focus-visible {
    outline: 2px solid var(--u-ink);
    outline-offset: -2px;
}

.u-showcase__tab-name {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.u-showcase__tab-price {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.u-home > .u-showcase-panels {
    padding: clamp(16px, 2vw, 24px) 0 clamp(64px, 8vw, 104px);
    background: var(--u-accent-soft);
}

.u-showcase__panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(24px, 3.5vw, 52px);
    padding: clamp(16px, 2.4vw, 32px);
    /* border: 1px solid var(--u-line); */
    border-radius: 12px;
    background: var(--u-surface);
    box-shadow: 0 0 4px rgba(0, 0, 0, .13), 2px 16px 50px rgba(0, 0, 0, .10);
}

.u-showcase__panel[hidden] {
    display: none;
}

.u-showcase__panel:not([hidden]) .u-showcase__copy {
    animation: u-rise 420ms cubic-bezier(.22, .7, .3, 1) both;
}

.u-showcase__panel:not([hidden]) .u-showcase__media {
    animation: u-settle 420ms cubic-bezier(.22, .7, .3, 1) both;
}

@keyframes u-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes u-settle {
    from { opacity: 0; transform: scale(.985); }
    to { opacity: 1; transform: none; }
}

.u-showcase__copy {
    flex: 1 1 300px;
    min-width: 0;
}

.u-showcase__media {
    flex: 1 1 380px;
    min-width: 0;
}

.u-showcase__media img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--u-line);
    border-radius: var(--u-radius-lg);
}

.u-showcase__eyebrow {
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--u-brand);
}

.u-showcase__title {
    max-width: 17ch;
    margin: 0;
    font-size: clamp(28px, 3.6vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.042em;
    font-weight: 900;
    color: var(--u-ink);
    text-wrap: pretty;
}

.u-showcase__text {
    max-width: 42ch;
    margin: 18px 0 0;
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.55;
    color: var(--u-text);
}

.u-showcase__actions {
    gap: 20px;
    margin-top: 28px;
}

.u-showcase__actions .u-btn {
    padding: 15px 26px;
    font-size: 13px;
}

.u-site .u-showcase__actions .u-btn--dark {
    background: var(--u-ink);
}

.u-site .u-showcase__actions .u-btn--dark:hover {
    background: var(--u-brand);
}

/* Accordion (mobile, set by site.js): the tab buttons become heads and
   each panel sits under its own. The panels' own section is hidden. */
.u-home > .u-showcase.is-accordion {
    padding-bottom: clamp(48px, 10vw, 72px);
}

.u-showcase__tabs.is-accordion {
    flex-direction: column;
}

.u-site .u-showcase__tabs.is-accordion .u-showcase__tab {
    flex: none;
    position: relative;
    width: 100%;
    padding-right: 48px;
    scroll-margin-top: var(--u-header-h, 0px);
}

.u-showcase__tabs.is-accordion .u-showcase__tab::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 140ms ease;
}

.u-showcase__tabs.is-accordion .u-showcase__tab[aria-expanded="true"]::after {
    margin-top: -2px;
    transform: rotate(-135deg);
}

.u-showcase__tabs.is-accordion .u-showcase__panel {
    border-radius: 0;
    box-shadow: none;
}

/* Stats ------------------------------------------------------------- */

.u-home-stats {
    padding: clamp(64px, 7vw, 96px) 0;
}

.u-home-stats .u-eyebrow {
    margin-bottom: clamp(28px, 3.5vw, 44px);
}

.u-stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(28px, 3vw, 40px) 0;
    margin: 0;
}

.u-stats__item {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 clamp(16px, 2.4vw, 32px);
    border-left: 1px solid var(--u-line);
}

.u-stats__item:first-child {
    padding-left: 0;
    border-left: 0;
}

.u-stats__value {
    font-size: clamp(38px, 4vw, 50px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.045em;
    color: var(--u-ink);
}

.u-stats__item--highlight .u-stats__value {
    color: var(--u-brand);
}

.u-stats__label {
    max-width: 20ch;
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: var(--u-muted);
    text-wrap: pretty;
}

/* Calculator band --------------------------------------------------- */

.u-home > .u-home-calc {
    margin-top: 0;
    padding: clamp(72px, 8vw, 120px) 0;
    background: var(--u-dark);
    background-image: radial-gradient(120% 80% at 8% 0%, rgba(255, 215, 48, .10) 0%, rgba(255, 215, 48, 0) 58%);
}

.u-section-head--dark {
    margin-bottom: 0;
    color: #fff;
}

.u-section-head--dark .u-eyebrow {
    color: var(--u-accent);
}

.u-section-head--dark .u-eyebrow::before {
    background: var(--u-accent);
}

.u-section-head--dark .u-section-head__title {
    max-width: 19ch;
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.u-section-head--dark .u-section-head__text {
    font-size: 16.5px;
    max-width: 42ch;
    color: var(--u-dark-muted);
}

/* Products ---------------------------------------------------------- */

.u-home-products .u-section-head {
    margin-bottom: 0;
}

.u-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 36px;
    padding: 10px;
    border: 1px solid var(--u-line);
    border-radius: 10px;
    background: var(--u-surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

/* .u-site prefix: see .u-showcase__tab. */
.u-site .u-filter__pill,
.u-site .u-filter__pill:focus {
    margin: 0;
    padding: 12px 18px;
    border: 0;
    border-radius: var(--u-radius-lg);
    background: transparent;
    color: var(--u-ink);
    font-family: var(--u-font);
    font-size: 14.5px;
    font-weight: 600;
    line-height: normal;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: background 140ms ease;
}

.u-site .u-filter__pill:hover {
    background: var(--u-surface-soft);
}

.u-site .u-filter__pill[aria-pressed="true"] {
    background: var(--u-accent);
}

.u-product-group {
    margin-top: 44px;
}

.u-product-group[hidden],
.u-product-group__item[hidden] {
    display: none;
}

.u-product-group__head {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Accordion (mobile, set by site.js): each head toggles its grid. */
.u-filter[hidden] {
    display: none;
}

.is-accordion .u-product-group {
    margin-top: 0;
    border-top: 1px solid var(--u-line);
}

.is-accordion .u-product-group:last-child {
    border-bottom: 1px solid var(--u-line);
}

.is-accordion .u-product-group:not(.u-product-group + .u-product-group) {
    margin-top: 24px;
}

.is-accordion .u-product-group__head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 16px;
    padding: 18px 0;
    cursor: pointer;
    scroll-margin-top: var(--u-header-h, 0px);
}

.is-accordion .u-product-group__head:focus {
    outline: none;
}

.is-accordion .u-product-group__head:focus-visible {
    outline: 2px solid var(--u-ink);
    outline-offset: 2px;
}

.is-accordion .u-product-group__rule {
    display: none;
}

.is-accordion .u-product-group__note {
    grid-column: 1;
}

.is-accordion .u-product-group__head::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / span 2;
    flex: none;
    width: 8px;
    height: 8px;
    margin: -4px 4px 0 0;
    border-right: 2px solid var(--u-ink);
    border-bottom: 2px solid var(--u-ink);
    transform: rotate(45deg);
    transition: transform 140ms ease;
}

.is-accordion .u-product-group__head[aria-expanded="true"]::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

.is-accordion .u-product-group__grid {
    margin: 4px 0 24px;
}

.is-accordion .u-product-group.is-collapsed .u-product-group__grid {
    display: none;
}

.u-product-group__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.u-product-group__rule {
    flex: 1;
    height: 1px;
    background: var(--u-line);
}

.u-product-group__note {
    font-size: 13px;
    color: var(--u-muted);
}

.u-product-group__grid {
    display: grid;
    /* At most three columns; the max() floor stops a fourth from fitting. */
    grid-template-columns: repeat(auto-fill, minmax(min(max(260px, calc((100% - 40px) / 3)), 100%), 1fr));
    gap: 20px;
    margin-top: 22px;
}

.u-product-group__grid--wide {
    grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
}

.u-product-group__item {
    display: flex;
}

/* Bundle ------------------------------------------------------------ */

.u-home > .u-home-bundle {
    margin-top: clamp(56px, 7vw, 96px);
    padding: clamp(64px, 7vw, 104px) 0;
    background: var(--u-surface-warm);
}

.u-bundle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    overflow: hidden;
    border-radius: var(--u-radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
}

.u-bundle__main {
    padding: clamp(28px, 4vw, 52px);
    background: var(--u-surface);
}

.u-section-head--brand {
    margin-bottom: 0;
}

.u-section-head--brand .u-eyebrow {
    color: var(--u-brand);
}

.u-section-head--brand .u-eyebrow::before {
    content: none;
}

.u-section-head--brand .u-section-head__title {
    max-width: 20ch;
    font-size: clamp(26px, 3.2vw, 42px);
}

.u-section-head--brand .u-section-head__text {
    max-width: 46ch;
    font-size: 16.5px;
    color: var(--u-text);
}

.u-bundle__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin: 30px 0 26px;
}

.u-bundle__amount {
    font-size: 44px;
    font-weight: 900;
    letter-spacing: -0.042em;
}

.u-bundle__was {
    font-size: 20px;
    color: var(--u-muted);
}

.u-bundle__save {
    font-size: 14px;
    font-weight: 700;
    color: var(--u-positive);
}

.u-bundle__features {
    display: grid;
    align-content: center;
    gap: 14px;
    margin: 0;
    padding: clamp(28px, 4vw, 52px);
    border-left: 1px solid #F0E7CE;
    background: #FFFDF2;
    list-style: none;
    font-size: 15.5px;
    line-height: 1.5;
}

.u-bundle__features li {
    display: flex;
    gap: 12px;
}

.u-bundle__features li::before {
    content: "✓";
    font-weight: 800;
    color: var(--u-positive);
}

.u-bundle__features strong {
    font-weight: 600;
}

.u-bundle__features span {
    color: var(--u-muted);
}

/* Solutions --------------------------------------------------------- */

.u-home-solutions .u-section-head,
.u-home-demos .u-section-head {
    margin-bottom: 0;
}

.u-solutions {
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    margin-top: 36px;
    border-radius: var(--u-radius);
}

.u-cells > .u-solution {
    display: block;
    padding: 26px 24px;
    color: var(--u-ink);
    transition: background-color 140ms ease;
}

.u-cells > a.u-solution:hover {
    background: var(--u-surface-soft);
}

.u-solution__title {
    display: block;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.u-solution__text {
    display: block;
    margin: 8px 0 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--u-muted);
}

.u-solution__link {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--u-brand);
}

/* Demos ------------------------------------------------------------- */

.u-demos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 48px;
    align-items: start;
}

.u-demos .u-section-head__text {
    max-width: 46ch;
    font-size: 16.5px;
    color: var(--u-text);
}

.u-demos .u-btn {
    margin-top: 26px;
    padding: 17px 30px;
}

.u-demos__list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.u-site .u-demos__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    padding: 16px 18px;
    border: 1px solid var(--u-line);
    border-radius: var(--u-radius);
    background: var(--u-surface);
    color: var(--u-ink);
    transition: border-color 140ms ease;
}

.u-site .u-demos__item:hover {
    border-color: var(--u-ink);
}

.u-demos__name {
    font-size: 15px;
    font-weight: 600;
}

.u-demos__meta {
    flex: 1;
    font-size: 13.5px;
    color: var(--u-muted);
}

.u-demos__open {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--u-brand);
}

/* Feature columns --------------------------------------------------- */

.u-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 40px;
}

.u-features__title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.u-features__text {
    margin: 12px 0 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--u-muted);
}

/* Developers -------------------------------------------------------- */

.u-dev {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 40px;
    align-items: center;
    padding: clamp(28px, 4vw, 52px);
    border: 1px solid #F0E7CE;
    border-radius: var(--u-radius-lg);
    background: var(--u-surface-warm);
}

.u-section-head--compact {
    margin-bottom: 24px;
}

.u-section-head--compact .u-section-head__title {
    font-size: var(--u-display-m);
    line-height: 1.08;
}

.u-dev .u-btn {
    padding: 15px 26px;
    font-size: 13px;
}

.u-dev__code {
    overflow-x: auto;
    padding: 24px;
    border-radius: var(--u-radius);
    background: var(--u-dark-3);
    color: #E0E0E0;
    font-size: 12.5px;
    line-height: 2;
}

.u-dev__code p {
    margin: 0;
}

.u-dev__comment {
    color: var(--u-dark-muted);
}

.u-dev__code p + .u-dev__comment {
    margin-top: 14px;
}

/* Limits ------------------------------------------------------------ */

.u-home-limits .u-cells {
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    border-radius: var(--u-radius);
}

.u-home-limits .u-cell__title {
    font-size: 16px;
    font-weight: 600;
}

/* Testimonials ------------------------------------------------------ */

.u-quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 20px;
}

.u-quote {
    margin: 0;
    padding: 32px;
    border: 1px solid var(--u-line);
    border-radius: var(--u-radius-lg);
    background: var(--u-surface);
}

.u-quote--highlight {
    border-color: #F3CB1E;
    background: var(--u-accent);
}

.u-quote__text {
    margin: 0;
    font-size: 19px;
    line-height: 1.45;
    letter-spacing: -0.015em;
    font-weight: 600;
    text-wrap: pretty;
}

.u-quote__by {
    margin-top: 18px;
    font-size: 13.5px;
    color: var(--u-muted);
}

/* Closing CTA ------------------------------------------------------- */

.u-home > .u-home-cta {
    margin-top: clamp(56px, 7vw, 96px);
    padding: clamp(72px, 9vw, 120px) 0;
    background: var(--u-accent);
    background-image: radial-gradient(#F3CB1E 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    text-align: center;
}

.u-home-cta__title {
    max-width: 22ch;
    margin: 0 auto;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.042em;
    font-weight: 900;
    text-wrap: pretty;
}

.u-home-cta__text {
    max-width: 52ch;
    margin: 18px auto 0;
    font-size: 17px;
    color: var(--u-text);
}

.u-home-cta__actions {
    justify-content: center;
    margin-top: 30px;
}

/* The last section before the footer keeps a gap when it is not the CTA. */
.u-home > .u-section:last-child {
    padding-bottom: var(--u-section);
}
