/* @font-face {
    font-family: 'fonts_cinzel';
    src: url('../fonts/Cinzel-VariableFont_wght.ttf');
    font-weight: 600;
    font-display: swap;
} */

@font-face {
    font-family: 'fonts_cinzel_decorative';
    src: url('../fonts/CinzelDecorative-Regular.ttf');
    font-weight: 600;
    font-display: swap;
}

/* Color Variables */
:root {
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-mono: 'DM Mono', 'Courier New', monospace;
    --font-family: 'customFont', serif;
    --font-size-base: 1rem;
    --spacing: 1.5rem;
    --nav-bar-height: 100px;
    --nav-bar-width: 100px;
    --ink: #1a1a18;
    --paper: #f3efe9;
    --muted: #8a8780;
    --accent: #c0392b;
    --rule: #d6d2c8;
    --col-width: 680px;
    --input-height: 36px;
    --input-width: 180px;
    --table-col-width: 300px;
}

::selection {
    background: black;
    color: white;
}

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

html {
    scroll-behavior: smooth;
}


body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
}


h2 {
    font-family: 'fonts_cinzel_decorative', serif;
    color: black;
}

h3 {
    font-family: 'fonts_cinzel_decorative', serif;
    color: black;
    margin-top: 1rem;
}

/* Hyperlinks */
a.hyperlink {
    color: var(--accent);
}

a.hyperlink:visited {
    color: var(--accent);
}

a.hyperlink:hover {
    background: black;
    color: var(--paper);
}

/* STYLE */
/* ── Utilities ── */
.col {
    max-width: var(--col-width);
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.wide {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

hr.rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin-block: 3rem;
}

/* ── Hero ── */
.hero {
    padding-block: 10rem 4rem;
    border-bottom: 1px solid var(--rule);
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
}

.hero-intro {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.7;
    color: #3a3a36;
    max-width: 560px;
    border-left: 2px solid var(--accent);
    padding-left: 1.25rem;
}

/* ── Prose sections ── */
.prose-section {
    padding-block: 4rem;
    border-top: 1px solid var(--rule);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 300;
    font-style: italic;
    color: var(--ink);
    letter-spacing: -0.01em;
    padding-bottom: 0;
    border-bottom: none;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.prose-section h2 {
    font-size: 2.2rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.prose-section h2 em {
    font-style: italic;
}

.prose-section p {
    margin-bottom: 1.4rem;
    font-weight: 300;
    color: #2e2e2a;
}

.prose-section p:last-child {
    margin-bottom: 0;
}

/* ── Pull quote ── */
blockquote.pull {
    margin: 3rem 0;
    padding: 1.75rem 2rem;
    border-left: 3px solid var(--accent);
    background: rgba(192, 57, 43, 0.04);
}

blockquote.pull p {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.4;
    color: var(--ink);
    margin: 0;
}

/* Buttons */
.btn {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: none;
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    text-decoration: none;
    background: var(--paper);
    height: var(--input-height);
}

.btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.no-border-btn {
    border: none;
    background: transparent;
}

.no-border-btn:hover {
    border: none;
    background: transparent;
}

/* Figures */
.figure-block {
    padding-block: 1rem 3rem;
}

.figure-caption {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    margin-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rule);
}

/* Footer */
.page-footer {
    border-top: 1px solid var(--rule);
    padding-block: 2rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
}

/* Remove the up and down arrows for values in the config panel on the home page */
/* Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    appearance: textfield;
}

.hidden {
    display: none !important;
}

/* Entries form */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
textarea,
select {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    background: white;
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 0.5rem 0.75rem;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    line-height: 1;
    height: var(--input-height);
    width: var(--input-width);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    font-style: italic;
}

textarea {
    resize: vertical;
    min-height: 140px;
}

label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: 0.35rem;
}

.entry-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.status-msg {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--accent);
}

/* ── Entries list ── */
.entries-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
}

.archive-entry {
    padding-block: 2rem;
    border-bottom: 1px solid var(--rule);
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 0 2rem;
    align-items: start;
}

.archive-entry:first-child {
    border-top: 1px solid var(--rule);
}

.archive-entry:hover {
    background: rgba(192, 57, 43, 0.025);
}

.entry-date {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.6;
    padding-top: 0.25rem;
}

.entry-date .entry-day {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.entry-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.entry-text {
    font-size: 0.95rem;
    font-weight: 300;
    color: #3a3a36;
    line-height: 1.7;
    white-space: pre-wrap;
}

.entry-actions {
    padding-top: 0.25rem;
}

/* Stat cards */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
    width: 100%;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
    max-width: 100%;
    border-radius: 0;
    text-align: left;
    transition: none;
}

.stat-title {
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.info-sup {
    font-size: 0.55rem;
    position: relative;
    top: -0.6em;
}

.tooltip {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translate(-50%, -5px);
    width: max-content;
    min-width: 120px;
    pointer-events: none;

    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 0.75rem 1rem;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: -1;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.has-tooltip:hover .tooltip,
.has-tooltip.is-open .tooltip {
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
    transform: translate(-50%, 0);
}


/* TABLE */
.table-section {
    padding-block: 4rem 6rem;
    border-top: 1px solid var(--rule);
    max-width: 100vw;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 600px;
    /* forceert horizontale scroll i.p.v. inkrimpen van kolommen */
    border-collapse: collapse;
    font-size: 1rem;
}

.data-table thead th {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1.25px solid var(--ink);
    cursor: pointer;
    background: transparent;
}

.data-table thead th:hover {
    color: var(--ink);
}

.sort-icon {
    margin-left: 0.3em;
    opacity: 0.5;
}

.data-table tbody td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--rule);
    font-weight: 300;
    vertical-align: top;
    max-width: var(--table-col-width);
}

.data-table tbody tr:hover td {
    background: rgba(192, 57, 43, 0.04);
}

.data-table tbody tr:hover td:first-child {
    border-left: 2px solid var(--accent);
    padding-left: calc(0.75rem - 2px);
}

/* Filters */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-bar select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a8780'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 1.8rem;
}

.filter-bar input::placeholder,
.select-search::placeholder {
    color: var(--ink);
}

/* SELECT AND SEARCH */
.select-wrap {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    width: var(--input-width);
}

.select-trigger,
.select-search {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: white;
    color: var(--ink);
    height: var(--input-height);
}

.select-trigger {
    padding-right: 1.8rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a8780'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.select-trigger:focus,
.select-search:focus {
    outline: none;
    border-color: var(--accent);
}

.select-search {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 101;
    display: none;
}

.select-wrap.open .select-search {
    display: block;
}

.dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 100;
    width: 100%;
    background: white;
    border: 1px solid var(--rule);
    border-radius: 2px;
    display: none;
    overflow: hidden;
}

.select-wrap.open .dropdown {
    display: block;
}

.dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
    max-height: 160px;
    overflow-y: auto;
}

.dropdown ul li {
    padding: 0.4rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    display: block;
    box-sizing: border-box;
    width: 100%;
}

.dropdown ul li:hover {
    background: var(--accent);
    color: white;
}

.dropdown ul li.active {
    background-color: var(--accent);
    color: white;
}

.dropdown ul li[hidden] {
    display: none !important;
}

/* Confirm message */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-box {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 2rem;
    max-width: 360px;
    width: 100%;
}

.confirm-msg {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.confirm-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

/* Responsiveness */
@media (max-width: 600px) {
    .stat-title {
        font-size: 0.55rem;
    }

    .stat-value {
        font-size: 0.85rem;
    }

    .form-row {
        flex-direction: column;
        /* Stacks the items vertically */
    }

    .form-row>div {
        width: 100%;
    }
}