/* ==========================================================================
   ATO public website — section polish + animated hero grids (v1.3.0)
   Loads after the ato-corporate theme on all screen sizes.
   ========================================================================== */

/* The theme's `html, body { overflow-x: hidden }` silently disables the sticky
   header on every screen size; `clip` prevents sideways scroll without that bug. */
html, body { overflow-x: clip !important; }

/* ---------- Animated hero grid ---------- */
.hero, .page-hero, .svc-hero { isolation: isolate; }
.ato-hero-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.ato-hero-fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .ato-hero-fx { -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 100%); mask-image: linear-gradient(180deg, #000 35%, transparent 100%); }

/* Scanning beam: a brighter copy of the grid, revealed by a moving band */
.ato-hero-scan {
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(6, 214, 160, .22) 1px, transparent 1px),
		linear-gradient(90deg, rgba(6, 214, 160, .22) 1px, transparent 1px);
	background-size: 46px 46px;
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 50%, transparent 100%);
	mask-image: linear-gradient(180deg, transparent 0%, #000 50%, transparent 100%);
	-webkit-mask-size: 100% 220px; mask-size: 100% 220px;
	-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
	animation: atoScan 9s cubic-bezier(.45, 0, .55, 1) infinite;
	opacity: .55;
}
@keyframes atoScan {
	0%   { -webkit-mask-position: 0 -240px; mask-position: 0 -240px; }
	100% { -webkit-mask-position: 0 calc(100% + 240px); mask-position: 0 calc(100% + 240px); }
}

/* Pointer spotlight (mouse / trackpad only) */
.ato-hero-spot {
	position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease;
	background-image:
		linear-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px);
	background-size: 46px 46px;
	-webkit-mask-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 70%);
	mask-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 70%);
}
.ato-hero-hover .ato-hero-spot { opacity: 1; }

/* Ambient glow that slowly drifts */
.ato-hero-glow {
	position: absolute; width: 640px; height: 640px; left: 55%; top: -30%;
	background: radial-gradient(circle, rgba(6, 214, 160, .14), transparent 65%);
	filter: blur(10px); animation: atoGlow 18s ease-in-out infinite alternate;
}
@keyframes atoGlow {
	0%   { transform: translate(0, 0) scale(1); }
	50%  { transform: translate(-18%, 22%) scale(1.15); }
	100% { transform: translate(10%, 8%) scale(.95); }
}

/* ---------- Two-column service sections ---------- */
.svc-two { gap: clamp(36px, 6vw, 84px) !important; align-items: start; }
.svc-two h2 { letter-spacing: -.02em; }
.svc-two > div:last-child { position: sticky; top: 120px; }
.admin-bar .svc-two > div:last-child { top: 152px; }

/* Outcomes — feature cards */
.svc-outcomes {
	display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
	counter-reset: atoOut; margin-top: 8px;
}
.svc-outcomes > div {
	position: relative; overflow: hidden; counter-increment: atoOut;
	display: flex !important; flex-direction: column; align-items: flex-start; gap: 16px;
	padding: 22px 20px 22px !important; margin: 0 !important;
	background: #fff !important; border: 1px solid var(--ato-line); border-radius: 18px !important;
	box-shadow: 0 1px 2px rgba(1, 38, 27, .04), 0 6px 18px rgba(1, 38, 27, .04);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
}
.svc-outcomes > div::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
	background: linear-gradient(90deg, var(--ato-mint), var(--ato-600));
	transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.svc-outcomes > div::after {
	content: counter(atoOut, decimal-leading-zero);
	position: absolute; top: 18px; right: 18px;
	font: 600 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; color: #a7b7b0;
}
.svc-outcomes > div > svg {
	box-sizing: border-box; flex: none; width: 44px !important; height: 44px !important; padding: 11px; margin: 0 !important;
	border-radius: 13px; color: var(--ato-700);
	background: linear-gradient(135deg, rgba(6, 214, 160, .22), rgba(10, 138, 99, .08));
	box-shadow: inset 0 0 0 1px rgba(6, 214, 160, .25);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), background .35s, color .35s;
}
.svc-outcomes > div > span {
	font-family: var(--ato-font-head); font-weight: 700; font-size: 1.02rem; line-height: 1.4; color: var(--ato-ink);
	padding-right: 18px;
}
@media (hover: hover) {
	.svc-outcomes > div:hover {
		transform: translateY(-4px); border-color: rgba(6, 214, 160, .45);
		box-shadow: 0 2px 4px rgba(1, 38, 27, .04), 0 18px 40px rgba(1, 38, 27, .1);
	}
	.svc-outcomes > div:hover::before { transform: scaleX(1); }
	.svc-outcomes > div:hover > svg { transform: rotate(-6deg) scale(1.06); background: var(--ato-800); color: var(--ato-mint); }
}
/* Staggered entrance when the theme's .reveal fires */
.reveal .svc-outcomes > div, .reveal .svc-steps > li {
	opacity: 0; transform: translateY(14px);
	transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
	transition-delay: calc(var(--ato-i, 0) * 80ms + 120ms);
}
.reveal.in .svc-outcomes > div, .reveal.in .svc-steps > li { opacity: 1; transform: none; }
/* After the entrance has played, hover reacts instantly */
.reveal.ato-done .svc-outcomes > div, .reveal.ato-done .svc-steps > li { transition-delay: 0s; }
@media (hover: hover) { .reveal.in .svc-outcomes > div:hover { transform: translateY(-4px); } }

/* "How we deliver" heading */
.svc-two h3 {
	display: flex; align-items: center; gap: 12px;
	margin-top: 44px !important; margin-bottom: 24px; font-size: 1.3rem; letter-spacing: -.01em;
}
.svc-two h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ato-line), transparent); }

/* Steps — vertical timeline */
.svc-steps { list-style: none !important; counter-reset: atoStep; padding: 0 !important; margin: 0 !important; }
.svc-steps > li {
	position: relative; counter-increment: atoStep;
	padding: 0 0 28px 66px !important; margin: 0 !important; min-height: 46px;
	color: var(--ato-muted); line-height: 1.65;
}
.svc-steps > li::marker { content: none; }
.svc-steps > li::before {
	content: counter(atoStep, decimal-leading-zero);
	position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 14px;
	display: grid; place-items: center;
	font: 800 .9rem/1 var(--ato-font-head); letter-spacing: .02em; color: #fff;
	background: linear-gradient(140deg, var(--ato-700), var(--ato-950));
	box-shadow: 0 10px 22px rgba(2, 68, 48, .22), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.svc-steps > li::after {
	content: ""; position: absolute; left: 22px; top: 54px; bottom: 6px; width: 2px; border-radius: 2px;
	background: linear-gradient(180deg, rgba(6, 214, 160, .55), rgba(6, 214, 160, .08));
}
.svc-steps > li:last-child { padding-bottom: 0 !important; }
.svc-steps > li:last-child::after { display: none; }
.svc-steps > li > strong {
	display: block; margin: 1px 0 4px; font-family: var(--ato-font-head); font-size: 1.08rem; font-weight: 800; color: var(--ato-ink);
}
.svc-steps .ato-step-d { display: block; }
@media (hover: hover) {
	.svc-steps > li::before { transition: transform .3s cubic-bezier(.2, .8, .2, 1), background .3s; }
	.svc-steps > li:hover::before { transform: scale(1.06); background: linear-gradient(140deg, var(--ato-mint), var(--ato-700)); }
}

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: 12px; margin-top: 8px; interpolate-size: allow-keywords; }
.faq details {
	position: relative; margin: 0 !important; padding: 0 !important;
	background: #fff; border: 1px solid var(--ato-line) !important; border-radius: 18px !important;
	box-shadow: 0 1px 2px rgba(1, 38, 27, .04);
	transition: border-color .3s, box-shadow .3s, background .3s;
}
.faq details::before {
	content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0;
	background: var(--ato-mint); transform: scaleY(0); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.faq details[open] { border-color: rgba(6, 214, 160, .5) !important; box-shadow: 0 16px 40px rgba(1, 38, 27, .09); }
.faq details[open]::before { transform: scaleY(1); }
@media (hover: hover) { .faq details:not([open]):hover { border-color: rgba(6, 214, 160, .35) !important; box-shadow: 0 8px 24px rgba(1, 38, 27, .06); } }

.faq summary {
	list-style: none; cursor: pointer; position: relative;
	display: flex !important; align-items: center; gap: 16px;
	padding: 20px 20px 20px 24px !important; margin: 0 !important;
	font-family: var(--ato-font-head); font-weight: 700; font-size: 1.02rem; line-height: 1.4; color: var(--ato-ink);
	border-radius: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 2px solid var(--ato-mint); outline-offset: 2px; }
.faq summary::after, .faq details[open] summary::after {
	content: "+" !important; position: static !important; flex: none; margin-left: auto;
	width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
	font: 400 1.35rem/1 var(--ato-font) !important; color: var(--ato-700) !important;
	background: rgba(6, 214, 160, .12);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), background .3s, color .3s;
}
.faq details[open] summary::after { transform: rotate(135deg); background: var(--ato-800); color: #fff !important; }
.faq details p { margin: 0 !important; padding: 0 24px 22px !important; color: var(--ato-muted); line-height: 1.7; }

/* Smooth open/close where supported (Chrome 131+); others open instantly */
.faq details::details-content {
	block-size: 0; overflow: clip;
	transition: block-size .35s cubic-bezier(.2, .8, .2, 1), content-visibility .35s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* "Still have questions?" card added under the FAQ */
.ato-faq-cta {
	position: relative; overflow: hidden; margin-top: 18px; padding: 24px;
	display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center;
	border-radius: 20px; color: rgba(255, 255, 255, .78);
	background: radial-gradient(400px 200px at 100% 0%, rgba(6, 214, 160, .22), transparent 70%), linear-gradient(150deg, var(--ato-950), var(--ato-800));
}
.ato-faq-cta::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 23px 23px;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000);
}
.ato-faq-cta > * { position: relative; }
.ato-faq-cta-ic {
	grid-row: span 2; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
	background: rgba(6, 214, 160, .16); color: var(--ato-mint); box-shadow: inset 0 0 0 1px rgba(6, 214, 160, .3);
}
.ato-faq-cta-ic svg { width: 22px; height: 22px; }
.ato-faq-cta strong { color: #fff; font-family: var(--ato-font-head); font-size: 1.08rem; }
.ato-faq-cta p { margin: 0; font-size: .92rem; }
.ato-faq-cta a {
	grid-column: 1 / -1; justify-self: start; margin-top: 12px;
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 12px;
	background: var(--ato-mint); color: var(--ato-950) !important; font-family: var(--ato-font-head); font-weight: 800; font-size: .95rem;
	text-decoration: none !important; transition: transform .25s, box-shadow .25s, background .25s;
}
.ato-faq-cta a svg { width: 16px; height: 16px; transition: transform .25s; }
@media (hover: hover) {
	.ato-faq-cta a:hover { background: #2ee3b3; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(6, 214, 160, .3); }
	.ato-faq-cta a:hover svg { transform: translateX(3px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.svc-two > div:last-child { position: static; }
}
@media (max-width: 560px) {
	.svc-outcomes { grid-template-columns: 1fr; gap: 10px; }
	.svc-outcomes > div { flex-direction: row !important; align-items: center; gap: 14px; padding: 16px 16px !important; border-radius: 16px !important; }
	.svc-outcomes > div::after { top: 50%; transform: translateY(-50%); right: 14px; }
	.svc-outcomes > div > span { padding-right: 26px; font-size: .98rem; }
	.svc-steps > li { padding-left: 58px !important; }
	.svc-steps > li::before { width: 40px; height: 40px; border-radius: 12px; }
	.svc-steps > li::after { left: 19px; top: 48px; }
	.faq summary { padding: 17px 16px 17px 18px !important; font-size: .98rem; }
	.faq details p { padding: 0 18px 18px !important; }
	.ato-faq-cta { padding: 20px; }
	.ato-hero-spot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ato-hero-scan, .ato-hero-glow { animation: none !important; }
	.ato-hero-scan { display: none; }
	.reveal .svc-outcomes > div, .reveal .svc-steps > li { opacity: 1 !important; transform: none !important; transition: none !important; }
	.faq details::details-content { transition: none; }
}
