/* byn.pt: folha de estilo única do site.
   Sem dependências externas: tipos do sistema, sem fontes nem scripts de terceiros. */

/* ---------------------------------------------------------------- tokens */

:root {
	--bg: #ffffff;
	--bg-alt: #f5f7f8;
	--surface: #ffffff;
	--text: #14171c;
	--text-muted: #55606e;
	--border: #e0e4e9;
	--accent: #0f5f78;
	--accent-hover: #0b4a5e;
	--accent-soft: #eaf3f6;
	--shadow: 0 1px 2px rgba(20, 23, 28, .06), 0 8px 24px rgba(20, 23, 28, .05);
	--radius: 12px;
	--max: 1080px;
	--gutter: 24px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #101317;
		--bg-alt: #161a20;
		--surface: #171c22;
		--text: #e9ecf0;
		--text-muted: #a3acb8;
		--border: #262c35;
		--accent: #6ec3de;
		--accent-hover: #93d4e9;
		--accent-soft: #17262d;
		--shadow: none;
	}
}

/* --------------------------------------------------------------- base */

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

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -.015em; margin: 0 0 .5em; font-weight: 640; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.75rem); margin-top: 2.2em; }
h3 { font-size: 1.1rem; margin-top: 1.8em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--bg-alt); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

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

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--surface); color: var(--text);
	padding: .7em 1em; border: 1px solid var(--border); border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

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

.site-header {
	border-bottom: 1px solid var(--border);
	background: var(--bg);
	position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
	display: flex; align-items: center; gap: 20px;
	min-height: 64px; flex-wrap: wrap;
}
.wordmark {
	font-size: 1.35rem; font-weight: 700; letter-spacing: -.03em;
	color: var(--text); text-decoration: none; margin-right: auto;
}
.wordmark:hover { color: var(--text); }
.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { font-weight: 600; }
.lang {
	display: flex; gap: 2px; align-items: center;
	border: 1px solid var(--border); border-radius: 999px; padding: 2px;
}
.lang a { padding: .15em .7em; border-radius: 999px; font-size: .85rem; }
.lang a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* --------------------------------------------------------------- hero */

main { display: block; }

.hero { padding: 72px 0 48px; }
.hero p.lead {
	font-size: 1.2rem; color: var(--text-muted); max-width: 46ch; margin-bottom: 0;
}
.eyebrow {
	text-transform: uppercase; letter-spacing: .12em; font-size: .75rem;
	font-weight: 700; color: var(--text-muted); margin-bottom: 1em; display: block;
}

/* --------------------------------------------------------------- app blocks */

section { padding: 8px 0; }
.band { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 56px 0; margin-top: 56px; }

.app-block { display: grid; grid-template-columns: 96px 1fr; gap: 20px 24px; align-items: start; padding: 40px 0; border-top: 1px solid var(--border); }
.app-block:first-of-type { border-top: 0; }
.app-block img.icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.app-block h2 { margin: 0 0 .2em; }
.app-block .tagline { color: var(--text-muted); margin-bottom: 1em; }

.app-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 48px 0 8px; }
.app-head img.icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: var(--shadow); }
.app-head h1 { margin-bottom: .25em; }
.app-head .tagline { font-size: 1.15rem; color: var(--text-muted); margin: 0 0 .4em; }
.meta { font-size: .9rem; color: var(--text-muted); }

.features { list-style: none; padding: 0; margin: 0 0 1.4em; }
.features li { padding-left: 1.5em; position: relative; }
.features li::before {
	content: ""; position: absolute; left: .25em; top: .68em;
	width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* --------------------------------------------------------------- badge e botões */

.badge-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 1.2em 0 0; }
.badge img { height: 40px; width: auto; display: block; }
.badge { display: inline-block; line-height: 0; }
@media (prefers-color-scheme: dark) {
	/* O selo oficial preto da Apple precisa de contorno claro sobre fundo escuro. */
	.badge img { background: #fff; border-radius: 8px; }
}
.button {
	display: inline-block; padding: .55em 1.1em; border-radius: 8px;
	border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .95rem;
}
.button:hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------- cartões */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 1.5em 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-top: 0; }
.card h2 { font-size: 1.1rem; margin: 0 0 .5em; }
.card p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- tabela */

.table-scroll { overflow-x: auto; margin: 1.5em 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; color: var(--text-muted); font-size: .9rem; padding-bottom: .8em; }
th, td { text-align: left; padding: .7em .9em; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { border-bottom: 2px solid var(--border); white-space: nowrap; }
tbody th { font-weight: 500; }
td.yes, td.no { text-align: center; width: 8em; }
td.no { color: var(--text-muted); }

/* Tabela comparativa Free/Pro. Os cabeçalhos das duas colunas partilham o eixo
   das células (centrados, com a mesma largura), e a coluna Pro ganha fundo
   próprio para que o que a versão paga acrescenta se leia de relance. */
.compare { table-layout: fixed; }
.compare col.free, .compare col.pro { width: 10.5em; }
.compare th.free, .compare th.pro, .compare td { text-align: center; }
.compare tbody th[scope="row"] { text-align: left; }
.compare thead th { vertical-align: bottom; font-size: 1rem; }
.compare th.pro { color: var(--accent); border-bottom-color: var(--accent); }
.compare td.pro, .compare th.pro { background: var(--accent-soft); }
.compare td.pro.yes { color: var(--accent); font-weight: 650; }
.compare td.txt { font-size: .9rem; line-height: 1.35; overflow-wrap: break-word; hyphens: auto; }
.compare td.free.txt { color: var(--text-muted); }
.compare td.pro.txt { color: var(--accent); font-weight: 650; }
.compare tr.group th {
	background: var(--bg-alt); text-align: left; padding-top: 1.3em;
	font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
	color: var(--text-muted);
}
.compare tr.group.is-pro th { background: var(--accent-soft); color: var(--accent); }
.compare tr.group + tr th, .compare tr.group + tr td { border-top: 0; }

.callout {
	background: var(--accent-soft); border: 1px solid var(--border); border-left: 4px solid var(--accent);
	border-radius: var(--radius); padding: 18px 22px; margin: 1.5em 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent); }

/* --------------------------------------------------------------- capturas */

.shot { margin: 0; }
.shot img {
	display: block; width: 100%; height: auto; border-radius: var(--radius);
	border: 1px solid var(--border); box-shadow: var(--shadow);
}
.shot figcaption { color: var(--text-muted); font-size: .9rem; margin-top: .7em; }
.shot.hero-shot { margin: 28px 0 0; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 28px 24px; margin: 1.5em 0 2em; }
.cards.cards-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card .kicker { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: .5em; }

.whats-new { columns: 2 320px; column-gap: 32px; }
.whats-new li { break-inside: avoid; }

/* --------------------------------------------------------------- página de organização (/beta) */

.estado {
	display: inline-block; vertical-align: middle; margin-left: .6em;
	font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	padding: .2em .75em; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted);
}
.estado.publicada { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.estado.dev { color: var(--text); border-color: var(--accent); }
.item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 14px; }
.item h4 { margin: 0 0 .35em; font-size: 1.05rem; line-height: 1.3; }
.item p { margin: 0 0 .5em; }
.item p:last-child, .item ol:last-child { margin-bottom: 0; }
.item ol { margin: .4em 0 0; }
.nota { color: var(--text-muted); font-size: .92rem; }
.relacao th, .relacao td { text-align: left; }
.relacao td { color: var(--text-muted); }
.relacao td:not(:empty) { color: var(--text); }

/* --------------------------------------------------------------- FAQ */

.faq { margin: 1.5em 0; }
.faq details { border-bottom: 1px solid var(--border); padding: .2em 0; }
.faq summary { cursor: pointer; padding: .8em 0; font-weight: 560; list-style: none; display: flex; justify-content: space-between; gap: 1em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 1.3em; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > *:not(summary) { margin-bottom: 1em; color: var(--text-muted); }

/* --------------------------------------------------------------- downloads */

.files { list-style: none; padding: 0; }
.files li { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; background: var(--surface); }
.files .file-name { font-weight: 600; }
.files .file-meta { color: var(--text-muted); font-size: .9rem; }

/* --------------------------------------------------------------- rodapé */

.site-footer { border-top: 1px solid var(--border); margin-top: 72px; padding: 36px 0 48px; color: var(--text-muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

.updated { color: var(--text-muted); font-size: .9rem; }

/* --------------------------------------------------------------- telemóvel */

@media (max-width: 640px) {
	body { font-size: 16px; }
	.hero { padding: 48px 0 32px; }
	.app-block { grid-template-columns: 1fr; gap: 16px; }
	.app-block img.icon { width: 72px; height: 72px; border-radius: 16px; }
	.app-head { padding-top: 32px; gap: 16px; }
	.app-head img.icon { width: 80px; height: 80px; border-radius: 18px; }
	.site-footer nav { margin-left: 0; }
	/* Num ecrã estreito, as colunas Sim/Não roubam largura à coluna que
	   interessa ler. Estreitam-se para a tabela não partir cada palavra. */
	table { font-size: .9rem; }
	th, td { padding: .6em .5em; }
	td.yes, td.no { width: 4em; }
	.compare col.free, .compare col.pro { width: 5.6em; }
	.compare td.txt { font-size: .82rem; }
	.compare tr.group th { font-size: .72rem; }
}

.site-footer p { margin: 0; }
