/* Portfolio page (body.tt-port, template page-portfolio-layout). Issue fabwintle/tourismtribe#138.
 * Layouts follow the Destinations patterns (dest-speak-hero, dest-logos,
 * dest-speak-people, dest-speak-organisers, dest-room-stage, dest-speak-capture).
 * Every colour, radius and font comes from the Tourism Tribe design reference
 * (docs/brand/design-reference.html) through the theme.json presets. Never destinations.css
 * (Fabienne, 14 Nov 2026). Every rule is scoped to .tt-port-* classes; type rules hang off .tt-port-sec so the
 * editor (add_editor_style) shows them too. */

:root { /* Custom properties on :root so add_editor_style() maps them onto the editor canvas too. */
	--tt-port-pad: 1.5rem; /* Matches the header's side padding, so every left edge lines up with the logo. */
	--tt-port-border: #e2e8f0; /* Design reference --border; no theme.json preset. */
	--tt-port-shadow: 0 4px 20px rgb(10 30 63 / 0.08), 0 1px 4px rgb(10 30 63 / 0.04);
	--tt-port-motif: url("data:image/svg+xml,%3Csvg viewBox='0 0 358 273' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform='translate(0,273) scale(0.1,-0.1)'%3E%3Cpath fill='%23fff' d='M360 2708 c-67 -26 -171 -125 -217 -208 -44 -78 -88 -211 -115 -342 -20 -99 -23 -143 -23 -353 0 -244 8 -329 46 -524 103 -516 364 -889 764 -1089 153 -76 391 -147 592 -176 143 -20 478 -21 618 -1 382 54 787 208 1055 400 284 205 409 407 477 775 14 76 18 149 18 370 0 278 -7 364 -45 587 -63 358 -207 565 -405 581 -78 6 -148 -23 -214 -89 -108 -108 -150 -203 -255 -572 -107 -372 -175 -532 -281 -654 -43 -51 -55 -53 -55 -14 0 16 -9 59 -21 96 -27 87 -88 156 -164 184 -111 42 -296 50 -423 20 -186 -45 -340 -192 -412 -396 -13 -35 -27 -63 -32 -63 -19 0 -143 135 -176 192 -82 140 -132 290 -213 647 -81 358 -120 460 -215 555 -89 91 -193 116 -304 74z'/%3E%3C/g%3E%3C/svg%3E");
}
.tt-port-main,
.tt-port-sec {
	background: var(--wp--preset--color--off-white);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--body);
}

/* Blocks inside the sections carry no flow gaps of their own; each section sets its spacing. */
.tt-port-main .wp-block-post-content > *,
.tt-port-sec :where(.wp-block-group) > * { margin-block-start: 0; margin-block-end: 0; }

/* ── One content width ──────────────────────────────────────────────── */
.tt-port-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1200px); /* Same as the header (--header-max). */
	margin-inline: auto;
	padding-inline: var(--tt-port-pad);
}
.tt-port-sec { padding-block: var(--wp--preset--spacing--50); }

/* ── Type ───────────────────────────────────────────────────────────── */
.tt-port-sec :is(h1, h2, h3) {
	font-family: var(--wp--preset--font-family--display);
	color: var(--wp--preset--color--primary);
	letter-spacing: -0.02em;
	line-height: 1.15;
}
.tt-port-sec h2 { font-size: var(--wp--preset--font-size--h-2); font-weight: 400; margin-bottom: var(--wp--preset--spacing--30); }
.tt-port-sec h3 { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.25rem; }
.tt-port-sec h2 em { font-style: italic; color: var(--wp--preset--color--teal-dark); }
.tt-port-kicker {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--teal-dark);
	margin-bottom: 0.5rem !important; /* Beats the zero block margin above. */
}
.tt-port-lead-s { font-size: var(--wp--preset--font-size--lead); line-height: 1.7; max-width: 46rem; margin-bottom: var(--wp--preset--spacing--40) !important; }
.tt-port-note { font-size: 0.85rem; color: var(--wp--preset--color--mid-grey); margin-top: var(--wp--preset--spacing--30) !important; }
.tt-port-sec a { color: var(--wp--preset--color--teal-dark); }
.tt-port-sec a:hover { color: var(--wp--preset--color--deep-navy); }

/* ── 1. Hero: design reference 09 (navy-to-teal panel, motifs at 0.04 to 0.10) ── */
.tt-port-hero-sec { padding-block: var(--wp--preset--spacing--40) 0; }
.tt-port-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: 1fr;
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem);
	border-radius: 24px; /* --r-lg, hero panels. */
	background: var(--wp--preset--gradient--hero);
	color: var(--wp--preset--color--white);
	box-shadow: 0 24px 64px rgb(10 30 63 / 0.3);
}
.tt-port-hero::before,
.tt-port-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
	background: var(--tt-port-motif) no-repeat center / contain;
}
.tt-port-hero::before { right: -30px; top: -30px; width: 340px; height: 260px; opacity: 0.07; }
.tt-port-hero::after { left: 30px; bottom: -40px; width: 200px; height: 152px; opacity: 0.04; }
@media (min-width: 900px) {
	.tt-port-hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; }
}
.tt-port-crumbs { font-size: 0.85rem; color: rgb(255 255 255 / 0.7); margin-bottom: var(--wp--preset--spacing--30) !important; }
.tt-port-sec .tt-port-crumbs a { color: rgb(255 255 255 / 0.9); text-decoration: underline; text-underline-offset: 3px; }
.tt-port-sec .tt-port-crumbs a:hover { color: var(--wp--preset--color--white); }
.tt-port-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.3rem 0.9rem;
	border-radius: 100px;
	border: 1px solid rgb(78 165 156 / 0.4);
	background: rgb(78 165 156 / 0.2);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgb(220 240 237);
	margin-bottom: var(--wp--preset--spacing--30) !important;
}
.tt-port-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--wp--preset--color--teal); }
.tt-port-sec .tt-port-title {
	font-size: var(--wp--preset--font-size--h-1);
	font-weight: 400;
	color: var(--wp--preset--color--white);
	margin-bottom: var(--wp--preset--spacing--30);
	max-width: 22ch;
}
.tt-port-title em { font-style: italic; color: var(--wp--preset--color--salmon); }
.tt-port-lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.7; color: rgb(255 255 255 / 0.85); max-width: 38rem; margin-bottom: 0.75rem !important; }
.tt-port-hero .tt-port-lead-s { font-size: 0.95rem; color: rgb(255 255 255 / 0.9); /* 5.5:1 at the teal end of its box; 0.7 measured 4.1:1. */ max-width: 38rem; margin-bottom: var(--wp--preset--spacing--40) !important; }
.tt-port-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tt-port-sec .tt-port-ctas .wp-block-button__link { display: inline-block; padding: 0.8rem 1.75rem; line-height: 1.4; } /* Design reference 05: 12px 28px; about 47px tall (44px touch target). */

.tt-port-hero-card {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary);
	border-radius: 16px;
	border-top: 4px solid var(--wp--preset--color--teal);
	padding: var(--wp--preset--spacing--30);
	box-shadow: 0 18px 40px rgb(0 0 0 / 0.25);
}
.tt-port-stat { padding-block: 0.75rem; border-bottom: 1px solid var(--tt-port-border); }
.tt-port-stat:last-child { border-bottom: 0; padding-bottom: 0; }
.tt-port-stat-n { font-family: var(--wp--preset--font-family--display); font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.1; color: var(--wp--preset--color--deep-navy); }
.tt-port-stat-l { font-size: 0.95rem; color: var(--wp--preset--color--mid-grey); margin-top: 0.15rem !important; }

/* ── 2. Organisers (dest-logos layout, as a grid) ───────────────────── */
.tt-port-logos {
	overflow: hidden;
	/* Soft fade at both ends of the line. */
	-webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.tt-port-logo-track {
	display: flex;
	width: max-content;
	animation: tt-port-logos 70s linear infinite; /* Two copies of the logos: moving by half loops seamlessly. */
}
.tt-port-logos:hover .tt-port-logo-track { animation-play-state: paused; }
@keyframes tt-port-logos { to { transform: translateX(-50%); } }
.tt-port-logo-track .tt-port-logo {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 168px;
	height: 84px;
	box-sizing: border-box;
	margin: 0 var(--wp--preset--spacing--20) 0 0 !important; /* Right margin, not gap, so half the track is exactly one set. */
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--tt-port-border);
	border-radius: 16px;
}
.tt-port-logo-track .tt-port-logo img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }
@media (prefers-reduced-motion: reduce) {
	.tt-port-logos { -webkit-mask-image: none; mask-image: none; }
	.tt-port-logo-track { animation: none; width: auto; flex-wrap: wrap; row-gap: var(--wp--preset--spacing--20); }
	.tt-port-logo-dup { display: none !important; }
}
/* Editor: one still copy of the logos. */
.editor-styles-wrapper .tt-port-logo-track { animation: none; width: auto; flex-wrap: wrap; row-gap: var(--wp--preset--spacing--20); }
.editor-styles-wrapper .tt-port-logo-dup { display: none !important; }

/* ── 3. Liz and Fabienne (dest-speak-people layout) ─────────────────── */
.tt-port-two { display: grid; gap: var(--wp--preset--spacing--30); grid-template-columns: 1fr; }
@media (min-width: 860px) { .tt-port-two { grid-template-columns: 1fr 1fr; } }
.tt-port-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--tt-port-border);
	border-top: 4px solid var(--wp--preset--color--teal);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--30);
	box-shadow: var(--tt-port-shadow);
}
.tt-port-person { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--wp--preset--spacing--20); align-items: start; }
.tt-port-person .tt-port-avatar { margin: 0; }
.tt-port-person .tt-port-avatar img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center top; display: block; }
.tt-port-person-body > * + * { margin-top: 0.5rem !important; }
.tt-port-role { font-size: 0.85rem; color: var(--wp--preset--color--mid-grey); margin-top: 0 !important; }
.tt-port-links { font-size: 0.9rem; }
.tt-port-links a { display: inline-block; padding-block: 0.6rem; } /* 44px tap height with the line. */

/* ── 4. Upcoming as cards (the [tt_engagements upcoming="1"] list) ──── */
body.tt-port .tt-port-upcoming:not(:has(li)) { display: none; } /* Front end only: the editor shows the shortcode text. */
.tt-port-upcoming h2 { margin-bottom: var(--wp--preset--spacing--30); }
.tt-port-upcoming ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--wp--preset--spacing--20); grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.tt-port-upcoming li {
	margin: 0;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--tt-port-border);
	border-top: 4px solid var(--wp--preset--color--salmon);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--30);
	box-shadow: var(--tt-port-shadow);
	line-height: 1.6;
}
.tt-port-upcoming li strong { font-family: var(--wp--preset--font-family--display); font-weight: 500; font-size: 1.15rem; line-height: 1.3; color: var(--wp--preset--color--primary); }

/* ── 5. What organisers say (dest-speak-organisers layout) ──────────── */
.tt-port-quotes {
	container-type: inline-size; /* 100cqw below is this box's width. */
	overflow: hidden;
	padding-block: 0.5rem 1.5rem; /* Room for the card shadows. */
	-webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.tt-port-quote-track {
	display: flex;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--30);
	width: max-content;
	/* Glides to the last card and back: no repeat copy, so screen readers hear each quote once. */
	animation: tt-port-quotes 45s ease-in-out infinite alternate;
}
.tt-port-quotes:is(:hover, :focus-within) .tt-port-quote-track { animation-play-state: paused; }
@keyframes tt-port-quotes { 0%, 8% { transform: translateX(0); } 92%, 100% { transform: translateX(calc(-100% + 100cqw)); } }
.tt-port-quote-track .tt-port-quote { flex: 0 0 auto; width: min(360px, 82cqw); }
@media (prefers-reduced-motion: reduce) {
	.tt-port-quotes { -webkit-mask-image: none; mask-image: none; }
	.tt-port-quote-track { animation: none; width: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
	.tt-port-quote-track .tt-port-quote { width: auto; }
}
.editor-styles-wrapper .tt-port-quote-track { animation: none; width: auto; flex-wrap: wrap; }
.tt-port-sec .tt-port-quote {
	position: relative;
	margin: 0;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30) var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--tt-port-border);
	border-top: 4px solid var(--wp--preset--color--teal);
	border-left: 1px solid var(--tt-port-border);
	border-radius: 16px;
	box-shadow: var(--tt-port-shadow);
	font-style: normal;
}
.tt-port-quote::before {
	content: "\201C";
	position: absolute;
	top: 0.25rem;
	left: var(--wp--preset--spacing--30);
	font-family: var(--wp--preset--font-family--display);
	font-size: 3.5rem;
	line-height: 1;
	color: var(--wp--preset--color--salmon);
}
.tt-port-quote p { font-size: 1rem; line-height: 1.7; }
.tt-port-quote cite { display: block; margin-top: var(--wp--preset--spacing--20); font-size: 0.85rem; font-style: normal; color: var(--wp--preset--color--mid-grey); }
.tt-port-quote cite strong { color: var(--wp--preset--color--primary); }

/* ── 6. The full record: years left, entries right (the year lists) ─── */
.tt-port-years h2 { font-size: var(--wp--preset--font-size--h-3); font-weight: 400; color: var(--wp--preset--color--teal-dark); margin: 0; }
.tt-port-years ul { margin: 0 0 var(--wp--preset--spacing--40); padding-left: 1.1rem; }
.tt-port-years li { margin-bottom: 0.6rem; line-height: 1.6; }
.tt-port-years li::marker { color: var(--wp--preset--color--teal); }
@media (min-width: 900px) {
	.tt-port-years { display: grid; grid-template-columns: 9rem minmax(0, 1fr); column-gap: var(--wp--preset--spacing--40); }
	.tt-port-years h2 { grid-column: 1; align-self: start; padding-top: 0.1rem; } /* Not sticky: every year shares one grid, so pinned years stacked on each other (Fabienne, 16 Nov 2026). */
	.tt-port-years ul { grid-column: 2; padding-top: 0.2rem; border-top: 1px solid var(--tt-port-border); padding-left: 1.25rem; padding-block-start: var(--wp--preset--spacing--20); }
}
@media (max-width: 899px) {
	.tt-port-years h2 { margin-bottom: var(--wp--preset--spacing--20); padding-top: var(--wp--preset--spacing--20); border-top: 1px solid var(--tt-port-border); }
}

/* ── 7. On stage (dest-room-stage layout, native image blocks) ──────── */
.tt-port-stage { display: grid; gap: var(--wp--preset--spacing--20); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .tt-port-stage { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tt-port-stage .tt-port-photo { position: relative; margin: 0; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--wp--preset--color--teal-light); }
.tt-port-stage .tt-port-photo-big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.tt-port-stage .tt-port-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tt-port-stage .tt-port-photo figcaption {
	position: absolute;
	inset: auto 0 0 0;
	margin: 0;
	padding: 2.5rem 0.9rem 0.7rem;
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--wp--preset--color--white);
	background: linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0));
}
.tt-port-stage .tt-port-photo figcaption strong { display: block; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
@media (max-width: 599px) {
	.tt-port-stage .tt-port-photo-big { aspect-ratio: 4 / 3; grid-row: auto; }
	.tt-port-stage .tt-port-photo figcaption span { display: none; }
}

/* ── 8. Closing call to action (dest-speak-capture layout, navy panel) ── */
.tt-port-cta-sec { padding-bottom: var(--wp--preset--spacing--60); }
.tt-port-cta {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: grid;
	gap: var(--wp--preset--spacing--30);
	grid-template-columns: 1fr;
	padding: clamp(1.75rem, 4vw, 3rem);
	border-radius: 24px;
	background: var(--wp--preset--color--deep-navy);
	color: rgb(255 255 255 / 0.85);
}
.tt-port-cta::after { content: ""; position: absolute; z-index: -1; right: -20px; bottom: -40px; width: 260px; height: 200px; opacity: 0.06; pointer-events: none; background: var(--tt-port-motif) no-repeat center / contain; }
@media (min-width: 860px) { .tt-port-cta { grid-template-columns: minmax(0, 1.4fr) auto; align-items: center; } }
.tt-port-sec .tt-port-cta h2 { color: var(--wp--preset--color--white); margin-bottom: 0.5rem; }
.tt-port-sec .tt-port-cta h2 em { color: var(--wp--preset--color--salmon); }

/* ── Focus and motion (website workbook B5) ─────────────────────────── */
.tt-port-sec a:focus-visible,
.tt-port-sec .wp-block-button__link:focus-visible { outline: 3px solid var(--wp--preset--color--teal); outline-offset: 3px; border-radius: 4px; }
.tt-port-hero a:focus-visible,
.tt-port-cta a:focus-visible { outline-color: var(--wp--preset--color--white); }
.tt-port-sec a:focus:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) {
	.tt-port-sec * { transition: none !important; animation: none !important; } /* Stops the lib.css button lift. */
}

/* ── Mobile: side gutter ────────────────────────────────────────────── */
@media (max-width: 599px) {
	.tt-port-main { --tt-port-pad: 1.25rem; }
	.tt-port-sec { padding-block: var(--wp--preset--spacing--40); }
	.tt-port-hero-sec { padding-block-end: 0; }
	.tt-port-person { grid-template-columns: 72px minmax(0, 1fr); }
	.tt-port-person .tt-port-avatar img { width: 72px; height: 72px; }
}
