/* ==========================================================================
   Case study pages - modern, responsive styling for pomegranates.ai
   Self-contained (does not depend on the old theme's main.css / JS)
   ========================================================================== */

:root {
	--red:        #950000;
	--red-deep:   #6d0606;
	--ink:        #ffffff;
	--muted:      rgba(255, 255, 255, 0.72);
	--muted-soft: rgba(255, 255, 255, 0.55);
	--accent:     #ff6b6b;
	--surface:    rgba(255, 255, 255, 0.05);
	--surface-2:  rgba(255, 255, 255, 0.08);
	--border:     rgba(255, 255, 255, 0.14);
	--radius:     16px;
	--radius-sm:  10px;
	--shadow:     0 14px 40px rgba(0, 0, 0, 0.35);
	--shadow-sm:  0 6px 18px rgba(0, 0, 0, 0.28);
	--maxw:       1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ink);
	line-height: 1.7;
	font-size: 1.0625rem;
	background: var(--red-deep);
	background:
		radial-gradient(1200px 600px at 80% -10%, rgba(255, 107, 107, 0.18), transparent 60%),
		linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
	background-attachment: fixed;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* ---- Header -------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(86, 4, 4, 0.72);
	backdrop-filter: saturate(140%) blur(10px);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--border);
}
.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 64px;
	flex-wrap: wrap;
}
.brand {
	color: var(--ink);
	font-weight: 700;
	letter-spacing: 0.02em;
	font-size: 1.05rem;
}
.brand:hover { text-decoration: none; opacity: 0.9; }
.site-nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.site-nav a {
	color: var(--muted);
	font-weight: 600;
	font-size: 0.95rem;
	padding: 0.4rem 0.7rem;
	border-radius: 8px;
}
.site-nav a:hover { color: var(--ink); background: var(--surface); text-decoration: none; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
	display: inline-block;
	font-weight: 700;
	font-size: 0.95rem;
	padding: 0.7rem 1.25rem;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-solid { background: var(--ink); color: var(--red); }
.btn-solid:hover { background: #fff0f0; }
.btn-outline { border-color: rgba(255, 255, 255, 0.5); color: var(--ink); }
.btn-outline:hover { border-color: #fff; background: var(--surface); }

/* ---- Back link ----------------------------------------------------------- */
.backlink {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--muted);
	font-weight: 600;
	font-size: 0.9rem;
	margin: 2rem 0 0.5rem;
}
.backlink:hover { color: var(--ink); text-decoration: none; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding: 1rem 0 2.5rem; }
.eyebrow {
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--accent);
	margin-bottom: 0.75rem;
}
.hero-grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 2.5rem;
	align-items: center;
}
.hero h1 {
	font-size: clamp(2.1rem, 5vw, 3.25rem);
	line-height: 1.1;
	margin: 0 0 1rem;
	letter-spacing: -0.01em;
}
.hero p { color: var(--muted); margin: 0 0 1rem; }
.hero-media img {
	width: 100%;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	border: 1px solid var(--border);
}
.hero-actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---- Sections ------------------------------------------------------------ */
.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid var(--border); }
.section h2 {
	font-size: clamp(1.5rem, 3.2vw, 2.15rem);
	margin: 0 0 0.5rem;
	letter-spacing: -0.01em;
}
.section h2::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-top: 0.85rem;
	border-radius: 2px;
	background: var(--accent);
}
.section .lead { color: var(--muted); max-width: 70ch; margin: 1.25rem 0 0; }
.section ul { color: var(--muted); padding-left: 1.2rem; }
.section ul li { margin: 0.35rem 0; }

/* ---- Stat callout -------------------------------------------------------- */
.stat-band {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-top: 1.75rem;
}
.stat {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.5rem;
}
.stat .num { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; line-height: 1; }
.stat .label { color: var(--muted); margin-top: 0.5rem; font-size: 0.95rem; }

/* ---- Feature cards ------------------------------------------------------- */
.feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 1.75rem;
}
.feature-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.25rem;
	box-shadow: var(--shadow-sm);
	transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}
.feature-card:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, 0.3);
	background: var(--surface-2);
}
.feature-card figure {
	margin: 0 0 1rem;
	background: rgba(0, 0, 0, 0.18);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 240px; /* fixed so headings/text line up across cards regardless of image size */
}
.feature-card figure img {
	max-height: 100%;
	max-width: 100%;
	width: auto;
	object-fit: contain;
	border-radius: 6px;
}
.feature-card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.feature-card p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.98rem; }
.feature-card p:last-child { margin-bottom: 0; }

/* ---- Video --------------------------------------------------------------- */
.video {
	position: relative;
	width: 100%;
	max-width: 900px;
	margin: 1.75rem auto 0;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- CTA band ------------------------------------------------------------ */
.cta {
	margin: 3rem 0 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 2.5rem 1.5rem;
	text-align: center;
}
.cta h2 { margin: 0 0 0.5rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.cta h2::after { margin-left: auto; margin-right: auto; }
.cta p { color: var(--muted); margin: 0 auto 1.5rem; max-width: 55ch; }
.cta-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
	margin-top: 3rem;
	border-top: 1px solid var(--border);
	padding: 2rem 0;
	color: var(--muted-soft);
	font-size: 0.9rem;
	text-align: center;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
	.hero-grid { grid-template-columns: 1fr; gap: 1.75rem; }
	.hero-media { order: -1; }
}

@media (max-width: 540px) {
	.container { padding: 0 1.15rem; }
	body { font-size: 1rem; }
	.section { padding: 2rem 0; }
	.feature-card figure { height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn:hover, .feature-card:hover { transform: none; }
}
