/* Gutebad – www.gutebad.se */

:root {
	--brand: #5a712d;
	--brand-strong: #46591f;
	--brand-soft: #e7edd9;
	--sun: #ffd60a;
	--bg: #fbfaf5;
	--bg-alt: #f4efdd;
	--surface: #ffffff;
	--text: #1d2414;
	--muted: #5b6450;
	--line: rgba(29, 36, 20, .12);
	--shadow: 0 1px 2px rgba(29, 36, 20, .06), 0 12px 32px -12px rgba(29, 36, 20, .28);
	--radius: 20px;
	--header-h: 64px;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--brand: #9fc25e;
		--brand-strong: #b7d67c;
		--brand-soft: #26301a;
		--bg: #10140b;
		--bg-alt: #171d10;
		--surface: #1e2516;
		--text: #eef2e6;
		--muted: #a9b39b;
		--line: rgba(238, 242, 230, .12);
		--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .7);
	}
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-h);
	-webkit-text-size-adjust: 100%;
}

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

body {
	margin: 0;
	overflow-x: clip;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-underline-offset: .15em; }
a:hover { color: var(--brand-strong); }

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.eyebrow {
	margin: 0 0 .6em;
	color: var(--brand);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

/* Header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	height: var(--header-h);
	background: color-mix(in srgb, var(--bg) 78%, transparent);
	backdrop-filter: saturate(1.6) blur(16px);
	-webkit-backdrop-filter: saturate(1.6) blur(16px);
	border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100%; }

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	font-weight: 800;
	font-size: 1.15rem;
	text-decoration: none;
	letter-spacing: -.01em;
}
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }

.nav { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a {
	display: block;
	padding: 8px 12px;
	border-radius: 999px;
	color: var(--muted);
	font-size: .95rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--brand-soft); }

@media (max-width: 640px) {
	.brand span { display: none; }
	.nav { gap: 0; }
	.nav a { padding: 8px 9px; font-size: .88rem; }
}
@media (max-width: 360px) {
	.nav li:last-child { display: none; }
}

/* Hero */

.hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	isolation: isolate;
}

.hero-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(100deg, rgba(20, 28, 10, .82) 0%, rgba(30, 44, 14, .55) 45%, rgba(30, 44, 14, .1) 100%),
		url("../images/hero.webp") center 40% / cover no-repeat;
}

.hero-inner {
	display: grid;
	grid-template-columns: 1.15fr .85fr;
	align-items: center;
	gap: 48px;
	padding-block: clamp(48px, 9vw, 112px) 0;
}

.hero-text { padding-bottom: clamp(48px, 9vw, 112px); }
.hero .eyebrow { color: var(--sun); }
.hero h1 { color: #fff; max-width: 12ch; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 36em; color: rgba(255, 255, 255, .9); }

.hero-device {
	align-self: end;
	justify-self: center;
	width: min(320px, 100%);
	margin-bottom: -120px;
}
.hero-device .screen { border-radius: 44px 44px 0 0; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }

@media (max-width: 820px) {
	.hero-inner { grid-template-columns: 1fr; gap: 8px; }
	.hero-text { padding-bottom: 32px; }
	.hero-device { width: min(260px, 72%); margin-bottom: -180px; }
	.hero-bg { background:
		linear-gradient(180deg, rgba(20, 28, 10, .78) 0%, rgba(20, 28, 10, .6) 60%, rgba(20, 28, 10, .35) 100%),
		url("../images/hero.webp") center / cover no-repeat; }
}

/* Store badges */

.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge-apple img { height: 48px; width: auto; }
/* The Google Play badge image has built in padding. Crop it so both badges look the same size. */
.badge-google { height: 48px; overflow: hidden; }
.badge-google img { height: 72px; width: auto; margin: -12px -11px; }

/* Sections */

.section { padding-block: clamp(72px, 10vw, 128px); }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 46rem; margin-bottom: 48px; }
.section-head > p, .section-head > div > p:last-child { color: var(--muted); font-size: 1.1rem; }

.features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 20px;
	margin: 0 0 64px;
	padding: 0;
	list-style: none;
}

.feature {
	padding: 28px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.feature p { margin: 0; color: var(--muted); font-size: .98rem; }

.feature-icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-bottom: 18px;
	border-radius: 14px;
	background: var(--brand-soft);
	color: var(--brand);
}
.feature-icon svg, .theme-switch svg {
	width: 26px;
	height: 26px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: step;
}
.steps li { counter-increment: step; padding-top: 20px; border-top: 2px solid var(--brand); }
.steps li::before {
	content: counter(step, decimal-leading-zero);
	display: block;
	margin-bottom: 8px;
	color: var(--brand);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.steps p { color: var(--muted); margin: 0; }

/* Platform sections */

.platform-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	max-width: none;
}
.platform-head > div:first-child { max-width: 40rem; }
.platform-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.theme-switch {
	display: inline-flex;
	padding: 4px;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--line);
}
.theme-switch button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--muted);
	font: inherit;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
}
.theme-switch svg { width: 18px; height: 18px; }
.theme-switch button[aria-pressed="true"] { background: var(--brand); color: var(--bg); }

.platform[data-theme="light"] .when-dark,
.platform[data-theme="dark"] .when-light { display: none; }

/* Screenshot galleries: a horizontal strip with scroll snapping that runs to the edges of the window. */

.gallery {
	--edge: max(16px, (100vw - 1160px) / 2);
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(220px, 260px);
	gap: 28px;
	margin: 0 calc(50% - 50vw);
	padding: 8px var(--edge) 24px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--edge);
	scrollbar-width: thin;
	scrollbar-color: var(--line) transparent;
}
.gallery li { scroll-snap-align: start; }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 16px; color: var(--muted); font-size: .93rem; line-height: 1.45; }
.gallery figcaption strong { display: block; color: var(--text); font-size: 1rem; }

.shot {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	border-radius: 34px;
}

.screen {
	width: 100%;
	border-radius: 34px;
	box-shadow: var(--shadow);
	outline: 1px solid var(--line);
	outline-offset: -1px;
	transition: transform .25s ease;
}
.screen-android { border-radius: 28px; }
.shot:hover .screen { transform: translateY(-4px); }

/* Tablet */

.tablet {
	display: grid;
	grid-template-columns: .8fr 1.2fr;
	align-items: center;
	gap: 48px;
	margin-top: 72px;
	padding: clamp(28px, 4vw, 48px);
	background: var(--bg-alt);
	border-radius: calc(var(--radius) + 8px);
}
.section-alt .tablet { background: var(--surface); }
.tablet-text p { color: var(--muted); margin: 0; }
.tablet-wide { grid-column: 1 / -1; }
.tablet-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.screen-tablet { border-radius: 18px; }

@media (max-width: 820px) {
	.tablet { grid-template-columns: 1fr; gap: 28px; }
}

/* Contact */

.contact {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: #fff;
	text-align: center;
	padding-block: clamp(88px, 12vw, 152px);
}
.contact-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(rgba(20, 28, 10, .55), rgba(20, 28, 10, .75)),
		url("../images/rauk.webp") center 60% / cover no-repeat;
}
.contact-inner { max-width: 44rem; }
.contact h2 { color: #fff; }
.contact p { color: rgba(255, 255, 255, .88); font-size: 1.1rem; }

.button {
	display: inline-block;
	margin-top: 12px;
	padding: 14px 28px;
	border-radius: 999px;
	background: #fff;
	color: #2c3816;
	font-weight: 700;
	text-decoration: none;
	transition: transform .2s ease, background .2s ease;
}
.button:hover { background: var(--sun); color: #2c3816; transform: translateY(-2px); }

/* Footer */

.site-footer { padding-block: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-inner p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Privacy policy */

.policy { max-width: 46rem; padding-block: clamp(40px, 7vw, 80px); }
.policy article + article { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--line); }
.policy h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.policy h2 { margin-top: 2em; font-size: 1.25rem; }
.policy ul { padding-left: 1.25em; margin: 0 0 1em; }
.policy li { margin-bottom: .5em; }
.policy li::marker { color: var(--brand); }

/* Lightbox */

.lightbox {
	max-width: min(92vw, 900px);
	max-height: 94vh;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}
.lightbox::backdrop { background: rgba(10, 14, 6, .86); backdrop-filter: blur(6px); }
.lightbox img { max-height: 90vh; width: auto; margin: auto; border-radius: 28px; }
.lightbox-close {
	position: fixed;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .28); }
