/* News archives (home.php, archive.php; template-parts/wttc-archive.php). BEM "wttc-archive". Tokens and shared components
   (breadcrumbs, chip, card, closing band) come from tokens.css / components.css.
   White top (title, lead, category chips, the latest story), a light grey band with the grid and the pager, then the closing band.
   The header is the same as everywhere: transparent over the white with navy ink until the page scrolls (body class wttc-header-light). */
.wttc-archive { background: var(--wttc-white); color: #151B34; font-family: var(--wttc-font-sans); }
.wttc-archive a:not(.wttc-button) { color: inherit; } /* not the buttons: their own colours (components.css) must win */

/* ---------- Head ---------- */
.wttc-archive__head { padding: calc(var(--wttc-header-full) + clamp(16px, 4vh, 40px)) 0 clamp(36px, 7vh, 64px); }   /* vertical rhythm follows the screen height: a 14" laptop (about 1366 x 768) must show the title, the chips and the lead story together */
.wttc-archive__head .wttc-crumbs { margin-bottom: 18px; }
.wttc-archive__title { margin: 0; color: var(--wttc-navy); font: 400 clamp(40px, min(5.4vw, 9.5vh), 76px)/1.03 var(--wttc-font-serif); letter-spacing: -.8px; text-wrap: balance; }
.wttc-archive__intro { margin: 28px 0 0; max-width: 72ch; color: #151B34; font-size: 17px; line-height: 1.65; }
.wttc-archive__intro + .wttc-lead, .wttc-archive__head .wttc-wrap > .wttc-lead { margin-top: 36px; }
.wttc-archive__grid-title { margin: 0 0 28px; color: var(--wttc-navy); font: 400 clamp(28px, 3.2vw, 40px)/1.15 var(--wttc-font-serif); letter-spacing: -.3px; }
.wttc-archive__lead { margin: 20px 0 0; max-width: 56ch; color: rgba(21, 27, 52, .82); font-size: 19px; line-height: 1.55; }

/* Category chips: real links (each category is an indexable page), ONE row. What does not fit is folded behind a "+N" button that opens the
   rest in as many rows as needed (archive.js; without JavaScript they simply wrap). Every state is set. */
.wttc-chips { display: flex; align-items: flex-start; gap: 8px; margin-top: clamp(20px, 3.5vh, 32px); }
.wttc-chips__list { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: -3px; padding: 3px; list-style: none; }
.wttc-chips__list li { margin: 0; }
a.wttc-chips__link, a.wttc-chips__link:visited { display: block; padding: 8px 13px; border: 1px solid #D1CFC8; border-radius: 999px; background: var(--wttc-white); color: var(--wttc-navy); font: 500 12.5px/1.2 var(--wttc-font-sans); text-decoration: none; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
a.wttc-chips__link:hover, a.wttc-chips__link:focus-visible, a.wttc-chips__link:active { border-color: var(--wttc-navy); background: var(--wttc-white); color: var(--wttc-navy); }
a.wttc-chips__link.is-current, a.wttc-chips__link.is-current:hover, a.wttc-chips__link.is-current:focus-visible { border-color: var(--wttc-navy); background: var(--wttc-navy); color: var(--wttc-white); }
a.wttc-chips__link:focus-visible { outline: 2px solid var(--wttc-navy); outline-offset: 2px; }
.wttc-chips__more[hidden] { display: none; }
button.wttc-chips__more { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 34px; margin: 0; padding: 0 13px; box-sizing: border-box; border: 1px solid var(--wttc-navy); border-radius: 999px; background: var(--wttc-white); color: var(--wttc-navy); font: 600 12.5px/1 var(--wttc-font-sans); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
button.wttc-chips__more:hover, button.wttc-chips__more:focus-visible, button.wttc-chips__more:active { background: var(--wttc-navy); color: var(--wttc-white); border-color: var(--wttc-navy); }
button.wttc-chips__more:focus:not(:focus-visible):not(:hover):not(:active) { background: var(--wttc-white); color: var(--wttc-navy); }
button.wttc-chips__more:focus-visible { outline: 2px solid var(--wttc-navy); outline-offset: 2px; }
button.wttc-chips__more svg { display: block; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.wttc-chips.is-open button.wttc-chips__more svg { transform: rotate(180deg); }

/* Collapsed: one row high, the folded chips hidden (and out of the tab order). Opening grows the row, the folded chips come in one after
   the other; closing reverses it. */
.wttc-chips.is-collapsible .wttc-chips__list { overflow: hidden; max-height: calc(var(--row-h, 34px) + 6px); transition: max-height .4s cubic-bezier(.22, 1, .36, 1); }
.wttc-chips.is-collapsible.is-open .wttc-chips__list { max-height: var(--full-h, 400px); }
.wttc-chips.is-collapsible .wttc-chips__list li.is-extra { opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s ease, transform .25s ease, visibility 0s linear .25s; }
.wttc-chips.is-collapsible.is-open .wttc-chips__list li.is-extra { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease calc(var(--i, 0) * 35ms + 80ms), transform .4s cubic-bezier(.22, 1, .36, 1) calc(var(--i, 0) * 35ms + 80ms), visibility 0s; }
/* While the script measures, everything is laid out and nothing animates. */
.wttc-chips.is-measuring .wttc-chips__list { max-height: none !important; overflow: visible !important; }
.wttc-chips.is-measuring .wttc-chips__list li, .wttc-chips.is-measuring .wttc-chips__list li.is-extra { transition: none !important; opacity: 1 !important; visibility: visible !important; transform: none !important; }

/* ---------- Hero picture (the featured image of the News page): FULL WIDTH, the header floats over its top exactly as on the home
   (blur, then navy once the page scrolls), a navy fade so the white text reads, breadcrumbs, title and lead at the bottom left in the
   content column. Its height follows the screen height so a 14" laptop still sees the chips and part of the lead story under it.
   Without a picture: the white head above (the header then has navy ink). ---------- */
.wttc-archive__head.has-hero { padding: 0 0 clamp(24px, 4vh, 40px); }
.wttc-archive__hero { position: relative; display: flex; align-items: flex-end; min-height: 450px; overflow: hidden; background: var(--wttc-navy); color: var(--wttc-white); isolation: isolate; }
.wttc-archive__hero-img { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.wttc-archive__hero::after { content: ""; position: absolute; inset: 0; z-index: -1; /* Tint of the navy fade over the picture: top (behind the header), middle, bottom (behind the title). Lower the three numbers for a lighter photo. */
	--tint-top: .30; --tint-mid: .04; --tint-bottom: .58;
	background: linear-gradient(to bottom, rgba(21, 27, 52, var(--tint-top)) 0%, rgba(21, 27, 52, var(--tint-mid)) 42%, rgba(21, 27, 52, var(--tint-bottom)) 100%); pointer-events: none; }
.wttc-archive__hero-inner { padding-top: var(--wttc-header-full); padding-bottom: clamp(22px, 4vh, 40px); }
.wttc-archive__hero .wttc-crumbs { margin-bottom: 14px; }
.wttc-archive__hero .wttc-archive__title { color: var(--wttc-white); font-size: clamp(38px, min(5vw, 9vh), 72px); }
.wttc-archive__hero .wttc-archive__lead.is-long { max-width: 74ch; font-size: 17px; line-height: 1.6; }
.wttc-archive__hero .wttc-archive__lead { margin-top: 14px; max-width: 56ch; color: rgba(255, 255, 255, .9); font-size: 18px; }
.wttc-archive__head.has-hero .wttc-chips { margin-top: clamp(18px, 3vh, 28px); }
.wttc-archive__head.has-hero a.wttc-lead { margin-top: clamp(20px, 3.5vh, 36px); }
@media (max-width: 767px) {
	.wttc-archive__hero { min-height: 270px; }
	.wttc-archive__hero .wttc-archive__lead { font-size: 16px; }
}

/* ---------- Lead story: the latest, large, on page 1 ---------- */
a.wttc-lead, a.wttc-lead:visited, a.wttc-lead:hover, a.wttc-lead:focus, a.wttc-lead:active { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: center; margin-top: clamp(28px, 5vh, 56px); color: inherit; text-decoration: none; }
.wttc-lead:focus-visible { outline: 2px solid var(--wttc-navy); outline-offset: 6px; border-radius: 16px; }
.wttc-lead__media { display: block; aspect-ratio: 16 / 10; max-height: min(46vh, 520px); overflow: hidden; border-radius: 16px; background: rgba(209, 207, 200, .55); }
.wttc-lead__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.wttc-lead:hover .wttc-lead__media img { transform: scale(1.03); }
.wttc-lead__body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.wttc-lead__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; font-size: 12px; color: rgba(21, 27, 52, .68); }
.wttc-lead__title { color: var(--wttc-navy); font: 400 clamp(26px, 2.55vw, 40px)/1.15 var(--wttc-font-serif); text-wrap: balance; }
.wttc-lead__text { color: rgba(21, 27, 52, .82); font-size: 17px; line-height: 1.55; }
.wttc-lead__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--wttc-navy); font: 600 12px/1.4 var(--wttc-font-sans); letter-spacing: .5px; text-transform: uppercase; }
.wttc-lead__more svg { transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
.wttc-lead:hover .wttc-lead__more svg, .wttc-lead:focus-visible .wttc-lead__more svg { transform: translateX(4px); }

/* ---------- Grid band ---------- */
.wttc-archive__grid { padding: clamp(40px, 7vh, 64px) 0 clamp(48px, 9vh, 80px); background: var(--wttc-cream); }
.wttc-archive__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.wttc-archive__empty { margin: 0; color: rgba(21, 27, 52, .82); font-size: 17px; }

/* ---------- Pager ---------- */
.wttc-pager { margin-top: 48px; }
.wttc-pager__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wttc-pager__item { margin: 0; }
.wttc-pager .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; box-sizing: border-box; border: 1px solid #D1CFC8; border-radius: 8px; background: var(--wttc-white); color: var(--wttc-navy); font: 500 14px/1 var(--wttc-font-sans); text-decoration: none; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.wttc-pager a.page-numbers:hover, .wttc-pager a.page-numbers:focus-visible, .wttc-pager a.page-numbers:active { border-color: var(--wttc-navy); background: var(--wttc-white); color: var(--wttc-navy); }
.wttc-pager span.page-numbers.current { border-color: var(--wttc-navy); background: var(--wttc-navy); color: var(--wttc-white); }
.wttc-pager span.page-numbers.dots { border-color: transparent; background: transparent; }
.wttc-pager a.page-numbers:focus-visible { outline: 2px solid var(--wttc-navy); outline-offset: 2px; }

@media (max-width: 1024px) {
	.wttc-archive__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	a.wttc-lead, a.wttc-lead:visited, a.wttc-lead:hover, a.wttc-lead:focus, a.wttc-lead:active { gap: 36px; }
}
@media (max-width: 767px) {
	.wttc-archive__head { padding-bottom: 40px; }
	.wttc-archive__lead { font-size: 17px; }
	a.wttc-lead, a.wttc-lead:visited, a.wttc-lead:hover, a.wttc-lead:focus, a.wttc-lead:active { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 36px; }
	.wttc-archive__grid { padding: 40px 0 56px; }
	.wttc-archive__cards { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.wttc-pager { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) { a.wttc-chips__link, .wttc-pager .page-numbers, .wttc-lead__media img, .wttc-lead__more svg { transition: none; } .wttc-lead:hover .wttc-lead__media img { transform: none; } }
.wttc-archive__hero .wttc-archive__lead a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
