/* Robotics page (page-templates/robotics.php). From design-src/canvas/project/Robotics.dc.html.
   Shared pieces (header, footer, booking band, pop-up, buttons, eyebrow, .wrap, .jt, .rv, .hin) are in base.css. */

/* Section heads */
.rob .sh { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; padding-top: 24px; border-top: 1px solid var(--steel); }
.rob .sh .tk { position: absolute; top: -6px; width: 1px; height: 11px; background: var(--steel); }
.rob .sh .tk.l { left: 0; }
.rob .sh .tk.r { right: 0; }
.rob .h2 { margin: 0; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.05; font-weight: 700; letter-spacing: -.015em; }
.rob .intro { margin: 20px 0 0; max-width: 640px; font-size: 19px; line-height: 30px; color: var(--slate); }
.rob .intro + .intro { margin-top: 12px; }

/* Labels on media */
.rob .tag { position: absolute; left: 16px; top: 16px; padding: 6px 10px; background: var(--ink); color: #fff; font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* ABB film */
.film-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--ink); }
.film-btn { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 8px; border: 0; border-radius: 999px; background: var(--teal); color: var(--ink); font: 600 14px/20px var(--font); cursor: pointer; }
.film-btn:hover { background: var(--teal-hover); }
.film-btn i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--ink); }

/* Completed project features */
.feat { margin-top: 56px; display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--line-light); }
.feat.rev { flex-direction: row-reverse; }
.feat-img { flex: 1.2 1 520px; min-width: 0; position: relative; min-height: 440px; background: var(--petrol); overflow: hidden; }
.feat-img img, .feat-img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat-img video { background: var(--ink); }
.feat-body { flex: 1 1 420px; min-width: 0; padding: 40px; display: flex; flex-direction: column; gap: 20px; }
.feat-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 999px; background: var(--teal); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 10px rgba(0,170,180,.25); transition: transform .3s; }
.feat-play:hover { transform: scale(1.07); }
.rob .h3 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.015em; }
.rob .txt { margin: 8px 0 0; font-size: 16px; line-height: 26px; color: var(--slate); }

/* Data rows */
.ds { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.ds > div { padding: 12px 0; border-top: 1px solid var(--line-light); }
.ds > div.w { grid-column: 1 / -1; }
.ds dt { font: 500 11px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.ds dd { margin: 4px 0 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); }
.bn .lbl { color: var(--teal-deep); }
.bn .txt { margin-top: 6px; }

/* Before / after */
.ba { display: grid; grid-template-columns: 1fr auto 1fr 1fr; align-items: end; gap: 16px; padding: 20px 0; border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); margin-top: auto; }
.ba .lbl { color: var(--slate); }
.ba .v { margin-top: 6px; font-size: 30px; line-height: 1.05; font-weight: 800; }
.ba .v.hi, .ba .v.up { color: var(--teal-deep); }
.ba .u { margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--slate); }
.arr { font: 500 20px/1 var(--mono); color: var(--steel); padding-bottom: 6px; }

/* Call strip */
.cta-strip { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: 32px 40px; background: var(--ink); color: #fff; }

/* Project in development: drawing */
.bu-grid line { stroke: var(--line-light); stroke-width: .15; }
.bu-co { position: absolute; display: flex; align-items: center; gap: 6px; transform: translate(-5px, -5px); }
.bu-co i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(0,170,180,.22); flex: 0 0 auto; }
.bu-co b { font: 500 10px/14px var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 4px 7px; white-space: nowrap; }
.bu-scan { display: none; }

/* Phases */
.phase-row { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; }
.phase-row li { border-top: 3px solid var(--line-light); padding-top: 14px; font-size: 17px; line-height: 24px; font-weight: 600; color: var(--slate); }
.phase-row li.on { border-color: var(--teal); color: var(--ink); }
.phase-row .lbl { display: block; margin-bottom: 6px; color: var(--steel); }
.phase-row li.on .lbl { color: var(--teal-deep); }

/* Motion (from the design), only when welcome */
@media (prefers-reduced-motion: no-preference) {
	.feat-img img { transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
	.feat:hover .feat-img img { transform: scale(1.045); }
	@supports (animation-timeline: view()) {
		.rob .feat, .rob .sh { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% entry 38%; }
		.bu-plan { animation: buwipe linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
		@keyframes buwipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
		.bu-scan { display: block; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--teal); animation: buscan linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
		@keyframes buscan { 0% { left: 0; opacity: 1; } 95% { left: 100%; opacity: 1; } 100% { left: 100%; opacity: 0; } }
		.bu-grid line { stroke-dasharray: 200; stroke-dashoffset: 200; animation: budraw linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
		@keyframes budraw { to { stroke-dashoffset: 0; } }
		.bu-co { animation: buco linear both; animation-timeline: view(); animation-range: cover 42% cover 50%; }
		.bu-co.c2 { animation-range: cover 45% cover 53%; }
		.bu-co.c3 { animation-range: cover 48% cover 56%; }
		.bu-co.c4 { animation-range: cover 51% cover 59%; }
		@keyframes buco { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
	}
}

/* Phone (the Robotics-M boards are this page at 390px) */
@media (max-width: 900px) {
	.hide-s { display: none !important; }
	/* Design height is 500px; let it grow when the text needs more room so the title never slips under the header. */
	.rsec { height: auto !important; min-height: 500px; display: flex; flex-direction: column; justify-content: flex-end; }
	.rhero { position: relative !important; padding-top: 100px; padding-bottom: 40px !important; }
	.rob > .wrap:not(.rhero) { padding-top: 64px !important; padding-bottom: 64px !important; }
	.rob .wrap { padding-left: 16px; padding-right: 16px; }
	.rob .sh { grid-template-columns: 1fr; gap: 10px; }
	.rob .intro { font-size: 17px; line-height: 27px; }
	.rob .btn-p, .rob .btn-g { height: auto; min-height: 54px; padding-top: 14px; padding-bottom: 14px; justify-content: center; text-align: center; width: 100%; }
	.feat { margin-top: 32px; }
	.feat-img { flex-basis: 100%; min-height: 200px !important; }
	.feat-body { padding: 24px 20px; gap: 16px; }
	.rob .h3 { font-size: 28px; }
	.ds > div { padding: 10px 0; }
	.ds dd { font-size: 15px; line-height: 22px; }
	.bn .txt { font-size: 15px; line-height: 24px; }
	.ba { grid-template-columns: 1fr auto 1fr 1fr; gap: 10px; }
	.ba .v { font-size: 20px; }
	.ba .u { font-size: 12px; line-height: 16px; }
	.film-btn { left: 12px; bottom: 12px; }
	#ldc .bu { padding: 8px !important; }
	.bu-co b { display: none; }
	.phase-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
	.phase-row li { font-size: 13px; line-height: 18px; padding-top: 10px; }
	.phase-row .lbl { font-size: 10px; line-height: 14px; margin-bottom: 4px; }
	.cta-strip { margin-top: 32px; padding: 24px 20px; }
	.cta-strip > div > .lbl { display: none; }
}
