/*
Theme Name: Ulysses
Description: Theme for Ulysses Petroleum Management (Energy Advisory · Expert Evidence).
Version: 1.0.9
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Author: Ulysses Petroleum Management
Text Domain: ulysses
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #0B4F86; outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { background: #FFFFFF; border-bottom: 1px solid #DCE5EE; }
.site-header .header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 18px; }
.site-logo { display: flex; align-items: center; gap: 14px; color: #0B4F86; text-decoration: none; }
.site-logo:hover { color: #0B4F86; }
.site-logo svg { width: 52px; height: 60px; flex: none; }
.site-logo .name { display: flex; flex-direction: column; line-height: 1.1; }
.site-logo .word { font-family: 'Newsreader', Georgia, serif; font-size: 38px; font-weight: 500; }
.site-logo .desc { font-size: 12px; letter-spacing: 0.1em; white-space: nowrap; }
.site-header .wp-block-navigation { gap: 8px 26px; font-size: 15px; }
.site-header .wp-block-navigation a { color: #1B2733; text-decoration: none; }
.site-header .wp-block-navigation .current-menu-item > a,
.site-header .wp-block-navigation a[aria-current="page"] { color: #0B4F86; font-weight: 600; }
.site-header .wp-block-navigation .nav-cta a { color: #FFFFFF; background: #0B4F86; padding: 8px 18px; border-radius: 4px; font-weight: 600; }
.site-header .wp-block-navigation .nav-cta a:hover { background: #14406B; }
@media (max-width: 480px) {
	.site-logo svg { width: 40px; height: 46px; }
	.site-logo .word { font-size: 30px; }
	.site-logo .desc { font-size: 10px; }
}

/* ---------- Bands and sections ---------- */
.band { background: #F2F6FA; border-bottom: 1px solid #DCE5EE; padding-block: 64px 56px; }
.band-dark { background: #14406B; color: #BFDDF5; padding-block: 88px 96px; }
.band-dark :where(h1, h2, h3) { color: #FFFFFF; }
.band-dark a:where(:not(.wp-element-button)) { color: #FFFFFF; }
.band-dark .eyebrow { color: #9FCBEF; }
.band-mist { background: #F2F6FA; padding-block: 80px; }
.section { padding-block: 72px; }
.section-tight { padding-block: 40px; }
.border-top { border-top: 1px solid #DCE5EE; }

.eyebrow { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: #0B5E95; line-height: 1.9; margin: 0; }
.lead { font-family: 'Newsreader', Georgia, serif; font-size: 26px; line-height: 1.35; color: #0B2540; }
.band-dark .lead { color: #FFFFFF; }
.intro { font-size: 19px; max-width: 760px; }
.sub { font-size: 18px; color: #0B4F86; font-weight: 500; }
.muted { color: #4A5A6A; }
.small { font-size: 15px; }
.back-link { font-size: 14px; margin: 0; }
.back-link a { text-decoration: none; }
.readable { max-width: 860px; }
.hero-title { font-size: 60px; line-height: 1.08; max-width: 900px; }
@media (max-width: 700px) {
	.hero-title { font-size: 40px; }
	h1 { font-size: 38px; }
	.lead { font-size: 22px; }
}

/* ---------- Cards ---------- */
.card { background: #F2F6FA; border: 1px solid #DCE5EE; border-radius: 6px; padding: 28px; }
.card-white { background: #FFFFFF; border: 1px solid #DCE5EE; border-radius: 6px; padding: 26px; }
.card-dark { background: #14406B; color: #BFDDF5; border-radius: 6px; padding: 28px; }
.card-dark :where(h2, h3, h4) { color: #FFFFFF; }
.card-dark a { color: #FFFFFF; }
.card h3, .card-dark h3, .card-white h3 { font-size: 24px; margin: 0; }
.card h3 a, .card-dark h3 a { text-decoration: none; color: inherit; }
.card .card-label, .card-white .card-label, .card-dark .card-label { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #0B5E95; margin: 0; }
.card-dark .card-label { color: #9FCBEF; }
.more { margin-top: auto; font-weight: 600; font-size: 15px; }
.more a { text-decoration: none; }
.card-dark .more a { color: #9FCBEF; }
.card, .card-dark, .card-white { display: flex; flex-direction: column; }
.card > *, .card-dark > *, .card-white > * { margin-block: 0; }
.card ul, .card-white ul { color: #4A5A6A; padding-left: 20px; margin: 0; }
.card-white h3 { font-size: 18px; font-family: 'Public Sans', sans-serif; font-weight: 600; }

/* ---------- Chips (areas of expertise) ---------- */
ul.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
ul.chips li { padding: 6px 14px; border-radius: 999px; background: #F2F6FA; border: 1px solid #DCE5EE; font-size: 14px; margin: 0; }

/* ---------- People ---------- */
.portrait { aspect-ratio: 4 / 5; max-width: 100%; background: #D5E1EC; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #4A5A6A; }
.portrait p { margin: 0; }
.portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.person h3 { font-size: 22px; margin: 0; }
.person h3 a { text-decoration: none; color: #0B2540; }
.person p { margin: 0; font-size: 14px; color: #4A5A6A; }
.profile-head .portrait { width: 240px; }
@media (max-width: 781px) { .profile-head .portrait { width: 180px; } }

/* ---------- Credentials strip ---------- */
.stat-value { font-family: 'Newsreader', Georgia, serif; font-size: 32px; line-height: 1.2; color: #0B2540; margin: 0; }
.stat-label { font-size: 15px; color: #4A5A6A; margin: 0; }

/* ---------- Experience table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid #DCE5EE; border-radius: 6px; }
.table-scroll table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.table-scroll th { background: #F2F6FA; text-align: left; color: #0B2540; padding: 14px 18px; }
.table-scroll td { padding: 14px 18px; border-top: 1px solid #DCE5EE; vertical-align: top; }
.table-scroll td:last-child { color: #4A5A6A; }
.table-scroll td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Perspectives lists ---------- */
.post-list .wp-block-post { display: flex; flex-wrap: wrap; gap: 6px 40px; padding: 26px 0; border-bottom: 1px solid #DCE5EE; margin: 0; }
.post-list .wp-block-post-date { flex: 0 0 160px; font-size: 14px; color: #4A5A6A; padding-top: 6px; }
.post-list .post-text { flex: 999 1 420px; min-width: 0; }
.post-list .wp-block-post-title { font-size: 26px; margin: 0 0 6px; }
.post-list .wp-block-post-title a { text-decoration: none; color: #0B2540; }
.post-list .wp-block-post-excerpt { color: #4A5A6A; margin: 0; }
.post-list .wp-block-post-excerpt__more-text { display: none; }
.wp-block-latest-posts.is-grid li, .home-posts li { margin: 0; }
.home-posts { list-style: none; padding: 0; border-top: 1px solid #DCE5EE; }
.home-posts li { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid #DCE5EE; }
.home-posts .wp-block-latest-posts__post-date { order: -1; width: 140px; font-size: 14px; color: #4A5A6A; }
.home-posts .wp-block-latest-posts__post-title { font-family: 'Newsreader', Georgia, serif; font-size: 22px; text-decoration: none; color: #0B2540; }

/* ---------- Article ---------- */
.article-body { max-width: 760px; margin-inline: auto; font-family: 'Newsreader', Georgia, serif; font-size: 20px; line-height: 1.65; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-meta { font-size: 15px; color: #4A5A6A; }

/* ---------- Poem ---------- */
.poem { font-family: 'Newsreader', Georgia, serif; font-size: 20px; line-height: 1.6; color: #1B2733; background: none; padding: 0; white-space: pre-wrap; }

/* ---------- Contact ---------- */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
	width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #9FB4C8; border-radius: 4px; background: #FFFFFF; box-sizing: border-box;
}
.wpcf7 input[type="submit"] { font: inherit; font-weight: 600; background: #0B4F86; color: #FFFFFF; border: 0; border-radius: 4px; padding: 14px 32px; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: #14406B; }
.wpcf7 label { font-size: 15px; font-weight: 600; color: #0B2540; }
.contact-card p { margin: 0; }
.contact-card .card-label { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: #14406B; color: #BFDDF5; font-size: 15px; }
.site-footer a { color: #FFFFFF; }
.site-footer .footer-inner { display: flex; flex-wrap: wrap; gap: 32px 56px; justify-content: space-between; padding-block: 48px 28px; }
.site-footer .word { font-family: 'Newsreader', Georgia, serif; font-size: 30px; font-weight: 500; color: #FFFFFF; display: block; }
.site-footer .label { font-size: 12px; letter-spacing: 0.18em; color: #9FCBEF; display: block; }
.site-footer .desc { font-size: 12px; letter-spacing: 0.1em; color: #9FCBEF; display: block; }
.site-footer .col { display: flex; flex-direction: column; gap: 6px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 32px 56px; }
.site-footer nav a { text-decoration: none; }
.site-footer .legal { border-top: 1px solid #2A5480; padding-block: 18px; font-size: 13px; }

/* ---------- Section stacking: bands sit flush against each other ---------- */
body .wp-site-blocks > * { margin-block-start: 0; }
body .wp-block-post-content > * { margin-block-start: 0; }
body .wp-block-post-content.article-body > * + * { margin-block-start: 1.1em; }

/* ---------- v1.0.1: quotations in dark bands; left-align narrower text ---------- */
/* Prose in white, quotations in light blue italic (v1.0.2) */
.band-dark p:has(em) { color: #FFFFFF; }
.band-dark em { color: #9FCBEF; font-style: italic; }
/* Narrower text blocks line up with the headings instead of being centred */
.is-layout-constrained > :where(.readable, .intro, .hero-title) {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}

/* v1.0.3: text in dark bands uses the full content width */
.band-dark .readable { max-width: var(--wp--style--global--content-size); }

/* v1.0.4: "statement + quotation" layout (About page). A paragraph that is entirely
   italic counts as a quotation: indented, light blue, close to the line above;
   the surrounding statements are white with a larger gap before each new one. */
.band-dark:has(p > em:only-child) p { color: #FFFFFF; }
.band-dark p:has(> em:only-child) {
	padding-left: 2em;
	margin-block-start: 4px !important;
	color: #9FCBEF;
}
.band-dark p:has(> em:only-child) + p:not(:has(> em:only-child)) { margin-block-start: 30px !important; }

/* v1.0.5 — real photos fill the 4:5 portrait boxes */
.portrait:has(img) { background: none; align-items: stretch; justify-content: stretch; overflow: hidden; }
.portrait > .wp-block-image, .portrait > figure { margin: 0 !important; width: 100%; height: 100%; flex: 1 1 100%; }
.portrait .wp-block-image img, .portrait figure img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; object-position: center top; border-radius: 6px; }

/* v1.0.6 — justified text on demand (add class "justify" in Advanced) */
.justify, .has-text-align-justify { text-align: justify; hyphens: manual; }

/* v1.0.9 — photo backgrounds with navy tint (add class "photo-home" or "photo-contact" to a banner) */
.photo-home, .photo-contact { background-color: #0B2540; background-size: cover; background-position: center; background-repeat: no-repeat; border-bottom: 0; }
.photo-home { background-image: linear-gradient(90deg, rgba(11,37,64,.80) 0%, rgba(11,37,64,.50) 60%, rgba(11,37,64,.30) 100%), url(assets/bg-home.jpg); }
.photo-contact { background-image: linear-gradient(90deg, rgba(11,37,64,.80) 0%, rgba(11,37,64,.50) 60%, rgba(11,37,64,.30) 100%), url(assets/bg-contact.jpg); color: #DCEBF7; }
.photo-contact :where(h1, h2, h3) { color: #FFFFFF; }
.photo-contact .eyebrow { color: #9FCBEF; }
.photo-contact p { color: #DCEBF7; }
@media (max-width: 781px) {
	.photo-home { background-image: linear-gradient(rgba(11,37,64,.72), rgba(11,37,64,.72)), url(assets/bg-home.jpg); }
	.photo-contact { background-image: linear-gradient(rgba(11,37,64,.72), rgba(11,37,64,.72)), url(assets/bg-contact.jpg); }
}
