/* ==========================================================================
   Homepage
   ========================================================================== */

.products, .industries, .stats, .why, .einv, .services, .clients, .voices, .insights, .cta {
	padding-block: clamp(56px, 8vw, 112px) 0;
}

/* ---------- Hero ---------- */

.hero { padding-top: clamp(24px, 4vw, 56px); }

.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	align-items: center;
	gap: clamp(24px, 4vw, 64px);
	min-height: min(680px, calc(100svh - var(--header-h) - 150px));
}

.hero__title {
	font-size: clamp(2.1rem, 1.2rem + 3vw, 3.9rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.01em;
	max-width: 19ch;
}
html[lang="en"] .hero__title { line-height: 1.08; letter-spacing: -.035em; max-width: 17ch; }

.hero__lead {
	margin-top: 22px;
	max-width: 50ch;
	font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem);
	color: var(--ink-2);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero__visual { position: relative; }
.dots {
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: 640px;
	margin-inline: auto;
	touch-action: pan-y;
}

/* Page-load sequence: copy settles while the dots assemble. */
.hero__copy > * { animation: tk-rise .9s var(--ease) both; }
.hero__copy > :nth-child(2) { animation-delay: .12s; }
.hero__copy > :nth-child(3) { animation-delay: .24s; }
@keyframes tk-rise { from { opacity: 0; transform: translateY(14px); } }

.trust {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 28px;
	margin-top: clamp(24px, 4vw, 40px);
	padding-top: 22px;
	border-top: 1px solid var(--line);
}
.trust__label { font-family: var(--f-ui); font-size: .9rem; font-weight: 500; color: var(--ink-3); }
.trust__list { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; }
.trust__list li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); }
.trust__list img {
	width: 64px;
	height: 40px;
	padding: 4px 6px;
	object-fit: contain;
	background: var(--chip);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
}

/* ---------- Products ---------- */

.products__grid {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 20px;
	margin-top: clamp(28px, 4vw, 48px);
}

.product {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: clamp(24px, 3.4vw, 44px);
	border-radius: var(--r-lg);
}
.product--ap { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.product--odoo { background: var(--bg-2); }
.product .link-arrow { margin-top: auto; padding-top: 8px; }

.product__name {
	font-family: var(--f-display);
	font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
	font-weight: 700;
	letter-spacing: -.02em;
	direction: ltr;
	text-align: start;
	unicode-bidi: isolate;
}
[dir="rtl"] .product__name { text-align: right; }
.product__tag { margin-top: 6px; font-family: var(--f-ui); font-weight: 500; color: var(--blue); }
.product__desc { color: var(--ink-2); max-width: 58ch; }

/* ---------- Industry explorer ---------- */

.explorer {
	display: grid;
	grid-template-columns: minmax(220px, 4fr) minmax(0, 8fr);
	gap: clamp(20px, 3vw, 48px);
	align-items: start;
}

.explorer__tabs { display: flex; flex-direction: column; border-inline-start: 1px solid var(--line); }
.explorer__tab {
	position: relative;
	padding: 12px 18px;
	border: 0;
	background: none;
	font-family: var(--f-ui);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.5;
	text-align: start;
	color: var(--ink-3);
	cursor: pointer;
	transition: color .2s;
}
.explorer__tab::before {
	content: "";
	position: absolute;
	inset-block: 8px;
	inset-inline-start: -1px;
	width: 3px;
	border-radius: 3px;
	background: transparent;
	transition: background-color .2s;
}
.explorer__tab:hover { color: var(--ink); }
.explorer__tab[aria-selected="true"] { color: var(--ink); }
.explorer__tab[aria-selected="true"]::before { background: var(--red); }

.explorer__panel { animation: tk-swap .45s var(--ease); }
@keyframes tk-swap { from { opacity: 0; transform: translateY(8px); } }

.explorer__media {
	margin: 0;
	aspect-ratio: 1024 / 601;
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: #fff;
}
.explorer__media img { width: 100%; height: 100%; object-fit: contain; }
.explorer__body { display: grid; gap: 12px; margin-top: 22px; max-width: 64ch; }
.explorer__title { font-size: 1.35rem; }
.explorer__body p { color: var(--ink-2); }

/* ---------- Numbers: dot-matrix panel ----------
   Each figure is drawn by the same dots as the logo; picking a figure (or waiting)
   makes the dots fly apart and re-form the next one, tilting in 3D with the pointer. */

.stats__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(24px, 4vw, 64px);
	align-items: center;
}

.stats__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin-top: 28px;
	list-style: none;
}
.stat {
	display: grid;
	gap: 2px;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: transparent;
	text-align: start;
	cursor: pointer;
	transition: border-color .25s, background-color .25s;
}
.stat:hover { border-color: var(--line-2); background: var(--bg-2); }
.stat[aria-pressed="true"] { border-color: var(--red); background: var(--surface); box-shadow: var(--shadow); }
.stat__num {
	font-family: var(--f-display);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	text-align: start;
	unicode-bidi: isolate;
}
[dir="rtl"] .stat__num { text-align: right; }
.stat[aria-pressed="true"] .stat__num { color: var(--red); }
.stat__label { font-size: .88rem; line-height: 1.5; color: var(--ink-2); }

.panel {
	position: relative;
	padding: clamp(14px, 2vw, 26px);
	border-radius: var(--r-lg);
	background: var(--navy);
	box-shadow: inset 0 0 0 1px rgba(143, 173, 240, .14), var(--shadow);
	overflow: hidden;
}
.panel::after {
	/* Soft glass highlight across the top of the display. */
	content: "";
	position: absolute;
	inset: 0 0 55%;
	background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent);
	pointer-events: none;
}
.matrix { width: 100%; aspect-ratio: 42 / 13; touch-action: pan-y; }
.panel__fallback {
	display: none;
	font-family: var(--f-display);
	font-size: clamp(3rem, 8vw, 6rem);
	font-weight: 800;
	text-align: center;
	color: #fff;
}
.no-matrix .matrix { display: none; }
.no-matrix .panel__fallback { display: block; }

.stats__caption { margin-top: 18px; min-height: 4.6em; }

/* Side by side, the screen and its caption span exactly the height of the text column:
   the screen's top lines up with the heading and the caption ends with the last figure. */
@media (min-width: 861px) {
	.stats__grid { align-items: stretch; }
	.stats__stage { display: flex; flex-direction: column; }
	.panel { flex: 1; display: flex; align-items: center; }
	.matrix { max-height: 100%; }
	.stats__caption { min-height: 0; }
}
.stats__title { font-family: var(--f-display); font-size: 1.2rem; font-weight: 700; }
.stats__desc { margin-top: 4px; color: var(--ink-2); }

/* ---------- Why ---------- */

.why__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(20px, 3vw, 40px);
	margin-top: clamp(28px, 4vw, 48px);
	list-style: none;
}
.why__item { padding-top: 22px; border-top: 1px solid var(--line-2); position: relative; }
.why__item::before {
	content: "";
	position: absolute;
	top: -1px;
	inset-inline-start: 0;
	width: 32px;
	height: 3px;
	background: var(--blue);
}
.why__title { font-size: 1.18rem; margin-bottom: 10px; }
.why__item p { color: var(--ink-2); font-size: 1rem; }

/* ---------- E-invoice band ---------- */

.einv__grid {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(24px, 4vw, 64px);
	align-items: center;
	padding: clamp(28px, 5vw, 64px);
	border-radius: var(--r-lg);
	background-color: var(--navy);
	background-image: radial-gradient(circle at 1.5px 1.5px, rgba(143, 173, 240, .22) 1.5px, transparent 0);
	background-size: 22px 22px;
	color: var(--navy-ink);
}
.einv .wrap.einv__grid { width: calc(100% - var(--gutter) * 2); max-width: var(--wrap); }
.einv .section-lead { color: rgba(238, 242, 250, .78); }
.einv__links { display: grid; gap: 10px; margin-top: 26px; list-style: none; }
.einv .link-arrow { color: #9DBBFF; }
.einv__seals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.einv__seals figure { margin: 0; }
.einv__seals img {
	width: 100%;
	aspect-ratio: 2 / 1;
	object-fit: contain;
	padding: 14px;
	background: #fff;
	border-radius: var(--r-md);
}
.einv__seals figcaption { margin-top: 10px; font-size: .9rem; text-align: center; color: rgba(238, 242, 250, .78); }

/* ---------- Services ---------- */

.services__list { margin-top: clamp(24px, 4vw, 40px); border-top: 1px solid var(--line); }
.service {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
	align-items: center;
	gap: 24px;
	padding: clamp(20px, 2.6vw, 32px) 12px;
	border-bottom: 1px solid var(--line);
	text-decoration: none;
	transition: background-color .25s;
}
.service:hover { background: var(--bg-2); }
.service__title { font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); font-weight: 600; }
.service p { color: var(--ink-2); }
.service .tk-icon { width: 28px; height: 28px; color: var(--blue); transition: transform .25s var(--ease); }
.service:hover .tk-icon { transform: translateX(6px); }
[dir="rtl"] .service:hover .tk-icon { transform: scaleX(-1) translateX(6px); }

/* ---------- Clients ---------- */

/* A curved wall of full-colour logos: columns sit on a cylinder that turns slowly,
   and can be dragged or swiped. Without JavaScript it is a plain scrolling row. */
.wall { position: relative; direction: ltr; }
.wall__stage {
	--chip-w: 176px;
	--chip-h: 108px;
	--gap: 14px;
	overflow-x: auto;
	padding-block: 10px;
	scrollbar-width: none;
}
.wall__stage::-webkit-scrollbar { display: none; }
.wall__ring { display: flex; gap: var(--gap); width: max-content; padding-inline: var(--gutter); list-style: none; }
.wall__col { display: grid; gap: var(--gap); }

.wall.is-3d .wall__stage {
	overflow: hidden;
	height: calc(var(--chip-h) * 3 + var(--gap) * 2 + 60px);
	perspective: 1500px;
	perspective-origin: 50% 50%;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.wall.is-3d.is-dragging .wall__stage { cursor: grabbing; }
.wall.is-3d .wall__ring {
	position: absolute;
	top: 30px;
	left: 50%;
	width: var(--chip-w);
	padding: 0;
	margin-left: calc(var(--chip-w) / -2);
	transform-style: preserve-3d;
}
.wall.is-3d .wall__col {
	position: absolute;
	inset: 0 auto auto 0;
	width: var(--chip-w);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.logo-chip {
	display: grid;
	place-items: center;
	width: var(--chip-w);
	height: var(--chip-h);
	padding: 12px 16px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	overflow: hidden;
	transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
:root[data-mode="dark"] .logo-chip { border-color: transparent; }
.logo-chip img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(var(--chip-h) - 26px);
	object-fit: contain;
	pointer-events: none;
}
.wall:not(.is-dragging) .logo-chip:hover {
	transform: translateZ(30px) scale(1.06);
	border-color: var(--blue);
	box-shadow: var(--shadow);
}

.wall__hint {
	margin-top: 4px;
	font-size: .85rem;
	text-align: center;
	color: var(--ink-3);
}
.wall:not(.is-3d) .wall__hint { display: none; }

/* ---------- Testimonials ---------- */

.voices__grid {
	display: grid;
	grid-template-columns: minmax(240px, 4fr) minmax(0, 8fr);
	gap: clamp(20px, 4vw, 64px);
	margin-top: clamp(28px, 4vw, 48px);
	align-items: start;
}
.voices__people { display: grid; gap: 8px; }
.person {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	border: 1px solid transparent;
	border-radius: var(--r-md);
	background: none;
	text-align: start;
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}
.person:hover { background: var(--bg-2); }
.person[aria-selected="true"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.person__img { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: cover; background: var(--chip); }
.person__text { display: grid; gap: 2px; }
.person__name { font-family: var(--f-ui); font-weight: 600; line-height: 1.4; }
.person__role { font-size: .88rem; line-height: 1.5; color: var(--ink-3); }

.quote { margin: 0; position: relative; padding-inline-start: clamp(0px, 3vw, 40px); animation: tk-swap .45s var(--ease); }
.quote::before {
	content: "”";
	position: absolute;
	top: -.3em;
	inset-inline-start: -.08em;
	font-family: Georgia, serif;
	font-size: 6rem;
	line-height: 1;
	color: var(--red);
	opacity: .9;
}
html[lang="en"] .quote::before { content: "“"; }
.quote p {
	font-family: var(--f-display);
	font-size: clamp(1.2rem, 1rem + 1vw, 1.75rem);
	font-weight: 400;
	line-height: 1.75;
	padding-top: 2.2rem;
	max-width: 40ch;
}
html[lang="en"] .quote p { line-height: 1.5; }

/* ---------- CTA ---------- */

.cta__box {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 28px 48px;
	padding: clamp(28px, 5vw, 64px);
	border-radius: var(--r-lg);
	background-color: var(--blue);
	background-image: radial-gradient(circle at 1.5px 1.5px, rgba(255, 255, 255, .2) 1.5px, transparent 0);
	background-size: 22px 22px;
	color: #fff;
}
:root[data-mode="dark"] .cta__box { background-color: #1D3F92; }
.cta__title { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem); max-width: 26ch; }
.cta__copy p { margin-top: 12px; max-width: 52ch; color: rgba(255, 255, 255, .86); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn--primary { background: #fff; color: var(--red); }
.cta .btn--primary:hover { background: #F3F5F9; }
.cta .btn--light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.cta .btn--light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------- Responsive ---------- */

/* 13–14" laptops: keep the headline, summary and buttons above the fold. */
@media (min-width: 1024px) and (max-height: 820px) {
	.hero { padding-top: 16px; }
	.hero__title { font-size: clamp(2rem, 1rem + 2.5vw, 3.2rem); }
	.hero__lead { margin-top: 16px; }
	.hero__actions { margin-top: 24px; }
	.dots { max-height: calc(100svh - var(--header-h) - 130px); }
}

/* Numbers panel and logo wall on tablets and phones. */
@media (max-width: 860px) {
	.stats__grid { grid-template-columns: 1fr; }
	.stats__stage { order: -1; }
	.stats__intro { display: contents; }
	.stats__intro > .section-title, .stats__intro > .section-lead { order: -2; }
	.stats__list { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
	.wall__stage { --chip-w: 128px; --chip-h: 84px; --gap: 10px; }
	.wall.is-3d .wall__stage { perspective: 900px; }
}

@media (max-width: 1023px) {
	.hero__grid { grid-template-columns: 1fr; min-height: 0; }
	.hero__visual { order: -1; max-width: 520px; width: 100%; margin-inline: auto; }
	.dots { aspect-ratio: 4 / 3; }
	.products__grid { grid-template-columns: 1fr; }
	.why__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.einv__grid { grid-template-columns: 1fr; }
	.service { grid-template-columns: minmax(0, 1fr) auto; }
	.service p { grid-column: 1; grid-row: 2; }
	.service .tk-icon { grid-column: 2; grid-row: 1 / 3; }
	.voices__grid { grid-template-columns: 1fr; }
	.voices__people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cta__box { grid-template-columns: 1fr; }

	.explorer { grid-template-columns: 1fr; }
	.explorer__tabs {
		flex-direction: row;
		gap: 8px;
		overflow-x: auto;
		margin-inline: calc(var(--gutter) * -1);
		padding: 2px var(--gutter) 8px;
		border: 0;
		scrollbar-width: none;
		scroll-snap-type: x proximity;
	}
	.explorer__tabs::-webkit-scrollbar { display: none; }
	.explorer__tab {
		flex: none;
		padding: 8px 16px;
		border: 1px solid var(--line-2);
		border-radius: 999px;
		font-size: .93rem;
		white-space: nowrap;
		scroll-snap-align: start;
	}
	.explorer__tab::before { display: none; }
	.explorer__tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
}

@media (max-width: 699px) {
	.dots { aspect-ratio: 16 / 11; }
	.hero__actions { margin-top: 26px; }
	.hero__actions .btn { flex: 1 1 100%; }
	.modules { grid-template-columns: 1fr; }
	.why__list { grid-template-columns: 1fr; }
	.stats__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stat { padding: 10px 12px; }
	.stat__num { font-size: 1.1rem; }
	.voices__people { grid-template-columns: 1fr; }
	.person { padding: 10px; }
	.einv__seals { grid-template-columns: 1fr 1fr; }
	.cta__actions .btn { flex: 1 1 100%; }
	.trust { gap: 12px; }
	.trust__list { gap: 10px 18px; }
}

/* ---------- Blog and careers ---------- */

.insights__grid {
	display: grid;
	grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: start;
}
.articles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.article {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: var(--surface);
	overflow: hidden;
	transition: border-color .25s, box-shadow .25s;
}
.article:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.article__media { display: block; aspect-ratio: 16 / 10; background: #fff; overflow: hidden; }
.article__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.article:hover .article__media img { transform: scale(1.04); }
.article__body { display: grid; gap: 8px; padding: 20px 22px 24px; }
.article__date { font-size: .85rem; color: var(--ink-3); }
.article__title { font-size: 1.15rem; line-height: 1.5; }
.article__title a { text-decoration: none; }
.article__title a:hover { text-decoration: underline; }
.article__body p { font-size: .95rem; color: var(--ink-2); }

.careers {
	display: grid;
	gap: 14px;
	padding: clamp(22px, 3vw, 32px);
	border-radius: var(--r-lg);
	background: var(--bg-2);
}
.careers__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); }
.careers__lead { color: var(--ink-2); font-size: .98rem; }
.careers__list { list-style: none; border-top: 1px solid var(--line-2); }
.careers__list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 2px;
	border-bottom: 1px solid var(--line-2);
	font-weight: 500;
	text-decoration: none;
}
.careers__list a:hover { color: var(--blue); }
.careers__list .tk-icon { color: var(--blue); flex: none; }
.careers .btn { justify-self: start; margin-top: 6px; }

@media (max-width: 1023px) {
	.insights__grid { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
	.articles { grid-template-columns: 1fr; }
}
