/* iT.SCHOOL — single stylesheet for the whole site.
   Brand colors and fonts (former Elementor kit). Design tokens shared with /contact/contact.css. */

:root {
	--color-brand: #009EE0;        /* official; button fills with white --text-button (3:1, AA large text), decoration */
	--color-brand-press: #0088C2;  /* button hover, white text 4:1 */
	--color-brand-text: #006E9C;   /* links, outlined buttons: 5.7:1 on white */
	--color-brand-hover: #005A80;
	--color-ink: #000000;          /* headings (official accent) */
	--color-text: #333333;
	--color-muted: #54595F;
	--color-line: #D6D6D6;
	--color-surface: #F2F2F2;
	--color-white: #FFFFFF;
	--color-success: #1B7F3B;
	--color-error: #B3261E;

	--font-heading: "Arvo", Georgia, serif;
	--font-body: "Open Sans", system-ui, sans-serif;

	/* Spacing 4-8-12-16-24-32-48-64-96 */
	--space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
	/* Text 14-17-20-20-32-40 */
	--text-button: 1.1875rem; /* 19px bold = WCAG large text, needed for white on --color-brand */
	--text-sm: 0.875rem; --text-base: 1.0625rem; --text-lead: 1.25rem; --text-h3: 1.25rem; --text-h2: 2rem; --text-h1: 2.5rem;
	--radius: 4px;
	--max-width: 1140px;
	--measure: 68ch;       /* line length for paragraphs */
	--measure-lead: 80ch;  /* one- or two-sentence intros: wider, to avoid a needless line break */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--space-9); }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-white);
}
img, video { display: block; max-width: 100%; height: auto; }

/* No single word on the last line: balanced headings and intros, "pretty" paragraphs.
   Inherited everywhere (cards, lists, contact page); safely ignored by older browsers. */
body { text-wrap: pretty; }
h1, h2, h3, legend, .lead, .eyebrow, .cta p { text-wrap: balance; }

h1, h2, h3 { font-family: var(--font-heading); color: var(--color-ink); font-weight: 700; line-height: 1.25; margin: 0 0 var(--space-4); }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); margin-bottom: var(--space-2); }
p, ul { margin: 0 0 var(--space-4); }
ul { padding-left: 1.25em; }
li + li { margin-top: var(--space-1); }

a { color: var(--color-brand-text); text-underline-offset: 2px; }
a:hover { color: var(--color-brand-hover); }
:focus-visible { outline: 2px solid var(--color-brand-text); outline-offset: 2px; }

.skip { position: absolute; left: var(--space-4); top: var(--space-4); padding: var(--space-2) var(--space-4); background: var(--color-white); z-index: 100; transform: translateY(-200%); }
.skip:focus { transform: none; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding-left: var(--space-5); padding-right: var(--space-5); }

/* --- Buttons --- */
.btn {
	display: inline-block;
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius);
	background: var(--color-brand);
	color: var(--color-white);
	font-size: var(--text-button);
	font-weight: 700;
	text-decoration: none;
	line-height: 1.25;
}
.btn:hover { background: var(--color-brand-press); color: var(--color-white); }
.btn-small { padding: var(--space-2) var(--space-4); }
.btn-secondary { background: transparent; color: var(--color-brand-text); box-shadow: inset 0 0 0 1px var(--color-brand-text); }
.btn-secondary:hover { background: var(--color-surface); color: var(--color-brand-hover); }

/* --- Header --- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--color-white); border-bottom: 1px solid var(--color-line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-6); padding-top: var(--space-4); padding-bottom: var(--space-4); }
.logo img { width: 180px; height: auto; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); list-style: none; margin: 0; padding: 0; }
.menu li + li { margin-top: 0; }
.menu a:not(.btn) { color: var(--color-ink); font-weight: 600; text-decoration: none; padding: var(--space-1) 0; border-bottom: 2px solid transparent; }
.menu a:not(.btn):hover, .menu a[aria-current]:not(.btn) { border-bottom-color: var(--color-brand); }

/* --- Sections --- */
.section { padding: var(--space-8) 0; }
.section + .section { padding-top: 0; }
.section-muted { background: var(--color-surface); padding: var(--space-8) 0; }
.section-muted + .section { padding-top: var(--space-8); }
.eyebrow { margin: 0 0 var(--space-2); color: var(--color-muted); font-size: var(--text-sm); font-weight: 600; }
.lead { font-size: var(--text-lead); color: var(--color-muted); max-width: var(--measure-lead); }
.prose { max-width: var(--measure); }
.section-header { max-width: var(--measure-lead); margin-bottom: var(--space-6); }
.page-title { margin: var(--space-8) 0 var(--space-6); } /* heading alone at the top of a page (Contact, privacy) */

/* Opening banner: text + visual */
.hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-7); align-items: center; padding-top: var(--space-8); padding-bottom: var(--space-8); }
.hero h1 { margin-bottom: var(--space-5); }
.hero .lead { margin-bottom: var(--space-6); }
.hero img, .hero video { width: 100%; border-radius: var(--radius); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Grids */
.grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-4 { display: grid; gap: var(--space-5); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { display: grid; gap: var(--space-6) var(--space-7); grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Cards */
.card { border: 1px solid var(--color-line); border-radius: var(--radius); padding: var(--space-5); background: var(--color-white); }
.card h3 { font-family: var(--font-body); font-size: var(--text-base); }
.card ul { margin: 0; }

.card-link { display: flex; flex-direction: column; border: 1px solid var(--color-line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; background: var(--color-white); }
.card-link:hover { border-color: var(--color-brand-text); color: inherit; }
.card-link img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-link div { padding: var(--space-5); display: flex; flex-direction: column; flex: 1; }
.card-link h3 { margin-bottom: var(--space-2); }
.card-link p { color: var(--color-muted); }
.card-link .more { margin: auto 0 0; color: var(--color-brand-text); font-weight: 600; }

/* Customer logos */
/* Customer logos: the list is doubled, sliding by half loops seamlessly */
.logos { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logos ul { display: flex; width: max-content; list-style: none; padding: 0; margin: 0; animation: logos 40s linear infinite; }
.logos ul:hover { animation-play-state: paused; }
.logos li { margin: 0; padding-right: var(--space-7); }
.logos img { width: 112px; height: 112px; object-fit: contain; filter: grayscale(1); transition: filter .2s; }
.logos img:hover { filter: none; }
@keyframes logos { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.logos { mask-image: none; }
	.logos ul { animation: none; width: auto; flex-wrap: wrap; justify-content: center; gap: var(--space-6); }
	.logos li { padding: 0; }
	.logos li[aria-hidden] { display: none; }
}

/* Features: text + screenshot, alternating sides */
.toc { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); list-style: none; padding: 0; margin: 0; font-size: var(--text-sm); }
.toc li + li { margin-top: 0; }
.feature { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-7); align-items: center; padding: var(--space-7) 0; border-top: 1px solid var(--color-line); }
.feature:nth-of-type(even) .feature-visual { order: -1; }
.feature-visual img { margin: 0 auto; max-height: 360px; width: auto; }

/* End-of-page call to action */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); }
.cta h2 { font-size: var(--text-h3); margin: 0; }
.cta p { margin: var(--space-1) 0 0; color: var(--color-muted); }

/* Team and partners */
.person img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.person div { padding: var(--space-4); }
.person h3 { font-size: var(--text-base); }
.person p { font-size: var(--text-sm); }
.profile { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-7); align-items: start; }
.profile img { border-radius: var(--radius); }
.profile .role { color: var(--color-muted); font-weight: 600; }
.back { display: inline-block; margin-bottom: var(--space-5); font-size: var(--text-sm); }
.partner-logo, .card-link .partner-logo { max-width: 200px; max-height: 80px; width: auto; aspect-ratio: auto; object-fit: contain; object-position: left; margin-bottom: var(--space-3); }
/* Member without a photo: initials until a portrait is available */
.initials { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; background: var(--color-surface); color: var(--color-brand-text); font-family: var(--font-heading); font-size: var(--text-h1); font-weight: 700; border-radius: var(--radius); }
.card-link .initials { border-radius: 0; }

/* Presentation video: the whole preview starts it (Chrome ignores clicks on a <video>); a link to the file without JS */
a.video { display: block; }
.video { width: 100%; aspect-ratio: 16 / 9; background: var(--color-surface); }

/* Last two words grouped by the generator (keep_last_words_together): unbreakable when there is room */
.nw-always { white-space: nowrap; }

/* --- Footer --- */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-line); font-size: var(--text-sm); }
.footer-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); padding-top: var(--space-7); padding-bottom: var(--space-6); }
.footer-inner .logo img { width: 150px; }
.footer-legal { padding-top: var(--space-4); padding-bottom: var(--space-6); border-top: 1px solid var(--color-line); color: var(--color-muted); }
.footer-legal p { margin: 0; }

/* --- Small screens --- */
@media (min-width: 521px) {
	.nw { white-space: nowrap; }
}
@media (max-width: 860px) {
	:root { --text-h1: 2rem; --text-h2: 1.5rem; --text-lead: 1.125rem; }
	/* Compact header so it can stay sticky (95px tall on a phone instead of 135px) */
	.header-inner { padding-top: var(--space-2); padding-bottom: var(--space-2); row-gap: var(--space-1); }
	.logo img { width: 140px; }
	.menu { gap: var(--space-1) var(--space-4); }
	.menu a:not(.btn) { font-size: 0.9375rem; }
	.menu .btn-small { padding: 2px var(--space-3); }
	html { scroll-padding-top: 7rem; }
	.hero, .grid-2, .feature, .profile, .footer-inner { grid-template-columns: minmax(0, 1fr); }
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero { gap: var(--space-6); padding-top: var(--space-7); padding-bottom: var(--space-7); }
	.feature { gap: var(--space-5); }
	.feature:nth-of-type(even) .feature-visual { order: 0; }
	.feature-visual img { max-height: 280px; }
	.profile img { max-width: 200px; }
	.section, .section-muted { padding: var(--space-7) 0; }
	.section-muted + .section { padding-top: var(--space-7); }
	.page-title { margin-top: var(--space-7); }
}
@media (max-width: 520px) {
	.wrap { padding-left: var(--space-4); padding-right: var(--space-4); }
	.grid-4 { grid-template-columns: minmax(0, 1fr); }
	.logo img { width: 150px; }
	.menu { gap: var(--space-2) var(--space-4); font-size: var(--text-sm); }
}
