/*
 * Fatiin theme styles. Colours, fonts and font sizes live in theme.json.
 *
 * NAMING
 *   Every class starts with "fatiin-" and follows one pattern:
 *     fatiin-thing            a component            (fatiin-box, fatiin-tag)
 *     fatiin-thing__part      a part inside it       (fatiin-header__logo, fatiin-client__logo)
 *     fatiin-thing--variant   a different version    (fatiin-box--dark, fatiin-section--tinted)
 *   Classes like wp-block-group or is-layout-flow are added by WordPress itself.
 *
 * ALL CLASSES
 *   Header    fatiin-header, fatiin-header__bar, fatiin-header__logo, fatiin-header__actions, fatiin-header__menu
 *   Banner    fatiin-hero, fatiin-hero__grid, fatiin-hero__text, fatiin-hero__art
 *   Sections  fatiin-section, fatiin-section--tinted, fatiin-section--grey, fatiin-section--dark, fatiin-section__heading
 *   Boxes     fatiin-box, fatiin-box--dark, fatiin-box--accent, fatiin-box--glass, fatiin-box--outline, fatiin-box__section
 *   Layout    fatiin-grid, fatiin-icon-title, fatiin-about, fatiin-about__media
 *   Text      fatiin-tag, fatiin-label, fatiin-lead, fatiin-muted, fatiin-info, fatiin-checklist
 *   Images    fatiin-media, fatiin-icon (--sm, --md, --lg, --plain), fatiin-avatars (__item, __more, __caption), fatiin-avatar
 *   Clients   fatiin-client, fatiin-client__logo
 *   Buttons   fatiin-button--light (plus WordPress's is-style-outline)
 *   Footer    fatiin-footer, fatiin-footer__columns, fatiin-footer__menu, fatiin-footer__note
 *
 * SHARED VALUES (change here, applies everywhere)
 */
:root {
	--fatiin-radius: 20px;          /* every box, picture and banner card */
	--fatiin-radius-inner: 12px;    /* small items inside a box */
	--fatiin-radius-pill: 999px;    /* buttons, tags, round badges */
	--fatiin-pad: clamp(1.5rem, 3vw, 2rem);            /* space inside every box */
	--fatiin-section-space: clamp(64px, 9vw, 100px);   /* space above and below every section */
	--fatiin-side-space: var(--wp--preset--spacing--x-small);
	--fatiin-border: 1px solid var(--wp--preset--color--outline);
	--fatiin-border-dark: 1px solid rgba(255, 255, 255, 0.12);
	--fatiin-divider-dark: 1px solid rgba(255, 255, 255, 0.22);
	--fatiin-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 10px 30px rgba(17, 24, 39, 0.06);
	--fatiin-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--fatiin-speed: 160ms;
}

/* ---------- Base ---------- */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
a, button, .wp-element-button, .wp-block-navigation-item__content { touch-action: manipulation; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
#about, #services, #clients, #contact { scroll-margin-top: 20px; }
.wp-site-blocks > main { margin-top: 0; }

/* ---------- Buttons ---------- */
.wp-element-button,
.wp-block-button__link {
	border-radius: var(--fatiin-radius-pill);
	padding: 16px var(--wp--preset--spacing--small);
	transition: transform var(--fatiin-speed) var(--fatiin-ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.wp-element-button:active,
.wp-block-button__link:active { transform: scale(0.97); }
.fatiin-button--light > .wp-block-button__link {
	background: var(--wp--preset--color--pure-white);
	color: var(--wp--preset--color--secondary);
}
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	padding: 15px calc(var(--wp--preset--spacing--small) - 1px);
}
.fatiin-header .wp-block-button__link { padding: 10px 20px; }

/* ---------- Header ---------- */
.fatiin-header {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 100;
	padding: var(--wp--preset--spacing--small) var(--fatiin-side-space) var(--wp--preset--spacing--x-small);
}
.admin-bar .fatiin-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .fatiin-header { top: 46px; } }
.fatiin-header__logo { margin: 0; line-height: 0; }
.fatiin-header__logo img { height: 48px; width: auto; display: block; }
.fatiin-header__actions { gap: var(--wp--preset--spacing--large); }
.fatiin-header__menu {
	color: var(--wp--preset--color--pure-white);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: uppercase;
	gap: var(--wp--preset--spacing--medium);
}
.fatiin-header__menu a { text-decoration: none; }
@media (max-width: 781px) { .fatiin-header__actions { gap: var(--wp--preset--spacing--small); } }

/* ---------- Banner ---------- */
.fatiin-hero {
	background: var(--wp--preset--color--secondary) url(../images/bg-hero.jpg) center / cover no-repeat;
	color: var(--wp--preset--color--pure-white);
	padding: 150px var(--fatiin-side-space) 0;
	margin-top: 0;
}
.fatiin-hero h1 { color: var(--wp--preset--color--pure-white); line-height: 1.1; }
.fatiin-hero__grid { align-items: end; }
.fatiin-hero__text { padding-bottom: var(--wp--preset--spacing--large); }
.fatiin-hero__text .wp-block-buttons { margin-top: var(--wp--preset--spacing--medium); }
.fatiin-hero__art { margin: -40px 0 0; }
.fatiin-hero__art img { display: block; width: 100%; height: auto; }

/* ---------- Sections ---------- */
.fatiin-section {
	padding: var(--fatiin-section-space) var(--fatiin-side-space);
	margin-top: 0;
	margin-bottom: 0;
}
.fatiin-section > * + * { margin-top: var(--wp--preset--spacing--large); }
.fatiin-section--tinted { background: var(--wp--preset--color--light); }
.fatiin-section--grey { background: var(--wp--preset--color--surface); }
.fatiin-section--dark {
	background: var(--wp--preset--color--foreground) url(../images/bg-dark.jpg) center / cover no-repeat;
	color: var(--wp--preset--color--pure-white);
}
.fatiin-section--dark :is(h1, h2, h3, h4, h5, h6) { color: var(--wp--preset--color--pure-white); }
.fatiin-section__heading > * { margin-block: 0; }
.fatiin-section__heading > * + * { margin-top: var(--wp--preset--spacing--small); }
.fatiin-section__heading h2 { line-height: 1.1; }

/* ---------- Boxes ---------- */
.fatiin-box {
	background: var(--wp--preset--color--pure-white);
	border: var(--fatiin-border);
	border-radius: var(--fatiin-radius);
	box-shadow: var(--fatiin-shadow);
	padding: var(--fatiin-pad);
	color: var(--wp--preset--color--body);
	height: 100%;
}
.fatiin-box > :first-child { margin-top: 0; }
.fatiin-box > :last-child { margin-bottom: 0; }
.fatiin-box h2,
.fatiin-box h3 { margin-top: 0; }
/* Dark glass card (services, contact details) */
.fatiin-box--dark {
	background: var(--wp--preset--color--secondary);
	border: var(--fatiin-border-dark);
	box-shadow: none;
	color: rgba(255, 255, 255, 0.75);
}
.fatiin-box--dark :is(h2, h3) { color: var(--wp--preset--color--pure-white); }
.fatiin-box--dark a { color: var(--wp--preset--color--pure-white); }
/* Purple card (calls to action) */
.fatiin-box--accent {
	background: var(--wp--preset--color--highlight);
	border-color: transparent;
	color: var(--wp--preset--color--pure-white);
}
.fatiin-box--accent :is(h2, h3) { color: var(--wp--preset--color--pure-white); }
/* See-through card on the banner */
.fatiin-box--glass {
	background: rgba(25, 24, 36, 0.54);
	border: var(--fatiin-border-dark);
	box-shadow: none;
	color: var(--wp--preset--color--pure-white);
	padding: var(--wp--preset--spacing--large);
	height: auto;
}
.fatiin-box--glass h3 { color: var(--wp--preset--color--pure-white); margin-bottom: 0.25rem; }
.fatiin-box--glass p { margin-top: 0; }
/* Dashed box (call us) */
.fatiin-box--outline {
	border: 2px dashed var(--wp--preset--color--outline);
	box-shadow: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--small);
	height: auto;
}
.fatiin-box--outline > * { margin: 0 !important; }
/* A section inside a box, divided by a line */
.fatiin-box__section {
	padding-bottom: var(--wp--preset--spacing--large);
	margin-bottom: var(--wp--preset--spacing--large);
	border-bottom: var(--fatiin-divider-dark);
}

/* ---------- Layout ---------- */
/* grid gap is set on each grid block (spacing "small") so WordPress can work out the columns */
.fatiin-icon-title { gap: var(--wp--preset--spacing--x-small); margin-bottom: var(--wp--preset--spacing--small); }
.fatiin-icon-title h3 { margin: 0; }
.fatiin-about { gap: var(--wp--preset--spacing--x-large); }
.fatiin-about__media > .fatiin-box {
	position: relative;
	margin: -80px var(--wp--preset--spacing--medium) 0;
	border: 5px solid var(--wp--preset--color--light);
	height: auto;
}

/* ---------- Text ---------- */
/* Small pill label above a title */
.fatiin-tag {
	display: flex !important;
	width: fit-content;
	gap: var(--wp--preset--spacing--xx-small);
	align-items: center;
	background: var(--wp--preset--color--pure-white);
	border-bottom: 5px solid var(--wp--preset--color--outline);
	border-radius: var(--fatiin-radius-pill);
	padding: 3px var(--wp--preset--spacing--x-small) 5px;
}
.fatiin-tag.is-content-justification-center { margin-inline: auto; }
.fatiin-tag p {
	margin: 0;
	color: var(--wp--preset--color--highlight);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: uppercase;
}
/* Small uppercase caption, e.g. PHONE, CALL US, footer headings */
.fatiin-label {
	margin: 0 0 0.25rem;
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--highlight);
}
.fatiin-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.3; }
.fatiin-muted { color: var(--wp--preset--color--neutral); }
.fatiin-section--dark .fatiin-muted,
.fatiin-hero .fatiin-muted { color: var(--wp--preset--color--light); }
.fatiin-info p { margin: 0; }
.fatiin-info a { text-decoration: underline; }
/* Ticked list */
.fatiin-checklist { list-style: none; padding: 0; margin: 0; }
.fatiin-checklist li {
	position: relative;
	padding-left: 28px;
	margin: 0 0 0.35rem;
	color: var(--wp--preset--color--secondary);
	font-weight: 500;
	line-height: 1.3;
}
.fatiin-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.1em;
	width: 18px;
	height: 18px;
	background: url(../images/icon-tick.png) center / contain no-repeat;
}

/* ---------- Images ---------- */
.fatiin-media { margin: 0; }
.fatiin-media img { display: block; width: 100%; height: auto; border-radius: var(--fatiin-radius); }
.fatiin-icon { margin: 0; flex-shrink: 0; line-height: 0; }
.fatiin-icon img { display: block; height: auto; }
.fatiin-icon--sm img { width: 20px; }
.fatiin-icon--md img {
	width: 48px;
	padding: 10px;
	box-sizing: border-box;
	border-radius: var(--fatiin-radius-inner);
	background: var(--wp--preset--color--highlight);
}
.fatiin-icon--lg img { width: 80px; }
.fatiin-icon--plain img { background: none; padding: 0; }
/* Row of round badges with a "+" */
.fatiin-avatars { gap: 0; align-items: center; }
.fatiin-avatars__item { margin: 0 0 0 -16px; line-height: 0; }
.fatiin-avatars__item:first-child { margin-left: 0; }
.fatiin-avatars__item img {
	width: 52px;
	height: 52px;
	border-radius: var(--fatiin-radius-pill);
	border: 4px solid var(--wp--preset--color--secondary);
}
.fatiin-avatars__more {
	margin: 0 0 0 -16px !important;
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: var(--fatiin-radius-pill);
	background: var(--wp--preset--color--highlight);
	border: 4px solid var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--pure-white);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
}
.fatiin-avatars__caption { margin: 0 0 0 var(--wp--preset--spacing--x-small) !important; font-size: var(--wp--preset--font-size--x-small); }
.fatiin-box--accent .fatiin-avatars :is(.fatiin-avatars__item img, .fatiin-avatars__more) { border-color: var(--wp--preset--color--highlight); }
.fatiin-avatar img { border-radius: var(--fatiin-radius-pill); }

/* ---------- Clients ---------- */
.fatiin-client {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--wp--preset--spacing--xx-small);
	min-height: 150px;
	text-align: center;
}
.fatiin-client p { margin: 0; font-size: var(--wp--preset--font-size--x-small); }
.fatiin-client__logo { margin: 0; line-height: 0; }
.fatiin-client__logo img { height: 64px; width: auto; max-width: 100%; }

/* ---------- Footer ---------- */
.fatiin-footer {
	background: var(--wp--preset--color--foreground) url(../images/bg-dark.jpg) center / cover no-repeat;
	color: rgba(255, 255, 255, 0.75);
	padding: var(--wp--preset--spacing--xx-large) var(--fatiin-side-space) var(--wp--preset--spacing--large);
	margin-top: 0;
}
.fatiin-footer .wp-block-site-title { color: var(--wp--preset--color--pure-white); font-weight: 600; }
.fatiin-footer .wp-block-site-title a { color: inherit; text-decoration: none; }
.fatiin-footer .fatiin-label { color: var(--wp--preset--color--pure-white); margin-bottom: var(--wp--preset--spacing--x-small); }
.fatiin-footer__menu { gap: var(--wp--preset--spacing--xx-small); font-size: var(--wp--preset--font-size--small); }
.fatiin-footer__menu a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.fatiin-footer__note {
	margin-top: var(--wp--preset--spacing--large) !important;
	padding-top: var(--wp--preset--spacing--small);
	border-top: var(--fatiin-border-dark);
}

/* ---------- Motion (assets/js/fatiin-motion.js) ----------
 * The head script adds .fatiin-motion only when the visitor has not asked to reduce motion.
 * These items stay hidden until GSAP fades them in; the same list is in fatiin-motion.js. */
.fatiin-motion :is(
	.fatiin-hero__text > *, .fatiin-hero__art, .fatiin-box--glass,
	.fatiin-section__heading,
	.fatiin-grid:not(.fatiin-hero__grid):not(.fatiin-about .fatiin-grid):not(.fatiin-box .fatiin-grid) > *,
	.fatiin-about > .wp-block-column,
	.fatiin-section > .wp-block-group > .fatiin-box--dark
) { visibility: hidden; opacity: 0; }

/* ---------- Hover (only where there is a mouse) ---------- */
@media (hover: hover) and (pointer: fine) {
	.fatiin-header__menu a:hover,
	.fatiin-footer__menu a:hover { color: var(--wp--preset--color--pure-white); text-decoration: underline; }
	.fatiin-button--light > .wp-block-button__link:hover { background: var(--wp--preset--color--light); color: var(--wp--preset--color--secondary); }
	.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.12); }
}
@media (hover: none) {
	.wp-block-button:not(.is-style-outline):not(.fatiin-button--light) > .wp-element-button:hover { background-color: var(--wp--preset--color--accent); }
}
@media (prefers-reduced-motion: reduce) {
	.wp-element-button:active,
	.wp-block-button__link:active { transform: none; }
}

/* ---------- Phones and tablets ---------- */
@media (max-width: 781px) {
	.fatiin-hero { padding-top: 120px; }
	.fatiin-hero__art { margin-top: 0; }
	.fatiin-about__media > .fatiin-box { margin-inline: var(--wp--preset--spacing--x-small); }
	.fatiin-footer__columns { gap: var(--wp--preset--spacing--medium); }
	/* Client logos: two per row instead of one very long column */
	.fatiin-grid:has(> .fatiin-client) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.fatiin-client { min-height: 120px; }
}
