/* Tekton — site and admin. One accent, lots of white space, Libre Franklin throughout. */

/*
 * Libre Franklin (SIL Open Font License; fonts/OFL.txt), served from this
 * site rather than Google Fonts: the pages' policy allows fonts, scripts and
 * styles from this origin only, and visitors' browsers never call a third party.
 * One variable file per style covers every weight.
 */
@font-face {
	font-family: "Libre Franklin";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("/fonts/libre-franklin-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
	font-family: "Libre Franklin";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("/fonts/libre-franklin-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
	font-family: "Libre Franklin";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("/fonts/libre-franklin-latin-ext-wght-italic.woff2") format("woff2");
	unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
	font-family: "Libre Franklin";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("/fonts/libre-franklin-latin-wght-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
	--bg: #ffffff;
	--bg-soft: #f6f7f9;
	--surface: #ffffff;
	--border: #e3e6eb;
	--text: #14181f;
	--muted: #5b6573;
	--accent: #1f5fbf;
	--accent-text: #ffffff;
	--accent-soft: #e9f0fb;
	--ok: #1d7a46;
	--warn: #a15c00;
	--danger: #b3261e;
	--radius: 10px;
	--shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 8%);
	--font: "Libre Franklin", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	/* Keys and commands too: same face, with figures of equal width so keys line up. */
	--mono: var(--font);
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1216;
		--bg-soft: #151a20;
		--surface: #171c23;
		--border: #29313b;
		--text: #e8ecf1;
		--muted: #9aa5b3;
		--accent: #6ea2f2;
		--accent-text: #0b1220;
		--accent-soft: #1b2a40;
		--ok: #5fcf8f;
		--warn: #f0b35a;
		--danger: #ff8a80;
		--shadow: none;
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.6 var(--font);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: 1.75rem; font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.92em; font-variant-numeric: tabular-nums slashed-zero; letter-spacing: 0.01em; }
.small { font-size: 0.875rem; }

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

.site-header {
	position: sticky; top: 0; z-index: 10;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.site-header nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.site-header nav a { color: var(--muted); font-size: 0.95rem; }
.site-header nav a:hover { color: var(--text); text-decoration: none; }
.site-header nav a.button, .site-header nav a.button:hover { color: var(--accent-text); }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }

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

section { padding: 72px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 36px; }

.hero { position: relative; overflow: hidden; padding: 120px 0 104px; isolation: isolate; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { max-width: 12.5em; text-wrap: balance; }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 560px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; max-width: 600px; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.92rem; }
.hero-points li { position: relative; padding-left: 20px; }
.hero-points li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 9px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }

/*
 * The key plan behind the hero: a structural grid with columns, beams, a core
 * and one beam's reinforcement. Right-aligned, and masked so it fades out
 * towards the text on the left (and softly at the bottom). Colours come from
 * the theme, so it follows dark mode.
 */
.hero-plan {
	/* Right-aligned to the content edge, spilling a little past it. */
	position: absolute; z-index: 0; top: 50%; right: calc((100vw - min(100vw, 1080px)) / 2 - 70px);
	width: min(50vw, 720px); height: auto; transform: translateY(-50%);
	pointer-events: none; user-select: none;
	-webkit-mask-image: linear-gradient(to right, transparent 0%, rgb(0 0 0 / 35%) 22%, #000 58%), linear-gradient(to top, transparent 0%, #000 10%);
	-webkit-mask-composite: source-in;
	mask-image: linear-gradient(to right, transparent 0%, rgb(0 0 0 / 35%) 22%, #000 58%), linear-gradient(to top, transparent 0%, #000 10%);
	mask-composite: intersect;
	--plan-line: color-mix(in srgb, var(--text) 30%, transparent);
	--plan-faint: color-mix(in srgb, var(--text) 16%, transparent);
	/* Opaque, so overlapping wall pieces don't darken at the corners and grid lines don't show through. */
	--plan-ink: color-mix(in srgb, var(--text) 55%, var(--bg));
	font-family: var(--font);
}
.hero-plan .plan-grid line { stroke: var(--plan-faint); stroke-width: 1; stroke-dasharray: 22 5 3 5; }
.hero-plan .plan-bubbles circle { fill: var(--bg); stroke: var(--plan-line); stroke-width: 1.2; }
.hero-plan .plan-bubbles text { fill: var(--plan-ink); font-size: 15px; font-weight: 600; text-anchor: middle; }
.hero-plan .plan-slab { fill: none; stroke: var(--plan-line); stroke-width: 1; stroke-dasharray: 6 4; }
.hero-plan .plan-beams line { stroke: var(--plan-line); stroke-width: 3; }
.hero-plan .plan-columns rect { fill: var(--plan-ink); }
/* Core walls: solid, like the columns. */
.hero-plan .plan-wall { fill: var(--plan-ink); }
.hero-plan .plan-lift { fill: none; stroke: var(--plan-line); stroke-width: 1; }
.hero-plan .plan-stair { stroke: var(--plan-line); stroke-width: 1; }
/* Treads above the cut plane: shown dashed, as drawn beyond the break. */
.hero-plan .plan-stair.beyond { stroke-dasharray: 3 2.5; }
.hero-plan .plan-break { fill: none; stroke: var(--plan-ink); stroke-width: 1; stroke-linejoin: round; }
.hero-plan .plan-arrow { fill: none; stroke: var(--plan-ink); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.hero-plan .plan-arrow-dot { fill: var(--plan-ink); }
.hero-plan .plan-stair-label { fill: var(--plan-ink); font-size: 7px; font-weight: 700; letter-spacing: 0.08em; text-anchor: end; }
.hero-plan .plan-hatch-line { stroke: color-mix(in srgb, var(--accent) 35%, transparent); stroke-width: 1.4; }
.hero-plan .plan-zone { stroke: none; }
.hero-plan .plan-zone-edge { fill: color-mix(in srgb, var(--accent) 5%, transparent); stroke: color-mix(in srgb, var(--accent) 60%, transparent); stroke-width: 1.5; stroke-dasharray: 8 5; }
.hero-plan .plan-zone-label { fill: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 5px; }
.hero-plan .plan-rebar rect { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.hero-plan .plan-rebar .bar { stroke: var(--accent); stroke-width: 2; }
.hero-plan .plan-rebar .link { stroke: color-mix(in srgb, var(--accent) 65%, transparent); stroke-width: 1; }
.hero-plan .plan-rebar text { fill: var(--accent); font-size: 12px; font-weight: 600; text-anchor: middle; letter-spacing: 0.02em; }
.hero-plan .plan-dims line { stroke: var(--plan-line); stroke-width: 1; }
.hero-plan .plan-dims .tick { stroke-width: 1.6; }
.hero-plan .plan-dims text { fill: var(--plan-ink); font-size: 12px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.hero-plan .plan-title { fill: var(--plan-ink); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-anchor: end; }

@media (prefers-reduced-motion: no-preference) {
	.hero-plan { animation: plan-in 1.2s ease-out both; }
	.hero-plan .plan-rebar { animation: plan-in 0.9s 0.5s ease-out both; }
}
@keyframes plan-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
	/* Narrow screens: below the text rather than behind it, bleeding off the right edge. */
	.hero { display: flex; flex-direction: column; padding-bottom: 32px; }
	.hero-copy { order: 1; }
	.hero-plan { order: 2; position: relative; top: auto; right: auto; transform: none; width: 125vw; max-width: none; margin: 28px 0 0 -5vw; }
}
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }

.feature .icon { width: 36px; height: 36px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feature .icon svg { width: 20px; height: 20px; }

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

.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan .price { font-size: 2rem; font-weight: 700; margin: 6px 0 2px; }
.plan .per { color: var(--muted); font-size: 0.9rem; min-height: 1.5em; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; flex: 1; }
.plan li { padding: 5px 0 5px 26px; position: relative; font-size: 0.95rem; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan form { display: grid; gap: 10px; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.seats { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; }
.seats input { width: 80px; }

/* ---- controls ---- */

.button, button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font: inherit; font-weight: 600; font-size: 0.95rem;
	padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
	background: var(--accent); color: var(--accent-text); cursor: pointer;
	text-decoration: none; transition: filter 0.15s;
}
.button:hover, button:hover { filter: brightness(1.08); text-decoration: none; }
.button.secondary, button.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
button.danger { background: var(--surface); color: var(--danger); border-color: var(--border); }
button.small, .button.small { padding: 6px 12px; font-size: 0.85rem; }
button:disabled { opacity: 0.55; cursor: default; filter: none; }

input, select {
	font: inherit; font-size: 0.95rem; color: var(--text);
	background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; width: 100%;
}
input:focus, select:focus, button:focus-visible, .button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 500; }

.notice { border-radius: 8px; padding: 12px 14px; font-size: 0.95rem; background: var(--bg-soft); border: 1px solid var(--border); }
.notice.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.notice.error { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); color: var(--danger); }
.hidden { display: none !important; }

.key-box { display: flex; gap: 8px; align-items: center; background: var(--bg-soft); border: 1px dashed var(--border); border-radius: 8px; padding: 12px 14px; font-family: var(--mono); font-size: 1.05rem; font-variant-numeric: tabular-nums slashed-zero; letter-spacing: 0.02em; word-break: break-all; }
.key-box span { flex: 1; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; padding-left: 40px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.85rem; display: grid; place-items: center; }

details { border-bottom: 1px solid var(--border); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

/* ---- admin ---- */

.admin-tabs { display: flex; gap: 4px; margin-left: 24px; }
.admin-tabs button { background: none; color: var(--muted); border: none; padding: 8px 12px; font-weight: 500; }
.admin-tabs button[aria-selected="true"] { color: var(--text); background: var(--bg-soft); }
.admin main { padding: 28px 0 60px; }
.admin main section { padding: 0; }
.admin h2 { font-size: 1.3rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; }
.toolbar input[type="search"] { width: 320px; max-width: 100%; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { padding: 18px; }
.stat .label { color: var(--muted); font-size: 0.85rem; }
.stat .value { font-size: 1.7rem; font-weight: 700; margin-top: 4px; }
.stat.warn .value { color: var(--warn); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-weight: 600; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg-soft); }
tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--bg-soft); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--border); }
.pill.ok { color: var(--ok); }
.pill.warn { color: var(--warn); }
.pill.danger { color: var(--danger); }

.panel { margin-top: 20px; }
.panel .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 16px; }
.panel .actions label { width: 110px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 0.92rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; word-break: break-all; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 0.9rem; box-shadow: var(--shadow); z-index: 50; max-width: min(560px, 90vw); }

pre.notes { white-space: pre-wrap; font-family: var(--mono); margin: 0; color: var(--muted); }
pre.notes:empty { display: none; }

@media (max-width: 720px) {
	.site-header nav a:not(.button) { display: none; }
	section { padding: 52px 0; }
	.hero { padding: 64px 0 56px; }
	.admin-tabs { overflow-x: auto; margin-left: 8px; }
}

.after-grid { margin-top: 18px; }
.narrow { max-width: 760px; }

/* ---- checkout ---- */

.checkout { max-width: 640px; }
.checkout form { display: grid; gap: 20px; }
.checkout h2 { font-size: 1.25rem; margin: 0; }
.summary { display: grid; gap: 14px; }
.summary p { margin: 4px 0 0; }
.summary .seats { width: max-content; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); padding-top: 12px; }
.summary .total strong { font-size: 1.3rem; }
.methods { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.methods legend { padding: 0; margin-bottom: 12px; }
.method { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; cursor: pointer; padding: 18px 20px; font-weight: 400; }
.method > span:nth-of-type(1) { display: grid; gap: 4px; }
.method input { width: auto; margin-top: 4px; accent-color: var(--accent); }
.method:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.method-price { font-weight: 600; white-space: nowrap; }
.checkout button[type=submit] { justify-self: start; }

/* ---- legal pages ---- */

.legal { max-width: 760px; }
.legal h1 { margin-bottom: 0.2em; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal h3 { font-size: 1.05rem; margin-top: 1.4em; }
.legal ul { padding-left: 1.3em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal .lead { font-size: 1.15rem; }
/* Placeholders for the owner to fill in before launch: meant to be impossible to miss. */
mark.todo { background: #fff3b0; color: #5c4400; padding: 0 3px; border-radius: 3px; }
.site-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
