/* PhoneHome site: one stylesheet for every page. Dark first; a matching light variant follows
   prefers-color-scheme: light. Flat surfaces, one teal accent. */

:root {
	--bg: #1a1a19;
	--surface: #232322;
	--surface-2: #2b2b29;
	--text: #f1efe8;
	--text-muted: #b4b2a9;
	--border: #3a3a37;
	--accent: #5dcaa5;
	--accent-hover: #74d6b4;
	--on-accent: #04342c;
	--accent-soft: rgba(93, 202, 165, 0.14);
	--phone-frame: #2e2e2c;
	--phone-screen: #121211;
	--radius: 16px;
	--content: 68rem;
	--prose: 42.5rem;
	/* Muted icon colours for the hero illustration. */
	--i1: #6f8fb8; --i2: #b8806f; --i3: #7fa68a; --i4: #b5a36a; --i5: #8f7fb0;
	--i6: #6aa3a8; --i7: #a8737f; --i8: #8a8a84; --i9: #c09a6b; --i10: #5f7d9e;
	color-scheme: dark;
}

@media (prefers-color-scheme: light) {
	:root {
		--bg: #f7f6f2;
		--surface: #ffffff;
		--surface-2: #efede6;
		--text: #1a1a19;
		--text-muted: #5f5e59;
		--border: #dedcd3;
		--accent: #0f6e56;
		--accent-hover: #0b5946;
		--on-accent: #ffffff;
		--accent-soft: rgba(15, 110, 86, 0.1);
		--phone-frame: #e4e2da;
		--phone-screen: #fbfaf7;
		color-scheme: light;
	}
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

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

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.15;
	letter-spacing: -0.015em;
	margin: 0 0 0.5em;
	font-weight: 650;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--text); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 1.25rem; }

/* Buttons */
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	background: var(--accent); color: var(--on-accent);
	border: 1px solid var(--accent);
	font-weight: 600; font-size: 1.05rem; text-decoration: none; line-height: 1.2;
	padding: 0.85rem 1.8rem; border-radius: 999px;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.button svg { width: 1.1em; height: 1.1em; }
.button-outline { background: transparent; color: var(--accent); font-size: 0.9rem; padding: 0.4rem 1rem; }
.button-outline:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 650; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav a:not(.button) { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:not(.button):hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { text-align: center; padding: 4.5rem 0 0; }
.hero .lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-muted); max-width: 40rem; margin: 0 auto 2rem; }
.download { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.requirements { list-style: none; margin: 0; padding: 0; color: var(--text-muted); font-size: 0.92rem; }
.requirements li { margin: 0.1rem 0; }

/* Hero illustration: three home screen pages, the middle one in teal. Decorative CSS, not a screenshot. */
.canvas {
	display: flex; justify-content: center; align-items: center;
	gap: clamp(0.75rem, 3vw, 2.25rem);
	margin: 3.5rem auto 0; padding: 0 0 4rem;
	max-width: 46rem;
}
.phone {
	flex: 0 1 13rem; min-width: 0;
	aspect-ratio: 9 / 19.5;
	background: var(--phone-frame);
	border-radius: clamp(14px, 4vw, 34px);
	padding: clamp(4px, 1vw, 8px);
	border: 1px solid var(--border);
}
.phone-current { flex-basis: 14.5rem; border: 2px solid var(--accent); outline: 4px solid var(--accent-soft); }
.screen {
	height: 100%; background: var(--phone-screen);
	border-radius: clamp(10px, 3.2vw, 27px);
	padding: 18% 9% 7%;
	display: flex; flex-direction: column; justify-content: space-between;
}
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10% 9%; }
.grid i, .dock i { display: block; aspect-ratio: 1; border-radius: 24%; background: var(--i8); }
.grid i.empty { background: transparent; }
.grid i.folder { background: var(--surface-2); border: 1px solid var(--border); }
.grid i.wide { grid-column: span 2; aspect-ratio: auto; border-radius: 12%; background: var(--surface-2); border: 1px solid var(--border); }
.dock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13%; background: var(--surface-2); padding: 7%; border-radius: 18%/40%; }
.grid i:nth-child(10n+1), .dock i:nth-child(4n+1) { background: var(--i1); }
.grid i:nth-child(10n+2), .dock i:nth-child(4n+2) { background: var(--i3); }
.grid i:nth-child(10n+3), .dock i:nth-child(4n+3) { background: var(--i2); }
.grid i:nth-child(10n+4), .dock i:nth-child(4n+4) { background: var(--i4); }
.grid i:nth-child(10n+5) { background: var(--i5); }
.grid i:nth-child(10n+6) { background: var(--i6); }
.grid i:nth-child(10n+7) { background: var(--i7); }
.grid i:nth-child(10n+8) { background: var(--i9); }
.grid i:nth-child(10n+9) { background: var(--i10); }
.grid i:nth-child(10n) { background: var(--i8); }
.grid i.empty { background: transparent; }
.grid i.folder, .grid i.wide { background: var(--surface-2); }

/* Screenshot slots */
.shot-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 760px) { .shot-grid { grid-template-columns: 1fr 1fr; } }
figure { margin: 0; }
figcaption { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.6rem; }

/* Sections */
.section { padding: 4rem 0; border-top: 1px solid var(--border); }
.section-head { max-width: var(--prose); margin-bottom: 2rem; }
.section-head p { color: var(--text-muted); margin: 0; }

.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.5rem), 1fr)); }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.feature-icon {
	width: 2.4rem; height: 2.4rem; border-radius: 10px; margin-bottom: 0.9rem;
	display: flex; align-items: center; justify-content: center;
	background: var(--accent-soft); color: var(--accent);
}
.feature-icon svg { width: 1.3rem; height: 1.3rem; }
.feature p { color: var(--text-muted); margin: 0; font-size: 0.97rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.5rem), 1fr)); }
.checklist li { padding-left: 1.6rem; position: relative; color: var(--text-muted); }
.checklist li strong { color: var(--text); display: block; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.55rem; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); }

.cta { text-align: center; }
.cta p { color: var(--text-muted); }

/* Long-form pages (support, privacy, 404) */
.page { padding: 3.5rem 0 4.5rem; }
.prose { max-width: var(--prose); line-height: 1.7; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.6rem); }
.prose h2 { margin-top: 2.75rem; font-size: 1.45rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin: 0.35em 0; }
.prose .lede { font-size: 1.15rem; color: var(--text-muted); }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }
.menu-path { font-weight: 600; }

.callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 1.1rem 1.25rem; margin: 1.5rem 0; }
.callout p:last-child { margin-bottom: 0; }

.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 0 1.25rem; margin: 0.75rem 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding-bottom: 1rem; color: var(--text-muted); }
.faq details > div p:last-child, .faq details > div ul:last-child { margin-bottom: 0; }

.notfound { text-align: center; padding: 6rem 0; }
.notfound img { width: 88px; height: 88px; margin: 0 auto 1.5rem; }
.notfound p { color: var(--text-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; color: var(--text-muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.site-footer p { margin: 0; }

@media (max-width: 560px) {
	body { font-size: 1rem; }
	.hero { padding-top: 3rem; }
	.site-nav { gap: 0.85rem; }
	.site-nav a:not(.button) { font-size: 0.88rem; }
	.button-outline { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
	/* The name stays for screen readers; the icon carries the brand on a phone. */
	.brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.section { padding: 3rem 0; }
	.page { padding: 2.5rem 0 3rem; }
	.canvas { margin-top: 2.5rem; padding-bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
