/* ─── mere.dev design system ────────────────────────────────────────────────
   Shared stylesheet for all public site pages (/, /csm, etc.)
   Do NOT load this on admin/login pages — they use style.css (Tailwind).
   ─────────────────────────────────────────────────────────────────────────── */

/* ─── Tokens ──────────────────────────────────────────────────────────────── */
:root {
    --ink: #1c1712;
    --ink-light: #3d3428;
    --ink-muted: #7a6e62;
    --paper: #f5f0e8;
    --paper-warm: #ede7d9;
    --paper-dark: #e0d8c8;
    --rust: #9b3a1a;
    --rust-light: #c4552a;
    --sage: #4a6741;
    --rule: rgba(28, 23, 18, 0.15);

    --serif: "Lora", Georgia, serif;
    --body: "Crimson Pro", Georgia, serif;
    --mono: "JetBrains Mono", monospace;

    --measure: 68ch;
    --gap: clamp(2rem, 5vw, 4rem);
}

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

html {
    scroll-behavior: smooth;
}

/* ─── Base ────────────────────────────────────────────────────────────────── */
body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: clamp(1.1rem, 1.3vw + 0.6rem, 1.25rem);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    position: relative;
    cursor: crosshair;
}

/* Paper grain texture overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    /* Grain parallaxes slightly with mouse via JS */
    transition: background-position 0.08s ease-out;
    will-change: background-position;
}

/* ─── Ripple canvas (behind content) ─────────────────────── */
#ripple-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
}

/* ─── Ink splat canvas (above content, below grain) ─────── */
#splat-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
}

/* ─── Layout ──────────────────────────────────────────────────────────────── */
.page,
.site-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    position: relative;
    z-index: 10;
}

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
nav {
    padding: 2rem 0 1.5rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--rule);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nav-brand {
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-brand span {
    color: var(--ink-muted);
    font-weight: 400;
    font-style: italic;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-family: var(--body);
    font-size: 0.95rem;
    color: var(--ink-muted);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s;
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--rust);
    transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a:hover {
    color: var(--rust);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.hire::after {
    background: var(--rust-light);
}

.nav-links a.hire {
    color: var(--rust);
    font-weight: 600;
}

.nav-links a.hire:hover {
    color: var(--rust-light);
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
    border-bottom: 1px solid var(--rule);
    position: relative;
}

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

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 500;
    line-height: 1.05;
    color: var(--ink);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

/* CSM page has a smaller, different h1 */
.hero h1.hero-h1-csm {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 18ch;
}

.hero-subtitle {
    font-family: var(--serif);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-style: italic;
    color: var(--ink-muted);
    margin-bottom: 2.5rem;
    letter-spacing: 0.01em;
}

.hero-body {
    max-width: var(--measure);
    font-size: clamp(1.15rem, 1.4vw + 0.5rem, 1.35rem);
    line-height: 1.65;
    color: var(--ink-light);
    margin-bottom: 2.5rem;
}

.hero-body strong {
    color: var(--ink);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
    display: inline-block;
    background: var(--rust);
    color: #fdf8f0;
    font-family: var(--body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.65rem 1.6rem;
    text-decoration: none;
    border: 1.5px solid var(--rust);
    cursor: pointer;
    transition:
        background 0.2s,
        color 0.2s,
        transform 0.1s,
        box-shadow 0.1s;
    box-shadow:
        2px 3px 0px rgba(28, 23, 18, 0.25),
        0 1px 6px rgba(28, 23, 18, 0.1);
    position: relative;
}

.btn-primary:hover {
    background: var(--rust-light);
    border-color: var(--rust-light);
    box-shadow:
        3px 4px 0px rgba(28, 23, 18, 0.3),
        0 2px 8px rgba(28, 23, 18, 0.12);
    transform: translate(-1px, -1px);
}
.btn-primary:active {
    transform: translate(2px, 3px);
    box-shadow: 0px 0px 0px rgba(28, 23, 18, 0.2);
    background: #7a2d14;
}

.btn-secondary {
    display: inline-block;
    color: var(--ink-muted);
    font-family: var(--body);
    font-size: 1rem;
    letter-spacing: 0.03em;
    padding: 0.65rem 0;
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    transition:
        color 0.2s,
        border-color 0.2s;
}

.btn-secondary:hover {
    color: var(--ink);
    border-color: var(--ink-muted);
}

/* ─── Section scaffold ────────────────────────────────────────────────────── */
section {
    padding: clamp(3rem, 6vw, 5rem) 0;
    border-bottom: 1px solid var(--rule);
}

.section-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: default;
}

.section-label::after {
    content: "";
    height: 1px;
    background: var(--rust);
    width: 3rem;
    max-width: 3rem;
    transition:
        width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        max-width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.5;
}

section:hover .section-label::after {
    width: 8rem;
    max-width: 8rem;
    opacity: 1;
}

/*h2 {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}*/

p {
    max-width: var(--measure);
    color: var(--ink-light);
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
footer {
    padding: 2.5rem 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    font-family: var(--serif);
    font-size: 0.9rem;
    color: var(--ink-muted);
    font-style: italic;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--rust);
}

/* ─── Animations ──────────────────────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.6s ease forwards;
}

.fade-in:nth-child(1) {
    animation-delay: 0.05s;
}
.fade-in:nth-child(2) {
    animation-delay: 0.15s;
}
.fade-in:nth-child(3) {
    animation-delay: 0.25s;
}
.fade-in:nth-child(4) {
    animation-delay: 0.35s;
}

@keyframes splatLife {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1);
    }
    15% {
        opacity: 0.75;
        transform: translate(-50%, -50%) scale(1);
    }
    60% {
        opacity: 0.45;
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
    }
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Ink splat ──────────────────────────────────────────── */
.ink-splat {
    position: fixed;
    pointer-events: none;
    z-index: 98;
    transform: translate(-50%, -50%);
    animation: splatLife 1.4s ease-out forwards;
    will-change: transform, opacity;
}

/* ─── Home: About ─────────────────────────────────────────────────────────── */
.about-pull {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-style: italic;
    color: var(--ink);
    line-height: 1.4;
    max-width: 52ch;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--rust);
}

/* ─── Home: Work ──────────────────────────────────────────────────────────── */
.work-grid {
    display: grid;
    gap: 0;
}

.project {
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--rule);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    position: relative;
    transition: padding-left 0.3s ease;
    cursor: default;
}

.project::before {
    content: "";
    position: absolute;
    top: 0;
    left: -2rem;
    width: 0;
    height: 100%;
    background: linear-gradient(to right, rgba(155, 58, 26, 0.07), transparent);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.project:hover::before {
    width: calc(100% + 4rem);
}

.project:hover {
    padding-left: 0.75rem;
}

.project:last-child {
    border-bottom: none;
}

.project-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
}

.project-org {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    white-space: nowrap;
}

.project-desc {
    color: var(--ink-light);
    font-size: 1rem;
    max-width: var(--measure);
    margin: 0;
}

.project-highlight {
    display: inline;
    background: var(--paper-dark);
    padding: 0.1em 0.3em;
    font-style: italic;
    color: var(--ink);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--rust);
    text-decoration: none;
    margin-top: 0.25rem;
    transition: color 0.2s;
    position: relative;
    padding-bottom: 1px;
}

.project-link:hover {
    color: var(--rust-light);
}

.project-link::after {
    content: " →";
}

/* ─── Home: Values ────────────────────────────────────────────────────────── */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value {
    padding: 1.5rem;
    background: var(--paper-warm);
    border: 1px solid var(--paper-dark);
    position: relative;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.value::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--sage);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.value:hover::before {
    opacity: 1;
}

.value:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(28, 23, 18, 0.07);
}

.value-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.value p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--ink-muted);
}

.values-closing {
    margin-top: 2.5rem;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--ink-muted);
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}

/* ─── Home: Hire ──────────────────────────────────────────────────────────── */
.hire-intro {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-style: italic;
    color: var(--ink);
    line-height: 1.4;
    max-width: 50ch;
    margin-bottom: 1.5rem;
}

.hire-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--rule);
    background: var(--paper-warm);
    transition:
        border-color 0.2s,
        color 0.2s;
}

.tag:hover {
    border-color: var(--rust);
    color: var(--ink);
}

.hire-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-link {
    font-family: var(--body);
    font-size: 1rem;
    color: var(--ink-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1px;
    transition:
        color 0.2s,
        border-color 0.2s;
}

.contact-link:hover {
    color: var(--rust);
    border-color: var(--rust);
}

/* ─── CSM: Ticket queue ───────────────────────────────────────────────────── */
.ticket-stack {
    margin: 3rem 0;
    display: grid;
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1.25rem;
    background: var(--paper-warm);
    border-bottom: 1px solid var(--rule);
}

.queue-title-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.queue-live {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--rust);
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rust);
    animation: liveBlink 1.1s ease-in-out infinite;
}

@keyframes liveBlink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.15;
    }
}

.ticket {
    background: var(--paper);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 1.25rem;
    padding: 1.1rem 1.5rem 0;
    position: relative;
    transition: background 0.3s;
}

.ticket.aged-warn {
    background: rgba(176, 125, 42, 0.04);
}
.ticket.aged-alert {
    background: rgba(155, 58, 26, 0.045);
}
.ticket.aged-dead {
    background: rgba(107, 26, 8, 0.07);
}

.ticket-id {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    white-space: nowrap;
    padding-top: 0.2rem;
}

.ticket-body {
    min-width: 0;
}

.ticket-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.15rem;
}

.ticket-meta {
    font-family: var(--body);
    font-size: 0.83rem;
    color: var(--ink-muted);
    margin: 0;
    max-width: none;
}

.ticket-cust-msg {
    font-family: var(--body);
    font-size: 0.83rem;
    font-style: italic;
    color: var(--rust);
    margin: 0.35rem 0 0;
    max-width: none;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    opacity: 0;
    transform: translateY(4px);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

.ticket-cust-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

.ticket-cust-msg::before {
    content: "↳";
    font-style: normal;
    font-size: 0.75rem;
    color: var(--rust);
    opacity: 0.6;
    flex-shrink: 0;
}

.typing-cursor::after {
    content: "|";
    animation: cursorBlink 0.7s step-end infinite;
    color: var(--rust);
}

@keyframes cursorBlink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.ticket-status {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border: 1px solid;
    white-space: nowrap;
    align-self: start;
    margin-top: 0.1rem;
    transition:
        color 0.6s,
        border-color 0.6s,
        background 0.6s;
}

.status-open {
    color: var(--rust);
    border-color: var(--rust);
    background: rgba(155, 58, 26, 0.06);
}

.status-solved {
    color: var(--sage);
    border-color: var(--sage);
    background: rgba(74, 103, 65, 0.06);
}

.status-waiting {
    color: var(--ink-muted);
    border-color: var(--rule);
    background: var(--paper-warm);
}

.status-dead {
    color: #6b1a08;
    border-color: #6b1a08;
    background: rgba(107, 26, 8, 0.09);
}

/* ─── CSM: Danger / age bar ───────────────────────────────────────────────── */
.danger-scale {
    grid-column: 1 / -1;
    border-top: 1px solid var(--rule);
    margin: 0.6rem -1.5rem 0;
    padding: 0.4rem 1.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.danger-label {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.danger-bar-track {
    flex: 1;
    height: 5px;
    background: var(--paper-dark);
    position: relative;
    overflow: hidden;
}

.danger-bar-fill {
    height: 100%;
    width: 0%;
    transition:
        width 1.2s ease,
        background-color 1.2s ease;
}

.fill-safe {
    background: #4a6741;
}
.fill-warn {
    background: #b07d2a;
}
.fill-alert {
    background: #9b3a1a;
}
.fill-dead {
    background: #6b1a08;
    animation: pulseBar 1.4s ease-in-out infinite;
}

@keyframes pulseBar {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.45;
    }
}

.danger-time {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.6s;
    min-width: 7ch;
    text-align: right;
}

.time-safe {
    color: #4a6741;
}
.time-warn {
    color: #b07d2a;
}
.time-alert {
    color: #9b3a1a;
}
.time-dead {
    color: #6b1a08;
    font-weight: 600;
}

/* ─── CSM: New ticket arrival animation ───────────────────────────────────── */
@keyframes ticketArrive {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

.ticket-new {
    animation: ticketArrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ticket-stack-inner {
    max-height: 540px;
    overflow: hidden;
    position: relative;
}

.ticket-stack-inner::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: linear-gradient(to bottom, transparent, var(--paper));
    pointer-events: none;
    z-index: 4;
}

.queue-count {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    padding: 0.18rem 0.55rem;
    background: var(--rust);
    color: #fdf8f0;
    border-radius: 0;
    transition: transform 0.25s ease;
}

.queue-count.bump {
    animation: countBump 0.35s ease;
}

@keyframes countBump {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.35);
    }
    100% {
        transform: scale(1);
    }
}

/* ─── CSM: Pull quote ─────────────────────────────────────────────────────── */
.pull {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-style: italic;
    color: var(--ink);
    line-height: 1.4;
    max-width: 52ch;
    margin: 2.5rem 0;
    padding-left: 1.5rem;
    border-left: 2px solid var(--rust);
}

/* ─── CSM: Split before/after ─────────────────────────────────────────────── */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.split-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rule);
}

.split-label.before {
    color: var(--rust);
}
.split-label.after {
    color: var(--sage);
}

.split-col ul {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.split-col li {
    font-size: 1rem;
    color: var(--ink-light);
    padding-left: 1.1rem;
    position: relative;
}

.split-col li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--ink-muted);
    font-size: 0.8rem;
}

/* ─── CSM: Services list ──────────────────────────────────────────────────── */
.services {
    display: grid;
    gap: 0;
    margin-top: 1.5rem;
}

.service {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--rule);
}

.service:last-child {
    border-bottom: none;
}

.service-title {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.service p {
    font-size: 0.975rem;
    margin: 0;
}

/* ─── CSM: Annotated demo ─────────────────────────────────────────────────── */
.annotated-demo {
    position: relative;
    margin-top: 2.5rem;
}

.annotation-wrap {
    position: relative;
}

.annotation-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: visible;
}

.annotation-text {
    font-family: "Caveat", cursive;
    font-size: 18px;
    fill: var(--rust);
    font-weight: 600;
}

.annotation-line {
    stroke: var(--rust);
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    opacity: 0.75;
}

.demo-ticket-stack {
    display: grid;
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    position: relative;
    z-index: 1;
}

.demo-ticket {
    background: var(--paper);
    padding: 0;
    position: relative;
}

.demo-ticket-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    padding: 1rem 1.5rem 0.5rem;
    align-items: start;
}

.demo-ticket-title {
    font-family: var(--serif);
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.2rem;
}

.demo-ticket-id {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--ink-muted);
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
}

.demo-search-bar {
    background: var(--paper-warm);
    border-bottom: 1px solid var(--rule);
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.demo-search-input {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--ink-muted);
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 0.3rem 0.75rem;
    flex: 1;
    min-width: 120px;
    letter-spacing: 0.05em;
}

.demo-filter-pill {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--rule);
    color: var(--ink-muted);
    background: var(--paper);
    cursor: pointer;
    white-space: nowrap;
}

.demo-filter-pill.active {
    background: var(--rust);
    color: #fdf8f0;
    border-color: var(--rust);
}

.demo-thread {
    padding: 0.6rem 1.5rem 0.75rem 2.5rem;
    border-top: 1px solid var(--rule);
    display: grid;
    gap: 0.4rem;
    background: var(--paper-warm);
}

.demo-message {
    font-size: 0.82rem;
    color: var(--ink-light);
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    font-family: var(--body);
    margin: 0;
    max-width: none;
}

.demo-message-who {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    white-space: nowrap;
    padding-top: 0.1em;
}

.demo-message-who.agent {
    color: var(--sage);
}
.demo-message-who.customer {
    color: var(--rust);
}

.demo-actions {
    padding: 0.5rem 1.5rem 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px dashed var(--rule);
}

.demo-action-btn {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--sage);
    color: var(--sage);
    background: rgba(74, 103, 65, 0.05);
    white-space: nowrap;
}

.demo-status-badge {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border: 1px solid;
    white-space: nowrap;
    align-self: start;
}

.badge-open {
    color: var(--rust);
    border-color: var(--rust);
}
.badge-solved {
    color: var(--sage);
    border-color: var(--sage);
}
.badge-waiting {
    color: var(--ink-muted);
    border-color: var(--rule);
}

.demo-visual-aid {
    padding: 0.5rem 1.5rem 0.75rem;
    border-top: 1px dashed var(--rule);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.demo-visual-thumb {
    width: 48px;
    height: 36px;
    background: var(--paper-dark);
    border: 1px solid var(--rule);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.demo-visual-thumb svg {
    opacity: 0.4;
}

.demo-visual-label {
    font-family: var(--body);
    font-size: 0.8rem;
    color: var(--rust);
    text-decoration: none;
    border-bottom: 1px solid rgba(155, 58, 26, 0.3);
    margin: 0;
    max-width: none;
}

.demo-visual-sub {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    margin: 0.15rem 0 0;
    max-width: none;
}

/* Demo danger scale (annotated version, slightly different from live queue) */
.demo-ticket .danger-scale {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 1.5rem 0.5rem;
    border-top: 1px solid var(--rule);
    margin: 0;
    grid-column: unset;
}

.danger-safe .danger-bar-fill {
    background: #4a6741;
    width: var(--pct, 20%);
}
.danger-warn .danger-bar-fill {
    background: #b07d2a;
    width: var(--pct, 50%);
}
.danger-alert .danger-bar-fill {
    background: #9b3a1a;
    width: var(--pct, 80%);
}
.danger-critical .danger-bar-fill {
    background: #6b1a08;
    width: var(--pct, 100%);
    animation: pulse-bar 1.4s ease-in-out infinite;
}

@keyframes pulse-bar {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.danger-safe .danger-time {
    color: #4a6741;
}
.danger-warn .danger-time {
    color: #b07d2a;
}
.danger-alert .danger-time {
    color: #9b3a1a;
}
.danger-critical .danger-time {
    color: #6b1a08;
    font-weight: 600;
}

/* OTP callout */
.otp-callout {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin: 0 -1.5rem;
    padding: 0.85rem 1.5rem;
    background: rgba(155, 58, 26, 0.04);
    border-top: 1px solid rgba(155, 58, 26, 0.2);
    border-left: 3px solid var(--rust);
}

.otp-icon {
    font-size: 0.85rem;
    color: var(--rust);
    flex-shrink: 0;
    margin-top: 0.2rem;
    line-height: 1;
}

.otp-title {
    font-family: var(--serif);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 0.2rem;
    max-width: none;
}

.otp-body {
    font-family: var(--body);
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin: 0;
    max-width: none;
    line-height: 1.5;
}

/* ─── Contact popup modal ─────────────────────────────────────────────────── */
.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 23, 18, 0.55);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.contact-modal {
    background: var(--paper);
    border: 1px solid var(--paper-dark);
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.contact-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
}

.contact-modal-close:hover {
    color: var(--rust);
}

.contact-modal h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.contact-modal-sub {
    font-family: var(--body);
    font-size: 0.95rem;
    color: var(--ink-muted);
    margin-bottom: 2rem;
}

/* Form fields */
.form-field {
    margin-bottom: 1.25rem;
}

.form-field label {
    display: block;
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
    display: block;
    width: 100%;
    font-family: var(--body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--paper-dark);
    padding: 0.6rem 0.85rem;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--rust);
}

.form-field textarea {
    min-height: 100px;
}

.form-submit {
    display: block;
    width: 100%;
    background: var(--rust);
    color: #fdf8f0;
    font-family: var(--body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.75rem 1.5rem;
    border: 1.5px solid var(--rust);
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.form-submit:hover:not(:disabled) {
    background: var(--rust-light);
    border-color: var(--rust-light);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.form-spinner svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-success {
    font-family: var(--body);
    font-size: 1rem;
    color: var(--sage);
    padding: 1rem 0;
}

.form-error {
    font-family: var(--body);
    font-size: 0.9rem;
    color: var(--rust);
    margin-top: 0.75rem;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nav-links {
        gap: 1rem;
    }

    .project-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .hire-contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ─── Ticket Button ─────────────────────────────────────────────────────────── */
.ticket-btn {
    width: 106px;
    height: 32px;
    cursor: pointer;
    display: block;
    outline: none;
}
.ticket-btn-bg {
    stroke: var(--rust);
    stroke-width: 5;
    transition: fill 0.2s;
    transform: scaleX(1.9);
    transform-box: fill-box;
    transform-origin: center;
    fill: transparent;
}
.ticket-btn:hover .ticket-btn-bg,
.ticket-btn:focus .ticket-btn-bg {
    fill: var(--rust-light);
}
.ticket-btn-label {
    fill: var(--ink-muted);
    font-family: "Lora", Georgia, serif;
    font-size: 114px;
    font-weight: 600;
    pointer-events: none;
    user-select: none;
}
.ticket-btn:hover .ticket-btn-label {
    fill: var(--paper);
}

/* ─── Ticket Modal (tk-*) ───────────────────────────────────────────────────── */
.tk-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 1rem;
}
.tk-overlay::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(194, 65, 12, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(194, 65, 12, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.tk-scene {
    perspective: 2000px;
    perspective-origin: 50% 50%;
    position: relative;
}
.tk-card {
    position: relative;
    width: 550px;
    height: 300px;
    transform-style: preserve-3d;
    cursor: pointer;
    will-change: transform;
}
@keyframes tk-entrance {
    from {
        transform: scale(0.6) rotateY(30deg) rotateX(-10deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotateY(0deg) rotateX(0deg);
        opacity: 1;
    }
}
.tk-card.tk-entering {
    animation: tk-entrance 1.2s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}
@keyframes tk-page-curl {
    0% {
        transform: scale(1) rotateY(0deg) rotateX(0deg) skewY(0deg);
    }
    15% {
        transform: scale(1.03) rotateY(25deg) rotateX(3deg) skewY(-1deg);
    }
    45% {
        transform: scale(0.97) rotateY(90deg) rotateX(5deg) skewY(2deg);
    }
    75% {
        transform: scale(1.02) rotateY(148deg) rotateX(2deg) skewY(-1deg);
    }
    100% {
        transform: scale(1) rotateY(180deg) rotateX(0deg) skewY(0deg);
    }
}
@keyframes tk-page-curl-back {
    0% {
        transform: scale(1) rotateY(180deg) rotateX(0deg) skewY(0deg);
    }
    15% {
        transform: scale(1.03) rotateY(155deg) rotateX(3deg) skewY(1deg);
    }
    45% {
        transform: scale(0.97) rotateY(90deg) rotateX(5deg) skewY(-2deg);
    }
    75% {
        transform: scale(1.02) rotateY(32deg) rotateX(2deg) skewY(1deg);
    }
    100% {
        transform: scale(1) rotateY(0deg) rotateX(0deg) skewY(0deg);
    }
}
.tk-card.tk-curl-fwd {
    animation: tk-page-curl 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    cursor: default;
}
.tk-card.tk-curl-bak {
    animation: tk-page-curl-back 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.tk-card.tk-flipped {
    transform: rotateY(180deg);
    cursor: default;
}
.tk-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
}
.tk-front {
    transform: rotateY(0deg);
}
.tk-back {
    transform: rotateY(180deg);
}
.tk-clip {
    position: absolute;
    inset: 0;
    clip-path: path(
        "M 0 30 A 30 30 0 0 0 30 0 L 520 0 A 30 30 0 0 0 550 30 L 550 39 C 542 39 542 49 550 49 L 550 58 C 542 58 542 68 550 68 L 550 77 C 542 77 542 87 550 87 L 550 97 C 542 97 542 107 550 107 L 550 116 C 542 116 542 126 550 126 L 550 135 C 542 135 542 145 550 145 L 550 155 C 542 155 542 165 550 165 L 550 174 C 542 174 542 184 550 184 L 550 193 C 542 193 542 203 550 203 L 550 212 C 542 212 542 222 550 222 L 550 232 C 542 232 542 242 550 242 L 550 251 C 542 251 542 261 550 261 L 550 270 A 30 30 0 0 0 520 300 L 30 300 A 30 30 0 0 0 0 270 L 0 261 C 8 261 8 251 0 251 L 0 242 C 8 242 8 232 0 232 L 0 222 C 8 222 8 212 0 212 L 0 203 C 8 203 8 193 0 193 L 0 184 C 8 184 8 174 0 174 L 0 165 C 8 165 8 155 0 155 L 0 145 C 8 145 8 135 0 135 L 0 126 C 8 126 8 116 0 116 L 0 107 C 8 107 8 97 0 97 L 0 87 C 8 87 8 77 0 77 L 0 68 C 8 68 8 58 0 58 L 0 49 C 8 49 8 39 0 39 L 0 30 Z"
    );
}
.tk-front-bg {
    background: #faf9f5;
}
.tk-back-bg {
    background: #f5f4ed;
}
.tk-ticket-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.tk-stub {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.tk-stub-l {
    left: 28px;
}
.tk-stub-r {
    right: 28px;
}
.tk-stub span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: #999;
    font-family: "JetBrains Mono", monospace;
}
.tk-stub-l span {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
}
.tk-stub-r span {
    writing-mode: vertical-rl;
}
.tk-stub .tk-dot {
    font-size: 6px;
    opacity: 0.4;
}
.tk-stub .tk-num {
    font-size: 11px;
}
.tk-strip {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c2410c;
    font-family: "JetBrains Mono", monospace;
}
.tk-strip-top {
    top: 2px;
}
.tk-strip-bottom {
    bottom: 2px;
    transform: rotate(180deg);
}
.tk-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.tk-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #7c3009;
    opacity: 0.5;
    font-family: "JetBrains Mono", monospace;
}
.tk-label {
    font-family: "Lora", Georgia, serif;
    font-size: 32px;
    font-style: italic;
    font-weight: 700;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(
        95deg,
        #9b3a1a 0%,
        #9b3a1a 20%,
        #c4552a 30%,
        #e8a87c 50%,
        #c4552a 70%,
        #9b3a1a 100%
    );
}
.tk-hint {
    font-size: 10px;
    color: #9ca3af;
    letter-spacing: 0.1em;
    font-family: "JetBrains Mono", monospace;
}
.tk-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.tk-curl-corner {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.tk-curl-corner svg {
    width: 100%;
    height: 100%;
}
.tk-card:not(.tk-flipped):not(.tk-curl-fwd):hover .tk-curl-corner {
    opacity: 1;
}
.tk-shadow-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.tk-shadow-shape {
    width: 100%;
    height: 100%;
    clip-path: path(
        "M 0 30 A 30 30 0 0 0 30 0 L 520 0 A 30 30 0 0 0 550 30 L 550 39 C 542 39 542 49 550 49 L 550 58 C 542 58 542 68 550 68 L 550 77 C 542 77 542 87 550 87 L 550 97 C 542 97 542 107 550 107 L 550 116 C 542 116 542 126 550 126 L 550 135 C 542 135 542 145 550 145 L 550 155 C 542 155 542 165 550 165 L 550 174 C 542 174 542 184 550 184 L 550 193 C 542 193 542 203 550 203 L 550 212 C 542 212 542 222 550 222 L 550 232 C 542 232 542 242 550 242 L 550 251 C 542 251 542 261 550 261 L 550 270 A 30 30 0 0 0 520 300 L 30 300 A 30 30 0 0 0 0 270 L 0 261 C 8 261 8 251 0 251 L 0 242 C 8 242 8 232 0 232 L 0 222 C 8 222 8 212 0 212 L 0 203 C 8 203 8 193 0 193 L 0 184 C 8 184 8 174 0 174 L 0 165 C 8 165 8 155 0 155 L 0 145 C 8 145 8 135 0 135 L 0 126 C 8 126 8 116 0 116 L 0 107 C 8 107 8 97 0 97 L 0 87 C 8 87 8 77 0 77 L 0 68 C 8 68 8 58 0 58 L 0 49 C 8 49 8 39 0 39 L 0 30 Z"
    );
}
.tk-back-inner {
    position: absolute;
    inset: 0;
}
.tk-cal-wrap {
    position: absolute;
    top: 14px;
    left: 20px;
    right: 20px;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(180, 83, 9, 0.2);
    border-radius: 6px;
    overflow: hidden;
    background: #faf9f5;
}
.tk-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    background: linear-gradient(to bottom, #faf9f5, #f5f4ed);
    border-bottom: 1px solid rgba(194, 65, 12, 0.15);
    flex-shrink: 0;
}
.tk-cal-title {
    font-family: "Lora", Georgia, serif;
    font-style: italic;
    font-size: 14px;
    color: #3b1c0a;
}
.tk-cal-badge {
    font-family: "JetBrains Mono", monospace;
    font-size: 7px;
    letter-spacing: 0.18em;
    color: #c2410c;
    border: 1px solid rgba(194, 65, 12, 0.35);
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
}
.tk-fields-row {
    display: flex;
    gap: 6px;
    padding: 5px 10px;
    border-bottom: 1px solid rgba(194, 65, 12, 0.08);
    flex-shrink: 0;
}
.tk-field-input {
    flex: 1;
    min-width: 0;
    font-family: "JetBrains Mono", monospace;
    font-size: 8.5px;
    color: #3b1c0a;
    background: #fff;
    border: 1px solid rgba(180, 83, 9, 0.25);
    border-radius: 3px;
    padding: 3px 6px;
    outline: none;
    transition: border-color 0.15s;
}
.tk-field-input::placeholder {
    color: #bbb;
}
.tk-field-input:focus {
    border-color: #c2410c;
}
.tk-field-full {
    width: 100%;
}
.tk-cal-body {
    display: flex;
    flex: 1;
    min-height: 0;
}
.tk-month-panel {
    flex: 1;
    min-width: 0;
    padding: 7px 10px 5px 14px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(194, 65, 12, 0.1);
}
.tk-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.tk-month-name {
    font-family: "JetBrains Mono", monospace;
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7c3009;
}
.tk-nav {
    background: none;
    border: none;
    color: #c2410c;
    cursor: pointer;
    font-size: 13px;
    width: 17px;
    height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background 0.12s;
    line-height: 1;
    padding: 0;
}
.tk-nav:hover {
    background: rgba(194, 65, 12, 0.12);
}
.tk-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    flex: 1;
    align-content: start;
}
.tk-dow {
    font-family: "JetBrains Mono", monospace;
    font-size: 6px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #bbb;
    text-align: center;
    padding-bottom: 2px;
}
.tk-day {
    font-family: "JetBrains Mono", monospace;
    font-size: 8px;
    text-align: center;
    padding: 2px 1px;
    border-radius: 3px;
    cursor: pointer;
    color: #6b4226;
    border: 1px solid transparent;
    transition:
        background 0.1s,
        color 0.1s;
    line-height: 1.3;
    user-select: none;
}
.tk-day:empty {
    pointer-events: none;
}
.tk-day:not(:empty):not(.tk-past):hover {
    background: rgba(194, 65, 12, 0.1);
    color: #c2410c;
}
.tk-day.tk-today {
    background: rgba(194, 65, 12, 0.1);
    color: #c2410c;
    font-weight: 700;
    border-color: rgba(194, 65, 12, 0.3);
}
.tk-day.tk-selected {
    background: #c2410c;
    color: #fff;
    font-weight: 700;
    border-color: #c2410c;
}
.tk-day.tk-past {
    color: #d1c5b8;
    cursor: default;
    pointer-events: none;
}
.tk-times-panel {
    width: 88px;
    flex-shrink: 0;
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
}
.tk-times-lbl {
    font-family: "JetBrains Mono", monospace;
    font-size: 6px;
    letter-spacing: 0.2em;
    color: #bbb;
    text-transform: uppercase;
    margin-bottom: 1px;
    flex-shrink: 0;
}
.tk-slot {
    font-family: "JetBrains Mono", monospace;
    font-size: 8px;
    padding: 4px 5px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(194, 65, 12, 0.18);
    color: #7c3009;
    background: rgba(250, 249, 245, 0.6);
    cursor: pointer;
    transition: all 0.1s;
    user-select: none;
    flex-shrink: 0;
}
.tk-slot:hover {
    border-color: #c2410c;
    color: #c2410c;
    background: rgba(194, 65, 12, 0.07);
}
.tk-slot.tk-slot-sel {
    background: #c2410c;
    color: #fff;
    border-color: #c2410c;
}
.tk-slots-empty {
    font-family: "JetBrains Mono", monospace;
    font-size: 7px;
    color: #ccc;
    text-align: center;
    margin-top: 6px;
    line-height: 1.6;
}
.tk-note-row {
    padding: 4px 10px;
    border-top: 1px solid rgba(194, 65, 12, 0.08);
    flex-shrink: 0;
}
.tk-cal-footer {
    padding: 5px 14px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(194, 65, 12, 0.1);
    background: linear-gradient(to top, #faf9f5, #f5f4ed);
    flex-shrink: 0;
}
.tk-summary {
    font-family: "JetBrains Mono", monospace;
    font-size: 7px;
    letter-spacing: 0.1em;
    color: #bbb;
    transition: color 0.2s;
}
.tk-summary.tk-active {
    color: #c2410c;
}
.tk-book-btn {
    font-family: "JetBrains Mono", monospace;
    font-size: 7.5px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #9b3a1a, #c4552a);
    color: #fff;
    border: none;
    padding: 6px 11px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.35;
    pointer-events: none;
    transition:
        opacity 0.2s,
        transform 0.12s,
        box-shadow 0.15s;
}
.tk-book-btn.tk-ready {
    opacity: 1;
    pointer-events: all;
}
.tk-book-btn.tk-ready:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(155, 58, 26, 0.45);
}
.tk-flip-back {
    background: none;
    border: 1px solid rgba(194, 65, 12, 0.28);
    color: rgba(124, 48, 9, 0.7);
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.35s 0.6s,
        color 0.2s,
        background 0.2s,
        border-color 0.2s;
}
.tk-flip-back.tk-show {
    opacity: 1;
    pointer-events: all;
}
.tk-flip-back:hover {
    color: #f97316;
    background: rgba(194, 65, 12, 0.07);
    border-color: rgba(249, 115, 22, 0.5);
}

/* ─── Booking Pages ──────────────────────────────────────────────────────────── */
.book-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 640px) {
    .book-layout {
        grid-template-columns: 1fr;
    }
}
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.cal-month {
    font-family: "Lora", Georgia, serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink);
}
.cal-nav-btn {
    background: none;
    border: 1px solid var(--rule);
    color: var(--ink-muted);
    cursor: pointer;
    padding: 0.25em 0.6em;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    border-radius: 2px;
    transition: all 0.15s;
}
.cal-nav-btn:hover {
    border-color: var(--ink-muted);
    color: var(--ink);
}
.cal-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.cal-dow span {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    text-align: center;
    padding: 0.25em 0;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    border-radius: 2px;
    cursor: default;
    color: var(--ink-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.12s;
}
.cal-day.available {
    color: var(--ink);
    cursor: pointer;
    background: var(--paper-warm);
    border-color: var(--rule);
}
.cal-day.available:hover {
    background: var(--paper-dark);
    border-color: var(--ink-muted);
}
.cal-day.today {
    border-color: var(--rust);
    color: var(--rust);
}
.cal-day.selected {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.cal-day.past {
    opacity: 0.35;
    pointer-events: none;
}
.slots-container {
    margin-bottom: 2rem;
}
.slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}
.slot-btn {
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    color: var(--ink);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 2px;
    cursor: pointer;
    text-align: center;
    transition: all 0.12s;
}
.slot-btn:hover {
    background: var(--paper-dark);
    border-color: var(--ink-muted);
}
.slot-btn.selected {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.slot-empty {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: var(--ink-muted);
    padding: 1rem 0;
}
.slot-summary {
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    display: none;
}
.slot-summary.visible {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.slot-summary-text {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: var(--ink);
}
.slot-summary-change {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    color: var(--rust);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.slot-summary-change:hover {
    text-decoration: underline;
}
.booking-form {
    margin-top: 0;
}
.form-row {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    margin-bottom: 0.4rem;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--paper-warm);
    border: 1px solid var(--paper-dark);
    border-radius: 2px;
    padding: 0.6em 0.85em;
    font-family: "Crimson Pro", Georgia, serif;
    font-size: 1rem;
    color: var(--ink);
    outline: none;
    transition: border-color 0.12s;
    appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--ink-muted);
    background: var(--paper);
}
.form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}
.form-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='%237a6e62'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85em center;
    padding-right: 2em;
}
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.otp-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}
.otp-input {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.75rem;
    letter-spacing: 0.3em;
    width: 14rem;
    background: var(--paper-warm);
    border: 1px solid var(--paper-dark);
    border-radius: 2px;
    padding: 0.4em 0.7em;
    color: var(--ink);
    outline: none;
    text-align: center;
}
.otp-input:focus {
    border-color: var(--ink-muted);
}
.resend-link {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    color: var(--rust);
    text-decoration: none;
    letter-spacing: 0.04em;
}
.resend-link:hover {
    text-decoration: underline;
}
.confirm-box {
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--sage);
    border-radius: 2px;
    padding: 2rem 2rem 2rem 1.75rem;
    margin: 2rem 0;
}
.confirm-detail {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.35rem 1rem;
    align-items: baseline;
    margin-bottom: 1.5rem;
}
.confirm-detail dt {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
}
.confirm-detail dd {
    font-size: 1rem;
    color: var(--ink);
}
.confirm-value {
    font-weight: 500;
    color: var(--ink);
}
.confirm-meet {
    display: inline-block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: var(--sage);
    text-decoration: none;
    border: 1px solid var(--sage);
    padding: 0.4em 1em;
    border-radius: 2px;
    transition: all 0.12s;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}
.confirm-meet:hover {
    background: var(--sage);
    color: var(--paper);
}
.confirm-link {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    color: var(--ink-muted);
    text-decoration: none;
}
.confirm-link:hover {
    color: var(--ink);
    text-decoration: underline;
}
.status-pill {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2em 0.65em;
    border-radius: 100px;
    display: inline-block;
}
.status-confirmed {
    background: rgba(74, 103, 65, 0.12);
    color: var(--sage);
}
.status-pending {
    background: rgba(184, 134, 11, 0.12);
    color: var(--amber);
}
.status-cancelled {
    background: rgba(122, 110, 98, 0.12);
    color: var(--ink-muted);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.925rem;
}
.admin-table th {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
    text-align: left;
    padding: 0.5rem 1rem 0.5rem 0;
    border-bottom: 1px solid var(--rule);
    white-space: nowrap;
}
.admin-table td {
    padding: 0.85rem 1rem 0.85rem 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
    color: var(--ink);
}
.admin-table tr:last-child td {
    border-bottom: none;
}
.admin-action {
    background: none;
    border: 1px solid var(--rule);
    color: var(--ink-muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.65rem;
    padding: 0.3em 0.7em;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.12s;
    text-decoration: none;
    display: inline-block;
}
.admin-action:hover {
    border-color: var(--rust);
    color: var(--rust);
}
.admin-action.danger:hover {
    background: var(--rust);
    color: var(--paper);
    border-color: var(--rust);
}
.availability-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.avail-day {
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 0.75rem 0.5rem;
    text-align: center;
}
.avail-day-name {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 0.4rem;
}
.avail-time {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    color: var(--sage);
    line-height: 1.5;
}
.avail-off {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    color: var(--ink-muted);
}
.block-form {
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.block-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    align-items: end;
}
@media (max-width: 640px) {
    .block-form-grid {
        grid-template-columns: 1fr;
    }
    .availability-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.notice {
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    border-radius: 2px;
    padding: 1rem 1.25rem;
    font-size: 0.925rem;
    color: var(--ink-muted);
    margin-bottom: 1.5rem;
}
.email-highlight {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    color: var(--ink);
}
.loading {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.7rem;
    color: var(--ink-muted);
    letter-spacing: 0.05em;
}
.form-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.form-spinner svg {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── ambience and sparkle ──────────────────────────────────────────────────────────── */

@keyframes splatLife {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.05);
    }
    12% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    55% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.08);
    }
}
