/*
 * IamOwino Pages
 * Inner-page layout in the site's own tokens. The theme's style.css supplies
 * the header, buttons and mobile menu; this file adds the content layout,
 * the full footer and the home page additions. Everything is prefixed iop-.
 */

:root {
	--ink: #0a0a0a;
	--surface: #111111;
	--surface-2: #181818;
	--surface-3: #1f1f1f;
	--text: #f0ebe1;
	--text-muted: #8a8078;
	--accent: #c8381a;
	--accent-deep: #a02a10;
	--gold: #b8973e;
	--gold-light: #d4b05a;
	--rule: rgba(255, 255, 255, 0.07);
	--rule-warm: rgba(184, 151, 62, 0.25);
	--nav-h: 72px;
	--max-w: 1200px;
	--ff-display: 'Cormorant Garamond', Georgia, serif;
	--ff-body: 'Inter', system-ui, sans-serif;
	--ff-label: 'Barlow Condensed', 'Inter', sans-serif;
	--pad-x: clamp(20px, 5vw, 80px);
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--iop-prose: #d9d3c8;
	--iop-soft: #b9b1a5;
}

/* ---------- accessibility helpers ---------- */
.iop-skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 1200;
	background: var(--accent);
	color: #fff;
	padding: 0.7em 1.1em;
	font-family: var(--ff-label);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 0.78rem;
}
.iop-skip:focus {
	left: 8px;
}
.iop-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.iop-page a:focus-visible,
.iop-page button:focus-visible,
.iop-page input:focus-visible,
.iop-foot a:focus-visible,
.iop-svc-link:focus-visible {
	outline: 2px solid var(--gold-light);
	outline-offset: 3px;
}

/* ---------- page frame ---------- */
.iop-main {
	display: block;
	position: relative;
	isolation: isolate;
	min-height: 60vh;
}
.iop-main::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 620px;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(55% 70% at 88% 0%, rgba(200, 56, 26, 0.12), transparent 62%),
		radial-gradient(40% 50% at 8% 8%, rgba(184, 151, 62, 0.07), transparent 65%);
}

/* ---------- header additions (inner pages only) ---------- */
.iop-page .head.scrolled {
	background: rgba(10, 10, 10, 0.86);
}
.iop-nav {
	flex: 1;
	justify-content: center;
}
.iop-nav a.active::after {
	transform: scaleX(1);
	transform-origin: left;
}
.iop-caret {
	display: inline-block;
	width: 0.4em;
	height: 0.4em;
	margin-left: 0.55em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	opacity: 0.7;
}
.iop-dd {
	position: relative;
}
.iop-sub {
	position: absolute;
	left: -18px;
	top: 100%;
	padding-top: 16px;
	min-width: 310px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
	z-index: 10;
}
.iop-dd:hover .iop-sub,
.iop-dd:focus-within .iop-sub {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.iop-sub__in {
	display: grid;
	background: rgba(17, 17, 17, 0.98);
	border: 1px solid var(--rule);
	padding: 8px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.iop-sub a {
	display: block;
	padding: 0.8em 1em;
	letter-spacing: 0.12em;
	white-space: nowrap;
}
.iop-sub a::after {
	display: none;
}
.iop-sub a:hover,
.iop-sub a:focus-visible {
	background: var(--surface-3);
}

/* On inner pages the full menu needs more room than the theme's 900px breakpoint allows. */
@media (max-width: 1060px) {
	.iop-page .nav,
	.iop-page .head .btn--fill {
		display: none;
	}
	.iop-page .burger {
		display: flex;
	}
}
.iop-page #ovNav {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.iop-page #ovNav a {
	display: block;
}
.overlay {
	overflow-y: auto;
}

/* ---------- hero ---------- */
.iop-hero {
	padding-top: calc(var(--nav-h) + clamp(34px, 6vw, 74px));
	padding-bottom: clamp(24px, 4vw, 48px);
}
.iop-crumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 0.6rem;
	margin-bottom: clamp(18px, 3vw, 30px);
	font-family: var(--ff-label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.74rem;
	color: var(--text-muted);
}
.iop-crumbs li + li::before {
	content: '/';
	margin-right: 0.6rem;
	color: rgba(184, 151, 62, 0.55);
}
.iop-crumbs a {
	transition: color 0.3s;
}
.iop-crumbs a:hover {
	color: var(--text);
}
.iop-crumbs li[aria-current] {
	color: var(--text);
	max-width: 44ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.iop-h1 {
	font-family: var(--ff-display);
	font-style: italic;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
	font-size: clamp(2.45rem, 6vw, 4.6rem);
	max-width: 21ch;
	text-wrap: balance;
	color: var(--text);
}
.iop-lead {
	margin-top: clamp(18px, 2.6vw, 28px);
	max-width: 54ch;
	color: var(--iop-soft);
	font-weight: 300;
	font-size: clamp(1.06rem, 1.4vw, 1.26rem);
	line-height: 1.7;
}
.iop-meta {
	margin-top: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.4rem;
	font-family: var(--ff-label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.76rem;
	color: var(--text-muted);
}
.iop-meta span + span::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 4px;
	margin-right: 1.4rem;
	vertical-align: middle;
	background: var(--accent);
	transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
	.iop-hero > * {
		animation: iop-rise 0.9s var(--ease) both;
	}
	.iop-hero > *:nth-child(2) {
		animation-delay: 0.05s;
	}
	.iop-hero > *:nth-child(3) {
		animation-delay: 0.1s;
	}
	.iop-hero > *:nth-child(4) {
		animation-delay: 0.18s;
	}
	.iop-hero > *:nth-child(5) {
		animation-delay: 0.24s;
	}
}
@keyframes iop-rise {
	from {
		opacity: 0;
		transform: translateY(22px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- body layout ---------- */
.iop-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(32px, 5vw, 72px);
	padding-block: clamp(18px, 3vw, 36px) clamp(36px, 6vw, 84px);
}
.iop-body:not(.has-aside) .iop-prose {
	max-width: 760px;
}
@media (min-width: 1000px) {
	.iop-body.has-aside {
		grid-template-columns: minmax(0, 1fr) 330px;
		align-items: start;
	}
	.iop-aside {
		position: sticky;
		top: calc(var(--nav-h) + 24px);
	}
}
.iop-aside {
	display: grid;
	gap: 18px;
}
.iop-body.has-aside .iop-prose {
	max-width: 760px;
}

/* ---------- prose ---------- */
.iop-prose {
	font-size: clamp(1.03rem, 1.1vw, 1.12rem);
	line-height: 1.78;
	color: var(--iop-prose);
}
.iop-prose > * + * {
	margin-top: 1.15em;
}
.iop-prose h2 {
	font-family: var(--ff-display);
	font-style: italic;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.08;
	font-size: clamp(1.9rem, 3.2vw, 2.55rem);
	color: var(--text);
	margin-top: 2.1em;
	scroll-margin-top: 96px;
}
.iop-prose > h2:first-child {
	margin-top: 0;
}
.iop-prose h3 {
	font-family: var(--ff-display);
	font-weight: 700;
	line-height: 1.2;
	font-size: clamp(1.4rem, 2vw, 1.7rem);
	color: var(--text);
	margin-top: 1.8em;
	scroll-margin-top: 96px;
}
.iop-prose h3 + p {
	margin-top: 0.45em;
}
.iop-prose a {
	color: var(--gold-light);
	text-decoration: underline;
	text-decoration-color: rgba(212, 176, 90, 0.4);
	text-underline-offset: 0.2em;
	transition: color 0.25s, text-decoration-color 0.25s;
}
.iop-prose a:hover {
	color: #fff;
	text-decoration-color: var(--accent);
}
.iop-prose strong {
	color: var(--text);
	font-weight: 600;
}
.iop-prose em {
	color: var(--text);
}
.iop-prose ul,
.iop-prose ol {
	list-style: none;
	padding-left: 0;
}
.iop-prose li {
	position: relative;
	padding-left: 1.7em;
}
.iop-prose li + li {
	margin-top: 0.6em;
}
.iop-prose ul > li::before {
	content: '';
	position: absolute;
	left: 0.1em;
	top: 0.85em;
	width: 0.7em;
	height: 2px;
	background: var(--accent);
}
.iop-prose ol {
	counter-reset: iop;
}
.iop-prose ol > li {
	counter-increment: iop;
	padding-left: 2.5em;
}
.iop-prose ol > li::before {
	content: counter(iop, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 0.28em;
	font-family: var(--ff-label);
	font-weight: 600;
	letter-spacing: 0.12em;
	font-size: 0.82rem;
	color: var(--gold);
}
.iop-prose blockquote {
	border-left: 3px solid var(--accent);
	padding: 0.2em 0 0.2em 1.3em;
	font-family: var(--ff-display);
	font-style: italic;
	font-size: 1.45em;
	line-height: 1.35;
	color: var(--text);
}
.iop-prose hr {
	border: 0;
	height: 1px;
	background: var(--rule);
	margin-block: 2.4em;
}
.iop-prose img {
	height: auto;
}
.iop-figure {
	margin: 0 0 2em;
}
.iop-figure img {
	width: 100%;
	height: auto;
}
.iop-prose .iop-cta {
	margin-top: 2em;
}
.iop-prose a.btn {
	text-decoration: none;
	color: #fff;
}
.iop-prose a.btn:hover {
	color: #fff;
}
.iop-prose a.btn--out span {
	color: var(--text);
}
.iop-note {
	border: 1px dashed var(--gold);
	background: rgba(184, 151, 62, 0.08);
	padding: 1em 1.3em;
	color: var(--gold-light);
}

/* ---------- side column ---------- */
.iop-side {
	background: var(--surface-2);
	border: 1px solid var(--rule);
	padding: clamp(20px, 2.4vw, 26px);
	position: relative;
}
.iop-side--cta::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--accent);
}
.iop-side__h {
	font-family: var(--ff-label);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-size: 0.72rem;
	color: var(--gold);
	margin-bottom: 0.9rem;
}
.iop-side__t {
	font-family: var(--ff-display);
	font-style: italic;
	font-weight: 700;
	font-size: 1.7rem;
	line-height: 1.1;
}
.iop-side__name {
	font-family: var(--ff-display);
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1.1;
}
.iop-side p:not(.iop-side__h):not(.iop-side__t):not(.iop-side__name) {
	color: var(--iop-soft);
	font-size: 0.95rem;
	line-height: 1.65;
	margin: 0.7em 0 1.1em;
}
.iop-side--author p:last-of-type {
	margin-bottom: 0.9em;
}
.iop-side__link {
	font-family: var(--ff-label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.78rem;
	color: var(--gold-light);
}
.iop-side__link:hover {
	color: #fff;
}
.iop-side ul,
.iop-side ol {
	list-style: none;
	display: grid;
	gap: 0.15rem;
}
.iop-side li a {
	display: block;
	padding: 0.5em 0;
	color: var(--iop-soft);
	font-size: 0.95rem;
	line-height: 1.4;
	border-bottom: 1px solid var(--rule);
	transition: color 0.3s, padding-left 0.3s var(--ease);
}
.iop-side li:last-child a {
	border-bottom: 0;
}
.iop-side li a:hover {
	color: var(--text);
	padding-left: 0.4em;
}

/* ---------- sections, cards, band ---------- */
.iop-sec {
	padding-block: clamp(26px, 4vw, 52px);
}
.iop-sec__h {
	font-family: var(--ff-display);
	font-style: italic;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.05;
	font-size: clamp(2rem, 4.4vw, 3rem);
	margin-bottom: clamp(18px, 2.6vw, 30px);
}
.iop-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: clamp(14px, 2vw, 22px);
}
.iop-cards--gap {
	margin-top: clamp(20px, 3vw, 34px);
}
.iop-cards--four {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
}
.iop-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	background: var(--surface-2);
	border: 1px solid var(--rule);
	padding: clamp(20px, 2.4vw, 30px);
	transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s;
}
.iop-card:hover,
.iop-card:focus-within {
	border-color: var(--rule-warm);
	background: var(--surface-3);
	transform: translateY(-3px);
}
.iop-card__k {
	font-family: var(--ff-label);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-size: 0.72rem;
	color: var(--gold);
}
.iop-card h2,
.iop-card h3,
.iop-card h4 {
	font-family: var(--ff-display);
	font-weight: 700;
	font-size: 1.6rem;
	line-height: 1.12;
	color: var(--text);
}
.iop-card h2 a::after,
.iop-card h3 a::after,
.iop-card h4 a::after {
	content: '';
	position: absolute;
	inset: 0;
}
.iop-card p {
	flex: 1;
	color: var(--iop-soft);
	font-size: 0.95rem;
	line-height: 1.65;
}
.iop-card__date {
	font-family: var(--ff-label);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.74rem;
	color: var(--text-muted);
}
.iop-card__more {
	font-family: var(--ff-label);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.76rem;
	color: var(--gold-light);
}
.iop-card__more span {
	display: inline-block;
	transition: transform 0.35s var(--ease);
}
.iop-card:hover .iop-card__more span {
	transform: translateX(5px);
}
.iop-empty {
	color: var(--iop-soft);
	max-width: 56ch;
}

.iop-band {
	margin-block: clamp(18px, 3vw, 40px) clamp(30px, 5vw, 56px);
}
.iop-band__in {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px 40px;
	background: var(--surface-2);
	border: 1px solid var(--rule);
	padding: clamp(28px, 4.5vw, 54px);
}
.iop-band__in::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--accent);
}
.iop-band h2 {
	margin-top: 0.5rem;
	font-family: var(--ff-display);
	font-style: italic;
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.05;
	font-size: clamp(1.8rem, 3.4vw, 2.7rem);
	max-width: 22ch;
}

.iop-search {
	display: flex;
	gap: 10px;
	max-width: 540px;
}
.iop-search input[type='search'] {
	flex: 1;
	min-width: 0;
	background: var(--surface-2);
	border: 1px solid var(--rule);
	border-radius: 0;
	color: var(--text);
	padding: 0.9em 1.1em;
	font: inherit;
}
.iop-search input[type='search']::placeholder {
	color: var(--text-muted);
}
.iop-pager .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 36px;
}
.iop-pager .page-numbers {
	border: 1px solid var(--rule);
	padding: 0.6em 1em;
	font-family: var(--ff-label);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.78rem;
	color: var(--iop-soft);
}
.iop-pager a.page-numbers:hover {
	color: var(--text);
	border-color: var(--rule-warm);
}
.iop-pager .page-numbers.current {
	border-color: var(--accent);
	color: var(--text);
}
.iop-pager .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* ---------- footer (inner pages and home page) ---------- */
.iop-foot {
	background: var(--ink);
	border-top: 1px solid var(--rule);
	margin-top: clamp(20px, 4vw, 50px);
}
.iop-foot__grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 0.8fr 1.1fr;
	gap: clamp(28px, 4vw, 56px);
	padding-block: clamp(38px, 5vw, 66px);
}
.iop-foot__brand strong {
	display: block;
	font-family: var(--ff-display);
	font-weight: 700;
	font-size: 1.6rem;
	line-height: 1.1;
}
.iop-foot__brand p {
	margin: 0.8rem 0 1.4rem;
	max-width: 36ch;
	color: var(--text-muted);
	font-size: 0.93rem;
	line-height: 1.65;
}
.iop-foot__h {
	margin-bottom: 1rem;
	font-family: var(--ff-label);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-size: 0.72rem;
	color: var(--gold);
}
.iop-foot ul {
	list-style: none;
	display: grid;
	gap: 0.6rem;
}
.iop-foot li a,
.iop-foot__loc {
	color: var(--iop-soft);
	font-size: 0.95rem;
	transition: color 0.3s;
}
.iop-foot li a:hover {
	color: var(--text);
}
.iop-foot__base {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: center;
	justify-content: space-between;
	border-top: 1px solid var(--rule);
	padding-block: 22px 26px;
}
.iop-foot__cp {
	font-family: var(--ff-label);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.72rem;
	color: var(--text-muted);
}
.iop-foot__logo {
	font-family: var(--ff-display);
	font-style: italic;
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--accent);
}
@media (max-width: 900px) {
	.iop-foot__grid {
		grid-template-columns: 1fr 1fr;
	}
	.iop-foot__brand {
		grid-column: 1 / -1;
	}
}
@media (max-width: 520px) {
	.iop-foot__grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- home page additions ---------- */
.iop-navgrp {
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.2vw, 36px);
}
@media (max-width: 1180px) {
	.nav--more {
		display: none;
	}
}
.iop-svc-link {
	color: inherit;
	transition: color 0.3s;
}
.iop-svc-link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}
.cap,
.core__body {
	position: relative;
}
.core__body h3 .iop-svc-link::after {
	display: none;
}
.iop-svc-link:hover {
	color: var(--accent);
}
.iop-latest__all {
	margin-top: clamp(22px, 3vw, 34px);
}
.iop-latest .iop-cards {
	margin-top: clamp(20px, 3vw, 34px);
}

@media (prefers-reduced-motion: reduce) {
	.iop-card,
	.iop-card__more span {
		transition: none;
	}
}
