/*
 * Helys marketing site. The palette and type mirror src/routes/layout.css so the site and
 * the app read as one product: white ground, stone greys, accent #55CDFC for links and
 * primary actions, highlight #F7A8B8 only as an occasional mark, Berkeley Mono for data.
 * Plain CSS on purpose -- nginx serves these files from disk, there is no build step.
 */

/* Jost (OFL) and Berkeley Mono (licensed) are served from the app's static/fonts by nginx. */
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('/fonts/jost-normal-latin.woff2') format('woff2');
}
@font-face {
	font-family: 'Jost';
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url('/fonts/jost-italic-latin.woff2') format('woff2');
}
@font-face {
	font-family: 'Berkeley Mono Variable';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('/fonts/BerkeleyMonoVariable.woff2') format('woff2');
}

:root {
	--sans: 'Jost', ui-sans-serif, system-ui, sans-serif;
	--mono: 'Berkeley Mono Variable', ui-monospace, 'SFMono-Regular', Menlo, monospace;

	--accent-50: #eefaff;
	--accent-100: #d6f3fe;
	--accent-200: #aee7fd;
	--accent-500: #55cdfc;
	--accent-600: #1fb6ef;
	--accent-700: #0a7aa6;
	--accent-800: #0a5f80;

	--highlight-100: #fde4e9;
	--highlight-300: #f7a8b8;
	--highlight-700: #b3244a;

	--stone-50: #fafaf9;
	--stone-100: #f5f5f4;
	--stone-200: #e7e5e4;
	--stone-300: #d6d3d1;
	--stone-500: #78716c;
	--stone-600: #57534e;
	--stone-700: #44403c;
	--stone-900: #1c1917;

	--maxw: 68rem;
	--radius: 10px;
}

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

html {
	font-family: var(--sans);
	font-size: 16px;
	color-scheme: light;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: #fff;
	color: var(--stone-900);
	line-height: 1.6;
	/* Nothing may scroll sideways at 375px. */
	overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

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

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

::selection {
	background: var(--highlight-100);
}

/* Links are underlined so they never rely on colour alone. */
a {
	color: var(--accent-700);
	text-decoration-line: underline;
	text-underline-offset: 2px;
}
a:hover {
	color: var(--accent-800);
}

code,
kbd,
.mono {
	font-family: var(--mono);
	font-variant-numeric: tabular-nums;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--stone-900);
	color: #fff;
	padding: 0.75rem 1rem;
	z-index: 100;
	text-decoration: none;
}
.skip-link:focus {
	left: 0;
}

.wrap {
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: 1.25rem;
}

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

.site-header {
	border-bottom: 1px solid var(--stone-200);
	background: #fff;
}
.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	padding-block: 1rem;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
	font-size: 1.15rem;
	letter-spacing: 0.01em;
	color: var(--stone-900);
	text-decoration: none;
	margin-right: auto;
}
.brand:hover {
	color: var(--stone-900);
}
.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 1.25rem;
}
.site-nav a:not(.btn) {
	color: var(--stone-700);
	text-decoration: none;
	font-size: 0.95rem;
}
.site-nav a:not(.btn):hover,
.site-nav a:not(.btn)[aria-current='page'] {
	color: var(--accent-700);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- buttons ---------- */

.btn {
	display: inline-block;
	font: inherit;
	font-weight: 500;
	line-height: 1.2;
	padding: 0.7rem 1.15rem;
	border-radius: var(--radius);
	border: 1px solid transparent;
	text-decoration: none;
	cursor: pointer;
}
.btn-primary {
	background: var(--accent-700);
	border-color: var(--accent-700);
	color: #fff;
}
.btn-primary:hover {
	background: var(--accent-800);
	border-color: var(--accent-800);
	color: #fff;
}
.btn-secondary {
	background: #fff;
	border-color: var(--stone-300);
	color: var(--stone-900);
}
.btn-secondary:hover {
	border-color: var(--stone-500);
	color: var(--stone-900);
}

/* ---------- sections ---------- */

main {
	display: block;
}
section {
	padding-block: 3.5rem;
}
section + section {
	border-top: 1px solid var(--stone-200);
}

h1,
h2,
h3 {
	line-height: 1.2;
	letter-spacing: -0.015em;
	margin: 0 0 0.6em;
	text-wrap: balance;
}
h1 {
	font-size: clamp(2rem, 6vw, 3.1rem);
	font-weight: 600;
}
h2 {
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 600;
}
h3 {
	font-size: 1.1rem;
	font-weight: 600;
}
p {
	margin: 0 0 1rem;
}
.lede {
	font-size: clamp(1.05rem, 2.4vw, 1.3rem);
	color: var(--stone-600);
	max-width: 44ch;
}

.hero {
	padding-block: clamp(3rem, 9vw, 6rem);
}
.hero .actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.75rem;
}
.hero .note {
	margin-top: 1rem;
	font-size: 0.9rem;
	color: var(--stone-500);
}

.grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.card {
	border: 1px solid var(--stone-200);
	border-radius: var(--radius);
	padding: 1.4rem;
	background: var(--stone-50);
}
.card h3 {
	margin-bottom: 0.4rem;
}
.card p:last-child {
	margin-bottom: 0;
}
.card p {
	color: var(--stone-600);
	font-size: 0.97rem;
}

.step-num {
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--accent-700);
	display: block;
	margin-bottom: 0.35rem;
}

/* ---------- source list ---------- */

.sources {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.sources li {
	font-family: var(--mono);
	font-size: 0.85rem;
	border: 1px solid var(--stone-200);
	border-radius: 999px;
	padding: 0.3rem 0.8rem;
	color: var(--stone-700);
	background: #fff;
}

/* ---------- pricing ---------- */

.plans {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
	align-items: start;
}
.plan {
	border: 1px solid var(--stone-200);
	border-radius: var(--radius);
	padding: 1.6rem;
	background: #fff;
}
.plan.featured {
	border-color: var(--accent-500);
	box-shadow: 0 0 0 1px var(--accent-500);
}
.plan .tag {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--highlight-700);
	background: var(--highlight-100);
	border-radius: 999px;
	padding: 0.15rem 0.6rem;
	margin-bottom: 0.6rem;
}
.price {
	font-family: var(--mono);
	font-variant-numeric: tabular-nums;
	font-size: 2.4rem;
	font-weight: 600;
	line-height: 1;
	display: block;
	margin-bottom: 0.2rem;
}
.price .per {
	font-size: 0.95rem;
	font-weight: 400;
	color: var(--stone-500);
}
.plan ul {
	list-style: none;
	margin: 1.2rem 0;
	padding: 0;
	font-size: 0.95rem;
	color: var(--stone-700);
}
.plan li {
	padding-left: 1.5rem;
	position: relative;
	margin-bottom: 0.55rem;
}
.plan li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--accent-500);
}
.plan .btn {
	width: 100%;
	text-align: center;
}

/* Single plan: the price card carries the add-on and annual lines as a definition list. */
.price-lines {
	margin: 1.1rem 0;
	padding-top: 1.1rem;
	border-top: 1px solid var(--stone-200);
	font-size: 0.95rem;
}
.price-lines dt {
	font-weight: 600;
	color: var(--stone-900);
}
.price-lines dt + dd {
	margin: 0.1rem 0 0.8rem;
	color: var(--stone-600);
}
.price-lines dd:last-child {
	margin-bottom: 0;
}
.trial-note {
	margin: 0.75rem 0 0;
	font-size: 0.88rem;
	color: var(--stone-500);
	text-align: center;
}

/* ---------- faq / prose ---------- */

.prose {
	max-width: 42rem;
}
.prose h2 {
	margin-top: 2.25rem;
	font-size: 1.35rem;
}
.prose h2:first-child {
	margin-top: 0;
}
.prose ul,
.prose ol {
	padding-left: 1.3rem;
	color: var(--stone-700);
}
.prose li {
	margin-bottom: 0.45rem;
}
.prose dt {
	font-weight: 600;
	margin-top: 1.6rem;
}
.prose dd {
	margin: 0.4rem 0 0;
	color: var(--stone-600);
}
.updated {
	font-family: var(--mono);
	font-size: 0.85rem;
	color: var(--stone-500);
}

/* ---------- footer ---------- */

.site-footer {
	border-top: 1px solid var(--stone-200);
	background: var(--stone-50);
	padding-block: 2.5rem;
	margin-top: 1rem;
	font-size: 0.92rem;
	color: var(--stone-600);
}
.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2.5rem;
	justify-content: space-between;
}
.site-footer nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
}
.site-footer p {
	margin: 0;
}
