/* NicheSiteHub. Fonts: Bricolage Grotesque (display), Instrument Sans (text), OFL, see /fonts. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
    --bg: #f6f3ee;
    --surface: #ffffff;
    --sunk: #efebe4;
    --ink: #17181c;
    --muted: #5f5d63;
    --line: #e3ded5;
    --accent: #ff5a36;
    --accent-ink: #c2391a;
    --ok: #138a45;
    --err: #c0321f;
    --shadow: 0 1px 2px rgba(23, 24, 28, .06), 0 10px 30px -12px rgba(23, 24, 28, .18);
    --radius: 16px;
    --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
    --text: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111216;
        --surface: #1a1b21;
        --sunk: #15161b;
        --ink: #f1efeb;
        --muted: #a5a3aa;
        --line: #2b2c34;
        --accent: #ff7556;
        --accent-ink: #ff9a80;
        --ok: #45cf7e;
        --err: #ff8a78;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -12px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, .h2, .h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4.2rem); font-weight: 750; }
h2, .h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3, .h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 520px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------- header ---------------------------------- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 750 1.15rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background:
    linear-gradient(#ff6b4a 0 0) 4px 4px / 8px 8px no-repeat, linear-gradient(#f5c84c 0 0) 14px 4px / 8px 8px no-repeat,
    linear-gradient(#4ad3b5 0 0) 4px 14px / 8px 8px no-repeat, linear-gradient(#8b7cff 0 0) 14px 14px / 8px 8px no-repeat, #17181c; }
.top-nav { display: flex; gap: 18px; font-size: .95rem; }
.top-nav a { text-decoration: none; color: var(--muted); }
.top-nav a:hover { color: var(--ink); }

/* ----------------------------------- hero ----------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% 0; z-index: -2;
    background: radial-gradient(40% 55% at 85% 20%, rgba(139, 124, 255, .35), transparent 70%),
                radial-gradient(35% 50% at 65% 85%, rgba(74, 211, 181, .30), transparent 70%),
                radial-gradient(30% 45% at 98% 75%, rgba(255, 90, 54, .28), transparent 70%),
                radial-gradient(25% 35% at 50% 10%, rgba(245, 200, 76, .25), transparent 70%); }
.hero.has-art::before { background: var(--art) center / cover no-repeat; inset: 0; }
.hero.has-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 85%, transparent) 45%, color-mix(in srgb, var(--bg) 10%, transparent) 100%); }
.hero-inner { max-width: 1200px; }
.hero h1 { max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.eyebrow { font: 600 .8rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eyebrow a { color: inherit; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--muted); max-width: 58ch; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }

/* -------------------------------- directory --------------------------------- */
.directory { padding-bottom: 56px; scroll-margin-top: 70px; }
.search { position: relative; max-width: 640px; display: flex; gap: 8px; margin-bottom: 18px; }
.search input { flex: 1; font: inherit; font-size: 1.05rem; padding: 15px 18px 15px 48px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.search input:focus { outline: none; border-color: var(--accent); }
.search-icon { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: .92rem; font-weight: 550; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font: 500 .75rem/1 var(--mono); opacity: .65; }
.result-line { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; min-height: 1.5em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 22px; }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }

.card { --c: var(--accent); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 18px 40px -16px color-mix(in srgb, var(--c) 55%, transparent); }
.card-shot { position: relative; display: block; aspect-ratio: 16 / 10; background: color-mix(in srgb, var(--c) 14%, var(--sunk)); border-bottom: 1px solid var(--line); overflow: hidden; }
.card-shot::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); z-index: 1; }
.card-shot > img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.card:hover .card-shot > img { transform: scale(1.025); }
.shot-fallback { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 45%, transparent), transparent 60%), color-mix(in srgb, var(--c) 18%, var(--sunk)); }
.shot-fallback img { width: 64px; height: 64px; border-radius: 14px; }
.shot-fallback.big { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.shot-fallback.big img { width: 96px; height: 96px; }
.ribbon { position: absolute; top: 14px; right: 12px; z-index: 1; background: var(--ink); color: var(--bg); font: 600 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 6px 9px; border-radius: 999px; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-cat { font: 600 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.card-title { font-size: 1.2rem; margin: 2px 0 0; }
.card-title a { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-logo { width: 28px; height: 28px; border-radius: 7px; }
.card-tag { color: var(--muted); margin: 0; flex: 1; }
.card-actions { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: #9a98a0; }
.status-up .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.status-down .dot { background: var(--err); box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 18%, transparent); }
.tag { font: 600 .7rem/1 var(--mono); padding: 4px 7px; border-radius: 6px; background: var(--sunk); border: 1px solid var(--line); color: var(--muted); }

/* --------------------------------- buttons ---------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .98rem/1 var(--text); padding: 13px 20px; border-radius: 12px; border: 1px solid transparent; background: var(--ink); color: var(--bg); text-decoration: none; cursor: pointer; transition: transform .12s, filter .12s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 9px 14px; font-size: .88rem; border-radius: 10px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); filter: none; }
.btn-brand { background: var(--c); color: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* -------------------------------- categories -------------------------------- */
.cats { padding-block: 24px 72px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.cat-tile { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 6px; min-height: 170px; padding: 20px; border-radius: var(--radius); text-decoration: none; color: #fff; background: var(--g); box-shadow: var(--shadow); transition: transform .18s; }
.cat-tile:hover { transform: translateY(-3px); }
.cat-tile.has-art { background: var(--art) center / cover; }
.cat-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,.55)); }
.cat-name { font: 700 1.3rem/1.1 var(--display); margin-top: auto; }
.cat-blurb { font-size: .9rem; opacity: .92; }
.cat-n { font: 600 .78rem/1 var(--mono); opacity: .9; }
.cat-ecommerce, .art-empty.cat-ecommerce { --g: linear-gradient(135deg, #ff7a59, #ffb347); }
.cat-portraits, .art-empty.cat-portraits { --g: linear-gradient(135deg, #c850c0, #ffcc70); }
.cat-real-estate, .art-empty.cat-real-estate { --g: linear-gradient(135deg, #1e3c72, #2a9d8f); }
.cat-video, .art-empty.cat-video { --g: linear-gradient(135deg, #0f0c29, #e94057); }
.cat-design, .art-empty.cat-design { --g: linear-gradient(135deg, #f7971e, #8e54e9); }
.cat-audio, .art-empty.cat-audio { --g: linear-gradient(135deg, #4a00e0, #c33764); }
.cat-food, .art-empty.cat-food { --g: linear-gradient(135deg, #b24592, #f15f79); }
.cat-developer, .art-empty.cat-developer { --g: linear-gradient(135deg, #0f2027, #2c7a7b); }
.art-empty.cat-hero { --g: linear-gradient(135deg, #8b7cff, #4ad3b5 60%, #ff6b4a); }

/* ---------------------------------- detail ---------------------------------- */
.detail-hero { --c: var(--accent); position: relative; padding: clamp(40px, 6vw, 80px) 0; background: radial-gradient(50% 70% at 85% 30%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); border-bottom: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.detail-title { display: flex; align-items: center; gap: 14px; font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: .2em; }
.detail-title img { width: 48px; height: 48px; border-radius: 12px; }
.detail-tag { font: 600 clamp(1.15rem, 2vw, 1.4rem)/1.3 var(--display); margin-bottom: .7em; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 18px; }
.detail-facts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-shots { position: relative; padding-right: 9%; padding-bottom: 6%; }
.browser { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 30px 60px -25px rgba(0,0,0,.35); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--sunk); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser-bar span { margin-left: 10px; font: .75rem/1 var(--mono); color: var(--muted); background: var(--surface); padding: 5px 10px; border-radius: 6px; flex: 1; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone { position: absolute; right: 0; bottom: 0; width: 26%; margin: 0; border-radius: 22px; overflow: hidden; border: 6px solid #17181c; background: #17181c; box-shadow: 0 25px 50px -20px rgba(0,0,0,.5); }
.phone img { aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.block { padding-block: clamp(40px, 6vw, 72px) 0; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature p { color: var(--muted); margin: 0; }
.makes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.makes li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; }
.makes span { color: var(--muted); font-size: .95rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 18px; }
.steps li { counter-increment: s; position: relative; padding: 22px 22px 22px 72px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 20px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem/1 var(--display); background: var(--ink); color: var(--bg); }
.steps p { color: var(--muted); margin: 0; }
main > .block:last-child, main > section.block:last-of-type { padding-bottom: 72px; }

/* ---------------------------------- footer ---------------------------------- */
.foot { border-top: 1px solid var(--line); background: var(--sunk); padding-top: 36px; margin-top: 24px; }
.foot-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.foot-inner p { margin-top: 10px; max-width: 34ch; }
.foot-cats { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 8px 28px; font-size: .93rem; }
.foot-cats a { color: var(--muted); text-decoration: none; }
.foot-cats a:hover { color: var(--ink); }
.foot-base { display: flex; justify-content: space-between; gap: 12px; padding-block: 24px; }

/* ---------------------------------- admin ----------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.admin { padding-bottom: 64px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; }
.admin-grid .panel { margin-bottom: 0; }
.admin-grid + .panel { margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: .92rem; }
input, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.alert { padding: 10px 14px; border-radius: 10px; margin: 12px 0; }
.alert-ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.alert-error { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.err { color: var(--err); }
.saved { color: var(--ok); }
.jobs { display: grid; gap: 12px; margin-top: 16px; }
.job-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.job { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.job progress { width: 140px; accent-color: var(--accent); }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.art-item { margin: 0; }
.art-item img, .art-empty { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.art-empty { display: grid; place-items: center; background: var(--g); color: #fff; font: .75rem var(--mono); }
.art-item figcaption { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
.table-wrap { overflow-x: auto; }
.listings { width: 100%; border-collapse: collapse; min-width: 900px; }
.listings th { text-align: left; font: 600 .75rem var(--mono); text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.listings td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.listings tr.is-hidden { opacity: .55; }
.row-app { display: flex; gap: 10px; align-items: center; min-width: 210px; }
.row-app img, .thumb-empty { width: 96px; height: 60px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line); }
.thumb-empty { display: grid; place-items: center; font-size: .7rem; color: var(--muted); }
.row-app div { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.row-form { display: flex; align-items: center; gap: 10px; }
.row-text { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 260px; }
.row-form .num { width: 76px; }
.check { display: inline-flex; width: 64px; justify-content: center; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

@media (max-width: 600px) {
    .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding: 2px 20px 6px; scrollbar-width: none; }
    .chips::-webkit-scrollbar { display: none; }
    .chip { flex: none; }
}
@media (max-width: 860px) {
    .detail-grid { grid-template-columns: 1fr; }
    .top-nav a:not(:first-child) { display: none; }
}
