:root {
    --ink:         #1a0004;
    --accent:      #3a0008;
    --paper:       #e8a800;
    --paper-shade: #d49200;
    --paper-deep:  #c07800;
    --void:        #18100a;
    --warning:     #cc2200;
    --overlay:     rgba(0, 0, 0, 0.9);

    --font-display: 'Tomorrow', sans-serif;
    --font-body:    'Abel', sans-serif;
    --font-mono:    'Geist Mono', monospace;

    --border-thin: 2px;

    --space-xxs: 4px;
    --space-xs: 8px;
    --space-s: 12px;
    --space-m: 16px;
    --space-l: 20px;
    --space-xl: 24px;
    --space-xxl: 32px;
    --space-xxxl: 48px;

    --text-sm: 16px;
    --text-md: 18px;
    --text-lg: 20px;
    --text-xl: 22px;
    --text-2xl: 24px;
    --text-3xl: 32px;
}

.content-column h1,
nav .title,
nav .num,
.btn,
.collapsible summary,
.list-numbered li::before,
.infobox-label,
.credits-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--paper);
    position: relative;
}

header {
    position: sticky;
    top: 0;
    z-index: 100;
}

header .banner {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center top;
}

header .logo {
    position: absolute;
    top: 14px;
    left: 20px;
    height: 92px;
    max-width: calc(100% - 40px);
}

header .promo {
    position: absolute;
    right: 20px;
    bottom: 0;
    height: 120px;
    width: auto;
    max-width: min(42vw, 420px);
}

.layout {
    display: flex;
    height: calc(100vh - 120px);
    overflow: hidden;
}

.nav-column {
    flex-shrink: 0;
    padding: var(--space-xxxl) 0 var(--space-xxxl) 61px;
    display: flex;
    align-items: flex-start;
    background-color: var(--paper-shade);
    position: relative;
}

.nav-column::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 32px;
    background-image: url('assets/img/ui/ui-crease-left.jpg');
    background-size: 100% auto;
    background-repeat: repeat-y;
    mix-blend-mode: multiply;
    opacity: 0.2;
    pointer-events: none;
}

.active-bar {
    position: absolute;
    left: 28px;
    width: 5px;
    height: 35px;
    background-color: var(--accent);
}

nav {
    flex: 1;
    padding-right: var(--space-xxxl);
}

nav ul {
    list-style: none;
}

nav ul li + li {
    margin-top: 10px;
}

nav ul li a {
    display: flex;
    align-items: baseline;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

nav .title,
nav .num {
    font-size: var(--text-3xl);
    color: var(--ink);
}

nav .dots {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: var(--text-3xl);
    color: var(--ink);
    margin-right: 10px;
}

.content-area {
    flex: 1;
    min-width: 0;
    position: relative;
}

.content-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
}

.content-column {
    width: 100%;
    padding: var(--space-xl) 0 var(--space-xl) 46px;
    background-color: var(--paper);
    position: relative;
}

.content-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 100%;
    background-image: url('assets/img/ui/ui-crease-right.jpg');
    background-size: 100% auto;
    background-repeat: repeat-y;
    mix-blend-mode: multiply;
    opacity: 0.2;
    pointer-events: none;
    z-index: 1;
}

.text-column {
    width: 70%;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.content-column h1 {
    font-size: var(--text-3xl);
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: var(--space-l);
    max-inline-size: 24ch;
    text-wrap: balance;
}

.content-column p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-3xl);
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: var(--space-xxl);
    text-wrap: pretty;
}

.content-column a:not(.btn) {
    color: var(--ink);
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-s);
    padding: var(--space-s) 28px;
    font-size: var(--text-2xl);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.btn-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
    flex-shrink: 0;
}

.collapsible {
    border: var(--border-thin) solid var(--accent);
    background: var(--paper);
    margin-bottom: var(--space-m);
}

.collapsible summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px var(--space-l);
    cursor: pointer;
    list-style: none;
    font-size: var(--text-2xl);
    color: var(--ink);
    user-select: none;
}

.collapsible summary:hover {
    background: var(--paper-shade);
}

.collapsible summary::-webkit-details-marker { display: none; }

.collapsible summary::before {
    content: '+';
    font-family: var(--font-mono);
    font-style: normal;
    font-size: var(--text-2xl);
    color: var(--accent);
    flex-shrink: 0;
}

.collapsible[open] summary::before {
    content: '−';
}

.collapsible-content {
    padding: var(--space-m) var(--space-l) var(--space-l);
    border-top: var(--border-thin) solid var(--accent);
}

.collapsible-content > p:last-child,
.collapsible-content > ul:last-child,
.collapsible-content > ol:last-child,
.collapsible-content > dl:last-child {
    margin-bottom: 0;
}

.feature-group-title {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: var(--text-lg);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0 0 var(--space-m);
}

.feature-group-title + .feature-list {
    margin-top: 0;
}

.feature-list {
    margin: 0 0 var(--space-xl);
}

.feature-list--bulleted {
    list-style: none;
    margin: 0 0 var(--space-xl);
}

.feature-list--bulleted li {
    display: flex;
    align-items: baseline;
    gap: var(--space-s);
    font-family: var(--font-body);
    font-size: var(--text-lg);
    line-height: 1.4;
    color: var(--ink);
    margin: 0 0 var(--space-s);
}

.feature-list--bulleted li::before {
    content: '■';
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

.feature-list--bulleted li:last-child {
    margin-bottom: 0;
}

.feature-list dt {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 var(--space-xs);
}

.feature-list dd {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    line-height: 1.4;
    color: var(--ink);
    margin: 0 0 var(--space-l);
}

.feature-list dt:last-of-type + dd:last-of-type {
    margin-bottom: 0;
}

.feature-default {
    font-family: var(--font-body);
    font-size: 0.85em;
    font-style: normal;
    font-weight: 400;
}

.input-diagram {
    display: flex;
    align-items: flex-end;
    gap: var(--space-xxl);
    height: 320px;
}

.input-diagram img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.input-diagram--centered {
    justify-content: center;
}

.btn-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    margin-bottom: var(--space-l);
}

.btn--primary       { background-color: transparent; color: var(--accent); outline: var(--border-thin) solid var(--accent); outline-offset: calc(-1 * var(--border-thin)); }
.btn--primary:hover { background-color: var(--accent); color: var(--paper); }

.list-bulleted,
.list-numbered {
    list-style: none;
    margin-bottom: var(--space-l);
}

.list-bulleted li,
.list-numbered li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-family: var(--font-body);
    font-size: var(--text-3xl);
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 6px;
}

.list-bulleted li::before {
    content: '■';
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
    position: relative;
    top: -2px;
}

.list-numbered {
    counter-reset: list-counter;
}

.list-numbered li {
    counter-increment: list-counter;
}

.list-numbered li::before {
    content: counter(list-counter) '.';
    font-size: var(--text-3xl);
    color: var(--accent);
    flex-shrink: 0;
    min-width: 2ch;
}

.infobox {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-m) var(--space-xl);
    margin-bottom: var(--space-l);
}

.infobox-icon {
    height: 64px;
    width: auto;
    flex-shrink: 0;
}

.infobox-label {
    font-size: var(--text-xl);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xxs);
}

.infobox p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: var(--text-xl);
    line-height: 1.3;
    margin: 0;
}

.infobox--warning {
    background-color: var(--ink);
    box-shadow: inset 6px 0 0 var(--warning);
}

.infobox--warning .infobox-label { color: var(--paper); }
.infobox--warning p              { color: var(--paper); }

.infobox--info {
    background-color: var(--paper);
    border: var(--border-thin) solid var(--ink);
    box-shadow: inset 6px 0 0 var(--ink);
}

.infobox--info .infobox-label { color: var(--ink); }
.infobox--info p              { color: var(--ink); }

.contact-form-shell {
    position: relative;
}

.contact-form {
    margin-top: 0;
}

.contact-form.is-submitting {
    pointer-events: none;
    opacity: 0.4;
}

.contact-form label:first-of-type { margin-top: 0; }

.contact-form label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 6px;
    margin-top: var(--space-xl);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-body);
    font-size: var(--text-lg);
    color: var(--ink);
    background-color: var(--paper-deep);
    border: none;
    padding: 6px 8px;
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form select {
    appearance: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: var(--text-lg);
    color: var(--ink);
}

.contact-form select option {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    background-color: var(--paper);
    color: var(--ink);
}

.contact-form select option:checked {
    background-color: var(--paper-deep);
    color: var(--ink);
}

.contact-form .form-submit {
    margin-top: var(--space-xxl);
}

.contact-form-note {
    font-weight: 400;
    text-transform: none;
}

.contact-form-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background-color: rgba(232, 168, 0, 0.88);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.contact-form-shell.is-visible .contact-form-overlay {
    opacity: 1;
    visibility: visible;
}

.contact-form-overlay-panel {
    width: 100%;
    max-width: 440px;
    padding: var(--space-l) var(--space-xl);
    border: var(--border-thin) solid var(--ink);
    box-shadow: inset 6px 0 0 var(--ink);
    background-color: var(--paper);
}

.contact-form-overlay-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: var(--text-xl);
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}

.contact-form-overlay-message {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    line-height: 1.35;
    color: var(--ink);
    margin: 0;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-m);
}

.screenshot-grid figure {
    margin: 0;
}

.screenshot-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: zoom-in;
}

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 1000;
    cursor: zoom-out;
    justify-content: center;
    align-items: center;
}

#lightbox.open {
    display: flex;
}

#lightbox .lightbox-frame {
    width: min(90vw, calc(90vh * 4 / 3), 1200px);
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

#lightbox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-credits {
    display: none;
}

@media (max-width: 1024px) {
    .nav-column        { display: none; }
    .staple            { display: none; }
    .hog               { display: none; }
    header .promo      { display: none; }
    .nav-column::after { display: none; }
    .content-area::before { display: none; }
    .mobile-credits    { display: block; }
    .mobile-credits a  { color: var(--ink); }

    header .banner     { height: 80px; }
    header .logo       { height: 60px; top: 10px; max-width: calc(100% - 2 * var(--space-m)); }

    .layout            { height: calc(100vh - 80px); }

    .content-column    { padding: var(--space-l) var(--space-m) var(--space-xl); }
    .text-column       { width: 100%; overflow-x: hidden; }

    .content-column h1 { font-size: var(--text-xl); max-inline-size: 100%; margin-bottom: var(--space-m); }
    .content-column p  { font-size: var(--text-md); margin-bottom: var(--space-l); }

    .list-bulleted li,
    .list-numbered li  { font-size: var(--text-md); }
    .list-numbered li::before { font-size: var(--text-md); }

    .infobox           { padding: var(--space-s) var(--space-m); gap: var(--space-m); align-items: flex-start; }
    .infobox-icon      { height: 44px; }
    .infobox-label     { font-size: var(--text-sm); }
    .infobox p         { font-size: var(--text-sm); }

    .btn               { width: 100%; justify-content: center; font-size: var(--text-md); padding: var(--space-xs) var(--space-m); }
    .btn-cluster       { flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-m); }

    .collapsible       { margin-bottom: var(--space-s); }
    .collapsible summary { font-size: var(--text-md); padding: var(--space-xs) var(--space-m); }
    .collapsible-content { padding: var(--space-s) var(--space-m) var(--space-m); }
    .feature-group-title { font-size: var(--text-sm); margin-bottom: var(--space-s); }
    .feature-list dt,
    .feature-list dd { font-size: var(--text-sm); }
    .feature-list { margin-bottom: var(--space-l); }
    .feature-list dt { margin-bottom: var(--space-xxs); }
    .feature-list dd { line-height: 1.35; margin-bottom: var(--space-m); }
    .feature-list--bulleted { margin-bottom: var(--space-l); }
    .feature-list--bulleted li { font-size: var(--text-sm); margin-bottom: var(--space-xs); }
    .contact-form-overlay { padding: var(--space-m); }
    .contact-form-overlay-panel { padding: var(--space-m); }
    .contact-form-overlay-title { font-size: var(--text-md); }
    .contact-form-overlay-message { font-size: var(--text-sm); }

    .screenshot-grid   { grid-template-columns: repeat(2, 1fr); }

    .input-diagram     { height: 180px; }
}

@media (max-width: 400px) {
    header .logo       { left: var(--space-s); height: 52px; max-width: calc(100% - 2 * var(--space-s)); }

    .content-column    { padding: var(--space-m) var(--space-s) var(--space-l); }

    .content-column h1 { font-size: var(--text-lg); }
    .content-column p,
    .list-bulleted li,
    .list-numbered li,
    .btn,
    .collapsible summary { font-size: var(--text-sm); }

    .collapsible summary { gap: var(--space-xs); padding: var(--space-xs) var(--space-s); }
    .collapsible-content { padding: var(--space-s); }

    .infobox           { flex-direction: column; gap: var(--space-s); }
    .infobox-icon      { height: 36px; }

    .screenshot-grid   { grid-template-columns: 1fr; gap: var(--space-s); }
    .screenshot-grid img { cursor: default; }
}

@media (max-height: 748px) {
    .credits       { display: none; }
    .mobile-credits { display: block; }
    .mobile-credits a { color: var(--ink); }
}

.credits {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 61px var(--space-xxxl) 61px;
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--ink);
    line-height: 1.5;
}

.credits-title {
    font-size: 14px;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}

.credits h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    margin-top: 10px;
    margin-bottom: 2px;
    color: var(--ink);
}

.credits a {
    color: var(--ink);
    text-decoration: underline;
}

.credits p {
    font-size: 11px;
    margin: 0;
    line-height: 1.5;
    color: var(--ink);
}

.staple {
    position: absolute;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 10;
}

.staple--top {
    top: 264px;
}

.staple--bottom {
    top: 696px;
}

.hog {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 70vh;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.2;
}

.svg-sprite {
    display: none;
    width: 0;
    height: 0;
    position: absolute;
    overflow: hidden;
}

#about {
    padding-top: var(--space-xxxl);
}
