/*
Theme Name: Tara Rampal
Theme URI: https://tararampal.com/
Description: Personal website theme for Professor Tara Rampal — Consultant Anaesthetist, prehabilitation pioneer and Visiting Professor. A lightweight block theme with self-hosted fonts and a homepage pattern.
Version: 1.3.1
Requires at least: 6.5
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: tara-rampal
*/

/* ---------- Base ---------- */
:root {
	--tr-ink: #13222E;
	--tr-slate: #3B4A55;
	--tr-muted: #56636D;
	--tr-accent: #0B6560;
	--tr-accent-dark: #07423F;
	--tr-gold: #F2B85B;
	--tr-mist: #F3F6F5;
	--tr-line: #E3E8EA;
	--tr-display: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}
body { -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 24px; }
:where(.wp-site-blocks) > main { margin-block-start: 0; }
.wp-block-post-content > .tr-section,
.wp-block-post-content > .tr-section + .tr-section { margin-block-start: 0 !important; margin-block-end: 0 !important; }
:focus-visible { outline: 3px solid var(--tr-gold); outline-offset: 3px; }

/* ---------- Header ---------- */
.tr-header { border-bottom: 1px solid var(--tr-line); background: #fff; }
.tr-header__inner { padding-block: 16px; }
.tr-wordmark { margin: 0; font-family: var(--tr-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.tr-wordmark a { color: var(--tr-ink); text-decoration: none; }
.tr-wordmark a::after { content: "."; color: var(--tr-accent); }
.tr-nav { font-size: 16px; font-weight: 600; }
.tr-nav a { color: var(--tr-ink); text-decoration: none; }
.tr-nav a:hover { color: var(--tr-accent); }
.tr-header .wp-block-button__link { padding: 0.65rem 1.25rem; font-size: 1rem; }
@media (max-width: 600px) { .tr-header-cta { display: none !important; } }

/* ---------- Sections ---------- */
.tr-section { padding-block: 88px; }
.tr-section--tight-bottom { padding-bottom: 40px; }
.tr-mist { background: var(--tr-mist); }
.tr-eyebrow { margin: 0; font-family: var(--tr-display); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tr-accent); }
.tr-lead { font-size: 1.3rem; color: var(--tr-slate); max-width: 620px; }
.tr-muted { color: var(--tr-slate); }
.tr-small { font-size: 16px; color: var(--tr-slate); }
.tr-section h2 { margin-top: 0.5rem; }

/* Buttons */
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1.5px solid currentColor; color: var(--tr-ink); background: transparent; padding: calc(0.85rem - 1.5px) calc(1.6rem - 1.5px); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--tr-ink); color: #fff; }
.wp-block-button__link { min-height: 44px; }

/* ---------- Hero ---------- */
.tr-hero { background: var(--tr-mist); padding-block: 88px 72px; }
.tr-hero h1 { margin-block: 0.4rem 0; }
.tr-hero-media { position: relative; }
.tr-portrait { margin: 0; }
.tr-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; display: block; }
.tr-badge { position: absolute; left: -28px; bottom: 32px; max-width: 300px; background: #fff; border-radius: 16px; padding: 18px 20px 18px 66px !important; box-shadow: 0 12px 32px rgba(19, 34, 46, 0.14); }
.tr-badge::before { content: ""; position: absolute; left: 20px; top: 20px; width: 32px; height: 32px; background: #B26B00;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M8.5 14 7 22l5-3 5 3-1.5-8'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='6'/%3E%3Cpath d='M8.5 14 7 22l5-3 5 3-1.5-8'/%3E%3C/svg%3E") center / contain no-repeat; }
.tr-badge p { margin: 0; line-height: 1.35; }
.tr-badge__title { font-family: var(--tr-display); font-weight: 800; font-size: 15px; color: var(--tr-ink); }
.tr-badge__text { font-size: 14px; color: var(--tr-slate); }

/* ---------- Featured-in bar ---------- */
.tr-featured { border-bottom: 1px solid var(--tr-line); padding-block: 28px; }
.tr-featured p { margin: 0; font-family: var(--tr-display); font-weight: 700; font-size: 18px; color: var(--tr-slate); }
.tr-featured p.tr-featured__label { font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tr-muted); }

/* ---------- Dark award band ---------- */
.tr-dark { background: var(--tr-ink); color: #fff; }
.tr-dark h2, .tr-dark h3 { color: #fff; }
.tr-dark p { color: #D5DEE3; }
.tr-dark .tr-eyebrow { color: var(--tr-gold); }
.tr-dark strong { color: #fff; }
.tr-dark a { color: var(--tr-gold); }
.tr-dark a:hover { color: #fff; }
.tr-tile { background: #1C3142; border-radius: 16px; padding: 22px; }
.tr-tile p { margin: 0; font-size: 15px; line-height: 1.4; }
.tr-dark p.tr-tile__year { font-family: var(--tr-display); font-weight: 800; font-size: 34px; color: var(--tr-gold); line-height: 1.2; }

/* ---------- Cards ---------- */
.tr-card { border: 1px solid var(--tr-line); border-radius: 20px; padding: 28px; height: 100%; box-sizing: border-box; background: #fff; }
.tr-card--accent { border-top: 4px solid var(--tr-accent); padding: 32px; }
.tr-card--plain { border: 0; }
.tr-card h3 { margin: 0; }
.tr-card p { margin-block: 0.6rem 0; }
.tr-card .tr-meta { font-size: 14px; font-weight: 600; color: var(--tr-muted); margin: 0; }
.tr-card .tr-card__link { margin-top: 1rem; font-weight: 600; }
.tr-card .tr-card__link a { text-decoration: none; }
.tr-card h3 a { color: var(--tr-ink); text-decoration: none; }
.tr-card h3 a:hover { color: var(--tr-accent); }
.tr-founder-name { font-size: 1.75rem !important; }
.tr-tag { display: inline-block; margin: 0 0 0.4rem !important; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.tr-tag--gold { color: #7A4A00; background: #FCEFD9; }
.tr-tag--teal { color: #0B4F4B; background: #DDEFEC; }
.tr-tag--blue { color: #213A6B; background: #E2E9F6; }
.tr-equal-cards > .wp-block-column { display: flex; }
.tr-equal-cards > .wp-block-column > .tr-card { flex: 1; }

/* ---------- About ---------- */
.tr-panel { background: var(--tr-mist); border-radius: 20px; padding: 32px; }
.tr-panel h3 { margin-top: 0; margin-bottom: 14px; font-size: 18px; }
.tr-roles { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; font-size: 17px; }
.tr-roles li span { color: var(--tr-slate); }

/* ---------- Publications ---------- */
.tr-pubs { border-bottom: 1px solid var(--tr-line); }
.tr-pub { border-top: 1px solid var(--tr-line); padding-block: 22px; gap: 8px 32px !important; }
.tr-pub p { margin: 0; }
.tr-pub .tr-pub__meta { flex: 0 0 180px; font-size: 15px; color: var(--tr-muted); }
.tr-pub .tr-pub__title { flex: 1 1 420px; font-family: var(--tr-display); font-weight: 700; font-size: 20px; line-height: 1.35; }
.tr-pub .tr-pub__title a { color: var(--tr-ink); text-decoration: none; }
.tr-pub .tr-pub__title a:hover { color: var(--tr-accent); text-decoration: underline; }

/* ---------- Teal speaking band ---------- */
.tr-teal { background: var(--tr-accent); color: #fff; }
.tr-teal h2, .tr-teal h3 { color: #fff; }
.tr-teal p { color: #E3F3F1; }
.tr-teal .tr-eyebrow { color: #BFE6E1; }
.tr-teal .wp-block-button:not(.is-style-outline) > .wp-block-button__link { background: #fff; color: #0B4F4B; }
.tr-teal .wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { background: #E3F3F1; }
.tr-teal .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; }
.tr-teal .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: #0B4F4B; }
.tr-topic { background: #0E7A74; border-radius: 16px; padding: 24px; }
.tr-topic h3 { margin: 0 0 8px; font-size: 19px; }
.tr-topic p { margin: 0; font-size: 16px; }

/* ---------- Contact ---------- */
.tr-contact-links p { margin: 0.35rem 0; font-weight: 600; }
.tr-panel--white { background: #fff; }

/* ---------- Contact page ---------- */
.tr-hero--compact { padding-block: 72px 56px; }
.tr-hero--compact h1 { max-width: 820px; margin-left: 0; }
.tr-hero--compact .tr-lead { margin-left: 0; }
.tr-card .tr-muted + .tr-meta { margin-top: 1.1rem; }
.tr-checklist { list-style: none; padding: 0; margin: 0.4rem 0 0; font-size: 16px; }
.tr-checklist li { position: relative; padding-left: 26px; margin-bottom: 6px; color: var(--tr-slate); }
.tr-checklist li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 12px; height: 7px; border-left: 2px solid var(--tr-accent); border-bottom: 2px solid var(--tr-accent); transform: rotate(-45deg); }
.tr-form-panel h2 { margin-top: 0; }
.tr-form-slot { border: 2px dashed #9FB3B0; border-radius: 14px; padding: 28px; background: #fff; color: var(--tr-slate); }
.tr-aside + .tr-aside { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--tr-line); }
.tr-aside h3 { font-size: 18px; margin: 0 0 8px; }
.tr-aside p { margin: 0.4rem 0 0; font-size: 16px; }

/* WPForms — match the site style (block style settings in the editor can override these) */
.tr-form-panel .wpforms-container {
	--wpforms-field-border-radius: 10px;
	--wpforms-field-border-color: #B8C4CA;
	--wpforms-field-text-color: #13222E;
	--wpforms-label-color: #13222E;
	--wpforms-label-sublabel-color: #56636D;
	--wpforms-button-background-color: #0B6560;
	--wpforms-button-text-color: #FFFFFF;
	--wpforms-button-border-radius: 999px;
	--wpforms-field-size-input-height: 48px;
	margin-top: 8px !important;
}
.tr-form-panel .wpforms-container input,
.tr-form-panel .wpforms-container select,
.tr-form-panel .wpforms-container textarea,
.tr-form-panel .wpforms-container button { font-family: inherit; }
.tr-form-panel .wpforms-container .wpforms-field-label { font-weight: 600; }
.tr-form-panel .wpforms-container button[type="submit"] { font-weight: 600; padding-inline: 28px; }

/* ---------- Inner pages ---------- */
.tr-pub .tr-pub__body { flex: 1 1 420px; }
.tr-pub .tr-pub__body .tr-pub__title { flex: none; }
.tr-pub p.tr-pub__authors { margin-top: 4px; font-size: 15px; color: var(--tr-muted); line-height: 1.45; }
.tr-project-meta { margin: 0.3rem 0 0 !important; font-size: 16px; color: var(--tr-slate); }
.tr-teal .tr-topic h3 { color: #fff; }
.tr-teal .tr-pubs, .tr-teal .tr-pub { border-color: #2C8C86; }

/* ---------- Footer ---------- */
.tr-footer { background: var(--tr-ink); color: #D5DEE3; padding-block: 40px; font-size: 15px; }
.tr-footer p { margin: 0; }
.tr-footer a { color: #D5DEE3; }
.tr-footer a:hover { color: #fff; }

/* ---------- Inner pages ---------- */
.tr-page-main { padding-block: 64px 96px; }
.tr-page-main .wp-block-post-title { margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	.tr-section { padding-block: 56px; }
	.tr-hero { padding-block: 40px 48px; }
	.tr-badge { position: relative; left: auto; bottom: auto; margin-top: -40px !important; margin-inline: 16px; }
	.tr-featured { padding-block: 22px; }
	.tr-featured p { font-size: 15px; }
	.tr-featured .wp-block-group { justify-content: flex-start !important; column-gap: 20px !important; row-gap: 6px !important; }
	.tr-featured p.tr-featured__label { flex-basis: 100%; }
	.tr-dark p.tr-tile__year { font-size: 28px; }
	.tr-pub .tr-pub__meta { flex-basis: 100%; }
	.tr-card, .tr-panel { padding: 22px; }
}
