/* /home-pains (proposed homepage). Adds to pains.css and next.css; same tokens, one accent. */

/* ---------- hero: today's wording, two boxed buttons, the lion ---------- */
.hp-hero { padding-bottom: clamp(3rem, 6vw, 5rem); }
.hp-hero h1 .nx-accent { display: block; color: var(--v3-neon); }
.hp-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hp-btn-outline { background: transparent; border: 2px solid rgba(238, 244, 239, .5); color: #fff; }
.hp-btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .06); }

/* ---------- section heads with a link on the right ---------- */
.hp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; max-width: none; }
.hp-head h2 { margin: 0; }

/* ---------- what do you need help with: one panel ---------- */
.hp-help { padding-bottom: 0; }
.hp-panel { background: var(--p-white); border: 1px solid var(--p-line); border-radius: var(--radius-xl, 20px); padding: clamp(1.5rem, 4vw, 3rem); }
.hp-panel .nx-head { margin-bottom: clamp(1rem, 2.5vw, 1.75rem); }
.hp-panel .nx-path:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- what we're building: the pains rows, one line per project ---------- */
.hp-building { padding-top: 0; }
.hp-row { display: flex; align-items: baseline; justify-content: space-between; gap: .35rem 1.5rem; flex: 1; flex-wrap: wrap; min-width: 0; }
.hp-row-title { font-size: clamp(1.15rem, 1.9vw, 1.4rem); }
.hp-row-ind { font-size: .9375rem; font-weight: 600; color: var(--p-ink-3); white-space: nowrap; }
.hp-build { margin-top: .6rem !important; }

/* ---------- pains: outcome left, the stat and a link to the project right ---------- */
.hp-extra { margin: 0 0 .25rem !important; }

/* ---------- price ---------- */
.pn-price h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.hp-accent { color: var(--p-accent); }
.hp-price-lead { font-size: 1.125rem; line-height: 1.55; color: var(--p-ink-2); margin: 0 0 1.5rem; max-width: 34rem; }
.hp-range { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.03em; color: var(--p-ink); margin: 0; }
.pn-terms a { color: var(--p-accent); font-weight: 600; white-space: nowrap; }

/* ---------- industries: one row of links ---------- */
.hp-industries { padding: clamp(2.5rem, 5vw, 3.75rem) 0; }
.hp-ind-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 1.25rem clamp(2rem, 5vw, 4rem); align-items: center; }
.hp-industries h2 { margin: 0; font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -.04em; line-height: 1.1; }
.hp-industries + .pn-quote-sec { padding-top: 0; }

@media (max-width: 900px) {
    .hp-ind-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
    /* Live mobile layout (live-mobile.css): headline, then intro beside the lion, then the buttons.
       Spread down the first screen so it fills without a blank band. */
    .hp-hero { padding: calc(69px + 2rem) 0 4.75rem; }
    .hp-hero .nx-hero-grid { min-height: calc(100svh - 69px - 6.75rem); align-content: space-between; }
    .hp-hero h1 { font-size: clamp(2.4rem, 12.2vw, 3.2rem); }
    .hp-actions { flex-direction: column; }
    .hp-actions .btn { width: 100%; justify-content: center; text-align: center; }
    .hp-row-title { font-size: 1.1rem; }
}

/* ======================================================================
   2026-11-28, round 4: depth and motion, alternating backgrounds, a cleaner help box.
   Motion lives in home-pains.js; everything here degrades to a still page and
   all motion stops under prefers-reduced-motion.
   ====================================================================== */

/* ---------- help box: no frame around the art, no dividing lines, even link spacing ---------- */
.hp-panel { position: relative; }
.hp-help-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hp-panel .nx-path { border: 0; padding: clamp(1rem, 2vw, 1.5rem) 0; }
.hp-panel .nx-path:last-child { border: 0; }
.hp-panel .nx-path-art .nx-art { border: 0; border-radius: var(--radius-xl, 20px); }
.hp-panel .nx-path h3 { margin: 0 0 1rem; }
.hp-panel .nx-chips { gap: .625rem; }
.hp-panel .nx-chips a { min-height: 36px; padding: .4rem .85rem; font-size: .9rem; }

/* ---------- alternating backgrounds: dark, light, dark, light all the way down ---------- */
body.next-v3 .hp-dark { background: var(--v3-ink); color: var(--v3-on-dark); }
body.next-v3 .hp-dark h2, body.next-v3 .hp-dark .nx-head p { color: #fff; }
body.next-v3 .hp-dark .hp-head .nx-link, body.next-v3 .hp-dark .nx-head .nx-link { color: var(--v3-neon); }
body.next-v3 .hp-built { padding-bottom: clamp(3.5rem, 7vw, 6rem); }
body.next-v3 .hp-building { padding-top: clamp(3.5rem, 7vw, 6rem); }
body.next-v3 .hp-dark.nx-industries .nx-rows, body.next-v3 .hp-dark.nx-industries .nx-rows li { border-color: var(--v3-line-dark); }
body.next-v3 .hp-dark.nx-industries .nx-rows a { color: #fff; }
body.next-v3 .hp-dark.nx-industries .nx-row-line { color: rgba(238, 244, 239, .7); }
body.next-v3 .hp-dark.nx-industries .nx-rows a:hover .nx-row-title { color: var(--v3-neon); }
body.next-v3 .nx-cta.hp-light { background: var(--p-bg, #f4f3ef); color: var(--p-ink); }
body.next-v3 .nx-cta.hp-light h2 { color: var(--p-ink); }
body.next-v3 .nx-cta.hp-light p, body.next-v3 .nx-cta.hp-light a:not(.btn) { color: var(--p-ink-2); }
body.next-v3 .nx-cta.hp-light::after { display: none; }
body.next-v3 .nx-cta.hp-light .nx-cta-phone { color: var(--p-ink); }

/* ---------- the lion: 3D, tilts to the cursor, travels into the help box ---------- */
.hp-lion-home { position: relative; perspective: 900px; }
.hp-lion { transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }
.hp-lion img { display: block; width: 100%; height: auto; filter: drop-shadow(0 28px 40px rgba(0, 0, 0, .45)); animation: hp-float 6s ease-in-out infinite; }
@keyframes hp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.hp-lion.is-flying { position: absolute; z-index: 40; pointer-events: none; transition: none; }
.hp-lion.is-flying img { animation: none; }
.hp-dock { flex: none; width: clamp(64px, 8vw, 104px); aspect-ratio: 1; }


/* ---------- ribbons: two crossed bands of what owning it means ---------- */
.hp-ribbons { position: relative; height: clamp(130px, 13vw, 170px); overflow: hidden; background: linear-gradient(var(--p-bg, #f4f3ef) 50%, var(--v3-ink) 50%); }
.hp-ribbon { position: absolute; left: -5%; width: 110%; top: 50%; padding: .85rem 0; overflow: hidden; white-space: nowrap; }
.hp-ribbon-a { background: var(--v3-neon); color: var(--v3-ink); rotate: -2deg; translate: 0 -105%; z-index: 2; box-shadow: 0 10px 30px rgba(15, 43, 25, .18); }
.hp-ribbon-b { background: #fff; color: var(--v3-ink); rotate: 1.5deg; translate: 0 12%; box-shadow: 0 10px 30px rgba(15, 43, 25, .12); }
.hp-ribbon-track { display: flex; width: max-content; flex-wrap: nowrap; animation: hp-tick 40s linear infinite; }
.hp-ribbon-b .hp-ribbon-track { animation-direction: reverse; animation-duration: 48s; }
.hp-ribbon span { flex: none; white-space: nowrap; font: 800 clamp(1rem, 1.6vw, 1.35rem)/1 var(--font-sans, Manrope, sans-serif); letter-spacing: -.01em; text-transform: uppercase; padding: 0 1.1rem; }
.hp-ribbon span::after { content: '✦'; margin-left: 2.2rem; font-size: .75em; vertical-align: .1em; }
@keyframes hp-tick { to { translate: -50% 0; } }

/* ---------- 3D cards: they tilt toward the cursor and catch the light ---------- */
.hp-tilt { transform-style: preserve-3d; transition: transform .2s ease-out, box-shadow .2s ease-out; position: relative; }
.hp-tilt::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .2s;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .55), transparent 55%); mix-blend-mode: soft-light; }
.hp-tilt.is-tilting::after { opacity: 1; }
.hp-tilt.is-tilting { box-shadow: 0 24px 50px rgba(0, 0, 0, .28); }

/* ---------- reveal: headings blur in, cards rise one after another ---------- */
.hp-js .hp-reveal { opacity: 0; filter: blur(10px); translate: 0 18px; transition: opacity .7s ease-out, filter .7s ease-out, translate .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.hp-js .hp-reveal.is-in { opacity: 1; filter: blur(0); translate: 0 0; }

/* the process line draws itself as the section comes in */
.hp-js .nx-process .nx-step::after { transform-origin: left center; transform: scaleX(0); transition: transform 1s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
.hp-js .nx-process.is-in .nx-step::after { transform: scaleX(1); }

@media (max-width: 768px) {
    .hp-ribbons { height: 130px; }
    .hp-js .nx-process .nx-step::after { transform-origin: center top; transform: scaleY(0); }
    .hp-js .nx-process.is-in .nx-step::after { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
    .hp-lion img, .hp-ribbon-track { animation: none; }
    .hp-js .hp-reveal { opacity: 1; filter: none; translate: none; transition: none; }
    .hp-js .nx-process .nx-step::after { transform: none; transition: none; }
}

/* ---------- tighter vertical rhythm (owner: too much space above and below) ---------- */
body.next-v3 .nx-section { padding-block: clamp(2.75rem, 5vw, 4.25rem); }
body.next-v3 .nx-section .nx-head { margin-bottom: clamp(1.1rem, 2.2vw, 1.75rem); }
body.next-v3 .hp-built, body.next-v3 .hp-building { padding-block: clamp(2.75rem, 5vw, 4.25rem); }
body.next-v3 .hp-help { padding-bottom: clamp(2.75rem, 5vw, 4.25rem); }
body.next-v3 .nx-cta { padding-block: clamp(3rem, 6vw, 4.5rem); }

/* the lion flies over the sections below the hero */
body.next-v3 .hp-hero { overflow: visible; }
body.next-v3 .hp-lion-home { z-index: 5; }

/* ---------- round 5: no box around the help section; the seven pains ---------- */
.hp-panel { background: none; border: 0; border-radius: 0; padding: 0; }
.hp-pains { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.75rem, 3vw, 2.5rem) clamp(2rem, 5vw, 4.5rem); }
.hp-pain h3 { margin: 0 0 .35rem; font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -.03em; line-height: 1.15; }
.hp-pain p { margin: 0; color: var(--p-ink-2); font-size: 1.0625rem; line-height: 1.5; }
.hp-pain .hp-pain-svc { margin-top: .6rem; font-size: .95rem; font-weight: 600; }
.hp-pain-svc a { color: var(--p-accent, #1f7a3d); text-decoration: none; }
.hp-pain-svc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hp-pain-svc span { color: var(--p-ink-3); }
@media (max-width: 768px) { .hp-pains { grid-template-columns: minmax(0, 1fr); } }

/* ---------- a story opens on the page: one window, Previous and Next ---------- */
.hp-sd { width: min(760px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 20px; background: var(--p-white, #fff); color: var(--p-ink);
    box-shadow: 0 40px 90px rgba(5, 20, 11, .45); overflow: hidden; margin: auto; }
.hp-sd[open] { display: flex; flex-direction: column; animation: hp-sd-in .28s cubic-bezier(.2, .8, .2, 1); }
.hp-sd::backdrop { background: rgba(8, 24, 14, .62); backdrop-filter: blur(6px); }
@keyframes hp-sd-in { from { opacity: 0; translate: 0 18px; scale: .98; } }
.hp-sd-x { position: absolute; top: 14px; right: 14px; z-index: 2; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(15, 43, 25, .06); color: var(--p-ink); cursor: pointer; }
.hp-sd-x:hover { background: rgba(15, 43, 25, .12); }
.hp-sd-body { overflow-y: auto; padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 3rem) 1.5rem; overscroll-behavior: contain; }
.hp-sd-body.is-swap { animation: hp-sd-swap .25s ease-out; }
@keyframes hp-sd-swap { from { opacity: 0; translate: var(--dir, 16px) 0; } }
.hp-sd-meta { display: flex; gap: .75rem; margin: 0 3rem .75rem 0; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p-ink-3); }
.hp-sd-status.is-live { color: var(--p-accent, #1f7a3d); }
.hp-sd-title { margin: 0 3rem .4rem 0; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.035em; line-height: 1.1; color: var(--p-ink); }
.hp-sd-for { margin: 0 0 1.5rem; color: var(--p-ink-3); }
.hp-sd-part { margin: 0 0 1.4rem; }
.hp-sd-part h3 { margin: 0 0 .4rem; font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--p-accent, #1f7a3d); }
.hp-sd-part p, .hp-sd-part li { font-size: 1.0625rem; line-height: 1.6; color: var(--p-ink-2); margin: 0 0 .6rem; }
.hp-sd-part ul { margin: 0; padding-left: 1.2rem; }
.hp-sd-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1rem, 3vw, 2rem); border-top: 1px solid var(--p-line); background: var(--p-white, #fff); }
.hp-sd-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--p-line-2, #d9d7cf); border-radius: 10px; background: none; color: var(--p-ink); font: 600 .95rem/1 inherit; cursor: pointer; }
.hp-sd-btn:hover { border-color: var(--p-accent, #1f7a3d); color: var(--p-accent, #1f7a3d); }
.hp-sd-count { font-size: .9rem; font-weight: 600; color: var(--p-ink-3); }
@media (max-width: 768px) {
    .hp-sd { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .hp-sd[open], .hp-sd-body.is-swap { animation: none; } }
.nx-story-card { cursor: pointer; }

/* ---------- cards: just the industry and the title; the whole card opens the story ---------- */
.hp-card { position: relative; min-height: 0; gap: .6rem; padding-bottom: clamp(1.5rem, 2.5vw, 2rem); }
.hp-card .nx-story-meta { margin: 0; }
.hp-card .nx-story-title { margin: 0; }
.hp-card .nx-story-title a { color: inherit; text-decoration: none; }
.hp-card .nx-story-title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.hp-card:hover .nx-story-title a { color: var(--p-accent, #1f7a3d); }
.hp-card .nx-story-title a:focus-visible { outline: none; }
.hp-card:has(a:focus-visible) { outline: 2px solid var(--v3-neon); outline-offset: 3px; }

/* ---------- what do you need help with: each group, then its services as picture tiles ---------- */
.hp-groups { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.hp-group h3 { margin: 0 0 1rem; font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -.03em; }
.hp-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.75rem, 1.5vw, 1.25rem); }
.hp-tile { margin: 0; }
.hp-tile a { display: flex; flex-direction: column; height: 100%; border-radius: 16px; background: var(--p-white, #fff); border: 1px solid var(--p-line); overflow: hidden; text-decoration: none; color: var(--p-ink);
    transition: border-color .2s, box-shadow .2s; }
.hp-tile a:hover { border-color: var(--p-accent, #1f7a3d); box-shadow: 0 18px 40px rgba(15, 43, 25, .14); }
.hp-tile-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #f3f2ee; }
.hp-tile-img img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: scale .4s cubic-bezier(.2, .7, .2, 1); }
.hp-tile a:hover .hp-tile-img img { scale: 1.06; }
.hp-tile-name { display: block; padding: .8rem .95rem .95rem; font-weight: 700; font-size: .98rem; line-height: 1.25; letter-spacing: -.01em; }
.hp-tile a:hover .hp-tile-name { color: var(--p-accent, #1f7a3d); }
.hp-tile a:focus-visible { outline: 2px solid var(--p-accent, #1f7a3d); outline-offset: 3px; }
@media (max-width: 1000px) {
    .hp-tiles { grid-template-columns: repeat(5, minmax(170px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; scrollbar-width: none; }
    .hp-tiles::-webkit-scrollbar { display: none; }
    .hp-tile { scroll-snap-align: start; }
}

/* ---------- grouped by pain: the pain and its outcome on the left, the services on the right ---------- */
.hp-group { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 1rem clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.hp-group-head h3 { margin: 0 0 .4rem; font-size: clamp(1.3rem, 2.1vw, 1.65rem); line-height: 1.15; letter-spacing: -.03em; }
.hp-group-head p { margin: 0; color: var(--p-accent, #1f7a3d); font-weight: 600; font-size: 1rem; line-height: 1.4; }
.hp-group .hp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) {
    .hp-group { grid-template-columns: minmax(0, 1fr); }
    .hp-group .hp-tiles { grid-template-columns: repeat(4, minmax(170px, 1fr)); }
}

/* ---------- the old row design, grouped by pain: picture, the pain, the outcome, the services ---------- */
.hp-panel .nx-path .hp-then { margin: -.25rem 0 1rem; color: var(--p-accent, #1f7a3d); font-weight: 600; font-size: 1.0625rem; }

/* ---------- every project card the same height, in both lists ---------- */
.hp-built .nx-story-grid, .hp-building .nx-story-grid { grid-auto-rows: 1fr; align-items: stretch; }
.hp-card { height: 100%; box-sizing: border-box; }
.hp-card { min-height: clamp(11rem, 16vw, 13.5rem); }
body.next-v3 .hp-help .nx-head { max-width: none; } body.next-v3 .hp-help h2 { white-space: nowrap; }

/* ---------- card titles: full card width, never more than two lines, the same space on every card ---------- */
body.next-v3 .hp-card .nx-story-title { max-width: none; font-size: clamp(1.2rem, 1.7vw, 1.45rem); line-height: 1.2; text-wrap: balance;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(2 * 1.2em); }
body.next-v3 .hp-card { min-height: 0; }
body.next-v3 .hp-card .nx-story-title { font-size: clamp(1.15rem, 1.5vw, 1.3rem); text-wrap: pretty; }
