/* Fonts */
@font-face {
	font-family: "Barlow";
	font-weight: 400;
	font-display: swap;
	src: url("/fonts/barlow-400.woff2") format("woff2");
}
@font-face {
	font-family: "Barlow";
	font-weight: 600;
	font-display: swap;
	src: url("/fonts/barlow-600.woff2") format("woff2");
}
@font-face {
	font-family: "Saira Condensed";
	font-weight: 700;
	font-display: swap;
	src: url("/fonts/saira-condensed-700.woff2") format("woff2");
}

/* Tokens */
:root {
	--ink: #2f251c;
	--ink-soft: #7a6652;
	--paper: #fffaf1;
	--paper-deep: #f6ead6;
	--paper-line: #eadcc6;
	--wall: #1f1b17;
	--wall-hole: #141110;
	--wall-panel: #2a241f;
	--wall-line: rgba(255, 244, 228, 0.08);
	--wall-text: #f5ead8;
	--wall-soft: #b8a891;
	--yellow: #ffc533;
	--yellow-deep: #d98a10;
	--board: #c8955a;
	--board-hole: #8f6336;
	--dusk: #22103f;
	--dusk-text: #f4e8ff;
	--radius: 32px;
	--radius-small: 20px;
	--gutter: clamp(16px, 4vw, 40px);
	--width: 1200px;
	--gap: clamp(16px, 2.2vw, 24px);
	--pad: clamp(24px, 4.6vw, 60px);
	--lift: 0 22px 44px -20px rgba(0, 0, 0, 0.55);
	--display: "Saira Condensed", "Arial Narrow", sans-serif;
	--body: "Barlow", system-ui, sans-serif;
	--spring: cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

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

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

body {
	margin: 0;
	background-color: var(--wall);
	background-image: radial-gradient(circle, var(--wall-hole) 0 2.5px, transparent 3px);
	background-size: 30px 30px;
	color: var(--wall-text);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.55;
}

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

h1,
h2,
h3 {
	margin: 0;
	font-family: var(--display);
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.005em;
}

p {
	margin: 0;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 3px solid var(--yellow);
	outline-offset: 3px;
	border-radius: 6px;
}

.container {
	width: min(100% - 2 * var(--gutter), var(--width));
	margin-inline: auto;
}

.section {
	margin-top: var(--gap);
	scroll-margin-top: 16px;
}

.eyebrow {
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.04em;
	color: var(--ink-soft);
	margin-bottom: 14px;
}

/* Top bar */
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 20px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.brand img {
	width: 44px;
	height: 44px;
	border-radius: 12px;
}

.brand span {
	font-family: var(--display);
	font-weight: 700;
	font-size: 32px;
	line-height: 1;
}

.topnav {
	display: flex;
	gap: 8px;
}

.topnav a {
	padding: 9px 16px;
	border-radius: 999px;
	background: var(--wall-panel);
	border: 1px solid var(--wall-line);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.topnav a:hover {
	background: var(--yellow);
	color: var(--ink);
}

/* Hero */
.hero-panel {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	align-items: center;
	gap: var(--pad);
	padding: var(--pad) var(--pad) 0;
	border-radius: calc(var(--radius) + 8px);
	background: var(--yellow);
	color: var(--ink);
	overflow: hidden;
}

.hero-copy .eyebrow {
	color: #6b4f1d;
}

.hero h1 {
	font-size: clamp(60px, 8.4vw, 118px);
}

.hero h1 span {
	display: inline-block;
	padding: 0.02em 0.14em 0.04em;
	border-radius: 0.1em;
	background: var(--ink);
	color: var(--yellow);
	rotate: -2deg;
}

.lead {
	margin-top: 26px;
	max-width: 36ch;
	font-size: clamp(18px, 1.55vw, 21px);
	color: #4d3b24;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 22px;
	margin-top: 32px;
}

.store-pill {
	display: inline-flex;
	align-items: center;
	padding: 15px 24px;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	font-weight: 600;
	font-size: 17px;
}

.arrow-link {
	font-weight: 600;
	text-decoration: none;
	border-bottom: 2px solid currentColor;
	padding-bottom: 2px;
}

.arrow-link::after {
	content: "→";
	display: inline-block;
	margin-left: 6px;
	transition: translate 0.2s;
}

.arrow-link:hover::after {
	translate: 4px 0;
}

.hero-device {
	position: relative;
	display: grid;
	place-items: center;
	padding-block: 12px;
}

.hero-device::before {
	content: "";
	position: absolute;
	width: 118%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: #ffb51a;
}

.phone {
	position: relative;
	width: clamp(230px, 24vw, 300px);
	padding: 10px;
	border-radius: 46px;
	background: #14110e;
	box-shadow: 0 40px 70px -30px rgba(60, 35, 0, 0.75);
	rotate: 4deg;
	transition: rotate 0.6s var(--spring), scale 0.6s var(--spring);
}

.hero-device:hover .phone {
	rotate: 0deg;
	scale: 1.03;
}

.phone-screen {
	position: relative;
	aspect-ratio: 360 / 782;
	border-radius: 36px;
	overflow: hidden;
	background: #2b2520;
}

.slides img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	animation: slide 18s infinite;
}

.slides img:nth-child(2) {
	animation-delay: 4.5s;
}

.slides img:nth-child(3) {
	animation-delay: 9s;
}

.slides img:nth-child(4) {
	animation-delay: 13.5s;
}

@keyframes slide {
	0% {
		opacity: 0;
		scale: 1.04;
	}
	3%,
	25% {
		opacity: 1;
		scale: 1;
	}
	29%,
	100% {
		opacity: 0;
	}
}

.hero-index {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
	margin: 0 calc(-1 * var(--pad));
	padding: 0;
	list-style: none;
	background: var(--ink);
}

.hero-index a {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 18px var(--pad) 18px clamp(18px, 2.4vw, 28px);
	color: var(--wall-text);
	font-weight: 600;
	text-decoration: none;
	border-left: 1px solid var(--wall-line);
	transition: background 0.2s;
}

.hero-index li:first-child a {
	padding-left: var(--pad);
	border-left: 0;
}

.hero-index a:hover {
	background: #3d3127;
}

.hero-index b {
	font-family: var(--display);
	font-size: 22px;
	color: var(--yellow);
}

/* Screws on the hero's corners: they turn as the page scrolls and when touched */
.screw {
	position: absolute;
	z-index: 1;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #efe6d8;
	box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16), 0 2px 3px rgba(80, 50, 0, 0.35);
	transition: rotate 0.8s var(--spring);
}

.screw:hover {
	rotate: -200deg;
}

.screw i {
	position: absolute;
	inset: 0;
}

.screw i::before,
.screw i::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 13px;
	height: 3px;
	border-radius: 2px;
	background: #7d6b55;
	translate: -50% -50%;
}

.screw i::after {
	rotate: 90deg;
}

.screw-top-left {
	top: 18px;
	left: 18px;
}

.screw-top-right {
	top: 18px;
	right: 18px;
}

.screw-bottom-left,
.screw-bottom-right {
	bottom: 78px;
}

.screw-bottom-left {
	left: 18px;
}

.screw-bottom-right {
	right: 18px;
}

@supports (animation-timeline: scroll()) {
	.screw i {
		animation: screw-turn linear both;
		animation-timeline: scroll(root);
	}
}

@keyframes screw-turn {
	to {
		rotate: 1080deg;
	}
}

/* Panels */
.panel {
	border-radius: var(--radius);
	padding: var(--pad);
}

.panel-cream {
	background: var(--paper);
	color: var(--ink);
}

.panel-dark {
	background: var(--wall-panel);
	border: 1px solid var(--wall-line);
	color: var(--wall-text);
}

.panel-dark .eyebrow {
	color: var(--wall-soft);
}

.panel-dusk {
	background: var(--dusk);
	color: var(--dusk-text);
}

.panel-dusk .eyebrow {
	color: #c9a8ea;
}

.section-head {
	max-width: 760px;
	margin-bottom: clamp(26px, 3.6vw, 44px);
}

.section-head h2,
.duo h2,
.journey h2 {
	font-size: clamp(42px, 5.4vw, 72px);
}

.section-head p:not(.eyebrow) {
	margin-top: 18px;
	max-width: 54ch;
	font-size: 19px;
	color: var(--ink-soft);
}

/* Steps of a job */
.steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.step-shot {
	margin: 0 0 18px;
	aspect-ratio: 9 / 13;
	border-radius: var(--radius-small);
	overflow: hidden;
	border: 6px solid var(--ink);
	background: var(--ink);
	transition: translate 0.5s var(--spring), box-shadow 0.5s;
}

.step:hover .step-shot {
	translate: 0 -8px;
	box-shadow: var(--lift);
}

.step-shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.step:first-child .step-shot img {
	object-position: bottom;
}

.step:nth-child(2) .step-shot img {
	object-position: center;
}

.step-number {
	font-family: var(--display);
	font-weight: 700;
	font-size: 22px;
	color: var(--yellow-deep);
}

.step h3 {
	margin: 2px 0 8px;
	font-size: 34px;
}

.step p {
	color: var(--ink-soft);
	font-size: 16px;
}

@media (max-width: 860px) {
	.steps {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: min(74%, 280px);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		margin-inline: calc(-1 * var(--pad));
		padding-inline: var(--pad);
		padding-bottom: 6px;
		scroll-padding-inline: var(--pad);
	}

	.step {
		scroll-snap-align: start;
	}
}

/* Gauges */
.gauges {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.gauges li {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 24px 26px;
	border-radius: var(--radius-small);
	background: var(--wall-panel);
	border: 1px solid var(--wall-line);
}

.gauges b {
	font-family: var(--display);
	font-size: clamp(56px, 6vw, 80px);
	line-height: 0.9;
	color: var(--yellow);
}

.gauges span {
	color: var(--wall-soft);
	font-size: 16px;
	line-height: 1.4;
}

@media (max-width: 860px) {
	.gauges {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Journey: room to shop */
.journey {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--pad);
	align-items: center;
}

.journey-copy > p:not(.eyebrow) {
	margin-top: 20px;
	font-size: 19px;
	color: var(--wall-soft);
	max-width: 46ch;
}

.said {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 28px 0 0;
	padding: 16px 20px 16px 16px;
	border-radius: var(--radius-small);
	background: #352d26;
}

.said img {
	width: 64px;
	height: 64px;
	flex: none;
	border-radius: 50%;
	background: var(--paper-deep);
}

.said b {
	display: block;
	color: var(--yellow);
}

.rail {
	display: flex;
	margin: 34px 0 0;
	padding: 0;
	list-style: none;
	font-weight: 600;
}

.rail li {
	position: relative;
	flex: 1;
	padding-top: 26px;
}

.rail li::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--yellow);
	box-shadow: 0 0 0 5px rgba(255, 197, 51, 0.18);
}

.rail li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 7px;
	left: 26px;
	right: 10px;
	border-top: 2px dashed rgba(255, 197, 51, 0.55);
}

.journey-shots {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6%;
	padding: 4% 6%;
}

.journey-shots img {
	border-radius: 28px;
	border: 8px solid #14110e;
	box-shadow: var(--lift);
	transition: rotate 0.6s var(--spring), translate 0.6s var(--spring);
}

.tilt-left {
	rotate: -6deg;
	translate: 0 18px;
}

.tilt-right {
	rotate: 5deg;
}

.journey-shots:hover img {
	rotate: 0deg;
	translate: 0 0;
}

@media (max-width: 860px) {
	.journey {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Neighbours */
.neighbours {
	overflow: hidden;
}

.marquee {
	margin-inline: calc(-1 * var(--pad));
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee + .marquee {
	margin-top: 16px;
}

.marquee-track {
	display: flex;
	gap: 16px;
	width: max-content;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	animation: marquee 70s linear infinite;
}

.marquee-reverse .marquee-track {
	animation-direction: reverse;
	animation-duration: 80s;
}

.marquee:hover .marquee-track {
	animation-play-state: paused;
}

@keyframes marquee {
	to {
		translate: calc(-50% - 8px) 0;
	}
}

.quote-card {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 340px;
	padding: 14px 18px 14px 14px;
	border-radius: var(--radius-small);
	background: #fff;
	border: 1px solid var(--paper-line);
	font-size: 15px;
	line-height: 1.4;
	color: var(--ink-soft);
	transition: translate 0.4s var(--spring), border-color 0.2s;
}

.quote-card:hover {
	translate: 0 -4px;
	border-color: var(--yellow);
}

.quote-card img {
	width: 72px;
	height: 72px;
	flex: none;
	border-radius: 50%;
	background: var(--paper-deep);
}

.quote-card b {
	display: block;
	margin-bottom: 2px;
	color: var(--ink);
}

/* Tools on the pegboard */
.tool-rack {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(130px, 40%), 1fr));
	gap: 30px 18px;
	margin: 0;
	padding: clamp(22px, 3vw, 36px);
	list-style: none;
	border-radius: var(--radius-small);
	background-color: var(--board);
	background-image: radial-gradient(circle, var(--board-hole) 0 3px, transparent 3.6px);
	background-size: 26px 26px;
	box-shadow: inset 0 0 0 6px #b07c43;
}

.tool {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 20px;
	cursor: grab;
}

.tool::before {
	content: "";
	position: absolute;
	top: 0;
	width: 6px;
	height: 26px;
	border-radius: 3px;
	background: #e9e4dc;
	box-shadow: 0 2px 2px rgba(60, 35, 10, 0.4);
}

.tool img {
	width: 100%;
	max-width: 150px;
	transform-origin: 50% 0;
	filter: drop-shadow(0 8px 6px rgba(60, 35, 10, 0.35));
}

.tool:hover img {
	animation: swing 1.4s ease-in-out;
}

@keyframes swing {
	15% {
		rotate: 12deg;
	}
	35% {
		rotate: -9deg;
	}
	55% {
		rotate: 5deg;
	}
	75% {
		rotate: -2deg;
	}
	100% {
		rotate: 0deg;
	}
}

.tool span {
	margin-top: 4px;
	padding: 3px 10px;
	border-radius: 8px;
	background: var(--paper);
	color: var(--ink);
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
}

/* Mentor and dream car */
.duo {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gap);
}

.duo h2 {
	margin-bottom: 18px;
}

.said-line {
	margin-bottom: 14px;
	font-weight: 600;
	font-size: 21px;
	line-height: 1.4;
}

.said-line b {
	display: block;
	font-size: 16px;
	color: #c9a8ea;
}

.mentor p:not(.eyebrow, .said-line),
.dream p:not(.eyebrow, .said-line) {
	font-size: 17px;
	opacity: 0.8;
}

.mentor {
	display: flex;
	flex-direction: column;
}

.mentor .eyebrow {
	margin-top: auto;
}

.mentor-face {
	width: clamp(128px, 14vw, 160px);
	height: auto;
	margin-bottom: 28px;
	border-radius: 50%;
	background: var(--yellow);
	transition: rotate 0.6s var(--spring);
}

.mentor:hover .mentor-face {
	rotate: -8deg;
}

.dream-car {
	width: 100%;
	aspect-ratio: 3 / 2;
	margin-bottom: 24px;
	border-radius: var(--radius-small);
	object-fit: cover;
	transition: scale 0.8s var(--spring);
}

.dream:hover .dream-car {
	scale: 1.02;
}

@media (max-width: 860px) {
	.duo {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Badges */
.badges {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 22px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: center;
}

.badges img {
	width: 100%;
	max-width: 132px;
	margin: 0 auto 10px;
	border-radius: 50%;
	transition: rotate 0.5s var(--spring), scale 0.5s var(--spring);
}

.badges li:hover img {
	rotate: -10deg;
	scale: 1.08;
}

.badges span {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.25;
}

@media (max-width: 640px) {
	.badges {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Call to action */
.cta-panel {
	display: flex;
	align-items: center;
	gap: clamp(20px, 4vw, 48px);
	padding: var(--pad);
	border-radius: var(--radius);
	background: var(--yellow);
	color: var(--ink);
}

.cta-panel img {
	width: clamp(88px, 11vw, 128px);
	flex: none;
	border-radius: 28%;
	box-shadow: 0 18px 30px -16px rgba(60, 35, 0, 0.7);
}

.cta-panel h2 {
	font-size: clamp(42px, 5.4vw, 72px);
	margin-bottom: 14px;
}

.cta-panel p {
	max-width: 58ch;
	font-size: 18px;
	color: #4d3b24;
}

.cta-mail {
	margin-top: 12px;
	font-weight: 600;
}

@media (max-width: 640px) {
	.cta-panel {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Footer */
.footer {
	margin-block: var(--gap) 32px;
}

.footer-panel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding: 22px var(--pad);
	border-radius: var(--radius-small);
	background: var(--wall-panel);
	border: 1px solid var(--wall-line);
	color: var(--wall-soft);
	font-size: 15px;
}

.footer-panel nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
}

.footer-panel a {
	text-decoration: none;
	font-weight: 600;
	color: var(--wall-text);
}

.footer-panel a:hover {
	color: var(--yellow);
}

/* Support and privacy pages */
.page {
	display: grid;
	gap: var(--gap);
	margin-top: 8px;
}

.prose {
	font-size: 18px;
}

.prose > * {
	max-width: 70ch;
}

.prose h1 {
	font-size: clamp(48px, 6vw, 80px);
	margin-bottom: 22px;
}

.prose h2 {
	margin: 34px 0 10px;
	font-size: 32px;
}

.prose h2:first-child {
	margin-top: 0;
}

.prose p + p {
	margin-top: 12px;
}

.prose a {
	color: #a8650a;
	font-weight: 600;
	text-underline-offset: 3px;
}

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

/* Hero on narrow screens */
@media (max-width: 860px) {
	.hero-panel {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero-copy {
		padding-top: 18px;
	}

	.hero-device {
		padding-block: 8px 28px;
	}

	.hero-device::before {
		width: 92%;
	}

	.screw-bottom-left,
	.screw-bottom-right {
		bottom: 140px;
	}
}

@media (max-width: 520px) {
	.screw-bottom-left,
	.screw-bottom-right {
		display: none;
	}

	.hero-index a,
	.hero-index li:first-child a {
		padding: 14px 18px;
		border-left: 0;
		border-top: 1px solid var(--wall-line);
	}
}

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

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}

	.slides img:first-child {
		opacity: 1;
	}

	.marquee {
		overflow-x: auto;
	}
}
