/*
Theme Name: TrapThink
Theme URI: https://trapthink.com
Author: Darren Ebbing
Description: The TrapThink podcast site. Spot the trap. Hold the line.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trapthink
*/

/* ---------- Basics ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* Small all-caps label above headings */
.tt-kicker {
	font-size: 0.8125rem !important;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin: 0;
}
.tt-dark .tt-kicker { color: var(--wp--preset--color--slate-light); }
.tt-kicker.tt-red { color: var(--wp--preset--color--red-text); }
.tt-dark .tt-kicker.tt-red { color: var(--wp--preset--color--red-bright); }

/* Big serif headline */
.tt-display {
	font-size: clamp(3rem, 7vw, 5.5rem) !important;
	line-height: 0.98 !important;
	letter-spacing: -0.02em;
}
.tt-display .tt-accent { color: var(--wp--preset--color--red-bright); }
.tt-h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem) !important; line-height: 1.1 !important; }
.tt-lede { font-size: 1.25rem !important; line-height: 1.55; }
.tt-measure { max-width: 760px; }
.is-layout-constrained > .tt-measure { margin-left: 0 !important; margin-right: auto !important; }

/* "Play the episode" link drawn as a red pill */
.wp-block-read-more.tt-cta {
	display: inline-block; background: var(--wp--preset--color--red); color: var(--wp--preset--color--white);
	font-weight: 700; padding: 0.85em 1.5em; border-radius: 999px; text-decoration: none; margin-top: 8px;
}
.wp-block-read-more.tt-cta:hover { background: #9E2F28; color: var(--wp--preset--color--white); }

/* ---------- Section bands ---------- */
.tt-section { padding: 88px 32px; }
.tt-section.tt-tight { padding-top: 56px; padding-bottom: 56px; }
.tt-dark { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }
.tt-dark p:not(.tt-kicker) { color: var(--wp--preset--color--mist); }
.tt-dark a:not(.wp-element-button) { color: var(--wp--preset--color--white); }
.tt-slate { background: var(--wp--preset--color--slate); color: var(--wp--preset--color--white); }
.tt-slate p { color: #E4ECF3; }
.tt-slate .tt-kicker { color: #D6E4EF; }
.tt-grey { background: var(--wp--preset--color--fog); }
@media (max-width: 640px) { .tt-section { padding: 56px 16px; } }

/* ---------- Header ---------- */
.tt-header { background: var(--wp--preset--color--white); border-bottom: 1px solid var(--wp--preset--color--line); padding: 12px 32px; }
.tt-header .tt-brand { display: flex; align-items: center; gap: 10px; }
.tt-header .tt-brand img { display: block; }
.tt-header .wp-block-navigation a { font-weight: 600; font-size: 0.9375rem; padding: 10px 6px; }
@media (max-width: 640px) { .tt-header { padding: 10px 16px; } }

/* ---------- Buttons ---------- */
.wp-block-button .wp-block-button__link { border-radius: 999px; font-weight: 700; padding: 0.9em 1.6em; }
.wp-block-button.is-style-tt-ghost .wp-block-button__link {
	background: transparent; color: inherit; border: 1.5px solid #4A5A6B; font-weight: 600;
}
.tt-grey .wp-block-button.is-style-tt-ghost .wp-block-button__link,
.tt-white .wp-block-button.is-style-tt-ghost .wp-block-button__link { border-color: #C5CDD6; color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-tt-ink .wp-block-button__link { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }

/* ---------- Cover art ---------- */
.tt-cover img { border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.tt-art img, .tt-art.wp-block-post-featured-image img { border-radius: 16px; aspect-ratio: 1 / 1; object-fit: cover; }

/* ---------- Platform links ---------- */
.tt-platforms { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.875rem; }
.tt-platforms a { font-weight: 600; }

/* ---------- Latest episode card ---------- */
.tt-latest { background: var(--wp--preset--color--fog); border-radius: 24px; padding: 32px; }
.tt-pill {
	display: inline-block; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white);
	font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
	padding: 6px 12px; border-radius: 999px;
}
.tt-pill a { color: inherit !important; text-decoration: none; }
.tt-dark .tt-pill { background: var(--wp--preset--color--red); }
.tt-meta { font-size: 0.875rem; color: var(--wp--preset--color--muted); }
.tt-dark .tt-meta { color: var(--wp--preset--color--mist); }

/* ---------- Pillars ---------- */
.tt-pillar { border-top: 4px solid var(--wp--preset--color--ink); padding-top: 20px; }
.tt-pillar.tt-pillar-red { border-top-color: var(--wp--preset--color--red); }

/* ---------- Show cards (dark) ---------- */
.tt-showcard { background: var(--wp--preset--color--ink-2); border-radius: 20px; padding: 24px; height: 100%; box-sizing: border-box; }
.tt-showcard h3 a { text-decoration: none; }

/* ---------- Episode rows ---------- */
.tt-rows .wp-block-post { border-top: 1px solid var(--wp--preset--color--line); padding: 16px 0; margin: 0; }
.tt-rows .wp-block-post:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.tt-row { display: flex; align-items: center; gap: 16px; }
.tt-row .wp-block-post-featured-image { flex: none; width: 72px; margin: 0; }
.tt-row .wp-block-post-featured-image img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.tt-row .wp-block-post-title { font-size: 1.25rem; margin: 0; }
.tt-row .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.tt-row-meta { display: flex; gap: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--wp--preset--color--muted); }
.tt-row-meta > * { margin: 0 !important; }
.tt-row-meta .wp-block-post-terms a { color: var(--wp--preset--color--muted); text-decoration: none; }

/* Start here numbered list */
.tt-start { counter-reset: tt; list-style: none; padding: 0; margin: 0; }
.tt-start li { counter-increment: tt; position: relative; padding-left: 52px; margin-bottom: 22px; font-size: 0.9375rem; color: var(--wp--preset--color--muted); }
.tt-start li::before {
	content: counter(tt); position: absolute; left: 0; top: -6px;
	font-family: var(--wp--preset--font-family--fraunces); font-weight: 800; font-size: 2.5rem; line-height: 1;
	color: var(--wp--preset--color--red);
}
.tt-start li a { display: block; font-family: var(--wp--preset--font-family--fraunces); font-size: 1.375rem; font-weight: 700; color: var(--wp--preset--color--ink); text-decoration: none; margin-bottom: 2px; }
.tt-start li a:hover { color: var(--wp--preset--color--red-text); }

/* ---------- Newsletter ---------- */
.tt-slate .wp-block-button .wp-block-button__link { background: var(--wp--preset--color--ink); }

/* ---------- Host ---------- */
.tt-headshot img { border-radius: 20px; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Single episode ---------- */
.tt-episode-hero .wp-block-post-title { font-size: clamp(2.5rem, 5.5vw, 4.25rem); line-height: 1; letter-spacing: -0.02em; }
.tt-episode-hero .wp-block-post-excerpt__excerpt { font-size: 1.1875rem; line-height: 1.6; color: var(--wp--preset--color--mist); }
.tt-episode-hero .wp-block-post-featured-image img { border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); aspect-ratio: 1 / 1; object-fit: cover; }
.tt-episode-body .wp-block-post-content > h2 { font-size: 1.875rem; margin-top: 56px; }
.tt-episode-body .wp-block-post-content > h2:first-child { margin-top: 0; }
.tt-episode-body .wp-block-post-content h3 {
	font-family: var(--wp--preset--font-family--inter); font-size: 0.8125rem; font-weight: 700;
	letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--muted); margin-top: 28px;
}
.tt-chapters { list-style: none; padding: 0; border-top: 1px solid var(--wp--preset--color--line); }
.tt-chapters li { padding: 14px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.tt-sources { list-style: none; padding: 0; }
.tt-sources li { margin-bottom: 10px; }
.tt-episode-body .wp-block-details { background: var(--wp--preset--color--fog); border-radius: 18px; padding: 24px 28px; }
.tt-episode-body .wp-block-details summary { font-weight: 700; cursor: pointer; color: var(--wp--preset--color--red-text); }
.tt-episode-body .wp-block-audio audio { width: 100%; }
.tt-episode-body iframe { width: 100%; border: 0; border-radius: 14px; }

.tt-side-card { border-radius: 20px; padding: 28px; }
.tt-side-card.tt-outline { border: 1px solid var(--wp--preset--color--line); }
.tt-side-card h2 { font-size: 1.625rem; line-height: 1.15; }

/* ---------- Archive grid ---------- */
.tt-grid .wp-block-post-template { gap: 32px; }
.tt-grid .wp-block-post-title { font-size: 1.375rem; }
.tt-grid .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }

/* ---------- Footer ---------- */
.tt-footer { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--mist); padding: 64px 32px 32px; }
.tt-footer a { color: var(--wp--preset--color--white); text-decoration: none; }
.tt-footer a:hover { text-decoration: underline; }
.tt-footer .tt-legal { border-top: 1px solid #253241; padding-top: 20px; margin-top: 40px; font-size: 0.8125rem; color: #A9B6C3; }
@media (max-width: 640px) { .tt-footer { padding: 48px 16px 24px; } }
