/* landing: UX pass 26 Nov (parallel agents). Loaded after style.css.
   Service pages (pages/service.php) and SEO landing pages (pages/seo.php):
   big alternating photo rows, short visible text with "Read more", chips, icon steps.
   Phone < 760px, tablet 760 to 1099px, desktop 1100px and up. */

/* ---------- Hero: a slow settle on the background photo ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lp-hero .page-hero-bg img { animation: lp-settle 14s ease-out both; }
}
@keyframes lp-settle { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Figures: large photo, caption over the bottom edge ---------- */
.lp-fig { position: relative; margin: 0; overflow: hidden; background: var(--ink); aspect-ratio: 3 / 2; }
.lp-fig-frame { position: absolute; inset: 0; }
.lp-fig picture, .lp-fig img { display: block; width: 100%; height: 100%; }
.lp-fig img { object-fit: cover; transition: transform 1.2s ease; }
.lp-fig figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 12px; font-size: .88rem; line-height: 1.4; color: #fff; background: linear-gradient(180deg, rgba(14, 16, 30, 0) 0%, rgba(14, 16, 30, .78) 70%); }
.lp-fig figcaption .gallery-tag { background: rgba(255, 255, 255, .92); }
.lp-fig figcaption .gallery-tag-ai { background: #fff4e0; }

/* Reveal: the photo fades in and settles from a slight zoom (no movement of the box) */
.reveal-ready .lp-fig.reveal { transform: none; transition: opacity .8s ease; }
.reveal-ready .lp-fig.reveal img { transform: scale(1.08); }
.reveal-ready .lp-fig.reveal.is-visible img { transform: scale(1); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lp-fig:hover img, .reveal-ready .lp-fig.reveal.is-visible:hover img { transform: scale(1.045); transition-duration: 2.4s; }
}

/* ---------- Alternating photo and text rows (landing pages) ---------- */
.lp-rows { display: grid; gap: clamp(40px, 6vw, 72px); padding: clamp(36px, 6vw, 80px) 0; }
.lp-row { display: grid; gap: 22px; }
.lp-text { padding: 0 var(--gutter); }
.lp-text h2 { margin-bottom: .45em; max-width: 24ch; }
.lp-text p { max-width: 62ch; margin: 0 0 .9em; font-size: 1.06rem; }
.lp-row-text .lp-text { width: 100%; max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto; }

.lp-row-chips { padding: 0 var(--gutter); }
.lp-row-chips .lp-chips { margin-top: 0; }
.lp-row-has-chips .lp-text > :last-child { margin-bottom: 0; }

/* Tablet and desktop: photo to the screen edge on one side, text lined up with the page grid */
@media (min-width: 760px) {
  .lp-row { --lp-edge: max(var(--gutter), calc(50vw - var(--wrap) / 2 + var(--gutter))); --lp-inner: clamp(28px, 4.5vw, 72px);
    grid-template-columns: 9fr 11fr; gap: 0; align-items: stretch; min-height: clamp(360px, 42vw, 560px); }
  .lp-row-flip { grid-template-columns: 11fr 9fr; }
  .lp-row-text { grid-template-columns: 1fr; min-height: 0; }
  .lp-row .lp-media { grid-column: 1; grid-row: 1; aspect-ratio: auto; height: 100%; min-height: 360px; border-radius: 0 14px 14px 0; }
  .lp-row .lp-text { grid-column: 2; grid-row: 1; align-self: center; padding: 28px var(--lp-edge) 28px var(--lp-inner); }
  .lp-row .lp-text p { max-width: 64ch; }
  .lp-row-flip .lp-media { grid-column: 2; border-radius: 14px 0 0 14px; }
  .lp-row-flip .lp-text { grid-column: 1; padding: 28px var(--lp-inner) 28px var(--lp-edge); }
  .lp-row-text .lp-text { grid-column: 1; padding: 0 var(--gutter); }
  /* Tablet: the chips run full width under the photo and text */
  .lp-row-chips { grid-column: 1 / -1; grid-row: 2; padding: 22px var(--lp-edge) 0; }
  .lp-row-chips .lp-chips { max-width: none; }
}
@media (min-width: 1100px) {
  .lp-row { grid-template-columns: 1fr 1fr; }
  /* Desktop: the chips sit under the text, the photo spans both */
  .lp-row-has-chips .lp-media { grid-row: 1 / span 2; }
  .lp-row-has-chips .lp-text { align-self: end; padding-bottom: 6px; }
  .lp-row-chips { grid-column: 2; grid-row: 2; align-self: start; padding: 12px var(--lp-edge) 28px var(--lp-inner); }
  .lp-row-flip .lp-row-chips { grid-column: 1; padding: 12px var(--lp-inner) 28px var(--lp-edge); }
}

/* ---------- Read more ---------- */
.more { margin: 0 0 .9em; }
.more summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; color: var(--violet); }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
.more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.more summary:hover { color: var(--cyan-dark); }
.more summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.more-close { display: none; }
.more[open] .more-open { display: none; }
.more[open] .more-close { display: inline; }
.more[open] > p { animation: lp-fade .35s ease both; }
@keyframes lp-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Chips (ticked lists) ---------- */
.lp-chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: 680px; }
.lp-chips li { display: inline-flex; align-items: flex-start; gap: 9px; margin: 0; padding: 8px 14px 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: .95rem; line-height: 1.4; }
.lp-chip-ic { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; }
.lp-chip-ic .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.lp-chips-2 { display: grid; grid-template-columns: 1fr; max-width: none; gap: 10px; }
.lp-chips-2 li { padding: 14px 16px 14px 12px; font-size: 1.02rem; background: #fff; box-shadow: var(--shadow); align-items: center; }
.lp-chips-2 .lp-chip-ic { width: 30px; height: 30px; }
.lp-chips-2 .lp-chip-ic .icon { width: 17px; height: 17px; }
@media (min-width: 480px) { .lp-chips-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Talk to our team (after the first row) ---------- */
.lp-talk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding: clamp(20px, 3vw, 28px) clamp(20px, 3.5vw, 36px); border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--violet) 0%, #2a6f9a 60%, var(--cyan-dark) 100%); }
.lp-talk h2 { color: #fff; margin: 0 0 .2em; }
.lp-talk p { margin: 0; color: rgba(255, 255, 255, .88); }
.lp-talk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.lp-talk .side-phone { margin-top: 0; }

/* ---------- Aside band: explainer, facts, related ---------- */
.lp-aside { border-top: 1px solid var(--line); }
.lp-aside-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.lp-ex { background: var(--surface); border-radius: 14px; padding: 14px; }
.lp-ex .ex { max-height: 300px; }
@media (max-width: 759px) { .lp-ex .ex, .lp-ex-side .ex { max-height: 190px; } .lp-check-grid li { padding: 11px 14px; } }
.lp-facts, .lp-related { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: #fff; }
.lp-facts h2, .lp-related h2 { margin-bottom: .6em; }
.lp-stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; color: var(--muted); font-size: .92rem; line-height: 1.35; }
.lp-stats strong { display: block; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; color: var(--violet); }
@media (min-width: 760px) {
  .lp-aside-grid { grid-template-columns: 1fr 1fr; }
  .lp-aside-grid > .lp-ex { grid-row: span 2; align-self: start; }
  .lp-aside-noex { grid-template-columns: 1.3fr 1fr; }
}
@media (min-width: 1100px) {
  .lp-aside-grid { grid-template-columns: 1.1fr 1fr 1fr; align-items: start; }
  .lp-aside-grid > .lp-ex { grid-row: auto; }
  .lp-aside-noex { grid-template-columns: 1.3fr 1fr; }
}

/* ---------- Full-width photo band ---------- */
.lp-band .lp-fig { aspect-ratio: 4 / 3; }
.lp-band figcaption { padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 760px) { .lp-band .lp-fig { aspect-ratio: 16 / 7; } }
@media (min-width: 1100px) { .lp-band .lp-fig { aspect-ratio: 21 / 8; } .lp-band figcaption { padding-left: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); } }

/* ---------- Process: numbered icon cards ---------- */
.lp-steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 18px; }
.lp-step { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.lp-step-badge { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--grad); color: #fff; flex: none; }
.lp-step-badge .icon { width: 26px; height: 26px; }
.lp-step-no { position: absolute; top: -4px; right: -8px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: #fff; border: 2px solid var(--violet); color: var(--violet); font-family: var(--font-head); font-weight: 700; font-size: .85rem; }
.lp-step h3 { font-size: 1.2rem; margin: 0 0 .3em; }
.lp-step p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.lp-step.reveal:nth-child(2) { transition-delay: .1s; }
.lp-step.reveal:nth-child(3) { transition-delay: .2s; }
.lp-step.reveal:nth-child(4) { transition-delay: .3s; }
.lp-step.reveal:nth-child(5) { transition-delay: .4s; }
.lp-step.reveal:nth-child(6) { transition-delay: .5s; }
.lp-step.reveal:nth-child(7) { transition-delay: .6s; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lp-step .lp-step-badge { transition: transform .4s ease; }
  .lp-step:hover .lp-step-badge { transform: rotate(-8deg) scale(1.06); }
}
/* Phone: a swipe track, one and a bit cards in view */
@media (max-width: 759px) {
  .lp-steps { grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 18px; scroll-padding: 0 var(--gutter); }
  .lp-step { scroll-snap-align: start; }
  .lp-step.reveal { transition-delay: 0s; }
}
@media (min-width: 760px) and (max-width: 1099px) { .lp-steps { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) {
  .lp-steps { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .lp-step:not(:last-child)::after { content: ""; position: absolute; top: 49px; right: -19px; width: 20px; height: 2px; background: var(--grad); opacity: .6; }
}

/* ---------- Checklist: photo plus icon cards ---------- */
.lp-check { display: grid; gap: 22px; }
.lp-check-media { border-radius: 14px; }
.lp-check-body h2 { margin-bottom: .7em; }
.lp-check-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lp-check-grid li { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: .98rem; line-height: 1.45; }
.lp-check-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface); color: var(--violet); }
.lp-check-ic .icon { stroke-width: 2.4; }
@media (max-width: 759px) { .lp-check-media { margin: 0 calc(-1 * var(--gutter)); border-radius: 0; } }
@media (min-width: 560px) { .lp-check-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) {
  .lp-check { grid-template-columns: 5fr 7fr; align-items: stretch; gap: clamp(28px, 4vw, 56px); }
  .lp-check .lp-check-media { aspect-ratio: auto; min-height: 100%; }
  .lp-check-solo { grid-template-columns: 1fr; max-width: 900px; }
  .lp-check-body { align-self: center; }
}

/* ---------- Service page: scope and explainer ---------- */
.lp-scope { display: grid; gap: 28px; align-items: center; }
.lp-ex-side { width: 100%; max-width: 360px; justify-self: center; }
@media (min-width: 760px) { .lp-ex-side .ex { max-height: 260px; } }
@media (min-width: 900px) { .lp-scope { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); } .lp-scope-solo { grid-template-columns: 1fr; } }

/* Service page: own photos bigger; one column of large photos on phone */
.lp-gallery .gallery { columns: 3 280px; column-gap: 16px; }
.lp-gallery .gallery-item { margin-bottom: 16px; }
@media (max-width: 560px) { .lp-gallery .gallery { columns: 1; } .lp-gallery .gallery-item figcaption { font-size: .92rem; padding: 10px 12px 12px; } }

/* Service page: photo strip when there are no own photos */
.lp-strip { display: grid; gap: 16px; grid-template-columns: 1fr; }
.lp-strip-figure { border-radius: 14px; aspect-ratio: 4 / 3; }
@media (min-width: 760px) { .lp-strip { grid-template-columns: 1fr 1fr; } .lp-strip-figure:first-child { grid-column: span 2; aspect-ratio: 16 / 7; } }
@media (min-width: 1100px) { .lp-strip { grid-template-columns: 1.4fr 1fr 1fr; } .lp-strip-figure:first-child { grid-column: auto; aspect-ratio: 4 / 3; } }

/* Service page: sub-service cards with photos */
.lp-subs { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.lp-industries .section-head p { max-width: 68ch; }
.lp-sub .visual-card-img { display: block; overflow: hidden; }
.lp-sub .visual-card-img img { transition: transform 1.2s ease; }
.lp-sub .visual-card-body h3 { font-size: 1.2rem; }
.lp-ex.lp-ex-map .ex { max-height: none; }
/* Four sub pages: one row of four on desktop, two by two below, never three plus an orphan */
@media (min-width: 621px) { .lp-subs-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1021px) { .lp-subs-4 { grid-template-columns: repeat(4, 1fr); } }
