/* ==========================================================================
   Evefab Engineering Tools — directory page
   Scoped under .etools so nothing leaks into the shared theme.

   Direction: measured, exact, workshop-worn.
   World: blueprint paper, calipers and a machined part drawing.
   The line drawing of a dimensioned part is the one visual moment; the hero
   has no grid, no gradient rule and no coloured glow behind it.
   ========================================================================== */

.etools {
    /* neutral ramp, tinted toward blueprint ink */
    --et-bg: #f5f7f9;
    --et-surface: #ffffff;
    --et-raised: #edf1f5;
    --et-line: rgba(17, 28, 41, .10);
    --et-line-soft: rgba(17, 28, 41, .06);
    --et-ink: #16212e;
    --et-ink-2: #4a5868;
    --et-ink-3: #6c7989;

    --et-night: #121b27;
    --et-night-2: #1b2634;
    --et-on-night: #f2f5f9;
    --et-on-night-2: #b9c6d6;
    --et-on-night-3: #8d9cb0;
    --et-night-line: rgba(242, 245, 249, .14);

    --et-accent: #1b5aa8;
    --et-accent-deep: #14467f;
    --et-accent-soft: #e9f0f8;

    --et-r-ctl: 8px;
    --et-r-card: 12px;
    --et-r-panel: 16px;
    --et-ease: cubic-bezier(.22, 1, .36, 1);
    --et-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

    color: var(--et-ink);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.etools * { box-sizing: border-box; }

.etools h1,
.etools h2,
.etools h3,
.etools h4 {
    color: var(--et-ink);
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

/* ---------------------------------------------------------------- hero --- */
.et-hero {
    position: relative;
    background: var(--et-night);
    border-bottom: 1px solid var(--et-night-line);
    color: var(--et-on-night);
    padding: 80px 0 72px;
}
.et-hero .container { position: relative; }
.et-hero-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}
.et-hero-copy { flex: 1 1 520px; min-width: 0; }
.et-eyebrow {
    margin: 0 0 12px;
    color: var(--et-ink-3);
    font-family: var(--et-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
.et-hero .et-eyebrow { color: var(--et-on-night-3); }
.et-hero h1 {
    margin: 0 0 16px;
    max-width: 16em;
    color: var(--et-on-night);
    font-size: clamp(28px, 3.6vw, 40px);
    line-height: 1.18;
}
.et-lead {
    margin: 0 0 32px;
    max-width: 48em;
    color: var(--et-on-night-2);
    font-size: 15px;
    line-height: 1.7;
}
.et-hero-art { flex: 0 1 420px; max-width: 100%; }
.et-hero-art svg { width: 100%; height: auto; display: block; }
/* Two drawing inks: part outline and dimension lines. The SVG content is
   untouched; only its stroke colours are restyled to belong to this palette. */
.et-hero-art svg [stroke="#4a6184"],
.et-hero-art svg [stroke="#5b7396"],
.et-hero-art svg [stroke="#46587a"] { stroke: #71869f; }
.et-hero-art svg [stroke="#3f8ae8"] { stroke: #9db9db; }
.et-hero-art svg [fill="#9fb5d4"] { fill: #a5bace; font-family: var(--et-mono); }

/* search */
.et-search { position: relative; max-width: 520px; }
.et-search label {
    display: block;
    margin-bottom: 8px;
    color: var(--et-on-night-3);
    font-family: var(--et-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
.et-search input {
    width: 100%;
    height: 44px;
    padding: 0 104px 0 16px;
    border: 1px solid var(--et-night-line);
    border-radius: var(--et-r-ctl);
    background: var(--et-night-2);
    color: var(--et-on-night);
    font-size: 14px;
    outline: none;
    transition: border-color 160ms var(--et-ease);
}
.et-search input::placeholder { color: var(--et-on-night-3); }
.et-search input:focus { border-color: #7fa8d8; outline: 2px solid rgba(157, 185, 219, .2); outline-offset: 1px; }
.et-search button {
    position: absolute;
    top: 4px; right: 4px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--et-surface);
    color: var(--et-ink);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 160ms var(--et-ease);
}
.et-search button:hover { background: var(--et-raised); }
.et-search button:focus-visible { outline: 2px solid #9db9db; outline-offset: 2px; }

/* --------------------------------------------------------------- stats --- */
.et-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--et-night-line);
}
.et-stat strong {
    display: block;
    color: var(--et-on-night);
    font-family: var(--et-mono);
    font-size: 28px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.et-stat span {
    display: block;
    margin-top: 8px;
    color: var(--et-on-night-3);
    font-family: var(--et-mono);
    font-size: 12px;
}

/* ----------------------------------------------------------- directory --- */
.et-section { padding: 64px 0; }
.et-section--soft { background: var(--et-bg); }
.et-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}
.et-section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(21px, 2.4vw, 28px);
    line-height: 1.25;
}
.et-section-head p { margin: 0; color: var(--et-ink-3); max-width: 56em; font-size: 14px; line-height: 1.7; }
.et-section-head .et-eyebrow { color: var(--et-ink-3); }

/* A count is quiet mono text, not a glowing pill. */
.et-count {
    color: var(--et-ink-3);
    font-family: var(--et-mono);
    font-size: 12px;
    white-space: nowrap;
}

/* filters */
.et-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}
.et-filter {
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--et-line);
    border-radius: var(--et-r-ctl);
    background: var(--et-surface);
    color: var(--et-ink-2);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 160ms var(--et-ease), border-color 160ms var(--et-ease), color 160ms var(--et-ease);
}
.et-filter:hover { border-color: rgba(17, 28, 41, .22); color: var(--et-ink); }
.et-filter.is-active {
    border-color: var(--et-night);
    background: var(--et-night);
    color: var(--et-on-night);
}
.et-filter:focus-visible { outline: 2px solid var(--et-accent); outline-offset: 2px; }

/* groups */
.et-group { margin-bottom: 48px; }
.et-group:last-child { margin-bottom: 0; }
.et-group-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--et-line);
    font-size: 16px;
    font-weight: 500;
}
.et-group-title small {
    color: var(--et-ink-3);
    font-family: var(--et-mono);
    font-size: 12px;
    font-weight: 400;
}
.et-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.et-card {
    position: relative;
    display: flex;
    gap: 16px;
    height: 100%;
    padding: 20px 24px;
    border: 1px solid var(--et-line);
    border-radius: var(--et-r-card);
    background: var(--et-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color 160ms var(--et-ease), background-color 160ms var(--et-ease);
}
/* Hover is a surface step, not a lift or a coloured shadow. */
.et-card:hover {
    border-color: rgba(17, 28, 41, .22);
    background: var(--et-raised);
    color: inherit;
    text-decoration: none;
}
.et-card:focus-visible { outline: 2px solid var(--et-accent); outline-offset: 2px; }
.et-card.is-hidden { display: none; }
.et-card h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
.et-card p { margin: 0; color: var(--et-ink-3); font-size: 13px; line-height: 1.65; }
.et-card-arrow {
    flex: 0 0 auto;
    align-self: center;
    width: 16px;
    color: var(--et-ink-3);
    font-family: var(--et-mono);
    font-size: 16px;
    line-height: 1;
    text-align: center;
    transition: color 160ms var(--et-ease);
}
.et-card:hover .et-card-arrow { color: var(--et-accent-deep); }

.et-empty {
    padding: 32px;
    border: 1px solid var(--et-line);
    border-radius: var(--et-r-card);
    background: var(--et-surface);
    color: var(--et-ink-3);
    font-size: 13px;
    text-align: center;
}

/* how to use */
.et-howto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.et-howto article {
    padding: 24px;
    border: 1px solid var(--et-line);
    border-radius: var(--et-r-card);
    background: var(--et-surface);
}
.et-howto h3 { margin: 0 0 12px; font-size: 16px; line-height: 1.4; }
.et-howto p { margin: 0; color: var(--et-ink-3); font-size: 13px; line-height: 1.7; }
/* Step numbers are quiet annotations, not coloured badges. */
.et-howto .et-step {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--et-ink-3);
    font-family: var(--et-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
}

/* notice */
.et-notice {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding: 16px 20px;
    border: 1px solid var(--et-line);
    border-radius: var(--et-r-card);
    background: var(--et-surface);
    color: var(--et-ink-2);
    font-size: 13px;
    line-height: 1.7;
}
.et-notice > span { color: var(--et-ink-3); font-family: var(--et-mono); }
.et-notice strong { color: var(--et-ink); font-weight: 500; }

/* cta */
.et-cta {
    padding: 64px 0;
    background: var(--et-night);
    color: var(--et-on-night);
}
.et-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.et-cta h2 { margin: 0 0 8px; color: var(--et-on-night); font-size: clamp(20px, 2.4vw, 24px); }
.et-cta p { margin: 0; color: var(--et-on-night-2); max-width: 48em; font-size: 14px; line-height: 1.7; }
.etools .et-cta .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 20px;
    border: 1px solid var(--et-night-line);
    border-radius: var(--et-r-ctl);
    background: var(--et-surface);
    color: var(--et-ink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 160ms var(--et-ease);
}
.etools .et-cta .btn:hover { background: var(--et-raised); color: var(--et-ink); }

/* responsive */
@media (max-width: 991px) {
    .et-hero { padding: 56px 0 48px; }
    .et-hero-art { display: none; }
    .et-section { padding: 48px 0; }
}
@media (max-width: 575px) {
    .et-stats { gap: 24px; }
    .et-stat strong { font-size: 24px; }
    .et-search button { padding: 0 12px; }
    .et-group-grid { grid-template-columns: 1fr; }
}
