:root {
    --black: #111;
    --graphite: #1b1b1b;
    --graphite-2: #272727;
    --red: #f20d18;
    --red-dark: #bd0710;
    --red-soft: rgba(242, 13, 24, .09);
    --white: #fff;
    --paper: #f3f3f3;
    --ink: #242424;
    --muted: #717171;
    --line: #dedede;
    --container: 1180px;
    --shadow: 0 18px 55px rgba(0, 0, 0, .085);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: 7px; left: 7px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--red); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.search-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: rgba(24, 24, 24, .98);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
    backdrop-filter: blur(14px);
}
.header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { width: 38px; height: 38px; display: block; object-fit: contain; border-radius: 6px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 16px; letter-spacing: .1px; }
.brand-copy small { margin-top: 5px; color: #cacaca; font-size: 8px; font-weight: 750; letter-spacing: 1.4px; text-transform: uppercase; }
.search-header nav { display: flex; align-items: center; gap: 9px; }
.header-link, .header-cta { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border-radius: 7px; font-size: 10px; font-weight: 850; letter-spacing: .5px; text-transform: uppercase; }
.header-link { color: #ddd; border: 1px solid rgba(255,255,255,.13); }
.header-cta { color: #fff; background: var(--red); }
.header-link:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.header-cta:hover { background: #ff2530; }

.search-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 78px;
    color: #fff;
    background: radial-gradient(circle at 82% 28%, rgba(242,13,24,.25), transparent 26%), linear-gradient(125deg, #111, #222 68%, #151515);
}
.grid-pattern { position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to right, transparent, #000 54%, transparent); }
.hero-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: end; gap: 70px; }
.eyebrow { margin: 0 0 16px; color: #ff5059; font-size: 10px; font-weight: 900; letter-spacing: 2.1px; }
.search-hero h1, .empty-results h2 { max-width: 780px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(41px, 5vw, 64px); font-weight: 400; line-height: 1.07; letter-spacing: -.035em; }
.search-hero h1 em { color: #ff5059; }
.hero-text { max-width: 740px; margin: 22px 0 0; color: #c8c8c8; font-size: 15px; line-height: 1.7; }
.hero-note { display: grid; gap: 8px; padding: 22px; border: 1px solid rgba(255,255,255,.13); border-left: 3px solid var(--red); border-radius: 11px; background: rgba(255,255,255,.035); }
.hero-note span { color: #ff555e; font-size: 8px; font-weight: 900; letter-spacing: 1.5px; }
.hero-note strong { font-size: 13px; line-height: 1.45; }
.hero-note small { color: #a7a7a7; font-size: 9px; line-height: 1.5; }

.search-area { padding: 0 0 86px; }
.filter-card { position: relative; z-index: 3; margin-top: -28px; overflow: hidden; border: 1px solid #dadada; border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.filter-heading { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 24px; color: #fff; background: var(--graphite); }
.filter-heading > div { display: grid; gap: 4px; }
.filter-heading span { color: #ff535c; font-size: 8px; font-weight: 900; letter-spacing: 1.5px; }
.filter-heading strong { font-family: Georgia, serif; font-size: 18px; font-weight: 400; }
.filter-heading a { color: #ddd; font-size: 9px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.filters-grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr) auto; align-items: end; gap: 15px; padding: 22px 24px 25px; }
.filters-grid label { min-width: 0; display: grid; gap: 7px; }
.filters-grid label > span { color: #4d4d4d; font-size: 9px; font-weight: 850; }
.filters-grid input, .filters-grid select { width: 100%; min-height: 45px; padding: 0 12px; color: #272727; border: 1px solid #d6d6d6; border-radius: 7px; outline: none; background: #fafafa; }
.filters-grid input:focus, .filters-grid select:focus { border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px var(--red-soft); }
.filters-grid button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; color: #fff; border: 0; border-radius: 7px; background: linear-gradient(135deg, #ff252f, var(--red-dark)); cursor: pointer; font-size: 9px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }

.result-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 48px 2px 23px; border-bottom: 1px solid #d8d8d8; }
.result-heading > div { display: grid; gap: 7px; }
.result-heading span { color: var(--red); font-size: 8px; font-weight: 900; letter-spacing: 1.6px; }
.result-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 29px; font-weight: 400; }
.result-heading p { margin: 0; color: #818181; font-size: 9px; }

.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-top: 24px; }
.agency-card { position: relative; min-width: 0; display: flex; flex-direction: column; padding: 25px; border: 1px solid #ddd; border-radius: 13px; background: #fff; box-shadow: 0 10px 35px rgba(0,0,0,.045); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.agency-card:hover { transform: translateY(-3px); border-color: #c7c7c7; box-shadow: 0 18px 45px rgba(0,0,0,.085); }
.agency-card.featured { border-top: 3px solid var(--red); padding-top: 23px; }
.agency-top { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 16px; }
.agency-logo, .agency-initials { width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid #dedede; border-radius: 12px; background: #f0f0f0; object-fit: cover; }
.agency-initials { color: #fff; border: 0; background: linear-gradient(145deg, #333, #161616); font-family: Georgia, serif; font-size: 25px; }
.agency-identity { min-width: 0; }
.featured-badge { display: inline-flex; margin-bottom: 6px; padding: 4px 7px; color: #fff; border-radius: 4px; background: var(--red); font-size: 7px; font-weight: 900; letter-spacing: 1px; }
.agency-identity h3 { overflow-wrap: anywhere; margin: 0; font-family: Georgia, serif; font-size: 21px; font-weight: 400; line-height: 1.15; }
.agency-identity p { margin: 8px 0 0; color: #7b7b7b; font-size: 9px; line-height: 1.45; }
.agency-description { min-height: 68px; margin: 22px 0 20px; color: #626262; font-size: 11px; line-height: 1.58; }
.tag-group { margin-top: 14px; }
.tag-group > strong { display: block; margin-bottom: 8px; color: #909090; font-size: 7px; font-weight: 900; letter-spacing: 1.2px; }
.tag-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-group span { padding: 6px 8px; color: #4b4b4b; border: 1px solid #e0e0e0; border-radius: 5px; background: #f8f8f8; font-size: 8px; line-height: 1.2; }
.segment-tags span { color: #9f1b23; border-color: #f2cdd0; background: #fff4f5; }
.agency-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 22px; }
.agency-actions a { min-height: 35px; display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; color: #555; border: 1px solid #d5d5d5; border-radius: 6px; background: #fafafa; font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .35px; }
.agency-actions .main-action { flex: 1 0 100%; justify-content: space-between; color: #fff; border-color: var(--red); background: var(--red); }

.empty-results { max-width: 760px; margin: 53px auto 0; padding: 55px 48px; text-align: center; border: 1px solid #ddd; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.empty-symbol { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 22px; color: #fff; border-radius: 17px; background: linear-gradient(145deg, #333, #111); font-size: 24px; font-weight: 900; }
.empty-results h2 { font-size: clamp(34px, 5vw, 49px); }
.empty-results > p:not(.eyebrow) { max-width: 600px; margin: 19px auto 0; color: #6e6e6e; font-size: 12px; line-height: 1.7; }
.empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border-radius: 7px; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.button.primary { color: #fff; background: var(--red); }
.button.secondary { color: #4b4b4b; border: 1px solid #ccc; background: #fafafa; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 30px; }
.pagination a { padding: 10px 13px; color: #fff; border-radius: 6px; background: var(--graphite); font-size: 9px; font-weight: 850; }
.pagination span { color: #747474; font-size: 9px; }

.contact-band { color: #fff; background: var(--graphite); border-top: 4px solid var(--red); }
.contact-grid { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.contact-grid > div { display: flex; align-items: center; gap: 18px; }
.contact-grid > div:first-child { display: grid; gap: 5px; }
.contact-grid small { color: #ff555d; font-size: 8px; font-weight: 900; letter-spacing: 1.5px; }
.contact-grid h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.contact-grid > div:last-child > a:first-child { font-size: 20px; font-weight: 800; }
.contact-button { min-height: 42px; display: inline-flex; align-items: center; gap: 12px; padding: 0 15px; border-radius: 7px; background: var(--red); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.search-footer { padding: 25px 0; color: #909090; background: var(--black); }
.search-footer .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 8px; letter-spacing: .5px; text-transform: uppercase; }

@media (max-width: 1080px) {
    .filters-grid { grid-template-columns: repeat(3, 1fr); }
    .wide-field { grid-column: span 2; }
    .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .container { width: min(var(--container), calc(100% - 26px)); }
    .header-inner { min-height: 60px; }
    .brand img { width: 34px; height: 34px; }
    .brand-copy strong { font-size: 14px; }
    .header-link { display: none; }
    .header-cta { padding: 0 10px; font-size: 8px; }
    .search-hero { padding: 55px 0 66px; }
    .hero-layout { grid-template-columns: 1fr; gap: 28px; }
    .search-hero h1 { font-size: 41px; }
    .hero-note { max-width: 520px; }
    .filters-grid { grid-template-columns: 1fr 1fr; padding: 19px 16px 21px; }
    .wide-field { grid-column: 1 / -1; }
    .filters-grid button { grid-column: 1 / -1; }
    .result-heading { align-items: flex-start; flex-direction: column; padding-top: 37px; }
    .results-grid { grid-template-columns: 1fr; }
    .agency-description { min-height: 0; }
    .empty-results { padding: 42px 22px; }
    .contact-grid, .contact-grid > div:last-child { align-items: flex-start; flex-direction: column; }
    .contact-grid { justify-content: center; padding: 35px 0; }
    .search-footer .container { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 460px) {
    .filters-grid { grid-template-columns: 1fr; }
    .wide-field, .filters-grid button { grid-column: auto; }
    .filter-heading { padding-inline: 16px; }
    .agency-card { padding: 20px; }
    .agency-top { grid-template-columns: 62px 1fr; }
    .agency-logo, .agency-initials { width: 62px; height: 62px; }
    .agency-actions a { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
