/*
Theme Name: SamGo Base
Theme URI: https://samgoai.com
Author: SamGo
Description: A blank canvas. This theme deliberately ships no design — no colours, no type scale, no layout system, no block presets. It exists only so WordPress has a valid classic theme to run: templates it can find, menu locations it can register, and a stylesheet it can load. Everything a visitor sees is written by the agent, per project, starting from this file.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: samgo-base
*/

/* ---------------------------------------------------------------------------
 * MODARVEN — visual language
 *
 * A first pass so the content model's data is readable before the full design
 * is written. The tokens below come from DESIGN.md: soft white canvas, deep
 * ink, architectural teal focus, warm sand for atmosphere. Every literal that
 * is not a design token is a bug in the making — keep them here on :root.
 * ------------------------------------------------------------------------- */

:root {
	/* Palette — from DESIGN.md */
	--bg: #f7f8f6;              /* main reading background */
	--surface: #ffffff;         /* cards, tables */
	--ink: #172b2b;             /* headings, body, key values */
	--ink-soft: #586867;        /* captions, units, meta */
	--brand: #145b55;           /* focus, primary actions */
	--brand-deep: #104841;      /* hover / pressed */
	--brand-soft: #eaf3f0;      /* selected / highlight */
	--sand: #f3eee6;            /* atmosphere, material scenes */
	--warn: #a45432;            /* caution, restricted */
	--line: #d9dfdc;            /* dividers, table borders */
	--line-strong: #7b8b85;     /* input / control outlines */

	/* Type */
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	--step--1: 0.875rem;        /* small / captions */
	--step-0: 1rem;             /* body */
	--step-1: 1.125rem;         /* lede */
	--step-2: 1.5rem;           /* card titles, h3 */
	--step-3: 2rem;             /* h2 */
	--step-4: 2.75rem;          /* h1 */
	--lh-tight: 1.15;
	--lh-body: 1.7;

	/* Rhythm */
	--gap: 1rem;
	--section: 3rem;
	--container: 1248px;
	--gutter: 1.5rem;
	--radius: 8px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(23, 43, 43, 0.05), 0 8px 24px rgba(23, 43, 43, 0.06);
}

/* ---------------------------------------------------------------------------
 * Reset / base
 * ------------------------------------------------------------------------- */

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

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

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: var(--lh-body);
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--brand);
	text-decoration: none;
}

a:hover {
	color: var(--brand-deep);
	text-decoration: underline;
}

h1, h2, h3, h4 {
	line-height: var(--lh-tight);
	font-weight: 600;
	color: var(--ink);
	margin: 0 0 0.5em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 1em; }

/* ---------------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------------- */

.site-main {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: var(--section) var(--gutter);
}

.site-main > * {
	max-width: 100%;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
	padding: 0 var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--gap);
	max-width: var(--container);
	margin: 0 auto;
	height: 80px;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
	white-space: nowrap;
	min-height: 44px;
}

.brand-mark {
	width: 10px;
	height: 10px;
	background: var(--brand);
	transform: rotate(45deg);
	flex-shrink: 0;
	border-radius: 1px;
}

.brand-name {
	font-size: 19px;
	letter-spacing: 3px;
	text-transform: uppercase;
}

.site-brand:hover {
	color: var(--brand);
	text-decoration: none;
}

.site-brand:hover .brand-mark {
	background: var(--brand-deep);
}

/* ---- Primary navigation ---- */

.site-nav {
	display: flex;
	align-items: center;
}

.site-nav .nav-list {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Each top-level entry is positioned so its dropdown can anchor to it */
.site-nav .menu-item {
	position: relative;
}

.site-nav a {
	color: var(--ink);
	font-size: var(--step--1);
	text-decoration: none;
	display: block;
	padding: 0.6rem 0.8rem;
	border-radius: var(--radius-sm);
	white-space: nowrap;
}

.site-nav a:hover {
	color: var(--brand);
	background: var(--brand-soft);
	text-decoration: none;
}

/* Parent with children gets a subtle chevron marker */
.site-nav .menu-item-has-children > a::after {
	content: "\25BE";
	margin-left: 0.3rem;
	font-size: 0.7em;
	opacity: 0.6;
}

/* ---- Dropdown (desktop) ---- */

.site-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0.4rem;
	display: none;
	z-index: 50;
}

.site-nav .menu-item:hover > .sub-menu,
.site-nav .menu-item:focus-within > .sub-menu {
	display: block;
}

.site-nav .sub-menu a {
	padding: 0.55rem 0.9rem;
	font-size: var(--step--1);
}

/* Third level (nested) flies out to the right */
.site-nav .sub-menu .sub-menu {
	top: -0.4rem;
	left: 100%;
	margin: 0 0 0 0.25rem;
}

/* ---- CTA item (Contact) ---- */
.site-nav .nav-cta > a {
	background: var(--brand);
	color: #fff;
	padding: 0.55rem 1.1rem;
	font-weight: 600;
}

.site-nav .nav-cta > a:hover {
	background: var(--brand-deep);
	color: #fff;
}

/* ---- Mobile toggle button ---- */
.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	background: transparent;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.nav-toggle-bar {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: #fff;
	padding: 0.5rem 1rem;
	z-index: 100;
	border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
	left: 0;
}

/* ---- Mobile: collapse nav behind the hamburger ---- */
@media (max-width: 900px) {
	.nav-toggle {
		display: flex;
	}

	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
		max-height: calc(100vh - 80px);
		overflow-y: auto;
		display: none;
		padding: 0.5rem var(--gutter) 1rem;
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav .nav-list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
	}

	.site-nav a {
		padding: 0.7rem 0;
		white-space: normal;
	}

	/* Dropdowns become in-line, indented lists on mobile */
	.site-nav .sub-menu {
		position: static;
		min-width: 0;
		box-shadow: none;
		border: none;
		border-left: 2px solid var(--line);
		border-radius: 0;
		margin: 0 0 0 1rem;
		padding: 0 0 0 0.75rem;
		display: none;
	}

	.site-nav .menu-item.is-open > .sub-menu {
		display: block;
	}

	.site-nav .sub-menu .sub-menu {
		border-left-color: var(--line-strong);
	}

	.site-nav .menu-item-has-children > a::after {
		float: right;
	}

	.site-nav .nav-cta > a {
		margin-top: 0.5rem;
		text-align: center;
	}
}

/* Footer */
.site-footer {
	background: var(--surface);
	border-top: 1px solid var(--line);
	margin-top: var(--section);
	padding: 2rem var(--gutter);
	color: var(--ink-soft);
	font-size: var(--step--1);
}

.site-footer-note {
	margin: 0.5rem 0 0;
}

.footer-list {
	display: flex;
	gap: 1.25rem;
	flex-wrap: wrap;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.footer-list a {
	color: var(--ink-soft);
}

.footer-list a:hover {
	color: var(--brand);
}

/* ---------------------------------------------------------------------------
 * Archive / list cards
 * ------------------------------------------------------------------------- */

.archive-title {
	margin-bottom: 0.25em;
}

.archive-description {
	color: var(--ink-soft);
	margin-bottom: var(--section);
}

.archive-list,
.post-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--gap);
}

@media (min-width: 720px) {
	.archive-list,
	.post-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.archive-list,
	.post-list {
		grid-template-columns: repeat(3, 1fr);
	}
}

.archive-card,
.post-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.archive-card-title,
.post-card-title {
	font-size: var(--step-2);
	margin-bottom: 0.5em;
}

.archive-card-title a,
.post-card-title a {
	color: var(--ink);
}

.archive-card-title a:hover,
.post-card-title a:hover {
	color: var(--brand);
	text-decoration: none;
}

.archive-card-image {
	display: block;
	border-radius: var(--radius-sm);
	overflow: hidden;
	margin-bottom: 1rem;
}

.archive-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.archive-card-excerpt,
.post-card-excerpt {
	color: var(--ink-soft);
	font-size: var(--step--1);
}

.archive-card-excerpt p,
.post-card-excerpt p {
	margin: 0;
}

/* Case study meta (label—value grid) */
.case-study-meta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 0.75rem;
	margin: 0 0 1rem;
	font-size: var(--step--1);
}

.case-study-meta dt {
	color: var(--ink-soft);
	font-weight: 600;
}

.case-study-meta dd {
	margin: 0;
	color: var(--ink);
}

/* ---------------------------------------------------------------------------
 * Single entry + case study detail
 * ------------------------------------------------------------------------- */

.entry,
.page-body {
	max-width: 760px;
	margin: 0 auto;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 2.5rem;
	box-shadow: var(--shadow);
}

.entry-header,
.entry-title,
.page-title {
	word-wrap: break-word;
}

.entry-image,
.page-image {
	border-radius: var(--radius-sm);
	overflow: hidden;
	margin: 0 0 1.5rem;
}

.entry-content,
.page-content {
	line-height: var(--lh-body);
}

/* Case study fields — stacked label/value */
.case-study-fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.25rem 0;
	margin: 1.5rem 0;
	border-top: 1px solid var(--line);
	padding-top: 1.5rem;
}

.case-study-fields dt {
	font-weight: 600;
	color: var(--brand);
	font-size: var(--step--1);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-top: 1rem;
}

.case-study-fields dt:first-child {
	margin-top: 0;
}

.case-study-fields dd {
	margin: 0;
	color: var(--ink);
}

/* Term lists (categories / tags) */
.entry-terms {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
	font-size: var(--step--1);
	color: var(--ink-soft);
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.term-label {
	font-weight: 600;
	color: var(--brand);
	margin-right: 0.25rem;
}

/* Pagination */
.nav-links {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: var(--section);
}

.nav-links a,
.nav-links span {
	display: inline-block;
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	font-size: var(--step--1);
	color: var(--ink);
	background: var(--surface);
}

.nav-links a:hover {
	border-color: var(--brand);
	color: var(--brand);
	text-decoration: none;
}

.nav-links .current {
	background: var(--brand);
	color: #fff;
	border-color: var(--brand);
}

.empty {
	color: var(--ink-soft);
	text-align: center;
	padding: 2rem;
}

/* Homepage */
.home {
	display: block;
}

/* The homepage owns its own full-bleed rhythm; the generic .site-main
   padding would double up with each section's own padding. */
.site-main:has(.home),
.site-main > .home {
	padding: 0;
	max-width: none;
	margin: 0;
}

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.container-narrow {
	max-width: 800px;
}

.section {
	padding: 6rem 0;
}

.section-light {
	background: var(--surface);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.section-teal {
	background: var(--brand);
	color: #fff;
}

.section-teal h2,
.section-teal h3,
.section-teal .section-lede,
.section-teal p {
	color: #fff;
}

.section-teal .eyebrow {
	color: var(--brand-soft);
}

/* ---------------------------------------------------------------------------
 * Interior pages (page-*.php) — shared content-page scaffolding
 * ------------------------------------------------------------------------- */

/* Page hero: a slimmer echo of the homepage hero, one column of type. */
.page-hero {
	padding: 5rem 0 3rem;
	background: var(--bg);
}

.page-hero .container {
	max-width: 1000px;
}

.page-hero-title {
	font-size: clamp(2.25rem, 5vw, 3.5rem);
	line-height: 1.08;
	font-weight: 600;
	letter-spacing: -1.6px;
	margin: 0 0 1.25rem;
	color: var(--ink);
	text-wrap: balance;
}

.page-hero-lede {
	font-size: var(--step-1);
	line-height: 1.6;
	max-width: 46rem;
	color: var(--ink-soft);
	margin: 0;
}

/* Content sections reuse .section / .section-light / .section-teal from the
   homepage, so rhythm and colour stay identical across the site. */

/* Two-column intro: statement + supporting copy */
.intro-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: start;
}

@media (max-width: 900px) {
	.intro-split {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

.intro-split h2 {
	font-size: var(--step-3);
	letter-spacing: -0.5px;
	margin: 0;
}

.intro-split p {
	color: var(--ink-soft);
	margin: 0;
}

/* Generic rich-text body for interior pages (legal, about prose, etc.) */
.prose {
	max-width: 760px;
	line-height: var(--lh-body);
	color: var(--ink);
}

.prose h2 {
	font-size: var(--step-2);
	margin: 2.5rem 0 1rem;
}

.prose h3 {
	font-size: var(--step-1);
	margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
	color: var(--ink-soft);
}

.prose ul,
.prose ol {
	padding-left: 1.25rem;
	margin: 0 0 1rem;
}

.prose li {
	margin-bottom: 0.4rem;
}

.prose a {
	color: var(--brand);
	text-decoration: underline;
}

.prose a:hover {
	color: var(--brand-deep);
}

/* Legal / long-document layout */
.legal-body {
	max-width: 800px;
}

.legal-body h2 {
	font-size: var(--step-2);
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}

.legal-body h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.legal-meta {
	font-size: var(--step--1);
	color: var(--ink-soft);
	margin-bottom: 2rem;
}

/* Contact / form scaffolding */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

@media (max-width: 900px) {
	.contact-grid {
		grid-template-columns: 1fr;
	}
}

.contact-detail {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.contact-block {
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--line);
}

.contact-block:last-child {
	border-bottom: none;
}

.contact-block h3 {
	font-size: var(--step--1);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--brand);
	margin-bottom: 0.35rem;
}

.contact-block p {
	margin: 0;
	font-size: var(--step-0);
}

.contact-block a {
	color: var(--ink);
	font-weight: 600;
}

.contact-block a:hover {
	color: var(--brand);
}

/* Form fields */
.form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 2rem;
	box-shadow: var(--shadow);
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

@media (max-width: 600px) {
	.form-row {
		grid-template-columns: 1fr;
	}
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.form-field label {
	font-size: var(--step--1);
	font-weight: 600;
	color: var(--ink);
}

.form-field input,
.form-field select,
.form-field textarea {
	font: inherit;
	font-size: var(--step-0);
	color: var(--ink);
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--bg);
	width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
	outline: 2px solid var(--brand);
	outline-offset: 1px;
	border-color: var(--brand);
}

.form-field textarea {
	min-height: 120px;
	resize: vertical;
}

.form-note {
	font-size: var(--step--1);
	color: var(--ink-soft);
}

/* Thank-you / confirmation state */
.confirm-panel {
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
	padding: 4rem 2rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.confirm-mark {
	width: 56px;
	height: 56px;
	margin: 0 auto 1.5rem;
	border-radius: 50%;
	background: var(--brand-soft);
	color: var(--brand);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 700;
}

.confirm-panel h1 {
	font-size: var(--step-3);
	margin-bottom: 1rem;
}

.confirm-panel p {
	color: var(--ink-soft);
	max-width: 34rem;
	margin: 0 auto 2rem;
}

/* Inline stat strip reused across interior pages */
.metric-strip {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}

@media (min-width: 720px) {
	.metric-strip {
		grid-template-columns: repeat(4, 1fr);
	}
}

.metric {
	border-top: 3px solid var(--brand);
	padding-top: 1rem;
}

.metric-value {
	display: block;
	font-size: var(--step-3);
	font-weight: 600;
	color: var(--ink);
	line-height: 1.1;
}

.metric-label {
	display: block;
	margin-top: 0.4rem;
	font-size: var(--step--1);
	color: var(--ink-soft);
}

/* Section heading block */
.section-head {
	max-width: 720px;
	margin: 0 0 2.5rem;
}

.section-head h2 {
	font-size: 40px;
	letter-spacing: -1.5px;
	margin: 0 0 0.5rem;
}

.section-lede {
	color: var(--ink-soft);
	font-size: var(--step-1);
	margin: 0;
}

.eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.8px;
	text-transform: uppercase;
	color: var(--brand);
	margin: 0 0 20px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.eyebrow::before {
	content: '';
	width: 24px;
	height: 1px;
	background: currentColor;
	flex-shrink: 0;
}

.section-cta {
	margin-top: 2rem;
}

/* ---- Hero ---- */
.hero {
	padding: 3.5rem 0 0;
	max-width: var(--container);
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.hero .eyebrow {
	margin: 0 0 1.5rem;
}

.hero-top {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	align-items: end;
	gap: 4rem;
	margin-bottom: 2.5rem;
}

.hero-statement {
	min-width: 0;
}

.hero-title {
	font-size: 60px;
	line-height: 1.06;
	font-weight: 600;
	letter-spacing: -2.7px;
	margin: 0;
	color: var(--ink);
	text-wrap: balance;
}

.hero-lede {
	font-size: 18px;
	line-height: 1.65;
	max-width: 30rem;
	color: var(--ink-soft);
	margin: 0;
	align-self: end;
	padding-bottom: 6px;
}

.hero-image {
	height: 530px;
	border-radius: var(--radius);
	overflow: hidden;
	position: relative;
	background: var(--ink);
}

.hero-image picture {
	display: block;
	width: 100%;
	height: 100%;
}

.hero-mobile-size { display: none; }
@media (max-width: 700px) {
	.hero-desktop-size { display: none; }
	.hero-mobile-size { display: inline; }
}

.hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 55%;
}

/* ---- Concept illustrations (honest stand-ins for absent product photos) ---- */

/* Any slot marked --concept renders an inline SVG diagram, not an <img>. The
   SVG itself is sized with width/height 100% and preserveAspectRatio="slice"
   so it cover-fills its box the same way a photograph would. These rules
   guarantee the SVG fills the slot and the caption/gradient still overlay. */
.hero-image--concept svg,
.gallery-img--concept svg,
.accordion-image--concept svg,
.compare-before svg,
.compare-after svg {
	display: block;
	width: 100%;
	height: 100%;
}

.hero-image--concept {
	background: #1a2e30; /* matches the capsule dusk illustration backdrop */
}

/* The gallery scenes and accordion stage panels are absolutely-stacked
   layers (only the .active one is visible). The old markup used <img>; the
   concept illustrations now live in <div class="gallery-img--concept"> and
   <div data-acc>. Re-assert the stacking so exactly one layer shows. */
.gallery-img--concept,
.accordion-image--concept [data-acc] {
	position: absolute;
	inset: 0;
}

.gallery-img--concept:not(.active),
.accordion-image--concept [data-acc]:not(.active) {
	opacity: 0;
	pointer-events: none;
}

.gallery-img--concept.active,
.accordion-image--concept [data-acc].active {
	opacity: 1;
}

/* Compare slider: before/after are stacked horizontally, after is clipped.
   The concept SVG must fill the same box the <img> used to. */
.compare-before,
.compare-after {
	position: absolute;
	inset: 0;
}

.hero-image::after {
	content: '';
	position: absolute;
	inset: 40% 0 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
	pointer-events: none;
}

.image-label {
	position: absolute;
	top: 20px;
	left: 20px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 4px;
	padding: 5px 10px;
	font-size: 12px;
	color: var(--ink);
	z-index: 1;
}

.hero-caption {
	position: absolute;
	bottom: 28px;
	left: 28px;
	right: 28px;
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 24px;
	color: #fff;
	z-index: 1;
}

.hero-caption h3 {
	font-size: 28px;
	letter-spacing: -0.6px;
	color: #fff;
	margin: 0;
}

.hero-caption p {
	color: #fff;
	font-size: 14px;
}

.hero-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--line);
	font-size: 14px;
	color: var(--ink-soft);
}

.hero-facts {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	margin: 0;
	padding: 0;
	font-size: var(--step--1);
	color: var(--ink-soft);
}

.hero-facts strong {
	color: var(--ink);
	display: block;
	font-size: var(--step-0);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* Large tablets and below: single column hero */
@media (max-width: 1000px) {
	.hero-top {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.hero-title {
		font-size: 48px;
	}

	.hero-lede {
		max-width: none;
	}

	.hero-image {
		height: 440px;
	}
}

/* Phones */
@media (max-width: 700px) {
	.hero {
		padding-top: 2.5rem;
	}

	.hero-title {
		font-size: 34px;
		letter-spacing: -1.2px;
	}

	.hero-lede {
		font-size: 18px;
	}

	.hero-image {
		height: 420px;
	}

	.hero-image img {
		object-position: 64% 50%;
	}

	.hero-caption {
		left: 20px;
		right: 20px;
		bottom: 22px;
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.hero-caption h3 {
		font-size: 22px;
		max-width: 18ch;
	}

	.hero-foot {
		flex-direction: column;
		align-items: flex-start;
	}

	.hero-actions {
		width: 100%;
	}
}

/* ---- Buttons ---- */
.btn {
	display: inline-block;
	padding: 0.7rem 1.4rem;
	border-radius: var(--radius-sm);
	font-weight: 600;
	font-size: var(--step-0);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
	text-decoration: none;
	transform: translateY(-1px);
}

.btn-primary {
	background: var(--brand);
	color: #fff;
}

.btn-primary:hover {
	background: var(--brand-deep);
	color: #fff;
}

.btn-secondary {
	background: var(--surface);
	color: var(--brand);
	border-color: var(--brand);
}

.btn-secondary:hover {
	background: var(--brand-soft);
	color: var(--brand-deep);
}

.btn-on-dark {
	background: #fff;
	color: var(--brand);
}

.btn-on-dark:hover {
	background: var(--brand-soft);
	color: var(--brand);
}

.btn-ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.6);
}

.btn-ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

/* ---- Text link ---- */
.text-link {
	font-weight: 600;
	color: var(--brand);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.25rem 0;
}

.text-link:hover {
	color: var(--brand-deep);
	text-decoration: underline;
}

/* ---- Product grid ---- */
.product-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

@media (min-width: 720px) {
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.product-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
}

.product-card-media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.product-card-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.product-card-body h3 {
	margin-bottom: 0.5rem;
}

.product-card-body p {
	color: var(--ink-soft);
	margin-bottom: 1rem;
}

.spec-chips {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 1.25rem;
	padding: 0;
	font-size: var(--step--1);
}

.spec-chips li {
	background: var(--brand-soft);
	color: var(--brand);
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
}

.product-card-body .text-link {
	margin-top: auto;
}

/* ---- Applications ---- */
.app-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 600px) {
	.app-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1000px) {
	.app-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.app-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.app-index {
	display: block;
	font-size: var(--step--1);
	font-weight: 600;
	color: var(--brand);
	letter-spacing: 0.08em;
	margin-bottom: 0.75rem;
}

.app-card h3 {
	font-size: var(--step-1);
	margin-bottom: 0.5rem;
}

.app-card p {
	color: var(--ink-soft);
	font-size: var(--step--1);
	margin: 0;
}

/* ---- Stats ---- */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
}

@media (min-width: 720px) {
	.stats-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.stat {
	text-align: center;
}

.stat-value {
	display: block;
	font-size: clamp(2.25rem, 5vw, 3.25rem);
	font-weight: 600;
	line-height: 1;
	color: #fff;
}

.stat-label {
	display: block;
	margin-top: 0.5rem;
	color: var(--brand-soft);
	font-size: var(--step--1);
}

/* ---- Benefits ---- */
.benefit-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 600px) {
	.benefit-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1000px) {
	.benefit-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.benefit {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.5rem;
}

.benefit h3 {
	font-size: var(--step-1);
	margin-bottom: 0.5rem;
	padding-left: 1rem;
	border-left: 3px solid var(--brand);
}

.benefit p {
	color: var(--ink-soft);
	font-size: var(--step--1);
	margin: 0;
}

/* ---- Process ---- */
.process-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	counter-reset: step;
}

@media (min-width: 600px) {
	.process-steps {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1000px) {
	.process-steps {
		grid-template-columns: repeat(3, 1fr);
	}
}

.process-steps li {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.step-num {
	display: inline-block;
	font-weight: 600;
	color: var(--brand);
	font-size: var(--step--1);
	letter-spacing: 0.08em;
	margin-bottom: 0.5rem;
}

.process-steps h3 {
	font-size: var(--step-1);
	margin-bottom: 0.5rem;
}

.process-steps p {
	color: var(--ink-soft);
	font-size: var(--step--1);
	margin: 0;
}

/* ---- Case studies ---- */
.case-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 720px) {
	.case-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.case-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.5rem;
	text-decoration: none;
	color: var(--ink);
	display: flex;
	flex-direction: column;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.case-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: var(--line-strong);
	color: var(--ink);
	text-decoration: none;
}

.case-country {
	font-size: var(--step--1);
	font-weight: 600;
	color: var(--brand);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 0.75rem;
}

.case-card h3 {
	font-size: var(--step-1);
	margin-bottom: 1rem;
}

.case-card .text-link {
	margin-top: auto;
}

/* ---- FAQ ---- */
.faq-list {
	border-top: 1px solid var(--line);
}

.faq-item {
	border-bottom: 1px solid var(--line);
}

.faq-item summary {
	cursor: pointer;
	font-weight: 600;
	padding: 1.25rem 0;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}

.faq-item summary::-webkit-details-marker {
	display: none;
}

.faq-item summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	color: var(--brand);
	font-weight: 400;
	font-size: var(--step-2);
}

.faq-item[open] summary::after {
	content: "\2212";
}

.faq-item p {
	color: var(--ink-soft);
	margin: 0 0 1.25rem;
	padding-right: 2rem;
}

/* ---- Final CTA band ---- */
.section-cta-band {
	text-align: center;
}

.section-cta-band h2 {
	font-size: var(--step-3);
	margin-bottom: 0.75rem;
}

.section-cta-band p {
	max-width: 32em;
	margin: 0 auto 1.5rem;
	color: var(--brand-soft);
}

.section-cta-band .hero-actions {
	justify-content: center;
}

/* Hero buttons — white primary against the dark band */
.hero-copy .btn-primary {
	background: #fff;
	color: var(--brand);
}

.hero-copy .btn-primary:hover {
	background: var(--brand-soft);
	color: var(--brand);
}

.hero-copy .btn-secondary {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.6);
}

.hero-copy .btn-secondary:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

/* ---- Hero entrance animation ---- */
.hero-copy > * {
	opacity: 0;
	transform: translateY(18px);
	animation: hero-rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.25s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.35s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.45s; }

/* ---------------------------------------------------------------------------
 * Homepage — signature interactions (from the design reference)
 * ------------------------------------------------------------------------- */

/* Mono meta label — the reference's small technical annotations */
.mono {
	font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.hero-foot-actions .text-link {
	font-size: var(--step--1);
}

/* ---- Section head: two-column statement row ---- */
.section-head {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 3rem;
	align-items: end;
	margin-bottom: 3rem;
}

.section-head h2 {
	font-size: 40px;
	letter-spacing: -1.5px;
	line-height: 1.12;
	margin: 0;
}

.section-head > p {
	margin: 0;
	color: var(--ink-soft);
	font-size: var(--step-1);
	line-height: 1.6;
}

@media (max-width: 900px) {
	.section-head {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
}

/* ============================================================
 * PRODUCT SYSTEM — gallery slider + mood chips
 * ============================================================ */
.gallery {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	height: 560px;
	background: var(--ink);
}

.gallery-img {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.55s ease;
}

.gallery-img.active {
	opacity: 1;
}

.gallery-img picture {
	display: block;
	width: 100%;
	height: 100%;
}

.gallery-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gallery::after {
	content: '';
	position: absolute;
	inset: 55% 0 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
	pointer-events: none;
}

.gallery-text {
	position: absolute;
	left: 28px;
	bottom: 28px;
	right: 28px;
	color: #fff;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-width: 34rem;
}

.gallery-text h3 {
	font-size: 28px;
	color: #fff;
	margin: 0;
	letter-spacing: -0.6px;
}

.gallery-text p {
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
	max-width: 40ch;
}

.gallery-status {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 1;
	color: #fff;
	background: rgba(0, 0, 0, 0.35);
	padding: 4px 10px;
	border-radius: 4px;
}

.gallery-controls {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.gallery-controls label {
	font-size: var(--step--1);
	color: var(--ink-soft);
}

.gallery-controls input[type="range"] {
	flex: 1;
	min-width: 160px;
	accent-color: var(--brand);
}

.mood-chips {
	display: flex;
	gap: 0.5rem;
}

.mood-chip {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 0.2s ease, border-color 0.2s ease;
	padding: 0;
}

.mood-chip.active {
	border-color: var(--ink);
	transform: scale(1.15);
}

@media (max-width: 700px) {
	.gallery {
		height: 400px;
	}
	.gallery-text {
		left: 20px;
		right: 20px;
		bottom: 20px;
	}
	.gallery-text h3 {
		font-size: 22px;
	}
}

/* ============================================================
 * KNOCK-DOWN STRUCTURE — exploded parts
 * ============================================================ */
.structure-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: 24px;
	align-items: stretch;
}
.structure-stage {
	display: flex;
	flex-direction: column;
	background: #eaf3f0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	position: relative;
	min-width: 0;
	overflow: hidden;
}
.drawing { display: block; width: 100%; height: auto; touch-action: pan-x; }
.drawing text { font-family: Inter, Arial, sans-serif; font-size: 14px; fill: var(--ink); }
.structure-roof { cursor: ns-resize; touch-action: none; }
.structure-roof:focus-visible { outline: none; filter: drop-shadow(0 0 4px #145b55); }
.mobile-marker { display: none; }
.stage-caption {
	margin-top: auto;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 24px;
	font-size: 12px;
	color: var(--ink-soft);
}
.stage-caption span:first-child { color: var(--ink-soft); font-weight: 400; }
/* Restore shared gesture hints after the structure rebuild. */
.hint {
	position: absolute;
	top: 16px;
	left: 16px;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 4px;
	background: var(--brand);
	color: #fff;
	font-size: var(--step--1);
	opacity: 1;
	pointer-events: none;
	transition: opacity .4s ease;
}
.hint.is-gone { opacity: 0; }
.structure-stage .hint-roof {
	top: 10%;
	left: 42%;
	transform: translateX(-50%);
	z-index: 2;
	background: rgba(255,255,255,.96);
	color: var(--ink);
	box-shadow: 0 8px 24px rgba(23,43,43,.08);
	white-space: nowrap;
}
.structure-stage .hint-roof .gesture {
	background: none;
	color: var(--brand);
	animation: none;
}
.structure-controls {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 32px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.legend {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	border-bottom: 1px solid var(--line);
	padding: 0 0 20px;
}
.legend .number {
	display: grid;
	place-items: center;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--bg);
	color: var(--ink);
	font-size: 12px;
}
.legend strong { display: block; font-size: 16px; font-weight: 600; margin: 0; }
.legend p { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }
.legend.active .number { background: var(--brand); border-color: var(--brand); color: #fff; }
.roof-control-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.roof-control input { display: block; width: 100%; margin: 12px 0 0; accent-color: var(--brand); min-height: 44px; padding: 10px 0; cursor: pointer; }
.structure-reset {
	min-height: 48px;
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
	cursor: pointer;
	font: inherit;
	font-size: 14px;
}
.structure-reset:hover, .structure-reset:focus-visible { background: #eaf3f0; }
.structure-controls .control-line { margin-top: auto; padding-top: 12px; gap: 12px; font-size: 14px; }
@media (max-width: 1000px) {
	.structure-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
	.structure-controls { padding: 24px; }
}
@media (max-width: 700px) {
	.structure-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.structure-stage .hint-roof { top: 4%; left: 45%; }
	.drawing text:not(.marker-text) { display: none; }
	.drawing .structure-roof rect { display: none; }
	.mobile-marker { display: block; }
	.drawing .marker-text { font-size: 24px; fill: #fff; text-anchor: middle; }
	.stage-caption { font-size: 11px; padding: 16px; }
	.structure-controls { gap: 16px; }
	.legend { padding-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.structure-stage .hint-roof .gesture { animation: none; }
}

/* ============================================================
 * COMPARISON SLIDER — before/after handle
 * ============================================================ */
.compare-track {
	position: relative;
	height: 440px;
	border-radius: var(--radius);
	overflow: hidden;
	cursor: ew-resize;
	user-select: none;
	touch-action: pan-y;
}

.compare-track img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	display: block;
}

.compare-after {
	clip-path: inset(0 0 0 50%);
}

.compare-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	background: #fff;
	z-index: 2;
}

.compare-handle span {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	box-shadow: var(--shadow);
	display: flex;
	align-items: center;
	justify-content: center;
}

.compare-handle span::before {
	content: '↔';
	color: var(--ink);
	font-size: 18px;
}

.compare-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 1rem;
	font-size: var(--step--1);
	letter-spacing: 0.05em;
}

@media (max-width: 700px) {
	.compare-track {
		height: 320px;
	}
}

/* ============================================================
 * PROCESS — progressive-disclosure accordion with image
 * ============================================================ */
.accordion-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

.accordion {
	border-top: 1px solid var(--line);
}

.accordion details {
	border-bottom: 1px solid var(--line);
}

.accordion summary {
	list-style: none;
	cursor: pointer;
	padding: 1.25rem 0;
	font-weight: 600;
	font-size: var(--step-1);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	color: var(--ink);
}

.accordion summary::-webkit-details-marker {
	display: none;
}

.accordion summary .plus {
	flex-shrink: 0;
	font-weight: 400;
	color: var(--ink-soft);
	transition: transform 0.3s ease;
}

.accordion details[open] summary .plus {
	transform: rotate(45deg);
}

.accordion details p {
	margin: 0 0 1.25rem;
	color: var(--ink-soft);
	max-width: 46ch;
}

.accordion-image {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	height: 480px;
	background: var(--ink);
	aspect-ratio: 1 / 1;
}

.accordion-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.45s ease;
}

.accordion-image img.active {
	opacity: 1;
}

.acc-caption {
	position: absolute;
	bottom: 20px;
	left: 20px;
	color: #fff;
	font-size: var(--step--1);
	letter-spacing: 0.05em;
	z-index: 1;
}

@media (max-width: 900px) {
	.accordion-layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
	.accordion-image {
		height: 320px;
	}
}

@keyframes hero-rise {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-copy > * {
		opacity: 1;
		transform: none;
		animation: none;
	}
}

/* ---- Reveal animation ---- */
/* Keep content readable even if scripts or observers fail; motion only shifts it. */
[data-reveal] {
	opacity: 1;
	transform: translateY(18px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	[data-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
 * Motion — respect the user's preference
 * ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
