/* TECH3DS sections: hero, showcase wall, service cards, process, bento portfolio, testimonials, CTA band.
 * Classes are also usable on Elementor containers via "CSS Classes". */

/* Elementor containers: keep content on the brand grid */
.elementor-section.elementor-section-boxed > .elementor-container, .e-con-boxed > .e-con-inner { max-width: var(--max-w); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; padding-block: clamp(3rem, 1.5rem + 7vw, 8rem) clamp(3rem, 2rem + 5vw, 6rem); background: var(--grid-blueprint), var(--bg); }
.hero::after { content: ""; position: absolute; inset: auto -20% -40% 35%; height: 80%; background: radial-gradient(closest-side, rgba(225, 6, 0, 0.32), transparent 70%); filter: blur(40px); pointer-events: none; }
.hero__grid { display: grid; gap: var(--space-12); grid-template-columns: 1.15fr 0.85fr; align-items: center; position: relative; z-index: 1; }
@media (max-width: 899px) { .hero__grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: var(--space-6); }
.hero h1 .accent { color: var(--accent-text); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.hero__pillars { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-6); padding: 0; list-style: none; font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.hero__pillars li::before { content: "▸ "; color: var(--accent-text); }
.hero__visual { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero__visual img { width: 78%; filter: drop-shadow(0 30px 60px rgba(225, 6, 0, 0.35)); animation: hero-float 9s ease-in-out infinite; }
@keyframes hero-float { 50% { transform: translateY(-14px) rotate(-1.5deg); } }
.hero__ring { position: absolute; inset: 6%; border: 1px dashed rgba(58, 123, 255, 0.35); border-radius: 50%; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- Section heads ---------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-12); }
.sec-head > div { max-width: 46rem; }
.sec-head p { color: var(--text-muted); margin: 0; }

/* ---------- Showcase Wall (moving rows, D7) ---------- */
.showcase { position: relative; display: grid; gap: var(--space-4); padding-block: var(--space-4); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.showcase__row { overflow: hidden; }
.showcase__track { display: flex; gap: var(--space-4); width: max-content; animation: marquee var(--dur, 60s) linear infinite; }
.showcase__row.is-reverse .showcase__track { animation-direction: reverse; }
.showcase__dupe { display: contents; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--space-4) / 2)); } }
.showcase.is-paused .showcase__track, .showcase.is-offscreen .showcase__track, .showcase__row.is-held .showcase__track { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) { .showcase:hover .showcase__track, .showcase:focus-within .showcase__track { animation-play-state: paused; } }
/* Touch: the rows keep moving (owner, 2026-11-17); press and hold a row to stop it, swipe works as usual. */
@media (hover: none) { .showcase__card { width: min(62vw, 260px); } .showcase__pause { top: calc(-1 * var(--space-12) + 4px); } }
.showcase__card { position: relative; flex: 0 0 auto; width: clamp(200px, 22vw, 300px); aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.showcase__card img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.showcase__cap { position: absolute; inset: auto 0 0; display: grid; gap: 2px; padding: var(--space-6) var(--space-4) var(--space-4); background: linear-gradient(transparent, rgba(10, 10, 11, 0.9)); color: var(--white); }
.showcase__title { font-weight: 600; font-size: 0.9375rem; }
.showcase__spec { font-size: 0.75rem; color: var(--steel-200); opacity: 0.85; }
@media (hover: hover) and (pointer: fine) {
	.showcase__spec { opacity: 0; transform: translateY(6px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
	.showcase__card:hover img { transform: scale(1.06); }
	.showcase__card:hover .showcase__spec { opacity: 1; transform: none; }
}
.showcase__pause { position: absolute; z-index: 2; right: var(--gutter); top: calc(-1 * var(--space-12)); display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; background: var(--surface); color: var(--heading); border: 1px solid var(--line); border-radius: 999px; font: 500 0.8125rem var(--font-body); cursor: pointer; }
.showcase__pause-icon { width: 10px; height: 12px; border-inline: 3px solid currentColor; box-sizing: border-box; }
.showcase.is-paused .showcase__pause-icon { border: 0; border-left: 10px solid currentColor; border-block: 6px solid transparent; }
/* Reduced motion: static rows with native swipe and snap */
@media (prefers-reduced-motion: reduce) {
	.showcase { mask-image: none; }
	.showcase__row { overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding-inline: var(--gutter); }
	.showcase__row::-webkit-scrollbar { display: none; }
	.showcase__track { animation: none; }
	.showcase__dupe { display: none; }
	.showcase__card { scroll-snap-align: start; width: min(70vw, 280px); }
	.showcase__pause { display: none; }
}

/* ---------- Service cards ---------- */
.svc-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-8) var(--space-6); min-height: 300px; background: linear-gradient(160deg, var(--carbon-800), var(--carbon-900)); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--text); text-decoration: none; overflow: hidden; }
.svc-card:hover { color: var(--text); border-color: rgba(225, 6, 0, 0.6); }
.svc-card h3 { margin: var(--space-4) 0 0; }
.svc-card p { color: var(--text-muted); margin: 0; flex: 1; }
.svc-card__num { position: absolute; top: var(--space-6); right: var(--space-6); color: var(--text-muted); font-size: 0.8125rem; }
.svc-card__more { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-text); font-weight: 600; font-size: 0.9375rem; }
/* Core services (first two) get the big cards; the rest sit below, compact. */
@media (min-width: 1101px) { .svc-card { grid-column: span 2; } .svc-card:not(.svc-card--main) { min-height: 220px; } }
.svc-card--main { min-height: 340px; border-color: rgba(225, 6, 0, 0.35); background: radial-gradient(80% 70% at 100% 0%, rgba(225, 6, 0, 0.16), transparent 70%), linear-gradient(160deg, var(--carbon-800), var(--carbon-900)); }
.svc-card--main h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.svc-card__tag { align-self: flex-start; padding: 4px 10px; border: 1px solid rgba(225, 6, 0, 0.5); border-radius: 999px; color: var(--accent-text); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.svc-card__more svg { width: 18px; transition: transform var(--dur) var(--ease-out); }
.svc-card:hover .svc-card__more svg { transform: translateX(4px); }
.svc-card__icon { width: 48px; height: 48px; border-radius: 12px; border: 1px solid rgba(225, 6, 0, 0.5); background: rgba(225, 6, 0, 0.08) center / 26px no-repeat; }
.svc-card__icon--cube { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF2A1F' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M12 2 3 7v10l9 5 9-5V7z'/%3E%3Cpath d='m3 7 9 5 9-5M12 12v10'/%3E%3C/svg%3E"); }
.svc-card__icon--gear { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF2A1F' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1'/%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3C/svg%3E"); }
.svc-card__icon--chip { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF2A1F' stroke-width='1.6'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3Cpath d='M9 2v4M15 2v4M9 18v4M15 18v4M2 9h4M2 15h4M18 9h4M18 15h4'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }
.svc-card__icon--code { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF2A1F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 7-5 5 5 5M16 7l5 5-5 5'/%3E%3C/svg%3E"); }

/* ---------- Process timeline ---------- */
.process { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-6); list-style: none; margin: 0; padding: 0; counter-reset: none; }
.process__line { position: absolute; top: 22px; left: 22px; right: 22px; width: calc(100% - 44px); height: 4px; overflow: visible; }
.process__line path { stroke: var(--brand-red); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.process__step { position: relative; }
.process__dot { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--carbon-900); border: 1.5px solid var(--brand-red); color: var(--white); font-size: 0.8125rem; margin-bottom: var(--space-4); position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--bg); }
.process h3 { font-size: 1.125rem; margin-bottom: var(--space-2); }
.process p { color: var(--text-muted); font-size: 0.9375rem; margin: 0; }
@media (max-width: 899px) {
	.process { grid-template-columns: 1fr; gap: var(--space-8); padding-left: 64px; }
	.process__line { display: none; } /* the CSS `d` property isn't reliable in Safari; use a plain rule instead */
	.process::before { content: ""; position: absolute; left: 21px; top: 16px; bottom: 16px; width: 2px; background: linear-gradient(var(--brand-red), rgba(225, 6, 0, 0.15)); }
	.process__dot { position: absolute; left: -64px; top: -6px; }
}

/* ---------- Bento portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-8); }
.filters__btn { min-height: var(--tap); padding: 0 18px; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--text); font: 500 0.9375rem var(--font-body); cursor: pointer; }
.filters__btn.is-on { background: var(--white); color: var(--ink); border-color: var(--white); }
.bento { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(260px, auto); }
@media (max-width: 899px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .bento { grid-template-columns: 1fr; } }
.bento__item { position: relative; display: flex; flex-direction: column; justify-content: end; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--white); text-decoration: none; min-height: 300px; }
.bento__item.is-wide { grid-column: span 2; grid-row: span 2; }
@media (max-width: 599px) { .bento__item.is-wide { grid-column: auto; grid-row: auto; } }
.bento__img { position: absolute; inset: 0; }
.bento__img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.bento__item:hover .bento__img img { transform: scale(1.05); }
.bento__body { position: relative; display: grid; gap: 6px; padding: var(--space-6); background: linear-gradient(transparent, rgba(10, 10, 11, 0.92) 45%); }
.bento__body h3 { margin: 0; font-size: 1.25rem; }
.bento__item:hover { color: var(--white); }
.tag { justify-self: start; font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; background: rgba(225, 6, 0, 0.18); color: var(--brand-red-bright); border: 1px solid rgba(225, 6, 0, 0.4); }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: var(--fs-mono); }
.spec-table th, .spec-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { color: var(--text-muted); font-weight: 400; width: 38%; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; }
.spec-table td { color: var(--heading); }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-auto-flow: column; grid-auto-columns: min(85%, 460px); gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: var(--space-4); }
.quote { scroll-snap-align: start; margin: 0; padding: var(--space-8); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.quote blockquote { margin: 0 0 var(--space-6); font-size: 1.125rem; color: var(--heading); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: clip; border-radius: var(--radius-lg); padding: clamp(2rem, 1rem + 5vw, 5rem); background: radial-gradient(80% 120% at 100% 0%, rgba(225, 6, 0, 0.45), transparent 60%), linear-gradient(135deg, #1a0706, var(--carbon-900)); border: 1px solid rgba(225, 6, 0, 0.35); }
.cta-band h2 { max-width: 18ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* ---------- Single project & generic page content ---------- */
.prose { max-width: 72ch; }
.prose img { border-radius: var(--radius); }
.page-hero { padding-block: clamp(3rem, 2rem + 4vw, 6rem) var(--space-8); background: var(--grid-blueprint), var(--bg); border-bottom: 1px solid var(--line); }
.page-hero .lead { color: var(--text-muted); }
.psr { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, 1fr); margin-block: var(--space-8); }
@media (max-width: 799px) { .psr { grid-template-columns: 1fr; } }
.psr > div { padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.psr h3 { font-size: 0.875rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-text); }
.notice-sample { display: inline-block; font: 600 0.75rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: #111; background: var(--warning); padding: 3px 8px; border-radius: 4px; }

/* Hide motion targets until GSAP runs (no flash), unless motion is off. */
.motion-ready:not(.motion-off) .reveal-lines { visibility: visible; }

/* Elementor widgets that hold a full-width block but should sit on the content grid */
.in-container { width: min(100% - 2 * var(--gutter), var(--max-w)); margin-inline: auto; }
.elementor-widget-shortcode.in-container .showcase { margin-inline: calc(-1 * var(--gutter)); }
.hero .elementor-widget-html, .section .elementor-widget-html { width: 100%; }

/* Hello Elementor default page template (non-Elementor pages) */
.site-main > .page-header { width: auto; margin: 0 0 var(--space-12); padding: clamp(3rem, 2rem + 4vw, 6rem) max(var(--gutter), calc((100% - var(--max-w)) / 2)) var(--space-8); background: var(--grid-blueprint), var(--bg); border-bottom: 1px solid var(--line); }
.site-main > .page-header .entry-title { margin: 0; max-width: 22ch; }
.page-content > * + * { margin-top: var(--space-6); }
.page-content .lead { max-width: 65ch; }

/* ---------- Touch equivalents of hover effects (owner, 2026-11-17) ----------
   Phones get the same feedback as a mouse: the card nearest the middle of the screen lights up
   (motion.js adds .is-inview), and every card and button reacts to a press. */
@media (hover: none) {
	.glow-hover.is-inview, .svc-card.is-inview, .bento__item.is-inview, .prod-card.is-inview { border-color: rgba(225, 6, 0, 0.6); box-shadow: var(--glow-red); }
	.bento__item.is-inview .bento__img img, .prod-card.is-inview .prod-card__img img { transform: scale(1.05); }
	.svc-card.is-inview .svc-card__more svg { transform: translateX(4px); }
	.glow-hover, .svc-card, .bento__item, .prod-card, .showcase__card, .btn { transition: transform 160ms var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); -webkit-tap-highlight-color: transparent; }
	.glow-hover:active, .svc-card:active, .bento__item:active, .prod-card:active, .showcase__card:active { transform: scale(0.98); }
	.btn:active { transform: scale(0.96); }
}

/* ---------- Featured case study [stech_case] + case-study page blocks ---------- */
.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; padding: clamp(1.5rem, 1rem + 3vw, 3.5rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: radial-gradient(70% 80% at 85% 30%, rgba(225, 6, 0, 0.16), transparent 70%), var(--grid-blueprint), var(--carbon-900); overflow: hidden; }
@media (max-width: 899px) { .case { grid-template-columns: 1fr; } }
.case__text { display: grid; gap: var(--space-4); align-content: start; }
.case__text h2 { margin: 0; }
.case__text .lead { margin: 0; }
.case__stats { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case__stats li { display: grid; gap: 2px; padding: 14px 16px; background: var(--carbon-950); }
.case__stats strong { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); color: var(--white); font-weight: 600; line-height: 1.1; }
.case__stats span { font-size: 0.8125rem; color: var(--text-muted); }
.case__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.case__chips li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.75rem; color: var(--steel-200); background: rgba(255, 255, 255, 0.03); }
.case__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.case__devices { position: relative; padding: 0 clamp(1.5rem, 6%, 3rem) clamp(2rem, 8%, 4rem) 0; }
.case__browser { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); background: #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4); }
.case__bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--carbon-800); }
.case__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--carbon-700); }
.case__bar span { margin-left: 10px; padding: 2px 12px; border-radius: 6px; background: var(--carbon-900); color: var(--text-muted); font-size: 0.6875rem; }
.case__shot { display: block; width: 100%; height: auto; }
.case__phone { position: absolute; right: 0; bottom: 0; width: clamp(110px, 30%, 210px); padding: 7px; border-radius: 28px; background: #0b0b0c; border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9); }
.case__phone .case__shot { border-radius: 21px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }

.eco-grid { list-style: none; margin: var(--space-6) 0; padding: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.eco-grid li { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, var(--carbon-800), var(--carbon-900)); }
.eco-grid strong { color: var(--white); font-family: var(--font-heading); font-size: 1.0625rem; }
.eco-grid span { font-size: 0.875rem; color: var(--text-muted); }
.eco-grid .mono { font-size: 0.6875rem; color: var(--accent-text); letter-spacing: 0.08em; text-transform: uppercase; }
.eco-hub { border-color: rgba(225, 6, 0, 0.5) !important; background: radial-gradient(90% 90% at 100% 0%, rgba(225, 6, 0, 0.18), transparent 70%), var(--carbon-900) !important; }
