/* The /consulting/ page: sections, how it works and the contact form. */
.svc-block{ margin-top:48px; }

/* Consulting and Recent work side by side, both cards the same height (the taller one);
   stacked on tablets and phones, where each card keeps its own height */
.side-by-side{ display:grid; gap:24px; grid-template-columns:1fr 1fr; align-items:stretch; }
.side-by-side > div, .side-by-side .carousel{ display:flex; flex-direction:column; }
.side-by-side .carousel{ flex:1; }
.side-by-side .project-grid{ grid-template-columns:1fr; flex:1; }
@media (max-width:800px){ .side-by-side{ grid-template-columns:1fr; } }

/* Recent work carousel: every card in one grid cell, so the box is as tall as the tallest
   card and nothing below moves when the card changes; only the active card is visible */
.carousel-track{ display:grid; flex:1; }
.carousel-slide{ grid-area:1 / 1; display:flex; visibility:hidden; }
.carousel-slide.active{ visibility:visible; }
/* A carousel inside a hidden slide stays hidden (visibility would otherwise show its active slide) */
.carousel-slide:not(.active) .carousel-slide.active{ visibility:hidden; }
.carousel-slide > .project-card{ flex:1; }
.carousel-nav{ display:flex; align-items:center; gap:8px; }
.carousel-nav button{ cursor:pointer; border:1px solid var(--line-strong); background:var(--panel); color:var(--heading); }
.carousel-prev, .carousel-next{ width:32px; height:32px; border-radius:50%; font-size:1.1rem; line-height:1; }
.carousel-nav .carousel-dot{ width:10px; height:10px; padding:0; border-radius:50%; }
.carousel-nav .carousel-dot.active{ background:var(--accent); border-color:var(--accent); }
.carousel-count{ font-size:var(--fs-sm); color:var(--text-dim); min-width:3.5em; text-align:center; }

/* How it works: 5 steps on one row; two columns on tablets and large phones, one column on small phones */
.svc-steps{ list-style:none; padding:0; margin:0; display:grid; gap:12px; grid-template-columns:repeat(5, 1fr); }
@media (max-width:800px){ .svc-steps{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:480px){ .svc-steps{ grid-template-columns:1fr; } }
.svc-steps li{ background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:16px; color:var(--text-dim); line-height:1.5; }
.svc-steps b{ display:block; color:var(--heading); font-family:var(--font-display); margin-bottom:6px; }
/* The last step (Deliver) is the goal: accent border, light tint, title in the accent colour */
.svc-steps li.step-goal{ border:2px solid var(--accent); background:var(--accent-wash); box-shadow:0 0 0 4px var(--accent-tint); }
.svc-steps li.step-goal b{ color:var(--accent); }


.contact-form{ display:grid; gap:12px; width:100%; max-width:520px; }
.contact-form label{ display:grid; gap:4px; font-size:var(--fs-sm); color:var(--text-dim); }
.contact-form input, .contact-form select, .contact-form textarea{ font:inherit; padding:10px; border:1px solid var(--line-strong); border-radius:var(--radius-sm); background:var(--panel); color:var(--text); }
.contact-form button{ justify-self:start; border:0; cursor:pointer; }


/* Spam trap: off screen for people, still in the form for bots */
.hp-field{ position:absolute; left:-10000px; width:1px; height:1px; overflow:hidden; }

.form-status{ color:var(--accent); font-size:var(--fs-sm); margin:0; }
.form-thanks{ color:var(--heading); font-weight:600; width:100%; }

/* A case study: the screenshot on the left (150px; 100px on phones), as tall as the text, the text on the right */
.project-card.card-media-left{ display:grid; grid-template-columns:150px 1fr; gap:20px; align-items:stretch; }
.card-media-left .card-text{ display:flex; flex-direction:column; gap:14px; min-width:0; }
/* The screenshot fills the column from the top and is cut at the bottom, level with the stack line */
.card-media-left .p-shots{ position:relative; }
.card-media-left .p-shots .carousel-track{ position:absolute; inset:0; grid-template-rows:100%; }
.card-media-left .p-shots .carousel-slide{ min-height:0; overflow:hidden; }
.card-media-left .p-shots .lightbox-link{ display:block; height:100%; }
.project-card.card-media-left .p-shots img{ aspect-ratio:auto; height:100%; object-fit:cover; object-position:top; }
@media (max-width:480px){ .project-card.card-media-left{ grid-template-columns:100px 1fr; gap:14px; } }
