/*
 * Public home page (views/home_page.html, views/home_slider.html,
 * templates/home.html.twig): the sections of
 * docs/design/2026-10-public-refresh/screens/01-home.html as classes.
 * Tokens come from site.css (:root --pp-*). Loaded after site.css.
 */

/* The home view fills the boxed page edge to edge; sections pad themselves. */
#page-wrapper.home { padding: 0; background: #fff; }

.home-page { color: var(--pp-text); }
.home-page h1, .home-page h2, .home-page h3, .home-page p { margin: 0; }
.home-strong { font-weight: 600; }

/* ---------- Slider ---------- */

.home-slider { position: relative; }
.home-slider-static {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 224;
}
.home-slider-frame {
    position: relative;
    width: 100%;
    /* The slides are whole-machine photos (3:2 to portrait) on transparent
       backgrounds: fit each one whole rather than cropping. */
    height: clamp(220px, 28vw, 420px);
    overflow: hidden;
}
.home-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 800ms ease;
}
.home-slide.is-active { opacity: 1; }
.home-slide img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 16px 0 40px;
    object-fit: contain;
}
.home-slider.is-reduced .home-slide { transition: none; }
@media (prefers-reduced-motion: reduce) {
    .home-slide { transition: none; }
}
.home-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 4px;
}
/* 24px hit area around a 10px dot. */
.home-slider-dot {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.home-slider-dot::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}
.home-slider-dot.is-active::before { background: var(--pp-red); }
.home-slider-dot:focus-visible { outline: 2px solid var(--pp-red); outline-offset: 1px; }

/* ---------- Shared type ---------- */

.home-section { padding: 56px; }
.home-band {
    background: var(--pp-band);
    border-top: 1px solid var(--pp-line-2);
    border-bottom: 1px solid var(--pp-line-2);
}
.home-page .home-h2 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 300;
    color: var(--pp-heading);
}
.home-page .home-h2-spaced { margin-bottom: 28px; }
.home-page .home-h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--pp-heading);
}
.home-head {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}
.home-page .home-lead { font-size: 17px; line-height: 1.6; color: var(--pp-text-2); }
.home-page .home-text { font-size: 15px; line-height: 1.6; color: var(--pp-text-2); }
.home-page .home-muted { font-size: 14px; color: var(--pp-muted); }
.home-kicker {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--pp-red);
}
.home-page .home-label {
    margin-bottom: 24px;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--pp-muted);
}

.home-grid { display: grid; gap: 16px; }
.home-grid-220 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.home-grid-230 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.home-grid-240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.home-grid-260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.home-grid-320 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.home-card {
    background: #fff;
    border: 1px solid #e2e2e0;
    border-radius: var(--pp-radius-card);
    display: flex;
    flex-direction: column;
}

/* ---------- Buttons ---------- */

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: var(--pp-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
}
.home-btn:hover, .home-btn:focus { text-decoration: none; }
.home-btn:focus-visible,
.home-page a:focus-visible { outline: 2px solid var(--pp-red); outline-offset: 1px; }
.home-btn-44 { height: 44px; padding: 0 20px; font-size: 15px; }
.home-btn-primary, .home-btn-primary:visited { background: var(--pp-red); color: #fff; }
.home-btn-primary:hover, .home-btn-primary:focus { background: var(--pp-red-hover); color: #fff; }
.home-btn-ghost, .home-btn-ghost:visited {
    padding: 0 22px;
    border: 1px solid var(--pp-input);
    color: var(--pp-text);
}
.home-btn-ghost:hover, .home-btn-ghost:focus { border-color: var(--pp-red); color: var(--pp-red); }
.home-btn-white, .home-btn-white:visited { padding: 0 20px; background: #fff; color: var(--pp-red); }
.home-btn-white:hover, .home-btn-white:focus { background: #fff; color: var(--pp-heading); }
.home-btn-outline-white, .home-btn-outline-white:visited { padding: 0 20px; border: 1px solid #fff; color: #fff; }
.home-btn-outline-white:hover, .home-btn-outline-white:focus { background: #fff; color: var(--pp-heading); }

/* ---------- Hero ---------- */

.home-hero {
    padding: 56px 56px 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-end;
}
.home-hero-main {
    flex: 999 1 560px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.home-page .home-eyebrow {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--pp-red);
}
.home-page .home-h1 {
    font-size: 44px;
    line-height: 1.12;
    font-weight: 300;
    color: var(--pp-heading);
    letter-spacing: -.01em;
}
.home-intro {
    font-size: 19px;
    line-height: 1.6;
    color: var(--pp-text-2);
    max-width: 760px;
}
.home-intro p { margin: 0 0 .6em; }
.home-intro p:last-child { margin-bottom: 0; }
.home-intro strong, .home-intro b { color: var(--pp-heading); }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.home-hero-call {
    flex: 1 1 280px;
    min-width: 0;
    border-left: 3px solid var(--pp-red);
    padding: 4px 0 4px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.home-hero-call-label { font-size: 14px; color: var(--pp-muted); }
.home-hero-phone, .home-hero-phone:visited {
    font-size: 26px;
    font-weight: 600;
    color: var(--pp-heading);
    text-decoration: none;
}
.home-hero-email { font-size: 15px; font-weight: 600; text-decoration: none; }

/* Hero text on the left, slider column on the right, its top in line with
   the eyebrow (both get the hero's 56px top padding). With no slides the
   fallback is the wide banner, so it goes full width above the text. */
.home-top { display: flex; align-items: flex-start; }
.home-top > .home-hero { flex: 1 1 0; min-width: 0; padding-right: 40px; }
.home-top > home-slider { display: block; flex: 0 1 44%; max-width: 560px; padding: 56px 56px 0 0; }
.home-top > home-slider .home-slider-frame { height: auto; aspect-ratio: 4 / 3; }
.home-top:has(.home-slider-static) { flex-direction: column-reverse; align-items: stretch; }
.home-top:has(.home-slider-static) > home-slider { max-width: none; padding: 0; }
.home-top:has(.home-slider-static) > .home-hero { padding-right: 56px; }

/* ---------- Applications ---------- */

.home-app { padding: 22px; gap: 8px; }
.home-app-title { font-size: 18px; font-weight: 600; color: var(--pp-heading); }

/* ---------- Machine lines ---------- */

.home-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}
.home-head-row .home-head { margin-bottom: 0; gap: 8px; }
.home-head-narrow { max-width: 680px; }
.home-page .home-head-narrow .home-text { font-size: 16px; }
.home-ask {
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.home-machine-cards { gap: 24px; margin-bottom: 24px; }
.home-machine-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-radius-card);
    overflow: hidden;
}
.home-machine-photo { aspect-ratio: 16 / 9; background: #f2f2f0; }
.home-machine-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-machine-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.home-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    border-top: 1px solid var(--pp-line);
}
.home-lines li {
    padding: 16px 16px 16px 0;
    border-bottom: 1px solid var(--pp-line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.home-line-title { font-size: 15px; font-weight: 600; color: var(--pp-heading); }

/* ---------- Why ---------- */

.home-section.home-why { padding-top: 0; }
.home-why-grid { gap: 32px; }
.home-why-item { display: flex; flex-direction: column; gap: 10px; }
.home-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pp-band);
    border: 1px solid #e2e2e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pp-red);
}

/* ---------- How we work ---------- */

.home-steps { list-style: none; margin: 0; padding: 0; }
.home-step { padding: 24px; gap: 10px; }
.home-step-num { font-size: 32px; font-weight: 300; color: var(--pp-red); line-height: 1; }

/* ---------- Portal + catalog ---------- */

.home-portal-row { gap: 24px; }
.home-portal {
    background: var(--pp-bar);
    color: #f2f2f2;
    border-radius: var(--pp-radius-card);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.home-page .home-panel-heading { font-size: 22px; font-weight: 600; color: var(--pp-heading); }
.home-page .home-portal .home-panel-heading { color: #fff; }
.home-page .home-portal-intro { font-size: 15px; line-height: 1.6; color: #cfcfcf; }
.home-portal-bullets { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.8; color: #e8e8e8; }
.home-portal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.home-page .home-portal-note { font-size: 13px; line-height: 1.55; color: #bdbdbd; }
.home-catalog {
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-radius-card);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.home-catalog-links { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.home-catalog-link, .home-catalog-link:visited {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #d0d0d0;
    border-radius: var(--pp-radius);
    text-decoration: none;
    color: var(--pp-text);
}
.home-catalog-link:hover, .home-catalog-link:focus { border-color: var(--pp-red); color: var(--pp-red); text-decoration: none; }
.home-catalog-link svg { flex: none; }
.home-catalog-text { flex: 1 1 auto; display: flex; flex-direction: column; }
.home-catalog-text strong { font-size: 15px; }
.home-catalog-sub { font-size: 13px; color: var(--pp-muted); }

/* ---------- Contact band ---------- */

.home-contact {
    margin: 0 56px 56px;
    padding: 32px;
    border-radius: var(--pp-radius-card);
    background: var(--pp-red);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.home-contact-text { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.home-page .home-contact-heading { font-size: 26px; font-weight: 600; color: #fff; }
.home-page .home-contact-text p { font-size: 15px; line-height: 1.6; color: #f6dcd8; }
.home-contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-contact .home-btn:focus-visible { outline-color: #fff; }

/* ---------- Brand family ---------- */

.home-section.home-family { padding-top: 48px; border-top: 1px solid var(--pp-line-2); }
.home-family-grid { gap: 32px; }
.home-family-item { display: flex; flex-direction: column; gap: 6px; }
.home-family-name { font-size: 16px; font-weight: 600; text-decoration: none; }
.home-page .home-family-item .home-muted { line-height: 1.55; }

/* ---------- Narrow screens: stack ---------- */

@media (max-width: 991px) {
    .home-top { flex-direction: column-reverse; align-items: stretch; }
    .home-top > home-slider { max-width: none; padding: 0; }
    .home-top > home-slider .home-slider-frame { aspect-ratio: auto; height: clamp(220px, 40vw, 360px); }
    .home-section, .home-hero, .home-top > .home-hero { padding: 40px 24px; }
    .home-section.home-why { padding-top: 0; }
    .home-section.home-family { padding-top: 32px; }
    .home-contact { margin: 0 24px 40px; padding: 24px; }
    .home-page .home-h1 { font-size: 34px; }
    .home-page .home-h2 { font-size: 26px; }
    .home-intro { font-size: 17px; }
    .home-grid, .home-lines { grid-template-columns: 1fr; }
}
/* style.css hides #banner (which clears the fixed header) below 700px. */
@media (max-width: 700px) {
    .home-page { padding-top: var(--pp-header-h); }
}
@media (max-width: 480px) {
    .home-section, .home-hero, .home-top > .home-hero { padding-left: 16px; padding-right: 16px; }
    .home-contact { margin-left: 16px; margin-right: 16px; }
    .home-portal, .home-catalog { padding: 24px; }
}
