/* ==========================================================================
   Nearest Plug — base layer
   Design tokens, reset, typography and layout primitives shared by every page.
   ========================================================================== */

:root {
    /* ---- Brand ---------------------------------------------------------- */
    --ink-950: #08110d;
    --ink-900: #0b1712;
    --ink-800: #10211a;
    --ink-700: #1a2e25;
    --ink-600: #2b4237;

    --accent: #b7f34a;
    --accent-strong: #a8e83f;
    --accent-soft: #f1fadf;
    --accent-text: #3f6f0d;          /* accent hue, dark enough for text on light surfaces */
    --mint: #4ade80;
    --emerald: #34d399;

    /* ---- Neutrals ------------------------------------------------------- */
    --bg: #f4f7f5;
    --bg-alt: #f7f9f8;
    --surface: #ffffff;
    --surface-muted: #eef3f0;
    --text: #122019;
    --text-muted: #5f6c66;
    --text-on-dark: #f3f7f4;
    --text-on-dark-muted: rgba(243, 247, 244, 0.72);
    --border: #dde5e1;
    --border-strong: #c4cfc9;
    --border-on-dark: rgba(255, 255, 255, 0.1);

    /* ---- Operational status --------------------------------------------- */
    --status-working: #22c55e;
    --status-busy: #f4b942;
    --status-maintenance: #f97316;
    --status-offline: #ef4444;
    --status-closed: #737d78;
    --status-unknown: #64748b;

    /* ---- Focus ---------------------------------------------------------- */
    --focus-ring: #2f6b0a;

    /* ---- Typography ----------------------------------------------------- */
    --font-sans: "Inter", "Manrope", "Plus Jakarta Sans", system-ui, -apple-system,
        "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

    --fs-xs: 0.8125rem;   /* 13px — metadata, minimum for content text */
    --fs-sm: 0.875rem;    /* 14px */
    --fs-base: 1rem;      /* 16px */
    --fs-md: 1.125rem;    /* 18px */
    --fs-lg: 1.25rem;     /* 20px */
    --fs-xl: 1.5rem;      /* 24px */
    --fs-2xl: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
    --fs-3xl: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem);
    --fs-display: clamp(2.6rem, 1.6rem + 4.4vw, 4.5rem);

    --lh-tight: 1.1;
    --lh-snug: 1.3;
    --lh-body: 1.6;

    /* ---- Spacing scale -------------------------------------------------- */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --sp-8: 64px;
    --sp-9: 96px;

    /* ---- Radii ---------------------------------------------------------- */
    --r-control: 10px;
    --r-input: 12px;
    --r-card: 18px;
    --r-feature: 26px;
    --r-pill: 999px;

    /* ---- Shadows -------------------------------------------------------- */
    --shadow-sm: 0 1px 2px rgba(8, 17, 13, 0.06);
    --shadow-md: 0 10px 30px -12px rgba(8, 17, 13, 0.18);
    --shadow-lg: 0 30px 70px -30px rgba(8, 17, 13, 0.35);

    /* ---- Layout --------------------------------------------------------- */
    --container: 1240px;
    --container-narrow: 760px;
    --gutter: clamp(16px, 3.5vw, 44px);
    --header-h: 68px;

    /* ---- Motion --------------------------------------------------------- */
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --t-fast: 140ms var(--ease);
    --t-base: 220ms var(--ease);
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

* {
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

main {
    flex: 1 0 auto;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

input,
button,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-underline-offset: 0.18em;
}

h1,
h2,
h3,
h4 {
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
    font-weight: 700;
    overflow-wrap: break-word;
    text-wrap: balance;
}

p {
    overflow-wrap: break-word;
    text-wrap: pretty;
}

ul[role="list"],
ol[role="list"] {
    list-style: none;
    padding: 0;
}

table {
    border-collapse: collapse;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--accent);
    color: var(--ink-950);
}

/* ==========================================================================
   Focus
   ========================================================================== */

:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

.on-dark,
.site-header,
.site-footer,
.page-hero {
    --focus-ring: var(--accent);
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.container--narrow {
    max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

.section {
    padding-block: clamp(56px, 7vw, 96px);
}

.section--tight {
    padding-block: clamp(40px, 5vw, 64px);
}

.section--surface {
    background: var(--surface);
    border-block: 1px solid var(--border);
}

.section--dark {
    background: var(--ink-950);
    color: var(--text-on-dark);
}

.stack > * + * {
    margin-top: var(--stack-gap, var(--sp-4));
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: absolute;
    inset-inline-start: var(--sp-4);
    top: -100px;
    z-index: 2000;
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-control);
    background: var(--accent);
    color: var(--ink-950);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: var(--sp-3);
}

.tabular {
    font-variant-numeric: tabular-nums;
}

.text-muted {
    color: var(--text-muted);
}

.wrap-anywhere {
    overflow-wrap: anywhere;
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
