/* SWTE Group — main stylesheet */

:root {
	/* Surfaces */
	--mist: #f1f4f8;          /* page canvas */
	--paper: #ffffff;         /* raised bands and panels */
	--night: #0a0f1f;         /* Must-Have Plugins band, footer (musthaveplugins.com navy) */

	/* Text */
	--ink: #121a33;
	--slate: #5a6478;
	--night-text: #e8ecf4;
	--night-muted: #98a2b8;

	/* Lines and accent */
	--line: #dbe1ea;
	--night-line: rgba(255, 255, 255, 0.09);
	--signal: #2a5bf6;
	--signal-night: #8aa8ff;

	/* Depth: a hairline contact ring plus a long, soft ambient shadow */
	--lift: 0 0 0 1px rgba(18, 26, 51, 0.06), 0 2px 4px rgba(18, 26, 51, 0.06), 0 22px 44px -18px rgba(18, 26, 51, 0.38);
	--lift-icon: 0 0 0 1px rgba(18, 26, 51, 0.06), 0 1px 2px rgba(18, 26, 51, 0.12), 0 8px 18px -8px rgba(18, 26, 51, 0.4);

	--display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
	--text: "Public Sans", "Helvetica Neue", Arial, sans-serif;

	--wrap: 76rem;
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--ease-out: cubic-bezier(0.2, 0.75, 0.1, 1);
}

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

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

body {
	margin: 0;
	background: var(--mist);
	color: var(--ink);
	font-family: var(--text);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-kerning: normal;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

main {
	flex: 1 0 auto;
}

::selection {
	background: var(--ink);
	color: var(--paper);
}

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

p {
	margin: 0 0 1em;
}

a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-color: color-mix(in srgb, var(--signal) 50%, transparent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.22em;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
	color: var(--signal);
	text-decoration-color: var(--signal);
}

:focus-visible {
	outline: 2px solid var(--signal);
	outline-offset: 3px;
	border-radius: 4px;
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

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

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -3rem;
	z-index: 10;
	padding: 0.5rem 0.9rem;
	background: var(--ink);
	color: var(--paper);
	text-decoration: none;
}

.skip-link:focus {
	top: 0.75rem;
}

/* Header */

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 1.5rem;
}

.wordmark {
	font-family: var(--display);
	font-size: 1.2rem;
	font-weight: 700;
	font-stretch: 86%;
	letter-spacing: -0.01em;
	text-decoration: none;
}

.wordmark:hover {
	color: var(--ink);
}

.wordmark img {
	display: block;
	width: auto;
	height: 3.25rem;
}

.site-nav {
	display: flex;
	gap: clamp(1.1rem, 3vw, 2rem);
	font-size: 0.98rem;
	font-weight: 500;
}

.site-nav a {
	text-decoration-color: transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	color: var(--ink);
	text-decoration-color: var(--signal);
}

/* Hero: the wordmark and every product we ship, as a home screen */

.hero {
	padding-block: clamp(1.5rem, 5vw, 4.5rem) clamp(4rem, 8vw, 7rem);
}

.hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: clamp(3rem, 6vw, 6rem);
	align-items: center;
}

.hero__title {
	--swte: clamp(5.5rem, 15vw, 14rem);
	width: fit-content;
	margin: 0;
	font-family: var(--display);
	font-weight: 400;
	line-height: 1;
	color: var(--ink);
}

.hero__line {
	display: block;
}

.hero__line--main {
	font-size: var(--swte);
	line-height: 0.8;
	letter-spacing: -0.035em;
	margin-left: -0.05em;
}

.hero__char {
	display: inline-block;
	font-weight: 780;
	font-stretch: 100%;
	font-variation-settings: "opsz" 96;
	animation: swte-open 1.25s var(--ease-out) both;
	animation-delay: calc(0.15s + var(--i) * 0.11s);
	transition: font-weight 0.5s var(--ease-out), font-stretch 0.5s var(--ease-out);
}

@keyframes swte-open {
	from {
		font-weight: 220;
		font-stretch: 75%;
		opacity: 0.25;
	}
	to {
		font-weight: 780;
		font-stretch: 100%;
		opacity: 1;
	}
}

@media (hover: hover) and (pointer: fine) {
	.hero__char:hover {
		font-weight: 300;
		font-stretch: 75%;
	}
}

/* As in the logo: the company form in capitals, spread to the width of SWTE */
.hero__line--sub {
	display: flex;
	justify-content: space-between;
	margin-top: calc(var(--swte) * 0.16);
	font-family: var(--text);
	font-size: calc(var(--swte) * 0.17);
	font-weight: 500;
	line-height: 1;
	color: var(--slate);
}

.hero__gap {
	width: 0.5em;
}

.hero__lead {
	max-width: 32rem;
	margin: clamp(1.75rem, 4vw, 2.75rem) 0 1.5rem;
	font-size: clamp(1.125rem, 1.6vw, 1.3rem);
	line-height: 1.55;
}

.hero__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 2rem;
	margin: 0;
	font-weight: 600;
}

.shelf {
	--tile: clamp(3.6rem, 6vw, 5.5rem);
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.6rem 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.shelf__item {
	animation: swte-arrive 0.7s cubic-bezier(0.34, 1.45, 0.64, 1) both;
	animation-delay: calc(0.55s + var(--i) * 45ms);
}

@keyframes swte-arrive {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.72);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.shelf a {
	display: flex;
	flex-direction: column;
	align-items: center;
	color: var(--ink);
	text-decoration: none;
	border-radius: 1rem;
}

.shelf__icon {
	display: grid;
	place-items: center;
	width: var(--tile);
	height: var(--tile);
	border-radius: 23%;
	overflow: hidden;
	box-shadow: var(--lift-icon);
	transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.shelf__icon--plugin {
	background: linear-gradient(165deg, #1c2546, var(--night) 70%);
}

.shelf__icon--plugin img {
	width: 64%;
	height: 64%;
	object-fit: contain;
}

.shelf__icon--app img {
	display: block;
	width: 100%;
	height: 100%;
}

.shelf a:hover .shelf__icon {
	transform: translateY(-3px);
}

.shelf__label {
	display: block;
	max-width: 100%;
	margin-top: 0.55rem;
	overflow: hidden;
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Products */

.product {
	padding-block: clamp(4rem, 9vw, 7.5rem);
	background: var(--paper);
}

.product--mist {
	background: var(--mist);
}

.product__head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: 1.1rem;
	align-items: center;
	margin-bottom: 1.6rem;
}

.product__head--plain {
	display: block;
}

.product__icon {
	grid-row: 1 / span 2;
	width: 4.25rem;
	height: 4.25rem;
	border-radius: 23%;
	box-shadow: var(--lift-icon);
}

.product__icon--mhp {
	border-radius: 0;
	box-shadow: none;
}

.product__name {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(2rem, 3.6vw, 2.75rem);
	font-weight: 700;
	font-stretch: 90%;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.product__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 1rem;
	margin: 0.4rem 0 0;
	font-size: 0.95rem;
	color: var(--slate);
}

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

.product__intro > p {
	max-width: 38rem;
	color: var(--slate);
}

.product__intro > .product__lead {
	font-size: clamp(1.15rem, 1.7vw, 1.33rem);
	line-height: 1.5;
	color: var(--ink);
}

.product__intro > :last-child {
	margin-bottom: 0;
}

.product__split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(3rem, 6vw, 6rem);
	align-items: center;
}

/* Screenshots: raw app screens, lifted and slightly tilted */

.shots {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-block: 0.5rem 2.5rem;
}

.frame {
	--w: clamp(9.5rem, 19vw, 15rem);
	flex: none;
	width: var(--w);
	margin: 0;
	overflow: hidden;
	border-radius: calc(var(--w) * 0.13);
	background: var(--paper);
	box-shadow: var(--lift);
	transform: rotate(-4deg);
}

.frame + .frame {
	margin-left: calc(var(--w) * -0.16);
	margin-top: calc(var(--w) * 0.3);
	transform: rotate(3deg);
}

.frame img {
	display: block;
	width: 100%;
	height: auto;
}

/* Must-Have Plugins: the night band */

.product--mhp {
	background: var(--night);
	color: var(--night-text);
}

.product--mhp a:hover {
	color: #fff;
	text-decoration-color: var(--signal-night);
}

.product--mhp :focus-visible {
	outline-color: var(--signal-night);
}

.product--mhp .product__intro {
	margin-bottom: clamp(2.75rem, 6vw, 4.5rem);
}

.product--mhp .product__meta {
	color: var(--night-muted);
}

.product--mhp .product__meta a,
.product--mhp .product__intro > .product__lead {
	color: #fff;
}

.product--mhp a {
	text-decoration-color: color-mix(in srgb, var(--signal-night) 55%, transparent);
}

.plugins {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
	gap: 2.75rem 2.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.plugins__item {
	padding-top: 1.5rem;
	border-top: 1px solid var(--night-line);
}

.plugins__item img {
	display: block;
	width: 2.75rem;
	height: 2.75rem;
	margin-bottom: 1rem;
	object-fit: contain;
}

.plugins__item .plugins__square {
	border-radius: 23%;
	box-shadow: 0 0 0 1px var(--night-line);
}

.plugins__item h3 {
	margin: 0 0 0.4rem;
	font-family: var(--display);
	font-size: 1.15rem;
	font-weight: 650;
	font-stretch: 94%;
	line-height: 1.25;
	color: #fff;
}

.plugins__item h3 a {
	text-decoration-color: transparent;
}

.plugins__item h3 a:hover {
	text-decoration-color: var(--signal-night);
}

.plugins__item p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--night-muted);
}

/* SWTE Apps */

.apps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.25rem, 3vw, 2rem);
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.app {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 2.5rem);
	align-items: center;
	padding: clamp(1.75rem, 3vw, 2.75rem);
	background: var(--mist);
	border-radius: 1.75rem;
}

.frame--small {
	--w: clamp(8rem, 12vw, 10.5rem);
}

.app + .app .frame--small {
	transform: rotate(3deg);
}

.app__name {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 0.75rem;
	font-family: var(--display);
	font-size: 1.45rem;
	font-weight: 700;
	font-stretch: 92%;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.app__name img {
	flex: none;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 23%;
	box-shadow: var(--lift-icon);
}

.app__name a {
	text-decoration-color: transparent;
}

.app__name a:hover {
	text-decoration-color: var(--signal);
}

.app__text p {
	color: var(--slate);
	font-size: 0.98rem;
}

.app__text .app__facts {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink);
}

/* Contact */

.contact {
	padding-block: clamp(2rem, 6vw, 5rem) clamp(4rem, 9vw, 7rem);
}

.contact__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: clamp(3rem, 7vw, 6rem);
	align-items: start;
}

.contact__title {
	margin: 0 0 1.75rem;
	font-family: var(--display);
	font-size: clamp(3.5rem, 9vw, 7.5rem);
	font-weight: 760;
	font-stretch: 84%;
	line-height: 0.9;
	letter-spacing: -0.035em;
}

.contact__lead {
	max-width: 30rem;
	font-size: 1.2rem;
	margin-bottom: 0.5rem;
}

.contact__email {
	margin-bottom: 2rem;
	font-family: var(--display);
	font-size: clamp(1.8rem, 4vw, 2.75rem);
	font-weight: 680;
	font-stretch: 90%;
	letter-spacing: -0.015em;
	line-height: 1.2;
}

.contact__note {
	max-width: 30rem;
	color: var(--slate);
	font-size: 0.95rem;
}

.contact__company {
	padding: clamp(1.5rem, 4vw, 2.75rem);
	background: var(--paper);
	border-radius: 1.5rem;
	box-shadow: var(--lift);
}

.contact__subtitle {
	margin: 0 0 1rem;
	font-family: var(--display);
	font-size: 1.5rem;
	font-weight: 700;
	font-stretch: 90%;
	letter-spacing: -0.01em;
}

.company {
	margin: 0;
}

.company__row {
	display: grid;
	grid-template-columns: 13.5rem minmax(0, 1fr);
	gap: 1rem;
	padding-block: 0.9rem;
	border-top: 1px solid var(--line);
}

.company dt {
	color: var(--slate);
	font-size: 0.95rem;
}

.company dd {
	margin: 0;
	font-weight: 500;
}

/* Generic pages */

.doc {
	padding-block: clamp(2.5rem, 7vw, 5rem);
}

.doc__inner {
	max-width: 46rem;
}

.doc__title {
	font-family: var(--display);
	font-size: clamp(2.2rem, 5vw, 3.5rem);
	font-weight: 700;
	font-stretch: 88%;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 1.5rem;
}

/* Footer */

.site-footer {
	background: var(--night);
	color: var(--night-muted);
	font-size: 0.95rem;
}

.site-footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 2rem 3rem;
	align-items: end;
	padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.site-footer p {
	margin: 0;
}

.site-footer .site-footer__name {
	margin-bottom: 0.35rem;
	font-family: var(--display);
	font-size: 1.75rem;
	font-weight: 700;
	font-stretch: 86%;
	letter-spacing: -0.015em;
	line-height: 1.1;
	color: #fff;
}

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer a {
	color: var(--night-text);
	text-decoration-color: rgba(255, 255, 255, 0.22);
}

.site-footer a:hover {
	color: #fff;
	text-decoration-color: var(--signal-night);
}

.site-footer :focus-visible {
	outline-color: var(--signal-night);
}

.site-footer .site-footer__copy {
	grid-column: 1 / -1;
	padding-top: 1.5rem;
	border-top: 1px solid var(--night-line);
	font-size: 0.85rem;
}

/* Responsive */

@media (max-width: 960px) {
	.hero__inner,
	.product__split,
	.contact__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero__title {
		--swte: clamp(5.5rem, 29vw, 14rem);
	}

	.shelf {
		--tile: clamp(3.6rem, 11vw, 5rem);
		max-width: 34rem;
	}

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

	.site-footer__inner {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
	}
}

@media (max-width: 560px) {
	.wordmark img {
		height: 2.6rem;
	}

	.shelf {
		gap: 1.25rem 0.25rem;
	}

	.shelf__label {
		font-size: 0.72rem;
		line-height: 1.25;
		white-space: normal;
	}

	.plugins {
		gap: 0;
	}

	.plugins__item {
		display: grid;
		grid-template-columns: 2.5rem minmax(0, 1fr);
		column-gap: 1rem;
		padding-block: 1.25rem;
	}

	.plugins__item img {
		grid-row: 1 / span 2;
		width: 2.5rem;
		height: 2.5rem;
		margin: 0.1rem 0 0;
	}

	.frame {
		--w: clamp(8.5rem, 42vw, 11rem);
	}

	.app {
		grid-template-columns: minmax(0, 1fr);
		justify-items: start;
	}

	.app .frame--small {
		--w: 9rem;
		justify-self: center;
		margin-bottom: 0.5rem;
	}

	.company__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.15rem;
	}
}

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

	.hero__char,
	.shelf__item {
		animation: none;
	}

	.hero__char,
	.shelf__icon {
		transition: none;
	}

	.shelf a:hover .shelf__icon {
		transform: none;
	}
}
