/*
Theme Name:        Tibet Lobby Day
Description:       Theme for the Tibet Lobby Day, Canada website. Red and white masthead with menu, Cormorant Garamond and Jost typography, and a footer with the contact line and event description. Designed to pair with the Tibet Lobby Day plugin (registration form and past-years gallery).
Author:            Canada Tibet Lobby Day
Version:           1.3.0
Requires at least: 5.8
Requires PHP:      7.4
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       tibet-lobby-day-theme
Tags:              one-column, custom-menu, custom-logo, editor-style
*/

:root {
	--tl-navy: #B01E23;
	--tl-navy-deep: #8A161A;
	--tl-gold: #8A161A;
	--tl-gold-soft: #FBEDED;
	--tl-ivory: #FFFFFF;
	--tl-surface: #FFFFFF;
	--tl-fg: #231F20;
	--tl-muted: #625C5C;
	--tl-line: #E7DFDF;
	--tl-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--tl-body: "Jost", "Helvetica Neue", Arial, sans-serif;
	--tl-width: 760px;
	--tl-wide: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--tl-ivory);
	color: var(--tl-fg);
	font-family: var(--tl-body);
	font-size: 17px;
	line-height: 1.65;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--tl-navy); text-underline-offset: 3px; }
a:hover { color: var(--tl-gold); }
:focus-visible { outline: 2px solid var(--tl-gold); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link:focus {
	position: fixed !important; top: 8px; left: 8px; z-index: 100001; width: auto; height: auto; clip: auto;
	background: #fff; color: var(--tl-navy); padding: 10px 16px; border-radius: 3px; font-weight: 600;
}

.tl-wrap { width: 100%; max-width: var(--tl-wide); margin: 0 auto; padding-inline: 20px; }

/* ---------- Masthead ---------- */
.tl-mast {
	background: var(--tl-navy);
	color: var(--tl-ivory);
	border-bottom: 3px solid var(--tl-gold);
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .tl-mast { top: 32px; }
@media (max-width: 782px) { .admin-bar .tl-mast { top: 46px; } }
@media (max-width: 600px) { .admin-bar .tl-mast { top: 0; } }

.tl-mast .tl-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.tl-brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.tl-brand:hover { color: inherit; }
.tl-brand .custom-logo { max-height: 48px; width: auto; display: block; }
.tl-brand-text { font-family: var(--tl-display); font-size: 1.5rem; font-weight: 700; line-height: 1.1; letter-spacing: .01em; }
@media (max-width: 480px) { .tl-brand-text { font-size: 1.25rem; } }

.tl-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.tl-nav li { position: relative; }
.tl-nav a {
	display: block; color: var(--tl-ivory); text-decoration: none; font-size: .92rem; font-weight: 500;
	padding: 8px 14px; border-radius: 3px; border: 1px solid transparent;
}
.tl-nav a:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.tl-nav .current-menu-item > a,
.tl-nav .current_page_item > a { background: #fff; color: var(--tl-navy); }
.tl-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--tl-navy-deep); min-width: 200px; padding: 6px; flex-direction: column; border-radius: 3px; }
.tl-nav li:hover > .sub-menu, .tl-nav li:focus-within > .sub-menu { display: flex; }

.tl-menu-toggle {
	display: none; background: transparent; color: var(--tl-ivory); border: 1px solid rgba(255,255,255,.35);
	border-radius: 3px; padding: 8px 12px; font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer;
}
@media (max-width: 720px) {
	.tl-menu-toggle { display: inline-block; }
	.tl-nav { display: none; width: 100%; }
	.tl-nav.is-open { display: block; }
	.tl-nav ul { flex-direction: column; padding-bottom: 8px; }
	.tl-nav .sub-menu { display: flex; position: static; background: transparent; padding: 0 0 0 14px; }
}

/* ---------- Content ---------- */
.tl-main { flex: 1; padding-block: 44px 64px; }
.tl-content { max-width: var(--tl-width); margin: 0 auto; }

.tl-eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--tl-gold); }
h1, h2, h3, h4 { font-family: var(--tl-display); color: var(--tl-navy); line-height: 1.15; text-wrap: balance; font-weight: 600; }
.tl-page-title { font-size: clamp(2.2rem, 6vw, 3.1rem); margin: 6px 0 20px; }
.entry-content h2 { font-size: 1.9rem; margin: 2em 0 .5em; }
.entry-content h3 { font-size: 1.45rem; margin: 1.6em 0 .4em; }
.entry-content p, .entry-content ul, .entry-content ol { max-width: 65ch; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content blockquote { border-left: 3px solid var(--tl-gold); margin: 1.5em 0; padding: .2em 0 .2em 1.2em; font-family: var(--tl-display); font-size: 1.35rem; color: var(--tl-navy); }
.entry-content hr { border: 0; border-top: 1px solid var(--tl-line); margin: 2.5em 0; }
.entry-content .alignwide { margin-inline: calc((var(--tl-width) - var(--tl-wide)) / 2); max-width: var(--tl-wide); }
@media (max-width: 1120px) { .entry-content .alignwide { margin-inline: 0; } }
.entry-content .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.entry-content figcaption, .wp-caption-text { font-size: .82rem; color: var(--tl-muted); }
.wp-block-button__link, .entry-content button, input[type=submit] {
	background: var(--tl-navy); color: #fff; border-radius: 3px; font-family: var(--tl-body); font-weight: 600;
}
.wp-block-button__link:hover { background: var(--tl-navy-deep); color: #fff; }
.wp-block-gallery figure img { border-radius: 3px; }

/* Posts list (if the site ever uses news posts) */
.tl-post { padding-block: 24px; border-bottom: 1px solid var(--tl-line); }
.tl-post h2 { margin: 4px 0 8px; font-size: 1.8rem; }
.tl-post h2 a { text-decoration: none; }
.tl-meta { font-size: .82rem; color: var(--tl-muted); }
.tl-pagination { margin-top: 32px; display: flex; gap: 12px; }

/* The plugin's contact line moves to the site footer, which shows it on every page. */
.tl-has-footer-contact .tld .tld-contact { display: none; }

/* ---------- Footer ---------- */
.tl-footer { background: var(--tl-navy); color: var(--tl-ivory); border-top: 3px solid var(--tl-gold); }
.tl-footer .tl-wrap { padding-block: 28px; display: grid; gap: 8px; }
.tl-footer p { margin: 0; }
.tl-footer-contact { font-size: 1rem; max-width: 65ch; }
.tl-footer-contact a { color: #fff; font-weight: 600; word-break: break-all; }
.tl-footer-contact a:hover { color: var(--tl-gold-soft); }
.tl-footer-small { font-size: .8rem; opacity: .75; }
.tl-footer-menu ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
.tl-footer-menu a { color: var(--tl-ivory); }

/* 404 */
.tl-404 p { color: var(--tl-muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
