/*
 * main.css: Shared responsive theme and component styles for the ATISTAT site.
 * Sections: foundations, navigation, selected projects, timeline, services, gallery, contacts, and footer.
 */

@font-face {
	font-family: "Bookman Cyr";
	src: url("../fonts/bookman-cyr.woff2") format("woff2"),
	     url("../fonts/bookman-cyr-fixed.ttf") format("truetype");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--green: #538135;
	--green-d: #456a2c;
	--ink: #30372c;
	--muted: #6a6f61;
	/* Deep project orange — building-type emphasis with 5.45:1 contrast on the cream card surface. */
	--project-accent: #a24600;
	--cream: #f4f1e9;
	--paper: #faf8f2;
	--line: rgba(48, 55, 44, .14);
	--pill: #e8e1cf;
	--maxw: 1240px;
	--serif: "Bookman Cyr", "Bookman Old Style", Georgia, "Times New Roman", serif;
	--gutter: clamp(20px, 5vw, 64px);
	--split-gap: clamp(28px, 5vw, 72px);
	--ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--serif);
	font-size: clamp(16px, 1.05vw, 18px);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.15; font-weight: 700; margin: 0; }
p { margin: 0 0 1.1em; }

.at-container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* clear the sticky header when jumping to an anchor */
.at-section, .at-hero, [id] { scroll-margin-top: 104px; }

.at-skip {
	position: absolute; left: -9999px; top: 0; background: var(--green); color: #fff;
	padding: 10px 16px; z-index: 200; border-radius: 0 0 6px 0;
}
.at-skip:focus { left: 0; }

.at-icon { width: 1.25em; height: 1.25em; }

/* ---------- headings / shared ---------- */
.at-h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--green); letter-spacing: .02em; }
.at-h3 { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--green); margin: 1.6em 0 .4em; }
.at-rule { display: block; width: 54px; height: 3px; background: var(--green); margin: 14px 0 26px; border-radius: 2px; }
.at-lead { font-size: 1.05em; color: var(--ink); max-width: 62ch; }
.at-section { padding-block: clamp(56px, 8vw, 110px); }
.at-section p { color: var(--muted); }

/* ---------- buttons ---------- */
.at-btn {
	display: inline-flex; align-items: center; gap: .5em;
	background: var(--green); color: #fff; padding: .72em 1.4em; border-radius: 4px;
	font-weight: 700; letter-spacing: .01em; transition: background .25s var(--ease), transform .25s var(--ease);
}
.at-btn:hover { background: var(--green-d); transform: translateY(-2px); }
.at-btn__icon { width: 1.1em; height: 1.1em; }
.at-btn--ghost { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.at-btn--ghost:hover { background: var(--green); color: #fff; }

/* =========================================================================
   HEADER
   ========================================================================= */
.at-header {
	position: sticky; top: 0; z-index: 100;
	background: color-mix(in srgb, var(--cream) 92%, transparent);
	backdrop-filter: saturate(1.1) blur(8px);
	border-bottom: 1px solid var(--line);
}
.at-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.at-logo { display: block; flex: 0 0 auto; }
.at-logo svg,
.at-logo__image { display: block; height: 52px; width: auto; max-width: min(260px, 42vw); object-fit: contain; }
.at-logo__text { font-weight: 700; font-size: 1.7rem; color: var(--green); }

.at-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); }
.at-nav__list { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 38px); list-style: none; margin: 0; padding: 0; }
.at-nav__link {
	position: relative; font-size: .96rem; letter-spacing: .07em; color: var(--ink);
	padding: 8px 2px; transition: color .2s var(--ease);
}
.at-nav__link::after {
	content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
	background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease);
}
.at-nav__link:hover { color: var(--green); }
.at-nav__link:hover::after { transform: scaleX(1); }

.at-lang { display: flex; align-items: center; gap: 8px; padding-left: clamp(6px, 1.6vw, 22px); border-left: 1px solid var(--line); }
.at-lang__opt { font-size: .92rem; letter-spacing: .08em; color: var(--muted); padding: 4px 2px; transition: color .2s; }
.at-lang__opt.is-active, .at-lang__opt:hover { color: var(--green); font-weight: 700; }
.at-lang__sep { color: var(--line); }

.at-navtoggle { display: none; background: none; border: 0; color: var(--ink); padding: 8px; }
.at-navtoggle svg { width: 30px; height: 30px; }
.at-navtoggle__close { display: none; }

/* =========================================================================
   SKETCH (blueprint reveal)
   ========================================================================= */
.at-sketch { display: block; position: relative; }
.at-sketch__frame {
	display: block; position: relative; overflow: hidden; border-radius: 6px;
	background: transparent;
}
/* multiply blends the sketch's near-white background into the page colour;
   the gradient mask feathers the artwork's hard rectangular edges so the
   drawing dissolves softly into the page instead of ending in an abrupt cut */
.at-sketch__img {
	width: 100%; height: auto; mix-blend-mode: multiply; transition: transform .9s var(--ease);
	--fade: 7%;
	-webkit-mask-image:
		linear-gradient(to right,  transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
		linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
	-webkit-mask-composite: source-in;
	mask-image:
		linear-gradient(to right,  transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%),
		linear-gradient(to bottom, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
	mask-composite: intersect;
}

.at-sketch__cap {
	display: block; margin-top: 14px; font-size: .95rem; color: var(--muted); letter-spacing: .01em;
}
.at-sketch__cap > span:first-child {
	color: var(--ink);
	font-size: 1.2em;
	font-weight: 700;
	line-height: 1.35;
}
.at-sketch__caplabel { color: var(--green); font-weight: 700; }
a.at-sketch:hover .at-sketch__cap { color: var(--ink); }

/* subtle, colourless hover lift */
.at-sketch.is-hot .at-sketch__img,
.at-sketch:hover .at-sketch__img { transform: scale(1.03); }

/* No white flash: an opacity (scroll-fade) or filter ancestor isolates the
   multiply blend, which would otherwise blend the sketch's paper against white.
   Painting the section colour behind the sketch keeps the blend correct at all
   times — during the fade-in and after. */
.at-hero__art,
.at-about__art { background-color: var(--cream); }

/* =========================================================================
   HERO
   ========================================================================= */
.at-hero { padding-block: clamp(30px, 5vw, 60px) clamp(40px, 6vw, 80px); }
.at-hero__inner {
	display: grid; grid-template-columns: minmax(min-content, 0.6fr) minmax(0, 1.4fr); align-items: center; gap: clamp(12px, 1.6vw, 26px);
	min-height: min(78vh, 760px);
}
.at-hero__text { min-width: 0; }
.at-hero__title { font-size: clamp(2.5rem, 3.5vw, 4rem); font-weight: 400; letter-spacing: .005em; }
.at-hero__title span { display: block; }
.at-hero__title .at-accent { color: var(--green); }
.at-accent { color: var(--green); }
.at-hero__art { position: relative; }
.at-hero .at-sketch__cap { text-align: right; }

/* Full-bleed hero image to the right screen edge (keeps title + caption in place) */
:root { --bleed: calc(var(--gutter) + max(0px, (100vw - var(--maxw)) / 2)); }
.at-hero__art { width: calc(100% + var(--bleed)); margin-right: calc(-1 * var(--bleed)); }
.at-hero__art .at-sketch__cap { margin-right: var(--bleed); }
@media (min-width: 861px) {
	/* Keep the right-edge anchor while reducing the displayed hero artwork by 15%. */
	.at-hero .at-sketch { width: 85%; margin-left: auto; }
	/* Keep the left-edge bleed while opening space before the About copy. */
	.at-about .at-sketch { width: 92%; margin-right: auto; }
}

/* =========================================================================
   ABOUT
   ========================================================================= */
.at-about__inner { --split-gap: clamp(12px, 1.6vw, 22px); display: grid; grid-template-columns: calc(50% - var(--split-gap)) 50%; gap: var(--split-gap); align-items: center; }
/* Full-bleed About image to the left screen edge (keeps text + caption in place) */
.at-about__art { width: calc(100% + var(--bleed)); margin-left: calc(-1 * var(--bleed)); }
.at-about__art .at-sketch__cap { margin-left: var(--bleed); }
.at-about__point { padding-top: .25rem; }
.at-about__point + .at-about__point { margin-top: 1.15rem; }
.at-about__point h3 {
	margin: 0 0 .35rem; color: var(--green); font-size: .92rem;
	letter-spacing: .06em;
}
.at-about__point p { margin-bottom: 0; }

/* =========================================================================
   EXPERIENCE — interactive home timeline
   ========================================================================= */
.at-opit { background: var(--paper); overflow: clip; }
.at-opit__head {
	display: grid; grid-template-columns: minmax(180px, .62fr) minmax(0, 1.38fr);
	gap: var(--split-gap); align-items: end; margin-bottom: clamp(34px, 5vw, 64px);
}
.at-opit__head .at-rule { margin-bottom: 0; }
.at-opit__headcopy { border-left: 1px solid var(--line); padding-left: clamp(24px, 3vw, 44px); }
.at-opit__journey {
	display: block; margin-bottom: 8px; color: var(--green); font-size: .78rem;
	font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.at-opit__headcopy .at-lead { margin-bottom: 0; font-size: clamp(1.05rem, 1.5vw, 1.25rem); }

/* =========================================================================
   SELECTED PROJECTS — seven attributed project cards before the complete timeline
   ========================================================================= */

.at-flagship {
	/* Component tokens keep all cards visually equal and preserve a generous timeline handoff. */
	--flagship-card-gap: clamp(20px, 2.5vw, 32px);
	--flagship-card-radius: 18px;
	--flagship-card-padding: clamp(18px, 2vw, 24px);
	--flagship-control-size: 44px;
	margin-bottom: clamp(48px, 7vw, 88px);
}

.at-flagship__title,
.at-timeline__title {
	margin: 0 0 clamp(22px, 3vw, 34px);
	color: var(--green);
	font-size: clamp(1rem, 1.5vw, 1.2rem);
	letter-spacing: .12em;
	line-height: 1.25;
	text-transform: uppercase;
}

.at-flagship__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--flagship-card-gap);
	align-items: stretch;
}

.at-flagship__card {
	min-width: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: var(--flagship-card-radius);
	background: var(--cream);
	box-shadow: 0 18px 48px color-mix(in srgb, var(--ink) 7%, transparent);
}

/* Programmatic focus identifies the selected-project destination reached from in-page links. */
.at-flagship__card:focus {
	outline: 3px solid var(--green);
	outline-offset: 4px;
}

.at-flagship__image {
	width: 100%;
	height: auto;
	aspect-ratio: 8 / 5;
	object-fit: cover;
}

.at-flagship__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	padding: var(--flagship-card-padding);
}

.at-flagship__name {
	margin: 0;
	color: var(--ink);
	font-size: clamp(1.08rem, 1.7vw, 1.45rem);
	font-weight: 700;
	line-height: 1.25;
	text-wrap: balance;
}

.at-flagship__meta {
	display: grid;
	gap: 0;
	margin: 18px 0 20px;
	font-size: .84rem;
	line-height: 1.45;
}

.at-flagship__meta > div {
	display: grid;
	grid-template-columns: minmax(82px, .72fr) minmax(0, 1.28fr);
	gap: 12px;
	padding: 8px 0;
	border-top: 1px solid var(--line);
}

.at-flagship__meta > div:last-child { border-bottom: 1px solid var(--line); }
.at-flagship__meta dt { color: var(--muted); }
.at-flagship__meta dd { min-width: 0; margin: 0; color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }

.at-flagship__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	gap: 10px;
	min-width: var(--flagship-control-size);
	min-height: var(--flagship-control-size);
	padding: 9px 16px;
	border: 1.5px solid var(--green);
	border-radius: 999px;
	background: transparent;
	color: var(--green);
	font-size: .86rem;
	font-weight: 700;
	line-height: 1.2;
	/* A brief response confirms activation without competing with the project imagery. */
	transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}

.at-flagship__action-icon { font-size: 1.1em; line-height: 1; }

/* Pointer feedback combines fill and movement so the state is not color-only. */
.at-flagship__action:hover {
	background: var(--green);
	color: var(--paper);
	transform: translateY(-2px);
}

/* Keyboard focus remains outside the pill so it is visible against every card background. */
.at-flagship__action:focus-visible {
	outline: 3px solid var(--green);
	outline-offset: 3px;
}

.at-home-timeline {
	/* Timeline geometry is refreshed by JavaScript after initialization and resize. */
	--active-progress: 50%;
	--timeline-track-width: 100%;
	--timeline-progress-width: var(--active-progress);
	position: relative;
}
.at-tl-mobile,
.at-tl-responsive { display: none; }
.at-tl-hint {
	margin: 0 10px 10px; color: var(--muted); font-size: .84rem; font-style: italic;
	text-align: right; opacity: .72; transition: opacity .3s var(--ease);
}
.at-home-timeline.is-touched .at-tl-hint { opacity: 0; }
.at-tl-stage {
	/* Shared boundary metrics keep each arrow centered above its endpoint year at every desktop width. */
	--timeline-boundary-width: clamp(76px, 8vw, 110px);
	--timeline-boundary-center: clamp(38px, 4vw, 55px);
	--timeline-stage-padding-inline: clamp(18px, 2.5vw, 34px);
	--timeline-stage-padding-top: clamp(18px, 2.3vw, 28px);
	/* Half the 44px control target places each arrow directly below the stage's top padding. */
	--timeline-control-center-top: calc(var(--timeline-stage-padding-top) + 22px);
	position: relative; isolation: isolate; display: grid;
	grid-template-columns: var(--timeline-boundary-width) minmax(0, 1fr) var(--timeline-boundary-width);
	align-items: end; gap: clamp(12px, 1.8vw, 28px);
	padding: var(--timeline-stage-padding-top) var(--timeline-stage-padding-inline) 22px;
	border: 1px solid var(--line); border-radius: 24px;
	background:
		radial-gradient(circle at 50% 0, rgba(83, 129, 53, .075), transparent 42%),
		linear-gradient(180deg, rgba(255,255,255,.55), rgba(244,241,233,.74));
	box-shadow: 0 24px 70px rgba(48, 55, 44, .07);
}
.at-tl-stage::before {
	content: ""; position: absolute; z-index: -1; inset: 12px; border-radius: 16px;
	border: 1px solid rgba(83, 129, 53, .08); pointer-events: none;
}
.at-tl-year { text-align: center; padding-bottom: 38px; }
.at-tl-year strong { display: block; color: var(--green); font-size: clamp(16px, 1.5vw, 20px); line-height: 1; }
.at-tl-year small {
	display: block; max-width: 11ch; margin: 8px auto 0; color: var(--muted);
	font-size: clamp(9px, .7vw, 10px); line-height: 1.4; letter-spacing: .08em; text-transform: uppercase;
}

.at-tl-rail-shell { position: relative; min-width: 0; }
.at-tl-buildings {
	/* Five allocations plus four 1rem gaps fill the viewport while all 13 tabs remain scrollable. */
	--timeline-control-width: calc(20% - .8rem);
	position: relative; display: flex; align-items: flex-end;
	gap: 1rem; min-height: clamp(155px, 15vw, 205px); padding: 10px 0 38px;
	overflow-x: auto; overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	touch-action: pan-x pan-y;
	overscroll-behavior-inline: contain;
	scrollbar-color: var(--green) transparent;
}
/* Safari/iOS momentum scrolling keeps free swipe panning responsive on wide touch layouts. */
.at-tl-buildings { -webkit-overflow-scrolling: touch; }
/* Scrollbars disappear only after JavaScript validates the rail, controls, tabs, and panels. */
.at-home-timeline.is-timeline-enhanced .at-tl-buildings { scrollbar-width: none; }
/* Chromium and Safari scrollbar hiding mirrors the enhancement-gated Firefox rule above. */
.at-home-timeline.is-timeline-enhanced .at-tl-buildings::-webkit-scrollbar {
	display: none;
}
/* Thirteen controls retain equal allocations and settle at proximity snap positions. */
.at-tl-buildings > .at-tlb {
	flex: 0 0 var(--timeline-control-width);
	min-width: var(--timeline-control-width);
	scroll-snap-align: center;
	scroll-snap-stop: normal;
}
.at-tl-line,
.at-tl-progress { position: absolute; left: 0; bottom: 38px; height: 2px; pointer-events: none; }
.at-tl-line {
	width: var(--timeline-track-width);
	background: repeating-linear-gradient(90deg, var(--line) 0 9px, transparent 9px 17px);
}
.at-tl-progress {
	z-index: 1; width: var(--timeline-progress-width); max-width: var(--timeline-track-width); background: var(--green);
	box-shadow: 0 0 0 1px rgba(83, 129, 53, .08); transition: width .55s var(--ease);
}
.at-tlb {
	position: relative; z-index: 2; min-width: 0; align-self: stretch;
	display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px;
	padding: 8px 6px 0; color: var(--muted); background: none; border: 0; border-radius: 8px;
}
.at-tlb__img {
	width: 100%; height: clamp(105px, 10.5vw, 150px); display: flex; align-items: flex-end; justify-content: center;
	background: transparent; mix-blend-mode: multiply; filter: grayscale(.18); opacity: .66;
	transform-origin: center bottom;
	--timeline-fade: 6%;
	-webkit-mask-image:
		linear-gradient(to right, transparent 0, #000 var(--timeline-fade), #000 calc(100% - var(--timeline-fade)), transparent 100%),
		linear-gradient(to bottom, transparent 0, #000 var(--timeline-fade), #000 calc(100% - var(--timeline-fade)), transparent 100%);
	-webkit-mask-composite: source-in;
	mask-image:
		linear-gradient(to right, transparent 0, #000 var(--timeline-fade), #000 calc(100% - var(--timeline-fade)), transparent 100%),
		linear-gradient(to bottom, transparent 0, #000 var(--timeline-fade), #000 calc(100% - var(--timeline-fade)), transparent 100%);
	mask-composite: intersect;
	transition: transform .45s var(--ease), filter .45s var(--ease), opacity .45s var(--ease);
}
.at-tlb:nth-of-type(1) .at-tlb__img { height: clamp(126px, 12.5vw, 176px); }
.at-tlb:nth-of-type(2) .at-tlb__img { height: clamp(108px, 10.8vw, 155px); }
.at-tlb:nth-of-type(3) .at-tlb__img { height: clamp(105px, 10.5vw, 150px); }
.at-tlb:nth-of-type(4) .at-tlb__img { height: clamp(108px, 10.8vw, 155px); }
.at-tlb:nth-of-type(5) .at-tlb__img,
.at-tlb:nth-of-type(6) .at-tlb__img { height: clamp(99px, 10vw, 142px); }
.at-tlb__img img {
	width: auto; max-width: 100%; height: 100%; object-fit: contain; object-position: center bottom;
	mix-blend-mode: normal; transition: height .45s var(--ease);
}
.at-tlb__year { font-size: .8rem; font-weight: 700; color: var(--muted); transition: color .3s var(--ease); }
.at-tlb__dot {
	position: absolute; bottom: -1px; left: 50%; width: 13px; height: 13px;
	transform: translate(-50%, 50%); border: 2px solid var(--green); border-radius: 50%;
	background: var(--cream); transition: background .3s var(--ease), transform .3s var(--ease);
}
.at-tlb::after {
	content: ""; position: absolute; bottom: 0; left: 50%; width: 1px; height: 21px;
	transform: translateX(-50%); background: var(--line);
}
/* Hover, focus, and selection clarify emphasis without escaping the tab allocation. */
.at-tlb:hover .at-tlb__img,
.at-tlb:focus-visible .at-tlb__img,
.at-tlb.is-active .at-tlb__img {
	filter: grayscale(0); opacity: 1;
	-webkit-mask-image: none; mask-image: none;
}
/* Subtle contained lift preserves adjacent pointer and focus targets. */
.at-tlb:hover .at-tlb__img,
.at-tlb:focus-visible .at-tlb__img { transform: translateY(-6px) scale(1.03); }
/* Active selection receives slightly stronger emphasis within the same allocation. */
.at-tlb.is-active .at-tlb__img { transform: translateY(-8px) scale(1.045); }
/* Keyboard focus surrounds the complete marker without relying on color alone. */
.at-tlb:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.at-tlb.is-active .at-tlb__year,
.at-tlb:hover .at-tlb__year { color: var(--green); }
.at-tlb.is-active .at-tlb__dot { background: var(--green); transform: translate(-50%, 50%) scale(1.22); }

/* Arcadia is fully grayscale only in the desktop marker rest state. */
.at-tlb[data-project="arcadia"] .at-tlb__img { filter: grayscale(1); }
/* Arcadia color returns for every interactive desktop state. */
.at-tlb[data-project="arcadia"]:hover .at-tlb__img,
.at-tlb[data-project="arcadia"]:focus-visible .at-tlb__img,
.at-tlb[data-project="arcadia"].is-active .at-tlb__img { filter: grayscale(0); }

/* --- Partner logo markers: tabs reveal panels that contain destination links --- */
.at-tlb--logo { text-decoration: none; }
.at-tlb--logo .at-tlb__img {
	align-items: flex-end;
	-webkit-mask-image: none; mask-image: none;
	mix-blend-mode: normal;
	filter: grayscale(1); opacity: .5;
	padding-bottom: 8px;
}
.at-tlb--logo .at-tlb__img img {
	width: 100%; height: auto; max-height: 74px;
	object-fit: contain; object-position: center bottom; mix-blend-mode: normal;
}
/* Logo hover and focus use the same contained emphasis as project markers. */
.at-tlb--logo:hover .at-tlb__img,
.at-tlb--logo:focus-visible .at-tlb__img { filter: none; opacity: 1; transform: translateY(-6px) scale(1.03); }
/* Selected company tabs remain visually prominent without overlapping neighbors. */
.at-tlb--logo.is-active .at-tlb__img { filter: none; opacity: 1; transform: translateY(-8px) scale(1.045); }

/* Directional fades are state-driven and never intercept pointer or touch input. */
.at-tl-edge {
	position: absolute; z-index: 7; top: 0; bottom: 38px; width: 52px;
	pointer-events: none; opacity: 0; transition: opacity .2s var(--ease);
}
.at-tl-edge--previous {
	left: 0;
	background: linear-gradient(90deg, var(--paper), transparent);
}
.at-tl-edge--next {
	right: 0;
	background: linear-gradient(270deg, var(--paper), transparent);
}
/* Each fade appears only when more rail content exists in its direction. */
.at-home-timeline.has-timeline-previous .at-tl-edge--previous,
.at-home-timeline.has-timeline-next .at-tl-edge--next { opacity: .92; }

/* Stage arrows occupy the top of each endpoint column (layer 8), leaving the year labels clear below. */
.at-tl-control {
	position: absolute; z-index: 8; top: var(--timeline-control-center-top); transform: translateX(-50%); pointer-events: auto;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 44px; min-height: 44px; padding: 8px 14px;
	color: var(--green); background: var(--paper); border: 1px solid var(--green); border-radius: 999px;
	transition: color .2s var(--ease), background .2s var(--ease), opacity .2s var(--ease);
}
/* Previous control aligns to the horizontal center of the start-year grid column. */
.at-tl-control--previous {
	left: calc(var(--timeline-stage-padding-inline) + var(--timeline-boundary-center));
}
/* Next control uses the same endpoint offset and mirrors its translation from the right edge. */
.at-tl-control--next {
	right: calc(var(--timeline-stage-padding-inline) + var(--timeline-boundary-center));
	transform: translateX(50%);
}
/* Icon dimensions match the SVG viewBox while the button preserves its full tap target. */
.at-tl-control svg { width: 10px; height: 18px; }
/* Hover gives enabled controls a filled brand treatment. */
.at-tl-control:not(:disabled):hover { color: var(--paper); background: var(--green); }
/* Keyboard focus uses a high-visibility outer ring. */
.at-tl-control:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
/* Boundary controls disappear when no further milestone exists in their direction. */
.at-tl-control:disabled { visibility: hidden; }

/* Linked info panel (partner entries) */
.at-tlpanel__copy--link { text-decoration: none; color: inherit; display: block; }
.at-tlpanel__copy--link:hover .at-tlpanel__name { color: var(--green); }
.at-tlpanel__go { display: inline-block; color: var(--green); font-weight: 700; transition: transform .3s var(--ease); }
.at-tlpanel__copy--link:hover .at-tlpanel__go { transform: translateX(5px); }
.at-tlcard--logo .at-tlcard__img { background: transparent; }
.at-tlcard--logo .at-tlcard__img img { object-fit: contain; padding: 14px; }
.at-tlcard__link { color: inherit; text-decoration: none; }

.at-tl-panels {
	position: relative; min-height: 176px; max-width: 900px;
	margin: 0 auto clamp(24px, 3.5vw, 42px);
}
.at-tlpanel {
	position: absolute; inset: 0; display: grid; grid-template-columns: clamp(92px, 10vw, 132px) minmax(0, 1fr) auto;
	gap: clamp(20px, 3vw, 36px); align-items: center; padding: clamp(22px, 3vw, 34px);
	border: 1px solid var(--line); border-radius: 16px; background: rgba(244, 241, 233, .72);
	opacity: 0; transform: translateY(2px); pointer-events: none;
	/* fade OUT: slow, soft, no snap */
	transition: opacity .5s ease, transform .5s ease;
}
.at-tlpanel.is-active {
	opacity: 1; transform: none; pointer-events: auto;
	/* fade IN: long, gentle cross-fade with barely-there movement */
	transition: opacity .85s cubic-bezier(.33, .06, .2, 1), transform .85s cubic-bezier(.33, .06, .2, 1);
}

/* Full-surface native control opens project details without changing tab-panel semantics. */
.at-timeline-project-launcher {
	position: absolute;
	inset: 0;
	z-index: 2; /* Above card content; native dialogs remain in the browser top layer. */
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: inherit;
	background: transparent;
	cursor: pointer;
}

/* Pointer feedback outlines the complete project surface without obscuring its content. */
.at-timeline-project-launcher:hover {
	box-shadow: inset 0 0 0 2px var(--green);
}

/* Keyboard focus outlines the same complete surface activated by Enter or Space. */
.at-timeline-project-launcher:focus-visible {
	outline: 3px solid var(--green);
	outline-offset: -3px;
}

.at-tlpanel__year {
	display: flex; align-items: center; justify-content: center; align-self: stretch;
	color: var(--green); font-size: clamp(1.4rem, 2.6vw, 2.15rem); font-weight: 700;
	border-right: 1px solid var(--line);
}
.at-tlpanel__name { color: var(--ink); font-size: clamp(1.35rem, 2.3vw, 1.9rem); }
.at-tlpanel__type { display: block; margin: 4px 0 8px; color: var(--green); font-weight: 700; }
.at-tlpanel__desc { max-width: 62ch; margin-bottom: 0; color: var(--muted); }

.at-opit__story {
	display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 6vw, 90px);
	margin-top: clamp(46px, 7vw, 88px); padding-top: clamp(30px, 4vw, 48px);
	border-top: 1px solid var(--line);
}
.at-opit__story p { max-width: 58ch; }
.at-opit__storylead { color: var(--ink) !important; font-size: clamp(1.05rem, 1.45vw, 1.2rem); }
.at-opit__award { border-left: 2px solid var(--green); padding-left: clamp(14px, 1.4vw, 20px); color: var(--ink); }
.at-inline-link { color: var(--green); text-decoration: none; border-bottom: 1px solid rgba(83, 129, 53, .35); transition: border-color .3s var(--ease); }
.at-inline-link:hover { border-bottom-color: var(--green); }

/* =========================================================================
   SERVICES
   ========================================================================= */
.at-services { }
.at-services__head { max-width: 74ch; margin-bottom: clamp(28px, 4vw, 48px); }
.at-services__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(34px, 4.5vw, 68px) clamp(38px, 5vw, 84px); }
.at-svc { position: relative; padding-top: clamp(20px, 2.2vw, 30px); border-top: 1px solid var(--line); }
.at-svc__num {
	display: block; font-family: var(--serif); font-size: clamp(1.35rem, 1.9vw, 1.85rem);
	line-height: 1; color: var(--green); opacity: .5; margin-bottom: .6em;
}
.at-svc__title { font-family: var(--serif); font-size: clamp(1.2rem, 1.7vw, 1.5rem); color: var(--ink); margin-bottom: .5em; }
.at-svc__desc { color: var(--muted); margin-bottom: 1.25em; max-width: 44ch; }
.at-svc__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .55em; counter-reset: svcstep; }
.at-svc__steps li {
	position: relative; padding-left: 2.5em; color: var(--muted); font-size: .95rem; line-height: 1.5;
	counter-increment: svcstep;
}
.at-svc__steps li::before {
	content: counter(svcstep, decimal-leading-zero);
	position: absolute; left: 0; top: .1em;
	color: var(--green); font-weight: 700; font-size: .78em; letter-spacing: .05em;
}
@media (max-width: 720px) { .at-services__grid { grid-template-columns: 1fr; } }

/* =========================================================================
   CONTACTS
   ========================================================================= */
.at-contacts__inner { display: grid; grid-template-columns: calc(50% - var(--split-gap)) 50%; gap: var(--split-gap); align-items: center; }
.at-map { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.at-map iframe { width: 100%; height: clamp(300px, 42vw, 460px); border: 0; }
.at-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.at-contact { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.at-contact__icon { width: 30px; height: 30px; color: var(--green); margin-top: 2px; }
.at-contact__title { display: block; font-weight: 700; color: var(--green); margin-bottom: 2px; }
.at-contact__val { color: var(--ink); }
a.at-contact__val:hover { color: var(--green); }

/* prose */
.at-prose { max-width: 74ch; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.at-footer { border-top: 1px solid var(--line); background: var(--paper); padding-block: 40px; }
.at-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
/* Brand lockup: the localized promise sits at the logo's lower-right edge on wide viewports. */
.at-footer__logo {
	display: inline-flex;
	align-items: flex-end;
	gap: clamp(10px, 2vw, 18px);
	max-width: 100%;
	opacity: .92;
	transition: opacity .25s var(--ease);
}
/* Hover state: restore full contrast to confirm that the complete brand lockup is interactive. */
.at-footer__logo:hover { opacity: 1; }
.at-footer__logo svg, .at-footer__logo img { display: block; height: clamp(30px, 3.4vw, 40px); width: auto; }
/* Two explicit lines preserve the approved wording while keeping the slogan visually secondary. */
.at-footer__slogan {
	display: inline-flex;
	flex: 0 1 auto;
	flex-direction: column;
	min-width: 0;
	color: var(--ink);
	font-size: clamp(.65rem, 1.1vw, .8rem);
	line-height: 1.35;
	letter-spacing: .01em;
	text-align: left;
}
.at-footer__slogan span { display: block; white-space: nowrap; }
/* Closing line carries the green investment accent while the construction line remains ink. */
.at-footer__slogan span:last-child { color: var(--green); }
.at-footer__note { margin: 0; font-size: .9rem; color: var(--muted); }
.at-footer__totop { display: inline-flex; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; align-items: center; justify-content: center; color: var(--green); transition: background .25s, color .25s; }
.at-footer__totop-icon { transform: rotate(-90deg); width: 20px; height: 20px; }
.at-footer__totop:hover { background: var(--green); color: #fff; }

/* Narrow phones and small tablets (max 640px): stack the slogan below the logo to prevent overlap. */
@media (max-width: 640px) {
	.at-footer__logo {
		flex-direction: column;
		align-items: center;
		gap: 8px;
		text-align: center;
	}
	.at-footer__slogan { text-align: center; }
}

/* =========================================================================
   fade-in on scroll
   ========================================================================= */
/* Content remains visible when JavaScript is unavailable or cannot initialize. */
.at-fade { opacity: 1; transform: none; }
/* JavaScript-enabled reveal starts offset; 700ms keeps the editorial motion unhurried. */
.has-js .at-fade { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.has-js .at-fade.is-in { opacity: 1; transform: none; }
/* The long timeline stays outside the reveal compositor so tall mobile content cannot remain unpainted. */
.has-js .at-home-timeline.at-fade { opacity: 1; transform: none; transition: none; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
/* Compact desktop (max 1024px): allow the hero to follow its content height. */
@media (max-width: 1024px) {
	.at-hero__inner { min-height: 0; }
	/* Two equal columns keep complete flagship content readable on compact desktop and tablet. */
	.at-flagship__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablet and mobile (max 860px): expose compact marker navigation above stacked evidence cards. */
@media (max-width: 860px) {
	.at-navtoggle { display: inline-flex; }
	.at-nav {
		position: fixed; inset: 92px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
		background: var(--cream); border-bottom: 1px solid var(--line);
		max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); box-shadow: 0 18px 30px rgba(0,0,0,.06);
	}
	.at-nav.is-open { max-height: 70vh; }
	.at-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter); }
	.at-nav__item { border-bottom: 1px solid var(--line); }
	.at-nav__link { display: block; padding: 16px 0; font-size: 1.05rem; }
	.at-nav__link::after { display: none; }
	.at-lang { justify-content: center; border-left: 0; padding: 16px 0 20px; }
	.at-navtoggle[aria-expanded="true"] .at-navtoggle__open { display: none; }
	.at-navtoggle[aria-expanded="true"] .at-navtoggle__close { display: block; }

	.at-hero__inner,
	.at-about__inner,
	.at-contacts__inner { grid-template-columns: 1fr; }
	.at-about__art { order: -1; max-width: 520px; }
	/* no edge-bleed on mobile */
	.at-hero__art, .at-about__art { width: auto; margin-left: 0; margin-right: 0; }
	.at-hero__art .at-sketch__cap, .at-about__art .at-sketch__cap { margin-left: 0; margin-right: 0; }
	.at-hero .at-sketch__cap, .at-hero__title { text-align: left; }
	.at-opit__head { grid-template-columns: 1fr; gap: 22px; }
	.at-opit__headcopy { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
	.at-opit__story { grid-template-columns: 1fr; gap: 4px; }
	.at-services__grid { grid-template-columns: 1fr; gap: 28px; }

	/* Responsive Experience keeps chronological links visible while removing desktop endpoint controls. */
	.at-home-timeline { min-width: 0; max-width: 100%; }
	.at-tl-desktop { display: none; }
	.at-tl-responsive {
		display: block; min-width: 0; max-width: 100%; margin: 0 0 24px;
	}
	.at-tlr-shell {
		position: relative; min-width: 0; max-width: 100%;
		border: 1px solid var(--line); border-radius: 14px;
		background: rgba(244, 241, 233, .72);
	}
	.at-tlr-rail {
		/* Three allocations, two gaps, and rail padding fit within the responsive viewport. */
		--responsive-marker-width: calc((100% - 20px) / 3);
		display: flex; gap: 10px; min-width: 0; padding: 10px 8px 18px;
		overflow-x: auto; overflow-y: hidden;
		scroll-behavior: smooth;
		scroll-snap-type: x proximity;
		touch-action: pan-x pan-y;
		overscroll-behavior-inline: contain;
		scrollbar-color: var(--green) transparent;
		-webkit-overflow-scrolling: touch;
	}
	/* Native scrollbars remain available until JavaScript validates all marker/card relationships. */
	.at-home-timeline.is-responsive-enhanced .at-tlr-rail { scrollbar-width: none; }
	/* Chromium and Safari mirror the enhancement-gated Firefox scrollbar behavior. */
	.at-home-timeline.is-responsive-enhanced .at-tlr-rail::-webkit-scrollbar { display: none; }
	.at-tlr {
		position: relative; z-index: 2;
		flex: 0 0 var(--responsive-marker-width); min-width: var(--responsive-marker-width);
		display: flex; flex-direction: column; align-items: center; gap: 5px;
		padding: 8px 5px 12px; color: var(--muted); text-decoration: none;
		border: 1px solid transparent; border-radius: 9px;
		scroll-snap-align: center; scroll-snap-stop: normal;
		transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
	}
	.at-tlr__img {
		width: 100%; height: clamp(62px, 18vw, 96px);
		display: flex; align-items: flex-end; justify-content: center;
		background: transparent; mix-blend-mode: multiply;
	}
	.at-tlr__img img {
		width: auto; max-width: 100%; height: 100%;
		object-fit: contain; object-position: center bottom;
	}
	.at-tlr--logo .at-tlr__img { align-items: center; mix-blend-mode: normal; }
	.at-tlr--logo .at-tlr__img img { width: 100%; height: auto; max-height: 52px; }
	.at-tlr__year { font-size: .72rem; font-weight: 700; line-height: 1; }
	.at-tlr__dot {
		position: absolute; bottom: 5px; left: 50%; width: 8px; height: 8px;
		transform: translateX(-50%); border: 1px solid var(--green); border-radius: 50%;
		background: var(--cream);
	}
	/* Pointer feedback adds a contained lift so state is visible without relying on color. */
	.at-tlr:hover { transform: translateY(-2px); border-color: var(--green); }
	/* Keyboard focus surrounds the complete responsive marker. */
	.at-tlr:focus-visible { outline: 2px solid var(--green); outline-offset: -1px; }
	/* Current-marker treatment is enhancement-gated and persists only after explicit activation. */
	.at-home-timeline.is-responsive-enhanced .at-tlr.is-current {
		color: var(--ink); border-color: var(--green);
		background: rgba(83, 129, 53, .12);
		box-shadow: inset 0 -3px 0 var(--green);
	}
	.at-home-timeline.is-responsive-enhanced .at-tlr.is-current .at-tlr__dot {
		background: var(--green);
	}
	.at-tlr-edge {
		position: absolute; z-index: 3; top: 0; bottom: 0; width: 36px;
		pointer-events: none; opacity: 0; transition: opacity .2s var(--ease);
	}
	.at-tlr-edge--previous {
		left: 0;
		background: linear-gradient(90deg, var(--paper), transparent);
	}
	.at-tlr-edge--next {
		right: 0;
		background: linear-gradient(270deg, var(--paper), transparent);
	}
	/* Before enhancement, the next fade signals that the native link rail can scroll. */
	.at-home-timeline:not(.is-responsive-enhanced) .at-tlr-edge--next { opacity: .9; }
	/* Validated edge classes expose additional marker content without intercepting touch input. */
	.at-home-timeline.has-responsive-previous .at-tlr-edge--previous,
	.at-home-timeline.has-responsive-next .at-tlr-edge--next { opacity: .9; }
	.at-tl-mobile { display: grid; gap: 20px; list-style: none; margin: 0; padding: 0; }
	.at-tlcard {
		position: relative;
		display: grid; grid-template-columns: minmax(150px, 38%) minmax(0, 1fr) auto; gap: 22px; align-items: center;
		padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream);
		min-width: 0; scroll-margin-top: 112px;
	}
	.at-tlcard > * { min-width: 0; }
	/* Programmatic card focus confirms responsive marker activation for keyboard and pointer users. */
	.at-tlcard:focus { outline: 3px solid var(--green); outline-offset: 4px; }
	.at-tlcard--logo .at-tlcard__link {
		display: grid; grid-column: 1 / -1;
		grid-template-columns: minmax(150px, 38%) minmax(0, 1fr);
		gap: 22px; align-items: center;
	}
	/* Native company-card links receive the same visible keyboard focus treatment as tabs. */
	.at-tlcard__link:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 8px; }
	.at-tlcard__img { height: 180px; display: flex; align-items: flex-end; justify-content: center; background: var(--cream); }
	.at-tlcard__img img {
		width: 100%; height: 100%; object-fit: contain; object-position: center bottom; mix-blend-mode: multiply;
		--timeline-fade: 5%;
		-webkit-mask-image:
			linear-gradient(to right, transparent 0, #000 var(--timeline-fade), #000 calc(100% - var(--timeline-fade)), transparent 100%),
			linear-gradient(to bottom, transparent 0, #000 var(--timeline-fade), #000 calc(100% - var(--timeline-fade)), transparent 100%);
		-webkit-mask-composite: source-in;
		mask-image:
			linear-gradient(to right, transparent 0, #000 var(--timeline-fade), #000 calc(100% - var(--timeline-fade)), transparent 100%),
			linear-gradient(to bottom, transparent 0, #000 var(--timeline-fade), #000 calc(100% - var(--timeline-fade)), transparent 100%);
		mask-composite: intersect;
	}
	.at-tlcard .at-tlpanel__year { display: inline-block; border: 0; font-size: 1.05rem; }
	.at-tlcard .at-tlpanel__desc { font-size: .92rem; }
}

/* Mobile (max 480px): collapse company links and all project cards to one column. */
@media (max-width: 480px) {
	.at-header__inner { min-height: 76px; }
	.at-logo svg, .at-logo__image { height: 40px; }
	.at-nav { inset: 76px 0 auto 0; }
	/* Fit long Bulgarian hero words within the narrow viewport without clipping. */
	.at-hero__title { font-size: clamp(1.8rem, 9vw, 2.2rem); overflow-wrap: anywhere; }
	.at-tlcard { grid-template-columns: 1fr; gap: 14px; padding: 16px; scroll-margin-top: 96px; }
	.at-tlcard--logo .at-tlcard__link { grid-template-columns: 1fr; gap: 14px; }
	.at-tlcard__img { height: 220px; }
	.at-footer__inner { justify-content: center; text-align: center; }
}

/* =========================================================================
   LANGUAGE SWITCHER — accessible tap target and active-state chip
   ========================================================================= */

/* Minimum 44×44 CSS pixel tap target for WCAG 2.5.5 (AAA) pointer target size */
.at-lang__opt {
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}

/* Green background chip as non-color-only active indicator; overrides the
   inherited muted color so white text provides sufficient contrast on green */
.at-lang__opt.is-active {
	background: var(--green); /* Primary brand green #538135 */
	color: #fff;
	border-radius: 4px;
	padding: 4px 8px;
	font-weight: 700;
}

/* =========================================================================
   SKETCH CAPTIONS — three-span vertical stack
   ========================================================================= */

/* Override the inherited block display to stack the three child spans vertically */
.at-sketch__cap {
	display: flex;
	flex-direction: column;
}

/* Prevent caption text overflow on narrow screens (≤375 px) */
@media (max-width: 375px) {
	.at-sketch__cap {
		font-size: .8rem;
		max-width: 100%;
		overflow-wrap: break-word;
	}
}

/* =========================================================================
   PARTNERS — partner logo/wordmark section
   ========================================================================= */

.at-partners {
	padding: clamp(32px, 5vw, 64px) var(--gutter);
	background: var(--cream); /* Light cream page background */
}

.at-partners h2 {
	text-align: center;
	margin-bottom: 1.5em;
}

/* Flex row of partner logo items with wrapping for small screens */
.at-partners__list {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	justify-content: center;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.at-partner__link {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: opacity .2s var(--ease);
}

.at-partner__link:hover,
.at-partner__link:focus-visible {
	opacity: .75;
}

/* Constrain all partner logos to max 52px height, preserving aspect ratio */
.at-partner__link img {
	max-height: 52px;
	width: auto;
	object-fit: contain;
}

/* Correct Project's tall mark uses a smaller cap so its visual weight matches the other partners. */
.at-partner__link .at-partner__logo--correct-project {
	max-height: 40px;
}

/* =========================================================================
   HOMEPAGE MARKETING — hero actions, Why ATISTAT, and FAQ
   ========================================================================= */

.at-hero__sub {
	margin: 1em 0 1.4em;
	font-size: clamp(.95rem, 1.4vw, 1.05rem);
	line-height: 1.6;
	color: var(--ink);
	max-width: 48ch;
	opacity: .82;
}

.at-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.at-why { background: var(--paper); }

.at-why__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: clamp(14px, 2vw, 24px);
	margin-top: clamp(20px, 3vw, 36px);
}

.at-why__card {
	border-left: 3px solid var(--green);
	padding: clamp(14px, 1.8vw, 20px) clamp(16px, 2vw, 22px);
	background: var(--cream);
	border-radius: 0 8px 8px 0;
}

.at-why__card h3 {
	color: var(--green);
	font-size: .98rem;
	font-weight: 700;
	margin: 0 0 .5em;
}

.at-why__card p {
	margin: 0;
	font-size: .93em;
	line-height: 1.62;
	color: var(--ink);
}

.at-faq__list {
	list-style: none;
	padding: 0;
	margin: clamp(20px, 3vw, 36px) 0 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 72ch;
}

.at-faq__item {
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
}

.at-faq__item summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: clamp(12px, 1.6vw, 18px) clamp(14px, 2vw, 22px);
	font-weight: 700;
	color: var(--ink);
	cursor: pointer;
	list-style: none;
	/* Safari needs the prefixed declaration to suppress selection on disclosure toggles. */
	-webkit-user-select: none;
	user-select: none;
}

.at-faq__item summary::-webkit-details-marker { display: none; }

.at-faq__item summary::after {
	content: "+";
	flex-shrink: 0;
	font-size: 1.35em;
	color: var(--green);
	/* 220ms gives immediate disclosure feedback without distracting from reading. */
	transition: transform .22s ease;
}

/* Open state rotates the plus sign into a close affordance. */
.at-faq__item[open] > summary::after { transform: rotate(45deg); }

/* Hover and keyboard focus share the same visible interactive state. */
.at-faq__item summary:hover,
.at-faq__item summary:focus-visible { color: var(--green); }

.at-faq__item summary:focus-visible {
	outline: 2px solid var(--green);
	outline-offset: -2px;
}

.at-faq__answer {
	padding: 0 clamp(14px, 2vw, 22px) clamp(12px, 1.6vw, 18px);
	line-height: 1.65;
	color: var(--ink);
}

/* =========================================================================
   SELECTED PROJECTS DIALOG — native <dialog> modal with sticky header
   ========================================================================= */

/* max 960px wide, 90vh tall, flex column for sticky-header + scrollable-body */
dialog.at-selected-projects {
	max-width: min(960px, 92vw);
	max-height: 90vh;
	width: 92vw;
	padding: 0;
	border: none;
	border-radius: 12px;
	overflow: hidden;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* Preserve native closed-dialog behavior while using flex layout in the top layer. */
dialog.at-selected-projects:not([open]) {
	display: none;
}

dialog.at-selected-projects[open] {
	display: flex;
}

/* Frosted-glass overlay behind the dialog (Q004 decision) */
dialog.at-selected-projects::backdrop {
	backdrop-filter: blur(4px);
	background: rgba(0,0,0,.45); /* Semi-opaque black */
}

/* Sticky header band pinned at the top of the dialog regardless of scroll */
.at-dialog__header {
	position: sticky;
	top: 0;
	z-index: 10; /* Above the scrollable gallery content */
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	background: var(--paper); /* Light paper background */
	border-bottom: 1px solid var(--line);
	flex-shrink: 0;
}

.at-dialog__header h2 {
	margin: 0;
	font-size: 1.2rem;
}

/* Circular close button (Q003 sticky close button decision) */
.at-dialog__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: var(--cream); /* Light cream */
	cursor: pointer;
	font-size: 1.2rem;
	line-height: 1;
	transition: background .2s var(--ease);
}

.at-dialog__close:hover,
.at-dialog__close:focus-visible {
	background: var(--pill);
}

/* Scrollable content area; flex: 1 ensures it fills remaining dialog height */
.at-dialog__body {
	overflow-y: auto;
	padding: 24px;
	flex: 1;
}

.at-dialog__body h3 {
	margin: 1.5em 0 .75em;
	font-size: 1.05rem;
}

.at-dialog__body h3:first-child {
	margin-top: 0;
}

.at-gallery-project__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	max-width: 76ch;
	margin: 0 0 20px;
}

.at-gallery-project__facts > div {
	min-width: 0;
	padding: 12px 14px;
	border-radius: 8px;
	background: var(--cream);
}

.at-gallery-project__facts dt {
	margin-bottom: 2px;
	color: var(--muted);
	font-size: .78rem;
}

.at-gallery-project__facts dd {
	margin: 0;
	color: var(--ink);
	font-weight: 700;
	overflow-wrap: anywhere;
}

.at-gallery-project__facts > div:first-child dd {
	color: var(--project-accent);
}

.at-gallery-project__description {
	max-width: 76ch;
	margin: 0 0 24px;
	color: var(--ink);
	line-height: 1.7;
}

/* Single-source project media remains a factual image, not an implied multi-image gallery. */
.at-project-image {
	display: block;
	width: min(100%, 720px);
	height: auto;
	border-radius: 6px;
}

/* =========================================================================
   GALLERY GRID — responsive project images enhanced as large-view controls
   ========================================================================= */

/* auto-fill with 220px minimum column width (Q020 decision); object-fit: contain
   preserves aspect ratios without cropping portrait and landscape images */
.at-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.at-gallery-grid img {
	max-width: 100%;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
	display: block;
}

.has-js .at-gallery-grid img[role="button"] {
	cursor: zoom-in;
}

/* Pointer feedback adds a structural edge to signal that each gallery image opens. */
.has-js .at-gallery-grid img[role="button"]:hover {
	box-shadow: 0 0 0 3px var(--green);
}

/* Keyboard focus mirrors the image control's pointer affordance. */
.has-js .at-gallery-grid img[role="button"]:focus-visible {
	outline: 3px solid var(--green);
	outline-offset: 3px;
}

/* =========================================================================
   LARGE IMAGE VIEW — project-scoped, viewport-filling overlay inside the native dialog
   ========================================================================= */

dialog.at-selected-projects[data-lightbox-open] {
	width: 100vw;
	max-width: 100vw;
	height: 100dvh;
	max-height: 100dvh;
	border-radius: 0;
	background: var(--ink);
}

dialog.at-selected-projects[data-lightbox-open] > .at-dialog__header,
dialog.at-selected-projects[data-lightbox-open] > .at-dialog__body {
	visibility: hidden;
}

.at-lightbox {
	position: fixed;
	inset: 0;
	z-index: 20; /* Above the project dialog header (10) while remaining in its modal top layer. */
	display: grid;
	grid-template-columns: minmax(44px, auto) minmax(0, 1fr) minmax(44px, auto);
	grid-template-rows: 56px minmax(0, 1fr);
	align-items: center;
	gap: clamp(8px, 2vw, 24px);
	width: 100vw;
	height: 100dvh;
	padding: clamp(8px, 2vw, 24px);
	background: color-mix(in srgb, var(--ink) 96%, transparent);
	color: var(--paper);
}

.at-lightbox[hidden] {
	display: none;
}

.at-lightbox__close,
.at-lightbox__control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid color-mix(in srgb, var(--paper) 54%, transparent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--ink) 72%, transparent);
	color: var(--paper);
}

.at-lightbox__close {
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
	font-size: 1.35rem;
}

.at-lightbox__control {
	grid-row: 2;
}

.at-lightbox__control--previous {
	grid-column: 1;
}

.at-lightbox__control--next {
	grid-column: 3;
}

.at-lightbox__control svg {
	width: 16px;
	height: 24px;
}

/* Hover and keyboard focus use a visible boundary and fill change on the dark overlay. */
.at-lightbox__close:hover,
.at-lightbox__close:focus-visible,
.at-lightbox__control:hover,
.at-lightbox__control:focus-visible {
	outline: 3px solid var(--paper);
	outline-offset: 3px;
	background: var(--green);
}

.at-lightbox__figure {
	grid-column: 2;
	grid-row: 1 / span 2;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	align-items: center;
	justify-items: center;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	margin: 0;
}

.at-lightbox__image {
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: contain;
}

.at-lightbox__caption {
	min-height: 1.5em;
	margin-top: 8px;
	font-size: .85rem;
	text-align: center;
}

/* =========================================================================
   PROJECT GALLERY PREVIEW — noninteractive four-image context inside a card
   ========================================================================= */

.at-gallery-mosaic {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, 56px);
	gap: 4px;
	align-self: center;
	justify-self: center;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	overflow: hidden;
	pointer-events: none;
}

.at-gallery-mosaic img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	display: block;
	border-radius: 2px;
}

/* Persistent decoration names the launcher visually and never intercepts pointer input. */
.at-gallery-mosaic__overlay {
	position: absolute; right: 4px; bottom: 4px; left: 4px;
	display: flex; align-items: center; justify-content: center; gap: 4px;
	padding: 5px 6px; color: var(--paper);
	/* Dark ink transparency preserves thumbnail context behind the localized affordance. */
	background: rgba(37, 42, 34, .78); border-radius: 3px;
	font-size: .65rem; font-weight: 700; line-height: 1.1;
	pointer-events: none;
}
.at-gallery-mosaic__icon { width: 16px; height: 16px; flex: 0 0 16px; }

/* Explicitly preserve native hidden behavior if other gallery display rules evolve. */
.at-gallery-project[hidden] { display: none; }

/* =========================================================================
   SERVICE FEATURES — green checkmark bullet list before numbered steps
   ========================================================================= */

/* Reset list style; bottom margin separates the feature list from step list */
.at-svc__features {
	list-style: none;
	padding: 0;
	margin: 0 0 1em 0;
}

/* Green check mark provides visual affordance; color only supplemented by ✓ symbol */
.at-svc__features li::before {
	content: "✓";
	color: var(--green); /* Primary brand green #538135 */
	margin-right: .5em;
}

/* =========================================================================
   WHATSAPP FAB — sole floating messaging action
   ========================================================================= */

/* Fixed bottom-right position; z-index 900 keeps it above content but below modals. */
.at-whatsapp-fab {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 900; /* Above page content and below the native modal top layer. */
}

.at-whatsapp-fab a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--green); /* Primary brand green #538135 */
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 16px rgba(83,129,53,.45); /* 83,129,53 = #538135 green */
	transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.at-whatsapp-fab a:hover,
.at-whatsapp-fab a:focus-visible {
	transform: scale(1.08);
	box-shadow: 0 6px 24px rgba(83,129,53,.6);
}

.at-whatsapp-fab svg {
	width: 28px;
	height: 28px;
}

/* =========================================================================
   RESPONSIVE — new components at reduced viewport widths
   ========================================================================= */

/* Tablet portrait and below (max 768px): tighten gaps, reduce gallery columns */
@media (max-width: 768px) {
	.at-gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	}
}

/* Large phones and below (max 680px): stack flagship evidence in source order. */
@media (max-width: 680px) {
	.at-flagship__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Mobile (max 480px): prevent horizontal overflow for partners and dialogs. */
@media (max-width: 480px) {
	.at-partners__list {
		gap: 20px;
	}
	/* Stacked facts preserve the four-field reading order within narrow dialogs. */
	.at-gallery-project__facts {
		grid-template-columns: 1fr;
	}
	.at-gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 8px;
	}
	dialog.at-selected-projects {
		max-width: 100vw;
		border-radius: 0;
		/* dynamic viewport height accounts for mobile browser chrome */
		max-height: 100dvh;
	}
	.at-lightbox {
		grid-template-columns: 44px minmax(0, 1fr) 44px;
		gap: 6px;
		padding: 8px;
	}
	.at-lightbox__close,
	.at-lightbox__control {
		width: 44px;
		height: 44px;
	}
}

/* Minimum supported width (320px): no horizontal overflow */
@media (max-width: 320px) {
	.at-gallery-grid {
		grid-template-columns: 1fr 1fr;
	}
	.at-dialog__body {
		padding: 16px 12px;
	}
}

/* Reduced motion: keep all timeline access and state changes while removing animated movement. */
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
	/* Reduced-motion users receive visible content without reveal transitions. */
	.has-js .at-fade { opacity: 1; transform: none; transition: none; }
	.at-sketch__img { transition: none !important; animation: none !important; }
	.at-tl-buildings,
	.at-tlr-rail { scroll-behavior: auto; }
	.at-tl-edge,
	.at-tlr,
	.at-tlr-edge,
	.at-tlb__img,
	.at-tlb__img img,
	.at-tlb__year,
	.at-tlb__dot,
	.at-tl-progress,
	.at-tl-control,
	.at-tlpanel,
	.at-flagship__action,
	.at-whatsapp-fab a { transition: none !important; }
	.at-faq__item summary::after,
	.at-lightbox__close,
	.at-lightbox__control {
		transition: none;
		animation: none;
	}
}
