/* 2Sinix site. Two layers: the red surface says everything; the dark bay below holds a note form.
   Single-theme on purpose - the red is the brand, not a mode.

   Fonts are served from here, not Google, so the privacy page's "nothing loads from anyone else's
   servers" stays true. All three are SIL Open Font License faces (latin subset). */

@font-face { font-family: "Bitter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/bitter-700.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/hanken-grotesk.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-400.woff2") format("woff2"); }

:root {
    --red: #ae1f23;
    --red-deep: #8e171b;
    --on-red: #fbecec;
    --bay: #121418;
    --bay-raised: #1b1e24;
    --bay-line: #2c313a;
    --text: #bcc2cb;
    --bright: #ffffff;
    --dim: #8a919c;
    --link: var(--bright);
    --field: #0c0e11;
    --error: #ff9d9d;
    --font-display: "Bitter", Georgia, serif;
    --font-body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--bay); color: var(--text); font: 400 1rem/1.6 var(--font-body); display: flex; flex-direction: column; min-height: 100vh; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

/* Links inside running text stay underlined; standalone links (footer, home mark) underline only on hover/focus. */
a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--on-red); outline-offset: 3px; }

.wrap {
    width: 100%; max-width: 980px; margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---- Surface ---- */
.surface { background: var(--red); color: var(--on-red); position: relative; overflow: hidden; }
.surface .wrap { position: relative; padding-block: 72px 96px; display: grid; justify-items: start; gap: 28px; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
.face { width: clamp(96px, 18vw, 132px); height: auto; display: block; fill: currentColor; }
.type { margin: 0; line-height: 0; }
.type svg { width: clamp(150px, 26vw, 220px); height: auto; display: block; fill: currentColor; }
.line {
    margin: 0; font-family: var(--font-display); font-weight: 700;
    font-size: clamp(1.75rem, 5.2vw, 3.25rem); line-height: 1.08; letter-spacing: -0.01em;
    max-width: 17ch; text-wrap: balance;
}
.sub { margin: 0; max-width: 46ch; font-size: 1.0625rem; opacity: 0.88; }

/* ---- Bay ---- */
.bay { flex: 1 0 auto; }
.bay > .wrap { padding-block: 56px 48px; display: grid; gap: 22px; justify-items: start; }
.ask { margin: 0; max-width: 44ch; }

button.go {
    font: 600 1rem var(--font-body); color: var(--on-red); background: var(--red);
    border: 0; border-radius: 999px; padding: 11px 26px; cursor: pointer;
}
button.go:hover { background: var(--red-deep); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--dim); cursor: pointer; text-decoration: none; text-underline-offset: 0.15em; }
.linkish:hover, .linkish:focus-visible { text-decoration: underline; }

/* The note states. Without script the form simply shows and the toggles hide. */
#open, #close, .sent { display: none; }
.js [data-state="closed"] #open, .js [data-state="sent"] #open { display: inline-block; }
.js [data-state="closed"] form, .js [data-state="sent"] form { display: none; }
.js #close { display: inline; }
[data-state="sent"] .sent { display: block; }
[data-state="sent"] .ask { display: none; }

form { width: 100%; max-width: 640px; background: var(--bay-raised); padding: 24px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.9375rem; color: var(--bright); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
input, textarea {
    font: inherit; color: var(--bright); background: var(--field);
    border: 2px solid var(--bay-line); border-radius: 0; padding: 9px 11px; width: 100%;
}
textarea { min-height: 8rem; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--red); }
.actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.err { color: var(--error); font-size: 0.875rem; margin: 0; }
.sent { margin: 0; }
.sent strong { color: var(--bright); }

/* The honeypot. Off-screen rather than display:none, because some bots skip hidden inputs. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Privacy and status pages ---- */
.surface.slim .wrap { padding-block: 20px; display: flex; align-items: center; }
.home { display: inline-flex; align-items: center; gap: 12px; color: var(--on-red); text-decoration: none; font-weight: 600; }
.home:hover span, .home:focus-visible span { text-decoration: underline; }
.home svg { width: 36px; height: 36px; fill: currentColor; }
.doc-page > .wrap { padding-block: 48px 56px; display: block; }
.doc { max-width: 66ch; display: grid; gap: 14px; }
.doc h1 { margin: 0; font: 700 clamp(1.75rem, 4.4vw, 2.5rem)/1.1 var(--font-display); color: var(--bright); }
.doc .updated { margin: 0 0 10px; font: 0.75rem var(--font-mono); color: var(--dim); letter-spacing: 0.06em; }
.doc h2 { margin: 18px 0 0; font: 600 1.0625rem/1.3 var(--font-body); color: var(--bright); }
.doc p, .doc ul { margin: 0; }
.doc ul { padding-left: 1.2rem; display: grid; gap: 4px; }

/* ---- Footer ---- */
.foot { flex: 0 0 auto; }
.foot .wrap {
    padding-block: 20px 32px; border-top: 1px solid var(--bay-line);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
    font: 0.75rem var(--font-mono); color: var(--dim);
}
.foot a { text-decoration: none; }
.foot a:hover, .foot a:focus-visible { text-decoration: underline; }

@media (max-width: 680px) {
    .surface .wrap { padding-block: 48px 64px; gap: 22px; }
    .bay > .wrap { padding-block: 40px 40px; }
    .pair { grid-template-columns: 1fr; }
    form { padding: 18px; }
}
