/*
	Atelier Glass — homepage stylesheet for the Matt Way Media redesign.

	Deliberately self-contained: it does NOT extend assets/css/main.css, so the
	apps hub and the standalone privacy pages keep rendering exactly as they do
	today while this page changes completely.

	Paths inside this file and in the markup are root-absolute (/assets/...), so
	the page works identically at /v2/index.html during review and at /index.html
	once it launches. Moving it is a file move, not a find-and-replace.
*/

:root {
	--bg: #0b0c0e;
	--bg-raised: #101216;
	--gold: #b99c45;
	--gold-light: #d9c07f;
	--gold-pale: #e8d49a;
	--text: #f2f1ee;
	--text-dim: #b8bcc0;
	--text-muted: #8b9096;
	--text-faint: #5f656b;
	--hairline: rgba(242, 241, 238, 0.13);
	--glass: rgba(255, 255, 255, 0.05);
	--glass-edge: rgba(255, 255, 255, 0.11);

	--serif: Newsreader, Georgia, "Times New Roman", serif;
	--sans: Jost, "Helvetica Neue", Helvetica, Arial, sans-serif;
	--mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--gutter: 60px;
	--maxw: 1400px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-weight: 300;
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a {
	color: var(--gold-light);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--gold-pale);
}

img,
video {
	max-width: 100%;
}

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

.mono {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Hero ---------- */

.hero {
	position: relative;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.hero-media,
.hero-media video,
.hero-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(11, 12, 14, 0.86) 0%,
		rgba(11, 12, 14, 0.62) 34%,
		rgba(11, 12, 14, 0.84) 72%,
		var(--bg) 100%
	);
}

.hero-inner {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 48px;
}

/* ---------- Site header ---------- */

.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 30px var(--gutter);
	max-width: var(--maxw);
	margin: 0 auto;
	width: 100%;
}

.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--text);
}

.brand img {
	width: 40px;
	height: auto;
	display: block;
}

.brand span {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

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

/* :not(.btn-gold) so the nav's muted colour never outranks the button's own. */
.site-nav a:not(.btn-gold) {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.site-nav a:not(.btn-gold):hover {
	color: var(--text);
}

.btn-gold {
	background: var(--gold);
	color: var(--bg);
	padding: 11px 22px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	transition: background 0.2s ease, color 0.2s ease;
}

.btn-gold:hover {
	background: var(--gold-pale);
	color: var(--bg);
}

.btn-outline {
	border: 1px solid var(--gold);
	color: var(--gold-light);
	padding: 15px 34px;
	display: inline-block;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
	background: var(--gold);
	color: var(--bg);
}

/* ---------- Hero copy ---------- */

.hero-copy {
	max-width: var(--maxw);
	margin: 0 auto;
	width: 100%;
	padding: 0 var(--gutter);
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.hero-kicker {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	color: var(--gold);
	margin: 0;
}

.hero h1 {
	margin: 0;
	font-family: var(--serif);
	font-weight: 200;
	font-size: clamp(44px, 6.4vw, 86px);
	line-height: 1.02;
	letter-spacing: -0.02em;
	color: #fff;
	text-wrap: pretty;
	max-width: 18ch;
}

.hero h1 em {
	font-style: italic;
	font-weight: 300;
	color: var(--gold-light);
}

/* ---------- Proof strip ---------- */

.proof {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-top: 1px solid rgba(185, 156, 69, 0.3);
	background: rgba(11, 12, 14, 0.5);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.proof div {
	padding: 24px clamp(18px, 2.5vw, 32px);
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.proof div + div {
	border-left: 1px solid rgba(242, 241, 238, 0.09);
}

.proof b {
	font-family: var(--serif);
	font-size: 28px;
	font-weight: 200;
	color: var(--gold-light);
	line-height: 1;
}

.proof span {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-muted);
}

/* ---------- Sections ---------- */

.section {
	padding: clamp(64px, 8vw, 104px) 0 0;
}

.section-head {
	display: flex;
	align-items: baseline;
	gap: 20px;
	margin-bottom: 36px;
}

.section-head .num {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--gold);
}

.section-head h2 {
	margin: 0;
	font-family: var(--serif);
	font-weight: 200;
	font-size: clamp(30px, 3.4vw, 40px);
	letter-spacing: -0.01em;
	color: #fff;
}

.section-head .count {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--text-muted);
}

.section-head .rule {
	flex: 1;
	height: 1px;
	background: var(--hairline);
}

.section-head .more {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gold-light);
	white-space: nowrap;
}

/* ---------- Film grid ---------- */

.reel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.reel {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.reel-frame {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--bg-raised);
	display: block;
}

.reel-frame img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reel-frame:hover img {
	transform: scale(1.04);
}

/* Vertical 9:16 reel sits as a portrait panel on a blurred bed of itself. */
.reel-frame.is-vertical {
	display: flex;
	align-items: center;
	justify-content: center;
}

.reel-frame.is-vertical .bed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(26px) brightness(0.38);
	transform: scale(1.1);
}

.reel-frame.is-vertical .portrait {
	position: relative;
	width: 54%;
	aspect-ratio: 9 / 16;
	border: 1px solid rgba(217, 192, 127, 0.3);
	object-fit: cover;
	height: auto;
	inset: auto;
}

.reel-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(11, 12, 14, 0.5);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-top: 1px solid rgba(217, 192, 127, 0.32);
	padding: 14px 18px;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.reel-caption strong {
	font-family: var(--serif);
	font-size: 20px;
	font-weight: 300;
	color: #fff;
}

.reel-caption span {
	font-family: var(--mono);
	font-size: 9px;
	letter-spacing: 0.14em;
	color: var(--gold-light);
}

.reel-play {
	position: absolute;
	top: 16px;
	left: 16px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(11, 12, 14, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(217, 192, 127, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.reel-frame:hover .reel-play {
	background: var(--gold);
}

.reel-frame:hover .reel-play svg path {
	fill: var(--bg);
}

.reel p {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: var(--text-muted);
}

/* ---------- Software (glass over image) ---------- */

.software {
	position: relative;
	overflow: hidden;
	margin-top: clamp(64px, 8vw, 104px);
}

.software-bed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.software-scrim {
	position: absolute;
	inset: 0;
	background: rgba(11, 12, 14, 0.87);
}

.software-inner {
	position: relative;
	padding: clamp(40px, 5vw, 56px) 0 clamp(44px, 5vw, 58px);
}

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-bottom: 28px;
}

.filter {
	background: var(--glass);
	border: 1px solid var(--glass-edge);
	color: #c9ced3;
	padding: 8px 17px;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter:hover {
	border-color: rgba(217, 192, 127, 0.5);
	color: var(--text);
}

.filter[aria-pressed="true"] {
	background: var(--gold);
	border-color: var(--gold);
	color: var(--bg);
}

.app-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 14px;
}

.app-card {
	background: var(--glass);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border: 1px solid var(--glass-edge);
	border-top-color: rgba(217, 192, 127, 0.34);
	padding: 16px;
	display: flex;
	align-items: center;
	gap: 13px;
	color: var(--text);
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.app-card:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(217, 192, 127, 0.5);
	transform: translateY(-2px);
	color: var(--text);
}

.app-card img {
	width: 46px;
	height: 46px;
	border-radius: 11px;
	display: block;
	flex-shrink: 0;
}

.app-card .meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.app-card .name {
	font-size: 13px;
	line-height: 1.25;
	color: #fff;
}

.app-card .cat {
	font-family: var(--mono);
	font-size: 9px;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	text-transform: uppercase;
}

.app-card .cat.is-soon {
	color: var(--gold-light);
}

.software-foot {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	border-top: 1px solid rgba(242, 241, 238, 0.12);
	padding-top: 22px;
	margin-top: 28px;
}

.software-foot p {
	margin: 0;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--text-muted);
	flex: 1;
	text-transform: none;
	letter-spacing: 0;
}

/* ---------- Capability ---------- */

.capability {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	background: var(--hairline);
	border: 1px solid var(--hairline);
}

.capability div {
	background: var(--bg);
	padding: 34px 28px;
	display: flex;
	flex-direction: column;
	gap: 13px;
}

.capability .rn {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.2em;
	color: var(--gold);
}

.capability h3 {
	margin: 0;
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 300;
	color: #fff;
}

.capability p {
	margin: 0;
	font-size: 13px;
	line-height: 1.75;
	color: var(--text-muted);
}

/* ---------- Contact ---------- */

.contact {
	position: relative;
	margin-top: clamp(64px, 8vw, 104px);
	min-height: 420px;
	display: flex;
	overflow: hidden;
}

.contact img.bed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 32%;
}

.contact .scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		var(--bg) 0%,
		rgba(11, 12, 14, 0.8) 42%,
		rgba(11, 12, 14, 0.93) 100%
	);
}

.contact-inner {
	position: relative;
	margin: auto;
	padding: 72px var(--gutter);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	text-align: center;
}

.contact h2 {
	margin: 0;
	font-family: var(--serif);
	font-weight: 200;
	font-size: clamp(34px, 4.4vw, 54px);
	line-height: 1.1;
	color: #fff;
	max-width: 18ch;
}

.contact p {
	margin: 0;
	font-size: 15px;
	line-height: 1.8;
	color: #a8adb2;
	max-width: 46ch;
}

/* ---------- Footer ---------- */

.site-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	padding: 26px var(--gutter);
	max-width: var(--maxw);
	margin: 0 auto;
	border-top: 1px solid rgba(242, 241, 238, 0.1);
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text-faint);
}

.site-footer a {
	color: var(--text-faint);
}

.site-footer a:hover {
	color: var(--gold-light);
}

/* ---------- Video lightbox ---------- */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 999;
	background: rgba(4, 5, 6, 0.94);
	display: none;
}

.lightbox[open],
.lightbox.is-open {
	display: block;
}

.lightbox iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	:root {
		--gutter: 28px;
	}

	.site-nav a:not(.btn-gold) {
		display: none;
	}

	/* Sole remaining nav control on small screens — keep it a 44px touch target. */
	.btn-gold {
		padding: 14px 24px;
	}

	.proof {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.proof div:nth-child(3) {
		border-left: 0;
	}

	.proof div:nth-child(n + 3) {
		border-top: 1px solid rgba(242, 241, 238, 0.09);
	}

	.capability {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/*
		Three cells in a two-column grid leave a hole in the last row. Let the odd
		one out run the full width instead. The capability strip has four and
		divides evenly, so it is left alone.
	*/
	.proof div:last-child {
		grid-column: 1 / -1;
	}

	.section-head {
		flex-wrap: wrap;
		gap: 12px;
	}

	.section-head .rule {
		display: none;
	}
}

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

	.capability {
		grid-template-columns: 1fr;
	}

	.proof {
		grid-template-columns: 1fr;
	}

	.proof div + div {
		border-left: 0;
		border-top: 1px solid rgba(242, 241, 238, 0.09);
	}
}

/* Respect the OS setting: no autoplaying background motion. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.reel-frame img,
	.app-card {
		transition: none;
	}

	.reel-frame:hover img {
		transform: none;
	}
}
